the-infocom-files / deadline

Deadline
4 stars 3 forks source link

Incorrect check for if Baxter is in the shed in both BAXTER-F and DUNBAR-F #61

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

When you walk in on Baxter's and Dunbar's secret meeting, you'll see something like this:

>ENTER SHED
Shed
This small garden shed is filled with implements of gardening and lawn care.
Shelves filled with various tools line the walls and a filthy window looks out
on the lawn.
Mr. Baxter is here.
Ms. Dunbar is here.
You seem to have walked in on some sort of get-together, although from the look
on Ms. Dunbar's face, you are not the guest of honor. She is aghast, and she
continually looks back and forth between Mr. Baxter and yourself.
Mr. Baxter heads off to the north.
Ms. Dunbar heads off to the north.

But looking at BAXTER-F and DUNBAR-F it seems clear that they're supposed to have a custom description in this case:

<ROUTINE BAXTER-F ("OPTIONAL" (RARG <>))
     <COND (<==? .RARG ,M-OBJDESC>
        <COND (<IN-MOTION? ,BAXTER> T)
              (<AND <IN? ,BAXTER ,SHED> <NOT <0? ,SECRET-MEETING>>>
               <TELL
"Mr. Baxter and Ms. Dunbar are here talking rapidly with each other. They
haven't noticed you yet." CR>)
<ROUTINE DUNBAR-F ("OPTIONAL" (RARG <>))
     <COND (<==? .RARG ,M-OBJDESC>
        <COND (<IN-MOTION? ,DUNBAR> <RTRUE>)
              (<AND <IN? ,BAXTER ,SHED> <NOT <0? ,SECRET-MEETING>>>
               <RTRUE>)

That is, if Baxter is in SHED, and the secret meeting is in progress, Baxter's description covers both Baxter and Dunbar, while Dunbar is temporarily invisible.

(Though see https://github.com/the-infocom-files/deadline/issues/48 for an issue concerning the SECRET-MEETING variable.)

There's just one problem: SHED isn't the room, it's a local global object, not the room itself. The room is SHED-ROOM. If I change the code to test for that instead, I get the probably intended:

>ENTER SHED
Shed
This small garden shed is filled with implements of gardening and lawn care.
Shelves filled with various tools line the walls and a filthy window looks out
on the lawn.
Mr. Baxter and Ms. Dunbar are here talking rapidly with each other. They haven't
noticed you yet.
You seem to have walked in on some sort of get-together, although from the look
on Ms. Dunbar's face, you are not the guest of honor. She is aghast, and she
continually looks back and forth between Mr. Baxter and yourself.
Mr. Baxter heads off to the north.
Ms. Dunbar heads off to the north.