Postures by Emily Short

Inspired by this post, I’ve made a pull request to the Extensions Github repository with an updated version of this extension:

github.com/i7/extensions/pull/47

Any comments are very welcome. I’ll just copy my thoughts from the PR description here:

I’m not sure what the best way is to handle responses about actions taken by NPC:s. More or less every message printed in the current code is preceded by checking “if the actor is visible,” which doesn’t seem very elegant and could potentially be slow. In the standard rules, the more common check seems to be “if the actor is the player” and then printing nothing if the actor isn’t.

But I think it is nice to get a more detailed response, such as “Clark is already standing on the folding chair,” rather than just “Clark is unable to do that,” and all those “if the actor is visible” seem to be the simplest way to achieve that without having to write a lot of separate rules just to print basically the same response.

The “convert lying down rule,” “convert sitting down rule” and “convert standing up rule” used to end with success or failure, but I’ve found that if I print a failure message such as “There [are] nothing [here] to sit on,” I have to return success, otherwise there will be a second response printed:

[code]>Clark, sit
There is nothing here to sit on.

Clark is unable to do that.[/code]
This means that the rules will now always end in success, which makes all those “rule succeeds” lines a little redundant.