Escape From Echo Base — 9 of 54

Alex Gibbins-Stark

Release 1

Section 7 - Controlled Doors

Controlling relates one device to one door.

The verb to be the master of implies the controlling relation.

The verb to be the slave of implies the reversed controlling relation.

Definition: a door is controlled if it is the slave of something.

Definition: a door is controlling if it is the master of something.

After switching on a device:

If the noun is the master of a door (called slave):

try the noun opening the slave;

continue the action.

After switching off a device:

If the noun is the master of a door (called slave):

try the noun closing the slave;

continue the action.

Report switching on a device:

If the noun is the master of a door (called slave):

stop the action.

Report switching off a device:

If the noun is the master of a door (called slave):

stop the action.

To shift is a verb.

Check an actor opening a controlled door:

if the actor is not the master of the noun:

say "[The actor] [can't shift] [the noun] by hand." instead.

Check an actor closing a controlled door:

if the actor is not the master of the noun:

say "[The actor] [can't shift] [the noun] by hand." instead.

Carry out an actor opening a controlled door:

now the noun is open.

Carry out an actor closing a controlled door:

now the noun is closed.

Report an actor opening a controlled door:

say "[The noun] [open].";

stop the action.

Report an actor closing a controlled door:

say "[The noun] [close].";

stop the action.