/tg/ Station 13 - Modules - TypesVar Details - Proc Details

airlock

Vars

aiControlDisabledIf 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
air_tightTRUE means density will be set as soon as the door begins to close
airlock_materialMaterial of inner filling; if its an airlock with glass, this should be set to "glass"
airlock_stateThe current state of the airlock, used to construct the airlock overlays
assemblytypeThe type of door frame to drop during deconstruction
backup_power_timePaired with backup_power_timer. Records its remaining time when something happens to interrupt power regen
backup_power_timerTimer id, active when we are actively waiting for the backup power to be restored
closeOtherIdCyclelinking for airlocks that aren't on the same x or y coord as the target.
cycle_pumpAirlock pump that overrides airlock controlls when set up for cycling
delayed_close_requestedTRUE means the door will automatically close the next time it's opened.
hackProofIf true, this door can't be hacked by the AI
lightsBolt lights show by default
main_power_timePaired with main_power_timer. Records its remaining time when something happens to interrupt power regen
main_power_timerTimer id, active when we are actively waiting for the main power to be restored
normalspeedControls if the door closes quickly or not. FALSE = the door autocloses in 1.5 seconds, TRUE = 8 seconds - see autoclose_in()
noteAny papers pinned to the airlock
note_overlay_fileUsed for papers and photos pinned to the airlock
previous_airlockWhat airlock assembly mineral plating was applied to
sealThe seal on the airlock
secondsElectrifiedHow many seconds remain until the door is no longer electrified. -1/MACHINE_ELECTRIFIED_PERMANENT = permanently electrified until someone fixes it.
security_levelHow much are wires secured
shockedbyLogging for door electrification.

Procs

beforeShuttleMoveTurf move procs
check_hackingPerforms basic checks to make sure we are still able to hack an airlock. If control is restored early through outside means, opens the airlock's control interface.
finish_emag_actTimer proc, called ~0.6 seconds after [emag_act]. Finishes the emag sequence by breaking the airlock, permanently locking it, and disabling power.
get_note_stateReturns a string representing the type of note pinned to this airlock Arguments:
get_wiresGenerates the airlock's wire layout based on the current area the airlock resides in.
hackAttemps to override airlocks that have the AI control wire disabled.
handle_backup_powerCall to update our backup power outage timer Will trigger a proper timer if we're actively restoring power, if not we'll dump the remaining time in a var on the airlock
handle_main_powerCall to update our main power outage timer Will trigger a proper timer if we're actively restoring power, if not we'll dump the remaining time in a var on the airlock
power_wires_changedIf our power wires have changed, then our backup/main power regen may have failed, so let's just check in yeah?
remaining_backup_outageReturns the amount of time we have to wait before backup power comes back Assuming it was actively regenerating Returns 0 if it is active
remaining_main_outageReturns the amount of time we have to wait before main power comes back Assuming it was actively regenerating Returns 0 if it is active
secure_closeForces the airlock to close and bolt
secure_openForces the airlock to unbolt and open
should_try_removing_electronicsReturns if a crowbar would remove the airlock electronics
try_remove_sealUsed when attempting to remove a seal from an airlock
try_to_force_door_openAdditional checks depending on what we want to happen to door (should we try and open it normally, or do we want this open at all costs?)

Var Details

aiControlDisabled

If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.

air_tight

TRUE means density will be set as soon as the door begins to close

airlock_material

Material of inner filling; if its an airlock with glass, this should be set to "glass"

airlock_state

The current state of the airlock, used to construct the airlock overlays

assemblytype

The type of door frame to drop during deconstruction

backup_power_time

Paired with backup_power_timer. Records its remaining time when something happens to interrupt power regen

backup_power_timer

Timer id, active when we are actively waiting for the backup power to be restored

closeOtherId

Cyclelinking for airlocks that aren't on the same x or y coord as the target.

cycle_pump

Airlock pump that overrides airlock controlls when set up for cycling

delayed_close_requested

TRUE means the door will automatically close the next time it's opened.

hackProof

If true, this door can't be hacked by the AI

lights

Bolt lights show by default

main_power_time

Paired with main_power_timer. Records its remaining time when something happens to interrupt power regen

main_power_timer

Timer id, active when we are actively waiting for the main power to be restored

normalspeed

Controls if the door closes quickly or not. FALSE = the door autocloses in 1.5 seconds, TRUE = 8 seconds - see autoclose_in()

note

Any papers pinned to the airlock

note_overlay_file

Used for papers and photos pinned to the airlock

previous_airlock

What airlock assembly mineral plating was applied to

seal

The seal on the airlock

secondsElectrified

How many seconds remain until the door is no longer electrified. -1/MACHINE_ELECTRIFIED_PERMANENT = permanently electrified until someone fixes it.

security_level

How much are wires secured

shockedby

Logging for door electrification.

Proc Details

beforeShuttleMove

Turf move procs

Area move procs

Machinery move procs

check_hacking

Performs basic checks to make sure we are still able to hack an airlock. If control is restored early through outside means, opens the airlock's control interface.

finish_emag_act

Timer proc, called ~0.6 seconds after [emag_act]. Finishes the emag sequence by breaking the airlock, permanently locking it, and disabling power.

get_note_state

Returns a string representing the type of note pinned to this airlock Arguments:

get_wires

Generates the airlock's wire layout based on the current area the airlock resides in.

Returns a new /datum/wires/ with the appropriate wire layout based on the airlock_wires of the area the airlock is in.

hack

Attemps to override airlocks that have the AI control wire disabled.

handle_backup_power

Call to update our backup power outage timer Will trigger a proper timer if we're actively restoring power, if not we'll dump the remaining time in a var on the airlock

handle_main_power

Call to update our main power outage timer Will trigger a proper timer if we're actively restoring power, if not we'll dump the remaining time in a var on the airlock

power_wires_changed

If our power wires have changed, then our backup/main power regen may have failed, so let's just check in yeah?

remaining_backup_outage

Returns the amount of time we have to wait before backup power comes back Assuming it was actively regenerating Returns 0 if it is active

remaining_main_outage

Returns the amount of time we have to wait before main power comes back Assuming it was actively regenerating Returns 0 if it is active

secure_close

Forces the airlock to close and bolt

secure_open

Forces the airlock to unbolt and open

should_try_removing_electronics

Returns if a crowbar would remove the airlock electronics

try_remove_seal

Used when attempting to remove a seal from an airlock

Called when attacking an airlock with an empty hand, returns TRUE (there was a seal and we removed it, or failed to remove it) or FALSE (there was no seal) Arguments:

try_to_force_door_open

Additional checks depending on what we want to happen to door (should we try and open it normally, or do we want this open at all costs?)