mirror of
https://github.com/ganelson/inform.git
synced 2024-07-18 06:54:26 +03:00
81 lines
3.6 KiB
Plaintext
81 lines
3.6 KiB
Plaintext
** Printing the name of something
|
|
(Bottles with removable stoppers; Trachypachidae Maturin 1803)
|
|
Bottles with removable stoppers: when the stopper is in the bottle, the bottle is functionally closed, but the stopper can also be removed and used elsewhere. Descriptions of the bottle reflect its state intelligently.
|
|
|
|
{*}"Trachypachidae Maturin 1803"
|
|
|
|
A bottle is a kind of container. Bottles are usually openable, transparent, and closed. A cork is a kind of thing. A cork is in every bottle.
|
|
|
|
Understand "cork [something]" as corking.
|
|
|
|
Understand the command "stopper" as "cork".
|
|
|
|
Understand "uncork [something]" as uncorking.
|
|
|
|
Corking is an action applying to one thing.
|
|
|
|
Check corking:
|
|
if the noun is not a bottle, say "[The noun] cannot be corked." instead.
|
|
|
|
Carry out corking:
|
|
try closing the noun.
|
|
|
|
Uncorking is an action applying to one thing.
|
|
|
|
Check uncorking:
|
|
if the noun is not a bottle, say "[The noun] cannot be uncorked." instead.
|
|
|
|
Carry out uncorking:
|
|
try opening the noun.
|
|
|
|
Understand "close [something] with [something preferably held]" as corking it with.
|
|
|
|
Understand "cork [something] with [something preferably held]" as corking it with.
|
|
|
|
Corking it with is an action applying to one thing and one carried thing.
|
|
|
|
Check corking it with:
|
|
if the noun is not a bottle, say "[The noun] cannot be corked." instead;
|
|
if the second noun is not a cork, say "[The second noun] will not fit in [the noun]." instead.
|
|
|
|
Carry out corking it with:
|
|
try inserting the second noun into the noun instead.
|
|
|
|
|
|
Instead of closing a bottle:
|
|
if a cork (called the item) is carried by the player, try inserting the item into the noun instead;
|
|
otherwise say "You need a stopper of some kind."
|
|
|
|
Instead of opening a bottle:
|
|
if a cork (called the item) is in the noun, try taking the item instead;
|
|
otherwise say "[The noun] has no stopper."
|
|
|
|
Carry out inserting a cork into a bottle:
|
|
now the second noun is closed.
|
|
|
|
After inserting a cork into a bottle:
|
|
say "You stopper [the second noun] with [the noun]."
|
|
|
|
Before taking a cork when the noun is in a closed bottle (called the item):
|
|
now the item is open.
|
|
|
|
Instead of taking a cork when the noun is in a bottle (called the item):
|
|
move the noun to the player;
|
|
say "You pull [the noun] from [the item]." instead.
|
|
|
|
Before printing the name of a bottle (called target) while not inserting, taking, searching, or removing:
|
|
if the target is closed, say "sealed ";
|
|
otherwise say "now open ".
|
|
|
|
After printing the name of a bottle (called target) while not inserting, searching, examining, or removing:
|
|
if the target contains a noncork thing, say " containing [a list of noncork things in the target]";
|
|
omit contents in listing.
|
|
|
|
Instead of examining a bottle:
|
|
say "[The noun] contains [a list of noncork things in the noun]."
|
|
|
|
Definition: a thing is noncork if it is not a cork.
|
|
|
|
The Doctor's Cabin is a room. "A dark, cramped triangle, like a slice of cake, except that its sharp end has been cut off: and so low that a moderately tall man would strike his head on the deck above if he were to stand upright. Every free surface is covered with sheets of best Venetian looking-glass, to increase the light filtering in. Long use and the carpenter's ingenuity have packed in a folding cot and table, and lockers are built into unlikely places: lockers filled with specimens, skeletons, sketches, drafts and serial letters." The jug is a bottle in the Doctor's Cabin. The jug contains a beetle. The description of the beetle is "The doctor assures you that it is a nondescript."
|
|
|
|
Test me with "get jug / x jug / open jug / x jug / i / x cork / cork jug / i / uncork jug / i / x jug / get beetle / i / close jug / i / x jug". |