How can I let the player refer to something that isn't present?

122 Views Asked by At

I’ve got a book drop, into which you can drop things:

The garage is a room. The book drop is fixed in place in the garage.

The player is carrying a persimmon.

Instead of inserting something into the book drop:
        say "Thunk."; move the noun to the book drop.

This much works:

garage
You can see a book drop here.

>PUT PERSIMMON IN BOOK DROP
Thunk.

However:

>TAKE PERSIMMON
You can't see any such thing.

I want to respond more meaningfully here. I tried this:

Instead of taking something which is in the book drop, say "You can't fit your hand through the slot."

but it seems we never get that far. The parser won’t let the player attempt any action referencing the persimmon.

Adding “The book drop is a transparent container.”, unsurprisingly, has various unwanted consequences (it lets you EXAMINE THE PERSIMMMON and even tells you about the persimmon when you LOOK).

Update: Adding “After deciding the scope of the player: place the contents of the book drop in scope.” also makes it so that the player “can see” the persimmon.

What’s the right way to fix this?

1

There are 1 best solutions below

1
On

I think this does only what you want without any unexpected side effects:

The garage is a room. The book drop is a fixed in place open container.
It is scenery in the garage. The studio is north of the garage.

The player is carrying a persimmon.

Instead of inserting something into the book drop:
say "Thunk."; move the noun to the book drop.

Instead of taking something which is in the book drop:
say "You can't fit your hand through the slot."

Instead of doing something to something which is in the book drop:
say "You can't see any such thing."

Instead of examining the book drop:
say "It's a book drop." 

Test me with "open drop / close drop / put persimmon in drop / get persimmon / x persimmon / x drop / n / get persimmon / x persimmon / x drop"