Open eriktorbjorn opened 5 years ago
This looks like it could be affecting several other games as well. I'll see if I can make a list later.
Not every game has PSEUDO-OBJECT
.
Games where PSEUDO-OBJECT
has no parents:
I can reproduce the bug in Cutthroats, Hitchhiker's Guide, Planetfall, Seastalker, Starcross, Suspect, and The Witness.
The Solid Gold versions don't build yet.
Infidel and Suspended don't seem to use pseudo objects.
I haven't checked what the others do differently so that I couldn't trigger the bug there.
Games where PSEUDO-OBJECT
is in GLOBAL-OBJECTS
:
Games where PSEUDO-OBJECT
is in LOCAL-GLOBALS
:
Changing the parent of the pseudo object can have unexpected (though possibly beneficial) consequences, though. Consider this case in Wishbringer's HERE-F
:
(<AND <VERB? PUT PUT-ON THROW>
<EQUAL? ,PRSI ,PSEUDO-OBJECT>>
<PERFORM ,V?DROP ,PRSO>)
HERE-F
is used for various pseudo objects, e.g. the planks at Wharf's End. In theory, "PUT NOTE ON PLANKS" should drop the note. Instead it replies with "You can't see any planks here!"
That's because of the PRE-PUT
pre-action (which is also called for a couple of other actions), which contains this check:
(<NOT <ACCESSIBLE? ,PRSI>>
<CANT-SEE-ANY ,PRSI>
<RTRUE>)
An object without a parent can't ever be accessible, so PSEUDO-OBJECT
doesn't stand a chance. Putting it in GLOBAL-OBJECTS
makes the PUT
action work as expected.
The quickest way to reproduce this bug is to go to the spaceship bridge and:
The error happens in
PRE-TAKE
, when it checks ifPRSO
is in a closed (presumably transparent) container.This does not happen in zork-substrate, probably because there
PSEUDO-OBJECT
resides inLOCAL-GLOBALS
. In Starcross, it has no parent. So that seems like it could be a sensible fix here, too.