the-infocom-files/trinity

Calling SAID-CRUMBS? from EBAG doesn't work as intended

Opened this issue · 2 comments

EBAG-F has this, which is apparently there to check if you refer to the empty (or soggy) bag as "crumbs":

<ROUTINE EBAG-F ()
	 <COND (<SAID-CRUMBS?>
		<TELL "The crumbs are all gone." CR>
		<RFATAL>)

But it doesn't work. Probably because the first thing SAID-CRUMBS? does is to check if you're carrying the full bag of crumbs (BAG):

<ROUTINE SAID-CRUMBS? ()
	 <COND (<NOT <IN? ,BAG ,PLAYER>>
		<RFALSE>)

Similarly, the CRUMBS-GONE? routine will only work if you are carrying the bag of crumbs, even though it's clearly meant to work if you are carrying the empty or soggy bag as well:

<ROUTINE CRUMBS-GONE? ()
	 <COND (<NOT <SAID-CRUMBS?>>
		<RFALSE>)
	       (<PRSO? BAG>
		<TAKE-CRUMBS>
		<RTRUE>)
	       (<PRSO? EBAG SOGGY>
		<TELL "The crumbs are all gone." CR>
		<RTRUE>)>
	 <RFALSE>>

This routine is called from:

  • PRE-GIVE
  • PRE-PUT
  • PRE-THROW
  • PRE-TAKE

The SAID-CRUMBS? routine is called from:

  • GWIM, where it already checks if you mean the BAG object.
  • BAG-F, so that should already be the BAG object.
  • EBAG-F, as described above.
  • CRUMBS-GONE?, as described above.

So I guess it should be safe to remove that check from SAID-CRUMBS?? Or did I miss something?