airlock_pump ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 21](git.png)
The pump looks up for the airlocks automatically based on airlock_pump_distance_limit and airlock_group_distance_limit values. When placed, the dir value (direction where the pipes are coming from) is considered as a direction towards the station (internal). The opposite direction is external. The airlock then tries to find airlocks or walls towards these directions until airlock_pump_distance_limit number of tiles reached. When it finds a valid object, then it tries to find airlocks, in directions perpendicular to the found tiles. And then adds them to the corresponding group (external/internal) until airlock_group_distance_limit number of tiles reached
Example scheme of a valid configuration: A-----W A-----A W--P--A W-----W A-----W
Where: A - airlocks W - walls P - pump A vent, scrubber and a sensor in a single device meant specifically for cycling airlocks. Ideal for airlocks of up to 3x3 tiles in size to avoid wind and timing out.
Vars | |
adjacent_turfs | List of the turfs adjacent to the pump for faster cycling and avoiding wind |
---|---|
airlock_group_distance_limit | Max distance between the central airlock and the side airlocks in a group |
airlock_pump_distance_limit | Max distance between the airlock and the pump. Used to set up cycling. |
airlocks_animating | Airlocks currently animating |
allowed_pressure_error | Allowed error in pressure checks |
cycle_pressure_target | Target pressure for the current cycle |
cycle_start_time | The start time of the current cycle to calculate cycle duration |
cycle_timeout | Max duration of cycle, after which the pump will unlock the airlocks with a warning |
cycling_set_up | Whether both airlocks are specified and cycling is available |
external_airlocks | Space-facing airlocks used in cycling |
external_pressure_target | Target pressure for depressurization cycle |
internal_airlocks | Station-facing airlocks used in cycling |
internal_pressure_target | Target pressure for pressurization cycle |
is_cycling_audible | Whether the airlocks comment the cycling details to the chat |
min_distro_pressure | Minimal distro pressure to start cycling |
open_airlock_on_cycle | Whether the pump opens the airlocks up instead of simpy unbolting them on cycle |
pump_direction | Indicates that the direction of the pump, if ATMOS_DIRECTION_SIPHONING is siphoning, if ATMOS_DIRECTION_RELEASING is releasing |
valid_airlock_typepath | Type of airlocks required for automatic cycling setup. To avoid hacking bridge doors. Ignored for mapspawn pump. |
volume_rate | Rate of the pump to remove gases from the air |
Procs | |
airlock_act | Proc for triggering cycle by clicking on a bolted airlock that has a pump assigned |
break_all_links | Break the cycling setup |
check_turfs | Update adjacent_turfs with atmospherically adjacent tiles |
fill_tile | Fill a tile with air from the distro node |
find_density | Get the turf of the first found airlock or an airtight structure (walls) within the allowed range |
get_adjacent_airlocks | Find airlocks adjacent to the central one, lined up along the provided directions |
is_valid_airlock | Whether the passed airlock can be linked with |
set_links | Find airlocks and link up with them |
siphon_tile | Siphon air from the tile to the waste node within the volume rate limit |
start_cycle | Start decompression or pressurization cycle depending on the passed direction |
stop_cycle | Complete/Abort cycle with the passed message |
unlink_airlock | Find airlocks and link up with them |
Var Details
adjacent_turfs ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 58](git.png)
List of the turfs adjacent to the pump for faster cycling and avoiding wind
airlock_group_distance_limit ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 62](git.png)
Max distance between the central airlock and the side airlocks in a group
airlock_pump_distance_limit ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 60](git.png)
Max distance between the airlock and the pump. Used to set up cycling.
airlocks_animating ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 74](git.png)
Airlocks currently animating
allowed_pressure_error ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 48](git.png)
Allowed error in pressure checks
cycle_pressure_target ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 46](git.png)
Target pressure for the current cycle
cycle_start_time ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 54](git.png)
The start time of the current cycle to calculate cycle duration
cycle_timeout ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 56](git.png)
Max duration of cycle, after which the pump will unlock the airlocks with a warning
cycling_set_up ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 70](git.png)
Whether both airlocks are specified and cycling is available
external_airlocks ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 68](git.png)
Space-facing airlocks used in cycling
external_pressure_target ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 44](git.png)
Target pressure for depressurization cycle
internal_airlocks ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 66](git.png)
Station-facing airlocks used in cycling
internal_pressure_target ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 42](git.png)
Target pressure for pressurization cycle
is_cycling_audible ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 76](git.png)
Whether the airlocks comment the cycling details to the chat
min_distro_pressure ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 50](git.png)
Minimal distro pressure to start cycling
open_airlock_on_cycle ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 72](git.png)
Whether the pump opens the airlocks up instead of simpy unbolting them on cycle
pump_direction ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 40](git.png)
Indicates that the direction of the pump, if ATMOS_DIRECTION_SIPHONING is siphoning, if ATMOS_DIRECTION_RELEASING is releasing
valid_airlock_typepath ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 64](git.png)
Type of airlocks required for automatic cycling setup. To avoid hacking bridge doors. Ignored for mapspawn pump.
volume_rate ![code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm 52](git.png)
Rate of the pump to remove gases from the air
Proc Details
airlock_act
Proc for triggering cycle by clicking on a bolted airlock that has a pump assigned
break_all_links
Break the cycling setup
check_turfs
Update adjacent_turfs with atmospherically adjacent tiles
fill_tile
Fill a tile with air from the distro node
find_density
Get the turf of the first found airlock or an airtight structure (walls) within the allowed range
get_adjacent_airlocks
Find airlocks adjacent to the central one, lined up along the provided directions
is_valid_airlock
Whether the passed airlock can be linked with
set_links
Find airlocks and link up with them
siphon_tile
Siphon air from the tile to the waste node within the volume rate limit
start_cycle
Start decompression or pressurization cycle depending on the passed direction
stop_cycle
Complete/Abort cycle with the passed message
unlink_airlock
Find airlocks and link up with them