I'm doing some testing on an idea that may be useful for the next version when gremlins make their mischevious return. I needed to develop a failsafe airlock system - not one that can protect against water, just against pathing.
The setup uses doors and hatch covers. These were selected because both have an instant reaction time to levers, so the dwarf pulling the lever has no ability to leave the lever tile before the door or hatch trigger. And hatches and doors have inverse effects on a lever - when the lever is off, doors block passage, but hatch covers allow passage across an open tile. When the lever is on, doors open allowing passage, but hatch covers open blocking passage across an open tile.
Consider a room that only one dwarf should enter:
+ wall
H hatch
D door
L lever
+ +
+++++ +++++
HLDH HDLH
+++++ +++++
+ +
The red lever on the left hooks to the red features, the white lever on the right to the white features. Both levers hook to the brown features.
When a dwarf approaches from the left and pulls the red lever, the brown hatches open blocking all access to the white lever but allowing the same dwarf to pull the red one. The red door opens and the dwarf can enter the room. On the way out, he pulls the red lever again, closing access to the room to him, allowing passage back out to where he started, and opening access to the white lever. Even if another dwarf is standing on the white lever, he can't get to the room, even if he pulls the white lever after the red one is pulled.
If a fortress wanted to protect against a mischievous gremlin, this idea can be expanded to require two lever pulls to gain access to a lever room, or to keep a dwarf sealed inside the room to pull levers with no risk of harm from the outside. It is also useful for certain dangerous contraptions when lever order is critical. Obsidian farms, for instance, when pumps are powered shouldn't allow the lever to release magma into the chamber to be pullable when the dwarf mining access is open.
The arrangement scales up so that you could have 3, 4, more approaches to the same room, each one connecting to the same pattern of doors and hatches so that only one dwarf can enter and blocking access to all others. This could allow for some interesting arrangements for adventurers.