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

firedoor

Vars

activeIs this firelock active/closed?
affecting_areasList of areas we handle. See CalculateAffectingAreas()
alarm_typeType of alarm we're under. See code/defines/firealarm.dm for the list. This var being null means there is no alarm.
assemblytypeThe type of door frame to drop during deconstruction
being_held_openTracks if the firelock is being held open by a crowbar. If so, we don't close until they walk away
ignore_alarmsShould the firelock ignore atmosphere when choosing to stay open/closed?
is_playing_alarmKeeps track of if we're playing the alarm sound loop (as only one firelock per group should be). Used during power changes.
issue_turfsList of problem turfs with bad temperature
light_xoffsetX offset for the overlay lights, so that they line up with the thin border firelocks
light_yoffsetY offset for the overlay lights, so that they line up with the thin border firelocks
merger_idThe merger_id and merger_typecache variables are used to make rows of firelocks activate at the same time.
my_areaFor the few times we affect only the area we're actually in. Set during Init. If we get moved, we don't update, but this is consistant with fire alarms and also kinda funny so call it intentional.
soundlooplooping sound datum for our fire alarm siren.
warn_lightsOverlay object for the warning lights. This and some plane settings allows the lights to glow in the dark.

Procs

CalculateAffectingAreasCalculates what areas we should worry about.
activateProc that handles activation of the firelock and all this details
add_as_sourceAdds this fire door as a source of trouble to all of its areas
adjust_lights_starting_offsetSets the offset for the warning lights.
correct_stateCorrects the current state of the door, based on its activity.
crack_openOpen the firedoor without resetting existing alarms
release_constraintsReset our temporary alarm ignoring Consider if we should close ourselves/our neighbors or not
remove_as_sourceRemoves this firedoor from all areas it's serving as a source of problems for
resetProc that handles reset steps
start_activation_processBegins activation process of us and our neighbors.
start_deactivation_processBegins deactivation process of us and our neighbors.
try_to_crowbarWe check for adjacency when using the primary attack.
try_to_crowbar_secondaryA simple toggle for firedoors between on and off

Var Details

active

Is this firelock active/closed?

affecting_areas

List of areas we handle. See CalculateAffectingAreas()

alarm_type

Type of alarm we're under. See code/defines/firealarm.dm for the list. This var being null means there is no alarm.

assemblytype

The type of door frame to drop during deconstruction

being_held_open

Tracks if the firelock is being held open by a crowbar. If so, we don't close until they walk away

ignore_alarms

Should the firelock ignore atmosphere when choosing to stay open/closed?

is_playing_alarm

Keeps track of if we're playing the alarm sound loop (as only one firelock per group should be). Used during power changes.

issue_turfs

List of problem turfs with bad temperature

light_xoffset

X offset for the overlay lights, so that they line up with the thin border firelocks

light_yoffset

Y offset for the overlay lights, so that they line up with the thin border firelocks

merger_id

The merger_id and merger_typecache variables are used to make rows of firelocks activate at the same time.

my_area

For the few times we affect only the area we're actually in. Set during Init. If we get moved, we don't update, but this is consistant with fire alarms and also kinda funny so call it intentional.

soundloop

looping sound datum for our fire alarm siren.

warn_lights

Overlay object for the warning lights. This and some plane settings allows the lights to glow in the dark.

Proc Details

CalculateAffectingAreas

Calculates what areas we should worry about.

This proc builds a list of areas we are in and areas we border and writes it to affecting_areas.

activate

Proc that handles activation of the firelock and all this details

Sets active and alarm type to properly represent our state. Also calls set_status() on all fire alarms in all affected areas, tells the area the firelock sits in to report the event (AI, alarm consoles, etc) and finally calls correct_state(), which will handle opening or closing this fire lock.

add_as_source

Adds this fire door as a source of trouble to all of its areas

adjust_lights_starting_offset

Sets the offset for the warning lights.

Used for special firelocks with light overlays that don't line up to their sprite.

correct_state

Corrects the current state of the door, based on its activity.

This proc is called after weld and power restore events. Gives the illusion that the door is constantly attempting to move without actually having to process it. Timers also call this, so that if activity changes during the timer, the door doesn't close or open incorrectly.

crack_open

Open the firedoor without resetting existing alarms

release_constraints

Reset our temporary alarm ignoring Consider if we should close ourselves/our neighbors or not

remove_as_source

Removes this firedoor from all areas it's serving as a source of problems for

reset

Proc that handles reset steps

Clears the alarm state and attempts to open the firelock.

start_activation_process

Begins activation process of us and our neighbors.

This proc will call activate() on every fire lock (including us) listed in the merge group datum. Returns without doing anything if we're already active, cause of course

Arguments: code should be one of three defined alarm types, or can be not supplied. Will dictate the color of the fire alarm lights, and defaults to "firelock_alarm_type_generic"

start_deactivation_process

Begins deactivation process of us and our neighbors.

This proc will call reset() on every fire lock (including us) listed in the merge group datum. sets our alarm type to null, signifying no alarm.

try_to_crowbar

We check for adjacency when using the primary attack.

try_to_crowbar_secondary

A simple toggle for firedoors between on and off