Child's Play

An interactive fiction by Stephen Granade (2007) - the Inform 7 source text

Chapter 2 - Printing the Description Of Activity, Which Allows Us to Tack Things Onto Descriptions

[I will note that after Emily Short and I discussed how to do this, she turned it into the Crusoe example in the I7 documentation.]
Printing the description of something is an activity.

This is the fancy examining rule:
    carry out the printing the description activity with the noun;

The fancy examining rule is listed instead of the standard examining rule in the carry out examining rulebook.

Rule for printing the description of something (called item) (this is the standard printing the description of rule):
    say "[description of item] [run paragraph on]".

[Ensure that we end our descriptions with a paragraph break]
Last after printing the description of something:
    say "[paragraph break]".

[To add a line to a description, use an 'After printing the description of...' rule. For example:
After printing the description of something that is damp:
    say "It is damp." instead.
N.B. that the "instead" is needed to prevent extra blank lines from appearing.]

The source code to Child's Play is licensed under a Creative Commons NonCommercial Sampling Plus 1.0 License.