the-infocom-files / starcross

Starcross
5 stars 3 forks source link

"GO THROUGH DOOR" doesn't work right in the Starcross #71

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Bridge
This is the control room of the Starcross. There are exits labelled
(arbitrarily) "Port," "Starboard," and "Out." The latter exit has a heavy
bulkhead which is closed.
Your ship's computer does the routine tasks of navigation and life support. A
control couch is mounted before a control panel and a large viewport. The ship's
registration is affixed nearby.
Your mass detector, essential in the search for black holes, sits to one side.
On the detector are a red button, a blue button, and a small screen on which
something is displayed.
Taped to the wall is a slightly faded instruction sheet for the computer.

>EXAMINE DOOR
The inner door is closed.

>GO THROUGH DOOR
Storage
This cubicle is used for storage. The only exit is to port.
Hanging on a rack is your space suit.
A safety line hangs on the wall.
>LOOK
Airlock
This is the airlock of the Starcross. The inner door is open, and the outer door
is closed. Neither door has a viewport.

>GO THROUGH INNER DOOR
You can't go that way.

>TIE LINE TO SUIT
>OPEN OUTER DOOR
The outer door opens and air rushes out of the airlock. Outside the airlock is
deep space. Beside the airlock is a safety hook to prevent you from drifting
away into space.

>TIE LINE TO SUIT
Attached to the space suit.

>TIE LINE TO HOOK
Attached to the hook.

>GO THROUGH OUTER DOOR
The safety line prevents you from leaving, as it is only about five meters long.
You must detach it to leave.

>OUT
Outside Ship
You are floating outside the Starcross. The airlock door is open. One end of
your safety line is attached to a hook next to the airlock. This is deep space,
outside the plane of the ecliptic and far beyond the orbit of Earth. The sun
seems small but still intolerably bright to look at directly.
You see the emptiness of space.

That's because of this bit in AIRLOCK-DOORS-FCN:

<ROUTINE AIRLOCK-DOORS-FCN ("AUX" DIR)
     <COND (<VERB? THROUGH>
        <COND (<==? ,HERE ,SPACESHIP-AIRLOCK>
               <COND (<==? ,PRSO ,AIRLOCK-INNER>
                  <SET DIR ,P?WEST>)
                 (ELSE <SET DIR ,P?UP>)>)
              (<==? ,PRSO ,AIRLOCK-INNER>
               <SET DIR ,P?EAST>)
              (ELSE <SET DIR ,P?DOWN>)>
        <DO-WALK .DIR>
        <RTRUE>)

So going through the inner door goes west from the airlock and east from the bridge.

To walk from the bridge to the airlock you have to go either out or south (see BRIDGE-EXITS). This routine thinks it's east.

To walk from the airlock to the bridge you have to go either in or south. Yes, south. This geography is a bit confusing. See SPACESHIP-AIRLOCK. But this routine thinks it's west.

To walk through the outer door you have to either go north, out or up. Since the routine chooses up, it should work. Except ADVENTURER-FCN thinks it's south, out or down:

<ROUTINE ADVENTURER-FCN ()
     <COND (<==? ,ADVENTURER ,WINNER>
        <COND (<AND ,THAT-END
                ,THIS-END
                <IN? ,SPACESUIT ,WINNER>
                <VERB? WALK>
                <NOT <AND <EQUAL? ,HERE ,YELLOW-DOCK>
                      <EQUAL? ,PRSO ,P?WEST>>>
                <NOT <AND <EQUAL? ,HERE ,YELLOW-DOCK-EDGE>
                      <EQUAL? ,PRSO ,P?EAST>>>
                <NOT <AND <EQUAL? ,HERE
                          ,SPACESHIP-AIRLOCK>
                      <EQUAL? ,PRSO ,P?SOUTH ,P?OUT P?DOWN>>>
                <NOT <AND <EQUAL? ,HERE ,DEEP-SPACE>
                      <EQUAL? ,PRSO ,P?IN>>>>
               <TELL
"The safety line prevents you from leaving, as it is only about
five meters long. You must detach it to leave." CR>)