Skip to content

Resources & Atmosphere

Simulation clock

StationSimulation dispatches fixed-rate ticks to registered ISimulationTickable participants. Rooms, station resources, atmosphere networks, and crew vitals use this shared cadence instead of running independent simulation loops.

Global power

StationResourceGrid aggregates power production and consumption across its station hierarchy, including exterior placeables.

This allows a Solar Generator outside to power devices inside enclosed rooms without placing cable objects. Power is available when:

total production + external supply >= total consumption

A device without sufficient power becomes unavailable. Understaffed devices still report their nominal power demand, while non-power production pauses until functional requirements are satisfied.

Resource data

StationObjectDefinition can contain:

  • production rates;
  • consumption rates;
  • storage capacities;
  • semantic tag contributions;
  • crew, comfort, research, medical, storage, and other authored values.

ResourceProducer, ResourceConsumer, and ResourceStorage can add component-level rates when a project needs prefab-specific overrides.

Local oxygen

Each RoomModule owns its oxygen quantity and maximum capacity. The default generated capacity scales with cell count.

Crew consumes oxygen from its current room. Oxygen-producing devices add oxygen only when they are operational and powered. Station-wide UI totals are summaries; they do not turn all rooms into one atmosphere.

Pressure

Pressure is also local. IPressureModifier implementations such as PressureLeak can change it over time. Operational state reacts to low pressure and low oxygen thresholds.

Ventilation

Ventilator_1x1 is a wall attachment. It does not replace the wall and does not merge two logical rooms.

To connect two rooms:

  1. build two enclosed rooms sharing a wall;
  2. select Ventilator from Devices;
  3. target the shared wall edge;
  4. rotate to the intended side;
  5. ensure station power is available.

An active AtmosphereVent asks the grid for the two rooms on opposite sides and conservatively equalizes oxygen ratios and pressure through StationAtmosphereNetwork.

The vent transfers only when:

  • both sides resolve to different rooms;
  • the vent is enabled;
  • its device can operate;
  • the station has sufficient power.

Operational states

Rooms and devices expose meaningful states such as Operational, Unpowered, Understaffed, Low Oxygen, or Depressurized. Room UI reports these states; production code uses device requirements rather than relying on display strings.