Section 4 - Desks, Drawers, Offices
Include Automated Drawers by Emily Short.
Definition: a container is empty if the number of things in it is 0.
Definition: a supporter is empty if the number of things on it is 0.
[After writing a paragraph about the nightstand:
if something is on the nightstand and at least one surprising drawer is part of the nightstand, say "[paragraph break]";
say "[if prior named noun is the nightstand and the nightstand is empty]It[otherwise]The nightstand[end if] has [the number of drawers which are part of the nightstand in words] drawer[s]";
if at least one open drawer is part of the nightstand
begin;
say "; [selection of drawers which are part of the nightstand conforming to the description open drawers which are part of the nightstand is-are] open";
if every open drawer which is part of the nightstand is empty, say " but empty";
end if;
say ". ";
now the current-subject is the nightstand;
now every drawer which is part of the nightstand is mentioned;
now every drawer which is part of the nightstand is referenced by the current-paragraph;
while a surprising thing (called second special-target) is referenced by the current-paragraph
begin;
carry out the disclosing contents activity with the second special-target;
now every thing contained by the second special-target is mentioned;
now every thing supported by the second special-target is mentioned;
now every thing held by the second special-target is mentioned;
now every thing which is part of the second special-target is mentioned;
end while;
now held-break is true;
say "[run paragraph on]"; ]
Rule for disclosing exterior of something which is in a drawer:
say "[The current-subject] is in [the holder of the current-subject]. ";
Rule for disclosing contents of a drawer (called special-target):
say "[if the prior named noun is the special-target]Inside[otherwise]In [the special-target][end if] [is-are a list of things in the special-target]. [run paragraph on]".
A desk is a kind of supporter. [Every desk incorporates two vertical drawers.] A desk is usually scenery. The description of a desk is usually "It's fakely veneered in dark wood and shows signs of years of abuse." A desk is usually seated.
A chair is a kind of supporter. A chair is usually scenery. A chair is always enterable. Understand "seat" as a chair. Understand "take [chair]" as entering. The description of a chair is usually "It is an ordinary inexpensive variety of chair, made locally and found around the island in great numbers." A chair is usually seated.
When play begins:
now every chair allows seated;
now every chair allows standing;
now every desk allows seated;
now every desk allows standing.
Before entering a chair which supports something (called the impediment):
if the noun supports a person:
say "[The noun] [is-are] plainly occupied." instead;
otherwise:
try taking the impediment;
if the impediment is on the noun:
stop the action.
Rule for writing a topic sentence about an as-yet-unknown introduceable person (called special-target) who is on a chair (called secondary-target):
now the secondary-target is mentioned;
say "[The special-target] [is-are] sitting here. [run paragraph on]";
now the current-paragraph references the special-target.
Rule for writing a paragraph about someone (called special-target) who is on a chair (called secondary-target):
if the special-target is initially-described, make no decision;
if the special-target is flexibly-described, make no decision;
if the special-target is introduceable and the special-target is as-yet-unknown, make no decision;
change the current-subject to special-target;
if the location is an office:
now the secondary-target is mentioned;
let N be a random desk which is in the location;
say "[The special-target] [is-are] seated at [its-their] [N]. [run paragraph on]";
otherwise:
say "[The special-target] [is-are] sitting on [a secondary-target]. [run paragraph on]";
Rule for disclosing contents of a desk (called special-target):
if someone (called desk-user) who is not the player is on a chair in the location:
say "[if special-target is not mentioned]On [the special-target] in front of[otherwise]In front of[end if] [the desk-user] [is-are a list of mentionable things on the special-target]. [run paragraph on]";
otherwise:
make no decision;
An office is a kind of room. One desk and one chair are in every office. An office is usually indoors.
Sanity-check sitting at a desk:
if the player can see a chair (called target chair) which does not support a person:
try entering the target chair instead.