Hey all. I’m attempting the sectioning off of a room into multiple areas, similar to what zarf used in Shade. The problem is, I feel as if I’m failing to see the forest for all the trees. It is as if I’m overlooking obvious solutions.
Hopefully, the code below illustrates things. How can it be improved, and are there any bugs I have missed?
Rule for printing the name of a room: say "[printed name in title case]" instead.
An area is a kind of thing.
the window is an area.
the middle of the room is an area.
the wall is an area.
the doorway is an area.
Placement relates various things to one area. The verb to be situated in implies the placement relation. The verb to grant (it grants, she is granting) implies the reversed placement relation.
[a kludge, yes. "It grants" not expressive at all, but I was at a loss as to what else to call it.]
The tacky sofa and the cushy chair are enterable containers.
The hardwood table and the windowsill are enterable supporters.
The bookcase is a container.
The sofa, the chair and the table are situated in the middle of the room.
The bookcase is situated in the wall.
The windowsill is situated in the window.
The player is situated in the doorway.
Before doing something when the action requires a touchable noun:
consider the implicitly pass through other barriers rule;
let M be a random area granting the noun;
let N be a random area granting the actor;
if M is not N:
now the actor is not situated in an area;
now the actor is situated in M;
say "You cross over to [the M].".
The lounge is a room.
The sofa, the chair, the table, the bookcase and the windowsill are in the lounge.
Any takers? hopeful smile