Overview
Lever (StructureLogicSwitch) in Stationeers: device, hash 1220484876. With build steps, 6 IC10 logic values and connection diagram.
The lever is the simplest way to tell a program or a logic chain something by hand. It has exactly two positions, and they are stored in Open: 1 or 0. Open is readable and writable – so a chip can flip the lever itself, and the lever visibly moves along.
Setting is read only and follows the position: every time the lever is flipped, it copies the new value of Open into Setting. That matters for logic chains, because a Logic Writer always takes the Setting of its source. Lock only locks manual operation – a chip can still flip a locked lever through Open.
It needs no power and has two data ports. It is built from the Kit (Logic Switch). The same kit also builds the switch (Switch), the Button, the Dial and the Important Button.
Most often the lever serves as a master switch for a program. The chip reads it by name, for example with lbn enabled LEVER NLEVER Open 0, and only acts when Open reports 1.
Think about the case where the lever is missing or wrongly named: lbn then returns NaN. Decide beforehand what is safe – for a vent rather “off”, for emergency lighting rather “on”. A complete example with a lever is in Logic without a chip: reader, writer, memory, compare, math.
IC10 and logic
6 logic values, 6 readable and 2 writable.
-
OpenRW 2 -
LockRW 10 -
SettingR 12 -
PrefabHashR 84 -
ReferenceIdR 217 -
NameHashR 268
Example: address by name
Reads Setting, shows the value on the IC housing and writes Open. Name the device with the labeller first; devices with the same name are addressed together.
# Lever address by name
define DEVICE 1220484876 # StructureLogicSwitch
define NAME HASH("Lever") # name in game (labeller)
define TARGET 1 # Open 1 = open
alias value r0
start:
yield
lbn value DEVICE NAME Setting 0 # 0 = average of all with this name
bnan value start # no device with this name
s db Setting value # show on the housing
sbn DEVICE NAME Open TARGET # set value
j startAcademy: devices by name Academy: batch modes IC10 academy IC10 editor
Connections
- 1Data
- 2Data
Building and deconstruction
Grid: small grid (0.5 m) · mounting: on wall or floor
- 1
Total material
Deconstruction returns
Built with: Kit (Logic Switch)
Material, fire and recycling
Flammable according to game data: flash point 373.2 K (100 °C); Autoignition 573.2 K (300 °C); burn time 5 s
Raw values from the game code (3)
Field names as in the game code, untranslated. Useful for mods and exact limits.
LogicUnitBase.ConnectionType | FlatExhaustive |
LogicUnitBase.Input1Index | 0 |
LogicUnitBase.OutputIndex | 1 |
See also
- Logic without a chip: reader, writer, memory, compare, mathWith logic readers, writers, compare, math and memory units you build simple controls with no program at all. What each part does, what it costs and when the chip is the better choice.
- Building an airlock: layout, control, common mistakesWhich parts an airlock is made of, how much air a cycle moves, a complete IC10 program with a lever and the mistakes airlocks usually fail on.