the-infocom-files / suspended

Suspended
8 stars 3 forks source link

You can't put object on TOPSHELF unless you're on the wedge, but you can put object in it #47

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago
>PUT CABLE ON SHELF
I can't reach up that far.

>PUT CABLE IN SHELF
Done.

>LOOK
Internal map reference -- Small Supply Room
A strange container exists by the east wall of this room which is being fed
electrical vibrations.
There is a stable holder here.
Sitting on the stable holder are...
    A sixteen-inch cable
    A metal tool
There is a strange container here.
Auda is off to the west.

That's because this is handled only in V-PUT-ON:

<ROUTINE V-PUT-ON ()
     <COND (<AND <EQUAL? ,PRSI ,TOPSHELF>
             <NOT <EQUAL? <GETP ,WINNER ,P?ROBOT> ,ON-WEDGE>>>
        <ROBOT-TELL "I can't reach up that far.">)
           (ELSE
        <PERFORM ,V?PUT ,PRSO ,PRSI>)>>

It would probably be better to handle the PUT action TOPSHELF-FCN, and always have V-PUT-ON call <PERFORM ,V?PUT ,PRSO ,PRSO>.