the-infocom-files / deadline

Deadline
4 stars 3 forks source link

McNabb doesn't wait for you among the roses when you ask him to show you the hole #39

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

Go to the Garden Path, wait for McNabb, then wait for him to start complaining about the holes among his roses.

>MCNABB, SHOW ME HOLES
"Follow me!" he says, and starts walking towards the roses.
Mr. McNabb heads off to the south.

>SMELL ROSES
They smell nice.
Mr. McNabb stops here.

>SOUTH
Among the Roses
You are among rows of roses. The ground is soft, and your footsteps leave a
rather bad impression as many poor seedlings are trampled underfoot. A safer
place to admire the flowers lies to the north. A window to the south allows a
view into the house.
There is no way into the house from here.
McNabb gives you a sideways glance. "What kept you?" he asks.
McNabb grabs your arm and leads you to a spot deep within the garden and near
the house. You might never have found this place alone. He points at the ground,
where you see two holes in the soft earth.

>EXAMINE MCNABB
Mr. McNabb isn't here!

So he immediately returns to the Garden Path. And if you to to Among the Roses, he'll show you the holes even though he isn't there.

I think what's happening is that as soon as he reaches IN-ROSES it calls <UNPRIORITIZE ,GARDENER> which, as I understand it, restores his previous goal of reaching the Garden Path. See I-GARDENER:

              (<==? .GL ,IN-ROSES>
               <UNPRIORITIZE ,GARDENER>
               <COND (<==? ,HERE .GL>
                  <GRAB-ATTENTION ,GARDENER>
                  <SHOW-HOLE>
                  <RTRUE>)
                 (T
                  <ENABLE <QUEUE I-SHOW-HOLE -1>>
                  <RFALSE>)>)>)>>

If I remove that call to <UNPRIORITIZE ,GARDENER> and instead puts it in the SHOW-HOLE and I-SHOW-HOLE routines, like so:

<ROUTINE SHOW-HOLE ()
     <TELL
"McNabb grabs your arm and leads you to a spot deep within the garden and
near the house. You might never have found this place alone. He points at
the ground, where you see two holes in the soft earth." CR>
     <UNPRIORITIZE ,GARDENER>
     <FCLEAR ,HOLE ,INVISIBLE>
     <SETG HOLE-SHOWN T>>
<ROUTINE I-SHOW-HOLE ()
     <COND (<G? <SETG SHOW-WAIT <+ ,SHOW-WAIT 1>> 4>
        <SETG NO-SHOW T>
        <QUEUE I-SHOW-HOLE 0>
        <UNPRIORITIZE ,GARDENER>
        <RFALSE>)
           (<==? ,HERE ,IN-ROSES>
        <COND (<NOT <==? ,SHOW-WAIT 1>>
               <TELL
"McNabb gives you a sideways glance. \"What kept you?\" he asks." CR>)>
        <SHOW-HOLE>
        <QUEUE I-SHOW-HOLE 0>)>>

So that should keep him from returning to the Garden Path until he's either shown you the holes, or until he got tired of waiting for you.

Of course it has to be thoroughly tested, including the case where you ask him to show you the holes while he's already among the roses (probably because he saw you trampling them), and the case where he isn't in the Garden Path when you ask him.