Doors with one side open and the other side closed
Opened this issue · 1 comments
This is going to take a bit of explaining, so I'll start with a partial map:
+----------------+
| Assembly Room |
| NEROOM |--
+----------------+ \
| +------------+
| | Front Deck |
| | ON-PORCH |
| +------------+
+----------------+ /
| Southeast Room |--
| SEROOM |
+----------------+
There are actually two doors between NEROOM
and ON-PORCH
. From NEROOM
it will check if NEROOM-DOOR
is open. From ON-PORCH
it will check if RIGHT-DOOR
is open. Similarly, the passage between SEROOM
and ON-PORCH
has both SEROOM-DOOR
and LEFT-DOOR
.
It's probably done this way because the names "right door" and "left door" only make sense from ON-PORCH
. But that makes it vitally important that the state of the door pairs are consistent. And for instance RIGHT-DOOR-F
has this piece of code:
(<AND <VERB? OPEN OPEN-WITH>
<EQUAL? ,PRSI <> ,HANDS>
<NOT <IS? ,PRSO ,OPENED>>>
<MAKE ,NEROOM-DOOR ,OPENED>
<RFALSE>)
(<AND <VERB? CLOSE>
<EQUAL? ,PRSI <> ,HANDS>
<IS? ,PRSO ,OPENED>>
<UNMAKE ,NEROOM-DOOR ,OPENED>
<RFALSE>)
I.e. opening or closing RIGHT-DOOR
will silently open or close NEROOM-DOOR
, before leaving it to V-OPEN
and V-CLOSE
to open/close RIGHT-DOOR
. But it doesn't check that NEROOM-DOOR
actually opens or closes. The CLOSE
action doesn't have a PRSI
as far as I can tell, so that shouldn't be a problem. But the OPEN-WITH
action will.
However, V-OPEN-WITH
does not open doors, so if you can trigger NEROOM-DOOR
to open that way, you'll have a door that's open from one side and closed from the other:
>LOOK
Assembly Room
Whoever used this room was paranoid about dirt. The floor is swept spotless, and
the edges of both windows are carefully sealed with tape. A closed front door
leads east, and there's an open closet door in the north wall. Other exits lead
south and west.
A workbench covered with loose sheets of brown paper runs along the north wall.
You see bits of wire and other debris scattered across the paper.
>EAST
The front door is closed.
>SOUTH
Southeast Room
>EAST
Front Deck
>NW
The right door is closed.
>OPEN RIGHT DOOR WITH HANDS
You can't open the right door with your hand.
>SW
Southeast Room
>N
Assembly Room
A workbench covered with loose sheets of brown paper runs along the north wall.
You see bits of wire and other debris scattered across the paper.
>EAST
Front Deck
To summarize, the simplest fix would be to remove the case for OPEN-WITH
since it seems that it will never open the RIGHT-DOOR
. That means it's no longer necessary to check PRSI
, and for CLOSE
it was never necessary in the first place. As far as I can see, these door are the only ones with this bug, so that means the following action routine would have to be fixed:
LEFT-DOOR-F
RIGHT-DOOR-F
NEROOM-DOOR-F
SEROOM-DOOR-F