Book 3 - Objects
Part 1 - Things
Chapter 1 - Containers
[This relatively complex substitution prints an object's initial appearance when the container enclosing it is examined. The only thing where it is actually triggered is for the key in the pond. As a general solution it works only when there's exactly one thing in the container, which is enough for this story's needs.]
Carry out examining (this is the print initial appearances when examining containers rule):
if special examine text should be printed:
say the initial appearance of a random thing in the noun;
say line break;
now examine text printed is true.
To decide whether special examine text should be printed:
if the noun is nothing:
decide no;
if the noun is not an open container and the noun is not a transparent container:
decide no;
if the number of things in the noun is not 1:
decide no;
let content be a random thing in the noun;
if the initial appearance of the content is empty or the content is handled:
decide no;
decide yes.
The examine containers rule does nothing when special examine text should be printed. [1]
Note
[1]. We could do "... substitutes for ... when ..." but then the "examine text printed" variable couldn't be used because the new rule wouldn't start in the carry out rulebook.