the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

Examining vehicles doesn't always print which objects are inside #29

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

The DINETTE-SET (table and chairs) in the apartment kitchen is both a surface and a vehicle. Examining it sometimes produces unexpected results:

>LOOK
Kitchen
This is the tiny kitchen of your apartment. Next to the sink is a small
refrigerator. Along the western wall, next to the doorway to the living area, is
a dinette set.

>PUT KEY ON TABLE
Done.

>EXAMINE TABLE
You see nothing special.

>SIT ON CHAIR
You are now seated at the dinette set.

>EXAMINE TABLE
Sitting on the dinette set is:
   a key

>GET KEY
Taken.

>EXAMINE TABLE
It's empty (not counting you).

The only response I consider to be a bug here is examining the table when there are objects on it but you're not sitting at it. So what causes this?

V-EXAMINE handles doors and containers by calling V-LOOK-INSIDE:

           (<OR <FSET? ,PRSO ,DOORBIT>
            <FSET? ,PRSO ,VEHBIT>>
        <V-LOOK-INSIDE>)

V-LOOK-INSIDE has a couple of special cases, none of which deals with the dinette set, so it goes to the default behavior:

              (<PRSO? <LOC ,PLAYER>>
               <DESCRIBE-VEHICLE>)
              (T
               <TELL "You see nothing special." CR>)>)

I think there's a case missing here. Something like this, perhaps:

              (<PRSO? <LOC ,PLAYER>>
               <DESCRIBE-VEHICLE>)
              (<FIRST? ,PRSO>
               <PRINT-CONT ,PRSO>)
              (T
               <TELL "You see nothing special." CR>)>)

But I haven't tested this, and I haven't compared it to how other games handle similar cases.