the-infocom-files / trinity

Trinity
24 stars 5 forks source link

"LEAVE SCAFFOLD" doesn't work correctly #64

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Scaffold

Whoever threw this place together wasn't too worried about permanence. Tin walls
rise on flimsy studs to a ceiling that sags under its own weight. It reminds you
of a prefab tool shed, several stories high.

You're standing beside a monstrous conglomeration of pipes, compressors and
pressure valves that fills most of the building. The only familiar equipment is
the open white door set into one of the storage tanks.

A stairway leads downward.

>LEAVE SCAFFOLD
You're not on the scaffold.

>DOWN
You descend the stairway.

Bottom of Scaffold

A maze of plumbing rises before you like the back of a giant refrigerator.
Stairs lead up to a scaffold overlooking the equipment. Turning south, you see a
closed set of sliding doors, with a small box and a loudspeaker mounted on the
wall beside them.

>LEAVE SCAFFOLD
There's no exit that way.

That's because SCAFFOLD-F does this:

           (<OR <EXITING?>
            <VERB? CLIMB-DOWN>>
        <COND (<ZERO? .ON>
               <DO-WALK ,P?DOWN>
               <RTRUE>)>
        <NOT-IN ,SCAFFOLD T>
        <RTRUE>)

I.e. it walks down if you're not on the scaffold. This is the opposite of what it should be doing. To be consistent with other code, we should simply swap the lines <DO-WALK ,P?DOWN> and <NOT-IN ,SCAFFOLD T>, rather than changing the condition. Compare this to GARDEN-F, just as an example:

           (<EXITING?>
        <COND (<ZERO? .IN>
               <NOT-IN>
               <RTRUE>)>
        <DO-WALK ,P?WEST>
        <RTRUE>)