Open eriktorbjorn opened 5 years ago
I think the correct solution is to move the check to the receptacle's action routine. It currently uses BCONTENTS
, but we could change it to RECEPTACLE-FCN
and define it as:
<ROUTINE RECEPTACLE-FCN ()
<COND (<AND <VERB? PUT>
<FIRST? ,RECEPTACLE>>
<TELL "The receptacle is already occupied." CR>)
(T
<BCONTENTS>)>>
And then, of course, remove that check from BALLOON-FCN
.
I missed that BALLOON-FCN
does two things when putting objects in the receptacle:
(<AND <VERB? PUT>
<EQUAL? ,PRSI ,RECEPTACLE>
<FIRST? ,RECEPTACLE>>
<TELL "The receptacle is already occupied." CR>
<RTRUE>)
(<AND <VERB? PUT>
<EQUAL? ,PRSI ,RECEPTACLE>>
<FSET ,PRSO ,NDESCBIT>
<RFALSE>)
So RECEPTACLE-FCN
would have to handle both. Though setting NDESCBIT
actually leads to another glitch, which I'll report separately.
You're only supposed to be able to put one object at a time in the balloon receptacle. But that's not enforced as well as it should:
When inside the basket:
When outside the basket:
The "already occupied" message is apparently printed by
BALLOON-FCN
whenRARG
isM-BEG
. As far as I can tell, theM-BEG
parameter is only used when invoking the action routine in<LOC ,WINNER>
, so I guess that's why it only happens when you're inside.