Section - Flippable Container/Supporters
[these are things that are containers when upright and enterable supporters when upside down]
A stepper is a kind of supporter.
A stepper is usually enterable.
[The stepper code should really all be up here, not down in the storage room code, but oh well. Moving it is too much bother now.]
A flippable supporter is a kind of supporter.
A flippable supporter is usually enterable and portable.
A flippable supporter is usually floor-standing.
A flippable supporter can be upended or right way up.
A flippable supporter is usually right way up.
Before printing the name of an upended flippable supporter:
say "upside-down ".
Understand "upside-down" and "upside down" as a flippable supporter [when the item described is upended]. [That part was removed to improve performance.]
An interior is a kind of container.
An interior is usually privately-named.
An interior is part of every flippable supporter.
Rule for printing the name of a container (called crate) when the crate is part of a flippable supporter (called main item):
say "[main item]".
[DEBUG]
[After printing the name of a container incorporated by a flippable supporter:
say " (inner space)".
Understand "inner" and "space" as a container when the item described is part of a flippable supporter.]
When play begins:
repeat with item running through flippable supporters:
now the inner space of the the item is privately-named.
To decide which container is the inner space of (main item - a flippable supporter):
let the crate be a random container incorporated by the main item;
decide on the crate.
[removing from]
Understand "[something related by reversed incorporation]" as a container. [CAN'T DELETE THIS]
Does the player mean removing from a flippable supporter:
it is very unlikely.
Does the player mean removing from a container incorporated by a flippable supporter:
it is very likely.
Check removing something from a flippable supporter:
try taking the noun instead.
Rule for clarifying the parser's choice of a flippable supporter:
do nothing.
Rule for clarifying the parser's choice of a container incorporated by a flippable supporter:
do nothing.
Does the player mean doing something with a container incorporated by a flippable supporter:
it is very unlikely.
Does the player mean quizzing about a container incorporated by a flippable supporter:
it is very unlikely.
Does the player mean informing about a container incorporated by a flippable supporter:
it is very unlikely.
Does the player mean querying about a container incorporated by a flippable supporter:
it is very unlikely.
Does the player mean requesting for a container incorporated by a flippable supporter:
it is very unlikely.
Does the player mean querying vaguely about a container incorporated by a flippable supporter:
it is very unlikely.
Last report examining a flippable supporter:
let crate be the inner space of the noun;
if something is in the crate:
say "In [the crate] [is-are a list of things in the crate]."
Instead of searching a right way up flippable supporter:
try searching the inner space of the noun.
Instead of turning an upended flippable supporter:
if specifically turning upside down:
say "[The noun] is already upside down.";
otherwise:
continue the action.
Instead of turning a flippable supporter when the player is on the noun:
say "You'll have to step off it first."
Instead of turning a flippable supporter:
if the noun is upended:
say "You [if something is on the noun]pick up the stuff on [the noun] and turn it[otherwise]turn [the noun][end if] over, so the open side is upwards.";
if something is on the noun:
now the player carries everything on the noun;
now the noun is right way up;
otherwise:
let the crate be a random container incorporated by the noun;
say "You [if something is in the crate]pick up the stuff in [the noun] and turn it[otherwise]turn [the noun][end if] upside down.";
if something is in the crate:
now the player carries everything in the crate;
now the noun is upended.
Instead of inserting something into a flippable supporter:
let the crate be a random container incorporated by the second noun;
try inserting the noun into the crate.
Instead of inserting something into a container which is part of an upended flippable supporter:
say "You can't put anything in [the second noun] while it's upside down."
After inserting something into a container which is part of a flippable supporter:
say "You put [the noun] into [the second noun]."
Instead of putting something on a flippable supporter when the second noun is right way up:
let the crate be a random container incorporated by the second noun;
try inserting the noun into the crate.
Instead of entering a flippable supporter when the noun is right way up:
say "There isn't much point in [if specifically sitting]sitting[otherwise]standing[end if] on [the noun] while it's the right way up."
After entering a flippable supporter when the chosen posture is sitting:
say "You sit down on [the noun] and try not to knee yourself in the chin."