mirror of
https://github.com/ganelson/inform.git
synced 2024-07-08 01:54:21 +03:00
31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
* Understanding things by their relations
|
|
(Containers referred to by contents; Cinco)
|
|
A taco shell that can be referred to (when it contains things) in terms of its contents.
|
|
|
|
It's fairly common that we want to be able to refer to a container in terms of what it has in it: a bottle of wine, a salt shaker, a chicken sandwich. The player is free to remove the contents again, and the object will go back to using its usual name:
|
|
|
|
{*}"Cinco"
|
|
|
|
Cinco de Mayo Fundraiser is a room.
|
|
|
|
The taco shell is an edible thing in the Fundraiser. It is a portable container. It has carrying capacity 1.
|
|
|
|
Understand "[something related by containment] taco" as the taco.
|
|
|
|
Rule for printing the name of the taco shell while not inserting or removing:
|
|
if the taco contains something (called filling), say "[filling] taco";
|
|
otherwise say "taco shell";
|
|
omit contents in listing.
|
|
|
|
The player carries shredded beef. It is edible.
|
|
|
|
The taking action has an object called source (matched as "from").
|
|
|
|
Setting action variables for taking:
|
|
now source is the holder of the noun.
|
|
|
|
Report taking something from the taco shell:
|
|
say "You gingerly pick [the noun] out of the taco shell." instead.
|
|
|
|
Test me with "x taco / put shredded beef in taco / get taco / i / x shredded beef taco / get shredded beef / x shredded beef taco".
|