the-infocom-files / moonmist

Moonmist
4 stars 3 forks source link

GENERIC-DINNER doesn't seem to work as intended #32

Open eriktorbjorn opened 3 years ago

eriktorbjorn commented 3 years ago

A generic routine is to help the parser determine which object you mean. The GENERIC-DINNER routine is to distinguish between DINNER (your dinner) and DINNER-2 (other dinner):

<ROUTINE GENERIC-DINNER (X "OPTIONAL" Y)
    <COND (<OR <REMOTE-VERB?>
           <VERB? EXAMINE>>
           ,DINNER)
          (<AND <EQUAL? ,P-ADJ <> ,A?MY>
            <EQUAL? ,P-XADJ <> ,A?MY>>
           ,DINNER)
          ;(<NOT <VISIBLE? ,DINNER>>
           <NOT-HERE ,DINNER>
           ,NOT-HERE-OBJECT)
          (T
           <SETG CLOCK-WAIT T>
           <TELL "(That wouldn't be polite!)" CR>
           ,NOT-HERE-OBJECT)>>

So a "remote verb" (FIND, ASK-ABOUT, etc.) will always refer to DINNER. If there is no adjective (or if the adjective is "my", but why would it ever need to check that when "my dinner" should already be unique?) it's also assumed to be your dinner.

But in the final case, where it's meant to say that it would be impolite to, say, eat someone else's dinner, that won't ever happen because once you use an adjective you've already uniquely identified which dinner object you mean. So that check would have to be part of DINNER-2's action routine. (It currently doesn't have one.)