Outside of the Airlock and APC, four machines implment the same idea of a 'wire panel'; i.e. a maintenance panel, exposed with a screwdriver, with wires inside for cutting and pusling. There is a lot of copy-paste code between them, resulting in patchwork functionality and bug fixes. There's no clear path towards which pattern to use, and how each wire works on each machine requires investigating the whole of the object code. This makes changes to the existing system very difficult, and makes adding wire panels to new machines a daunting process.
A wire panel:
A common set of names for behavior wires can control makes it easier to reason about the expected/intended behavior of an action on a wire across implementations. Machines do not need to consider how every flag may affect them, just those they implement.
Proposed | weapon_stand | seed_vendor | vending | manufacturer |
---|---|---|---|---|
INERT | INERT | INERT | ||
SHOCK | MALF | MALF | SHOCK | SHOCK |
POWER | POWER | POWER | POWER | |
EXTEND | EXTEND | EXTEND | EXTEND | |
ACCESS | EXTEND | SCANID | ||
SAFETY | SHOOTINV | MALF | ||
SILICON | SCANID |
Not every wire affects controls the same way. Some controls are only changed on pulse, while others require a pulse to break, but a mend to fix. Some wires change multiple controls, while others none. A common format to describe what actions on a wire will support goals 1 and 2.
wire,
WIRE_INERT,
WIRE_SHOCK,
WIRE_POWER,
WIRE_ACCESS,