Hi intfiction.org! This is my first post here, so please bear with me.
I’m new to Inform 7 and am trying to implement chairs. I know there are extensions for chairs, but I’m doing this more as a learning exercise than anything else.
Here’s what I’ve got so far:
[code]“Chairs” by Stephen Ware
A chair is a kind of supporter. It is always enterable.
Report entering a chair (this is the report sitting in a chair rule):
say “You sit.”;
The report sitting in a chair rule is listed first in the report entering rulebook.
Report getting off a chair (this is the report standing up from a chair rule):
say “You stand up.”;
The report standing up from a chair rule is listed first in the report getting off rulebook.
Check an actor going when the actor is on a chair (this is the stand up from a chair before going rule):
say “(first standing up)[paragraph break]”;
silently try the actor exiting.
The stand up from a chair before going rule is listed first in the check going rules.
Understand “sit in [thing]” as entering.
Understand “sit down in [thing]” as entering.
Understand “sit [thing]” as entering.
Understand “get up from [thing]” as getting off.
The Patio is a room. “The front patio of your house is sparsely furnished, much like the house itself, which lies to the south.”.
The Foyer is south of the The Patio. “The foyer is small and empty.”.
the white plastic chair is a chair in The Patio. “Your one piece of patio furniture, a white plastic chair, is here.”.[/code]
Test with: sit in chair / look / get up from chair / sit in chair / go south
It’s working mostly they way I want it to, except for one problem: When you sit in a chair and “look,” the room description is:
"Patio (on the white plastic chair)".
I know this probably seems really stupidly minor, but I would like it to read:
Patio (in the white plastic chair)
How difficult is it to change the preposition “on” to “in” when the player is sitting in a chair?
I know that “on” is perfectly acceptable from a grammar point of view. This is not my actual game. The actual game is larger and being able to change these prepositions will matter; this is just a stripped-down example so that I could ask for feedback.
Any help is appreciated, and thanks to those who helped me get this far on the MUD.