the-infocom-files / deadline

Deadline
4 stars 3 forks source link

McNabb will tell you about the holes more than once (by design?) #59

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

If I understand correctly, I-GARDENER is called whenever McNabb reaches a goal. If this goal is ROSE-GARDEN, it sets up a timer to call I-G-I-G (gardener in garden?), which does this:

<ROUTINE I-G-I-G ()
     <SETG G-I-G ,PRESENT-TIME>
     <COND (<AND <==? ,HERE ,ROSE-GARDEN> <NOT ,HOLE-SHOWN>>
        <SETG HOLE-TELL T>
        <TELL
"All of a sudden, Mr. McNabb starts talking to himself quite
loudly about his poor roses being ruined.  He walks up to you and
says \"You canna believe the holes someone's made. Crushed my
roses.  It'll take me plenty a time to set it right.  I just
canna believe it!\"  He shakes his head dejectedly." CR>)>>

This is McNabb's schedule:

    ;"GARDENER"
    <TABLE 0
           60 10 NORTH-LAWN     ;"9-10AM"
           60 10 EAST-LAWN      ;"10-11AM"
           60 10 ROSE-GARDEN    ;"11AM-1PM"
           60 10 ORCHARD        ;"1-2PM"
           60 15 SOUTH-LAWN     ;"2-3PM"
           120 15 WEST-LAWN     ;"3-5PM"
           0>

So it may look like he would only trigger the message once, but that's not the case. When you call ESTABLISH-GOAL you can (and this is done most of the time) specify a flag to tell it to set the actor's current location as the "queued goal". That queued goal is then restored when calling UNPRIORITIZE. I think the idea here is that an actor follows his schedule, but depending on outside events the game can assign new goals to it. When these have been handled, it then calls UNPRIORITIZE to make the actor return to its old location.

Which means that to get the message twice, you can:

So it seems to me that he should only tell you about the holes if <NOT ,HOLE-TELL>, not <NOT ,HOLE-SHOWN>.

This should not make the game harder to solve in any way. Just remove an unnecessary duplicate message.