the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

You can open the crates in WAREHOUSE-2 by putting things in them #28

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Warehouse
You have entered a warehouse filled with dusty crates. The exit is to the south.
An alarm is ringing loudly.

>LOOK IN CRATE
It seems that the crate is closed.

>OPEN CRATE
You'd need a crowbar to open these crates.

>PUT KEY IN CRATE
You open the crate and discover that there's not enough room inside.

>LOOK IN CRATE
It's empty.

>EXAMINE CRATE
The crates are closed.

That's because V-PUT helpfully opens containers for you, if they're closed. I think the best solution would be to handle in it CRATE-F. Something like this, perhaps:

<ROUTINE CRATE-F ()
     <COND (<VERB? OPEN>
        <TELL "You'd need a crowbar to open these crates." CR>)
           (<OR <VERB? EXAMINE>
            <AND <VERB? PUT>
             <PRSI? ,CRATE>>>
        <TELL "The crates are closed." CR>)>>
eriktorbjorn commented 4 years ago

It turns out that this works on more than just the crates, so perhaps it needs to be fixed in V-PUT after all. Here's one case with the UNOPENABLE-DOOR:

>LOOK
Row Houses
You are standing just inside the front door of a row of renovated old brick
three-story apartments. The inner door leads south, and Southway is just outside
to the north.

>PUT KEY IN DOOR
You open the door and discover that there's not enough room inside.

From what I can understand, V-PUT can automatically open any object with DOORBIT, CONTBIT or VEHBIT, if it isn't already open. Perhaps that should be restricted to CONTBIT? (Though that does not fix the aforementioned crates.)

eriktorbjorn commented 4 years ago

You can also use this trick to unlock both doors at Parkview Apartments, APARTMENT-DOOR and PARKVIEW-DOOR.