mirror of
https://github.com/ganelson/inform.git
synced 2024-07-18 06:54:26 +03:00
22 lines
1.2 KiB
Plaintext
22 lines
1.2 KiB
Plaintext
* To carry, to wear, to have
|
|
(DROP applies even to objects the player carries indirectly; Celadon)
|
|
Using the enclosure relation to let the player drop things which he only indirectly carries.
|
|
|
|
By default, Inform only lets the player drop those things which he is carrying -- that is, those directly in his possession. Things inside satchels or on portable trays have to be taken first.
|
|
|
|
If we want to change this behavior, we might add a dropping rule that distinguishes between carrying and mere enclosure (introduced back in "The location of something" in the chapter on Things):
|
|
|
|
{*} "Celadon"
|
|
|
|
The Tea Room is a room. The player carries a black lacquer tray. The lacquer tray is portable. On the lacquer tray are a celadon teapot and a napkin.
|
|
|
|
Before dropping something:
|
|
if the player does not carry the noun and the player encloses the noun:
|
|
say "(first taking [the noun] from [the holder of the noun])[command clarification break]";
|
|
silently try taking the noun;
|
|
if the player does not carry the noun, stop the action.
|
|
|
|
Instead of taking the napkin:
|
|
say "It seems to be stuck to the tray, possibly by an underlying wad of gum."
|
|
|
|
Test me with "i / drop teapot / i / look / drop teapot / drop napkin / i / drop tray". |