1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-07 17:44:22 +03:00
inform7/resources/Documentation/Examples/Garibaldi1.txt
2023-07-24 11:56:58 +01:00

35 lines
1.8 KiB
Plaintext

Example: *** Garibaldi 1
Subtitle: Readout of all doors in the game
Location: Doors
RecipeLocation: Doors, Staircases, and Bridges
Index: Garibaldi 1. Readout of all doors in the game
Description: Providing a security readout device by which the player can check on the status of all doors in the game.
For: Z-Machine
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".