the-infocom-files / trinity

Trinity
23 stars 5 forks source link

"EMPTY BAG INTO PRAM" probably doesn't work as intended #28

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

There are code for three different cases when you first see the ruby:

So how does the ruby get into the pram? The only way is through BAG-F, which handles the EMPTY-INTO action:

              (<PRSI? PRAM>
               <CRUMBS-INTO-PRAM>
               <RTRUE>)

The CRUMBS-INTO-PRAM will call <GET-RUBY T> - the only case where GET-RUBY is called with a parameter - which will move the ruby into the pram instead of to the room.

But it's all for nothing, because PRAM-F gets the first shot at handling the action:

        <COND (<INTBL? ,PRSA ,PUTVERBS ,NUMPUTS>
               <COND (<PRSO? ME>
                  <PERFORM ,V?ENTER ,PRAM>
                  <RTRUE>)
                 (<PRSO? BAG>
                  <PIGEONS-EAT-BAG>
                  <RTRUE>)>)>
        <RFALSE>)

And that will move the ruby to the ground. It seems odd to me that putting the bag in the pram works this way, and note that it does not check here if the pram is open or closed. And the "EMPTY" command is spectacularly buggy anyway, as described in https://github.com/the-infocom-files/trinity/issues/13

But I think it would be nice if the special case could be reinstated somehow.

eriktorbjorn commented 4 years ago

It might be as simple as calling CRUMBS-INTO-PRAM from PRAM-F instead of PIGEONS-EAT-BAG.