§9.8. Simple Machines
The "device" kind provides for the simplest form of machine: one which is, at any given moment, switched on or switched off. Inform looks after this state, but leaves it to us to make the machine actually do something:
The air-conditioning unit is a device in the Florist's Shop. The air-conditioning is fixed in place and switched on.
Every turn when the location is the Florist's Shop:
if the air-conditioning is switched off, say "You worry about the cut flowers in this jungle-hot air.";
otherwise say "There is an low susurration from the air-conditioning unit."
One primary dictionary definition for a machine is "an apparatus using or applying mechanical power and having several parts", and we often use the "part of" relationship to build machinery. Control Center provides a neat way to display the component parts of a machine to the player who examines it.
One component almost always part of an electrical machine is the (literal) switch, lever or button to control whether it is switched on or off. In Model Shop just such an on/off button is automatically made part of every device.
While an electrical device has only two states, a mechanical machine might have many, and for these the best approach is to define a kind of value naming the possibilities: see Signs and Portents, where the states are the possible destinations pointed towards.
Perhaps stretching the definition of "machine", What Makes You Tick demonstrates a fishing pole which the player can put together from several pieces.
See Bags, Bottles, Boxes and Safes for a safe that can be dialed to different combinations
![]() | Start of Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics |
![]() | Back to §9.7. Painting and Labeling Devices |
![]() | Onward to §9.9. Televisions and Radios |
It is straightforward to make a rule that anything with parts must mention all those parts during an EXAMINE command:
Now whenever we look at any object with components, we will first see the description, then a list of parts which belong to it. The following refinement brings in elements of later chapters, but it may be worth noting: because we've written our rule as an "After examining...", anything that pre-empts the operation of the examine command will also prevent that rule from occurring. So for instance:
...would not result in the needle being mentioned.
|
|
It is straightforward to make a rule that anything with parts must mention all those parts during an EXAMINE command:
Now whenever we look at any object with components, we will first see the description, then a list of parts which belong to it. The following refinement brings in elements of later chapters, but it may be worth noting: because we've written our rule as an "After examining...", anything that pre-empts the operation of the examine command will also prevent that rule from occurring. So for instance:
...would not result in the needle being mentioned.
|
|
|
|