Pseudodevices by Zed Lopez


If you would like supporters or containers (or other kinds) to support being switched on or off like devices, just specify that they have the switched on property.

The self-opening box is a container. The self-opening box can be switched on or switched off.

Since Inform 7 already knows switched on and switched off are opposites, you actually only need one or the other. Either of these would work.

The self-opening box can be switched on. The self-opening box can be switched off.

But since it's not a device, it won't be caught by conditionals of the form ``if X is a device``. The extension provides the devicive adjective for such tests.

if T is devicive if T is a device...

Example: * Light table

"Light Table"

Include Pseudodevices by Zed Lopez.

Lab is a room. The switch is a fixed in place device in the Lab. The switch is switched on. The light table is a supporter in the Lab. The light table can be switched on or switched off.

After deciding the scope of the player when the location is the Lab and the Lab is dark: place the light table in scope.

Carry out switching on the light table: now the light table is lit.

Carry out switching off the light table: now the light table is unlit.

Carry out switching on the switch: now the Lab is lighted.

Carry out switching off the switch: now the Lab is dark.

Test me with "turn on table / turn off switch / turn off table / turn on table".