Garibaldi 1

Readout of all doors in the game
Example 22
★★★

Providing a security readout device by which the player can check on the status of all doors in the game.

Suppose we would like to allow the player to view the status of all the doors functioning in the game; and we want to identify those doors by mentioning which two rooms they connect. The following uses some techniques that will be covered in later chapters, but the basic idea may be obvious:

"Garibaldi"
The security readout is a device. The description of the readout is "The screen is blank."
Instead of examining the switched on security readout:
   say "The screen reads: [fixed letter spacing]";
   say line break;
   repeat with item running through doors:
      say line break;
      say " [item] ([front side of the item]/[back side of the item]): [if the item is locked]LOCKED[otherwise]UNLOCKED[end if]";
   say variable letter spacing;
   say paragraph break.

It is more or less arbitrary which room winds up as the "front side" and which as the "back", but in this case it hardly matters.

The player carries the security readout.
The Docking Bay is a room. The inner airlock is a door. It is north of the Docking Bay and south of the Zocalo. The inner airlock is lockable and unlocked. The outer airlock is lockable and locked. It is a door. It is south of the Docking Bay and north of Space.
The quarantine seal is a door. It is west of the Zocalo and east of Medlab. Quarantine seal is locked.
The security pass unlocks the inner airlock. The player carries the security pass.
Test me with "x readout / turn on readout / x readout / lock inner airlock with security pass / x readout".
Test me with "x readout / turn on readout / x readout / lock inner airlock with security pass / x readout".
Docking Bay
You can see an outer airlock and an inner airlock here.

>(Testing.)

>[1] x readout
The screen is blank.

The security readout is currently switched off.

>[2] turn on readout
You switch the security readout on.

>[3] x readout
The screen reads:

inner airlock (Docking Bay/Zocalo): UNLOCKED
outer airlock (Docking Bay/Space): LOCKED
quarantine seal (Zocalo/Medlab): LOCKED

>[4] lock inner airlock with security pass
You lock the inner airlock.

>[5] x readout
The screen reads:

inner airlock (Docking Bay/Zocalo): LOCKED
outer airlock (Docking Bay/Space): LOCKED
quarantine seal (Zocalo/Medlab): LOCKED