stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. Stationeers wiki
  3. Devices
  4. Occupancy Sensor

Devices

Occupancy Sensor

Anwesenheitssensor

PrefabStructureOccupancySensor Hash322782515in the hash lookup
Power paintable Game 0.2.6428.27798

Overview

Occupancy Sensor (StructureOccupancySensor) in Stationeers: device, hash 322782515. With build steps, 6 IC10 logic values and connection diagram.

The occupancy sensor is the calmer sibling of the Motion Sensor. According to the game data it needs no power, mounts in the 0.5 m grid and has one shared port for power and data.

What it covers: according to the game code it counts the player characters in the same room – the area the game recognises as a closed room. Loose items do not count. If it hangs outside or the room is not sealed, it always reports 0. Activate is not a 0/1 signal here but the number of people; Quantity gives the same value. With an access restriction it only counts authorised people. All values, StackSize included, are read only, and it has no On.

The 18 memory slots: a chip reads them with get at addresses 0 to 17. get does not work by name – the sensor has to sit on one of the housing's pins, or you pass its ReferenceId. The sensor rebuilds the list on every logic tick: for each person in the room there is one entry for the person, followed by one entry for every occupied slot of their inventory. After 18 entries the list ends; unused slots read 0. Every entry is a packed number:

  • the lowest 8 bits (and with 255) are the kind: 1 = person, 2 = item,
  • for a person, the prefab hash of the character starts at bit 8 (sra by 8),
  • for an item, bits 8 to 15 hold the slot number and the item's prefab hash starts at bit 16 (sra by 16).

That way a chip can check, for example, whether somebody wearing a helmet stands in the airlock. A person with many occupied slots fills the 18 entries quickly, though.

It is built from the Kit (Sensors). According to the game data it is flammable (auto-ignition from 573 K). Typical uses are lights, heating or ventilation that only run while somebody is in the room. More about sensors is in Sensors: gas, daylight, motion, occupancy.

IC10 and logic

6 logic values, 6 readable and 0 writable.

  • Activate R 9
  • Quantity R 27
  • PrefabHash R 84
  • ReferenceId R 217
  • NameHash R 268
  • StackSize R 280

Example: address by name

Reads Quantity, shows the value on the IC housing and writes –. Name the device with the labeller first; devices with the same name are addressed together.

# Occupancy Sensor address by name
define DEVICE 322782515  # StructureOccupancySensor
define NAME HASH("Occupancy Sensor")  # name in game (labeller)
alias value r0

start:
yield
lbn value DEVICE NAME Quantity 0  # 0 = average of all with this name
bnan value start  # no device with this name
s db Setting value  # show on the housing
j start

Connections

1
Schematic: inputs left, outputs right, waste on top, power and data at the bottom. Position and spacing do not match the model.
  1. 1Power and data

Building and deconstruction

Grid: small grid (0.5 m) · mounting: on wall or floor

  1. 1

    Place

    Take back with Hand Drill

Total material

Deconstruction returns

Built with: Kit (Sensors)

Material, fire and recycling

Flammable according to game data: flash point 373.2 K (100 °C); Autoignition 573.2 K (300 °C); burn time 2.33 s

Raw values from the game code (1)

Field names as in the game code, untranslated. Useful for mods and exact limits.

Sensor.ConnectionTypeFlatExhaustive

See also

  • Sensors: gas, daylight, motion, occupancyWhich sensor measures what, which logic values it delivers and how to combine several sensors cleanly – with a worked example on oxygen partial pressure and two programs.
Esc
↑ ↓ selectEnter open/ opens search anywhere