Space Station 13 - Modules - TypesVar Details - Proc Details

area

Vars

air_doors_activatedBoolean. Whether or not the area's firedoors are activated (closed). Tied to area alarm processing. Do not modify directly; Use air_doors_close() or air_doors_open() instead.
air_scrub_infoList (string (id_tag) => /datum/signal/data). List of radio signal data received from scrubbers in the area, indexed by the scrubber's id_tag. Do not modify directly; See ./receive_signal() and ./send_signal().
air_scrub_namesList (string (id_tag) => string). List of 'long names' for scrubbers within the area. Also serves as a list of all scrubbers registered with the area. Set by ./register_env_machine().
air_vent_infoList (string (id_tag) => /datum/signal/data). List of radio signal data received from vents in the area, indexed by the vent's id_tag. Do not modify directly; See ./receive_signal() and ./send_signal().
air_vent_namesList (string (id_tag) => string). List of 'long names' for vents within the area. Also serves as a list of all vents registered with the area. Set by ./register_env_machine().
all_doorsLAZYLIST (/obj/machinery/door/firedoor). Contains a list of all firedoors within and adjacent to this area. Updated during a firedoor's Initialize() and Destroy() calls. Do not modify directly.
always_unpoweredBoolean. Whether or not the area is always considered to be unpowered, bypassing all other area checks if TRUE.
ambienceList (file (sounds)). List of sounds that can be played to mobs in the area as ambience. See ./play_ambience().
apcDirect reference to the APC installed in the area, if it exists. Automatically updated during the APC's Initialize() and Destroy() calls.
area_flagsBitflag (Any of AREA_FLAG_*). See code\__defines\misc.dm.
atmosalmInteger (0, 1, or 2). Whether or not the area has an active atmosphere alarm and the level of the atmosphere alarm. Do not modify directly; Use ./atmosalert() instead.
base_turfThe base turf type of the area, which can be used to override the z-level's base_turf for floor deconstruction.
base_turf_special_handlingBoolean. Some base_turfs might cause issues with changing turfs, this flags it as a special case. See /proc/get_base_turf_by_area().
ejectBoolean. Whether or not the area is in the 'Evacuation' alert state. Do not modify directly; Use ./readyalert() or ./readyreset() instead.
fireBoolean. Whether or not the area has an active fire alarm. Do not modify directly; Use ./fire_alert() and ./fire_reset() instead.
forced_ambienceLAZYLIST (file (sounds)). Additional ambience files. These are always played instead of only on probability, are set to loop, and are slightly louder than ambience sound files. See ./play_ambience().
global_uidInteger. Global counter for uid values assigned to areas. Increments by one for each new area.
has_gravityBoolean. Whether or not the area has gravity. Do not set directly; Use ./gravitychange() instead.
holomap_colorString (Color HEX code). Color of this area on the holomap. Can be one of HOLOMAP_AREACOLOR_*.
lightswitchBoolean. Whether or not the area's lightswitch is switched to 'On' or 'Off'. Used to synchronize lightswitch buttons. Do not modify directly; Use ./set_lightswitch() instead.
oneoff_environInteger. Amount of power to drain from the ENVIRON channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.
oneoff_equipInteger. Amount of power to drain from the EQUIP channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.
oneoff_lightInteger. Amount of power to drain from the LIGHT channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.
partyBoolean. Whether or not the area is in 'party light' mode. Do not modify directly; Use ./partyalert() or ./partyreset() instead.
planetary_surfaceBoolean. Whether or not the area belongs to a planet.
power_environBoolean. Whether or not the ENVIRON power channel is enabled for the area. Updated and used by APCs.
power_equipBoolean. Whether or not the EQUIP power channel is enabled for the area. Updated and used by APCs.
power_lightBoolean. Whether or not the LIGHT power channel is enabled for the area. Updated and used by APCs.
req_accessList (string (access_*)). Access requirements for the area. Used for autosetting access on doors, etc.
requires_powerBoolean. Whether or not the area requires power to be considered powered, bypassing all other checks if TRUE. This takes priority over always_unpowered.
secureBoolean. Whether or not the area is considered 'secure'. Unsecure areas will have doors between them use access diff; secure ones use union.
sound_envInteger (One of the environments defined in code\game\sound.dm). Sound environment used for modification of sounds played to mobs in the area.
turf_initializerType path (Types of /singleton/turf_initializer). If set, uses the provided singleton to modify all turfs in the area during Initialize().
turfs_airlessBoolean (Default FALSE) - If set, floor turfs in the area will be set to airless when they initialize. This is unset during LateInitialize() to avoid interfering with player-placed tiles.
turret_controlsList (/obj/machinery/turretid). A list of all turret control panels in the area. Turrets use this list to see if individual power/lethal settings are allowed. Updated during Initialize() and Destroy() calls on the controllers.
uidInteger. The area's unique ID number. set to the value of global_uid + 1 when the area is created.
used_environInteger. Amount of constant use power drain from the ENVIRON power channel. Do not modify; Use ./power_use_change() instead.
used_equipInteger. Amount of constant use power drain from the EQUIP power channel. Do not modify; Use ./power_use_change() instead.
used_lightInteger. Amount of constant use power drain from the LIGHT power channel. Do not modify; Use ./power_use_change() instead.
vent_pumpsA lazy list of vent pumps currently in the area

Procs

air_doors_closeSets air_doors_activated and sets all firedoors in all_doors to the closed state. Does nothing if air_doors_activated is already set.
air_doors_openClears air_doors_activated and sets all firedoors in all_doors to the open state. Does nothing if air_doors_activated is already cleared.
atmosalertDefines the area's atmosphere alert level.
can_modify_areaReturns boolean. Whether or not the area can be modified by player actions.
clear_usageSets all oneoff_* vars to 0. Helper for APCs. Called every machinery process tick.
copy_contents_toAttempts to move the contents, including turfs, of one area to another area. Positioning is based on the lower left corner of both areas. Tiles that do not fit into the new area will not be copied. Source atoms are not modified or deleted. Turfs are created using ChangeTurf(). dir, icon, and icon_state are copied. All other vars use the default value for the copied atom. Primarily used for holodecks.
fire_alertSets a fire alarm in the area, if one is not already active.
fire_resetClears an active fire alarm from the area.
get_camerasReturns list (/obj/machinery/camera). A list of all cameras in the area.
get_dimensionsReturns List (axis => Integer). The width and height, in tiles, of the area, indexed by axis. Axis is "x" or "y".
gravitychangeSets the area's has_gravity state.
has_gravityReturns boolean. Whether or not the area is considered to have gravity.
has_turfsReturns boolean. Whether or not there are any turfs (/turf) in src.
partyalertSets a party alarm in the area, if one is not already active.
partyresetClears an active party alarm from the area.
play_ambienceHandles playing ambient sounds to a given mob, including ship hum.
power_changeCalled whenever the area's power or power usage state should change.
power_use_changeUpdates the area's continuous power use (See the used_* vars) for the given channel. This is used by machines to properly update the area of power use changes.
poweredReturns boolean. Whether or not the area is considered to have power for the given power channel. See requires_power and always_unpowered for some area-level overrides.
prison_breakTrigger for the prison break event. Causes lighting to overload and dooes to open. Has no effect if the area lacks an APC or the APC is turned off.
readyalertSets an active evacuation alarm in the area, if one is not already active.
readyresetClears an active evacuation alarm from the area.
retally_powerRecomputes the continued power usage; can be used for testing or error recovery, but is not called under normal conditions.
set_emergency_lightingCalls set_emergency_lighting(enable) on all /obj/machinery/light in src.
set_lightswitchSets the area's light switch state to on or off, in turn turning all lights in the area on or off.
thunkCauses the provided mob to 'slam' down to the floor if certain conditions are not met. Primarily used for gravity changes.
usageReturns Integer. The total amount of power usage queued for the area from both used_* and oneoff_* for the given power channel, or all channels if TOTAL is passed instead.
use_powerAdds the given amount of power to the used_* var for the given power channel, effectively increasing continuous power usage.
use_power_oneoffAdds the given amount of power to the oneoff_* var for the given power channel. This results in a single spike in power usage that is reset on the next power tick. Use this for a one-time power draw from the area, typically for non-machines.

Var Details

air_doors_activated

Boolean. Whether or not the area's firedoors are activated (closed). Tied to area alarm processing. Do not modify directly; Use air_doors_close() or air_doors_open() instead.

air_scrub_info

List (string (id_tag) => /datum/signal/data). List of radio signal data received from scrubbers in the area, indexed by the scrubber's id_tag. Do not modify directly; See ./receive_signal() and ./send_signal().

air_scrub_names

List (string (id_tag) => string). List of 'long names' for scrubbers within the area. Also serves as a list of all scrubbers registered with the area. Set by ./register_env_machine().

air_vent_info

List (string (id_tag) => /datum/signal/data). List of radio signal data received from vents in the area, indexed by the vent's id_tag. Do not modify directly; See ./receive_signal() and ./send_signal().

air_vent_names

List (string (id_tag) => string). List of 'long names' for vents within the area. Also serves as a list of all vents registered with the area. Set by ./register_env_machine().

all_doors

LAZYLIST (/obj/machinery/door/firedoor). Contains a list of all firedoors within and adjacent to this area. Updated during a firedoor's Initialize() and Destroy() calls. Do not modify directly.

always_unpowered

Boolean. Whether or not the area is always considered to be unpowered, bypassing all other area checks if TRUE.

ambience

List (file (sounds)). List of sounds that can be played to mobs in the area as ambience. See ./play_ambience().

apc

Direct reference to the APC installed in the area, if it exists. Automatically updated during the APC's Initialize() and Destroy() calls.

area_flags

Bitflag (Any of AREA_FLAG_*). See code\__defines\misc.dm.

atmosalm

Integer (0, 1, or 2). Whether or not the area has an active atmosphere alarm and the level of the atmosphere alarm. Do not modify directly; Use ./atmosalert() instead.

base_turf

The base turf type of the area, which can be used to override the z-level's base_turf for floor deconstruction.

base_turf_special_handling

Boolean. Some base_turfs might cause issues with changing turfs, this flags it as a special case. See /proc/get_base_turf_by_area().

eject

Boolean. Whether or not the area is in the 'Evacuation' alert state. Do not modify directly; Use ./readyalert() or ./readyreset() instead.

fire

Boolean. Whether or not the area has an active fire alarm. Do not modify directly; Use ./fire_alert() and ./fire_reset() instead.

forced_ambience

LAZYLIST (file (sounds)). Additional ambience files. These are always played instead of only on probability, are set to loop, and are slightly louder than ambience sound files. See ./play_ambience().

global_uid

Integer. Global counter for uid values assigned to areas. Increments by one for each new area.

has_gravity

Boolean. Whether or not the area has gravity. Do not set directly; Use ./gravitychange() instead.

holomap_color

String (Color HEX code). Color of this area on the holomap. Can be one of HOLOMAP_AREACOLOR_*.

lightswitch

Boolean. Whether or not the area's lightswitch is switched to 'On' or 'Off'. Used to synchronize lightswitch buttons. Do not modify directly; Use ./set_lightswitch() instead.

oneoff_environ

Integer. Amount of power to drain from the ENVIRON channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.

oneoff_equip

Integer. Amount of power to drain from the EQUIP channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.

oneoff_light

Integer. Amount of power to drain from the LIGHT channel on the next power tick. Do not modify directly; Use ./use_power_oneoff() instead. This is reset to 0 every power tick after processing power use.

party

Boolean. Whether or not the area is in 'party light' mode. Do not modify directly; Use ./partyalert() or ./partyreset() instead.

planetary_surface

Boolean. Whether or not the area belongs to a planet.

power_environ

Boolean. Whether or not the ENVIRON power channel is enabled for the area. Updated and used by APCs.

power_equip

Boolean. Whether or not the EQUIP power channel is enabled for the area. Updated and used by APCs.

power_light

Boolean. Whether or not the LIGHT power channel is enabled for the area. Updated and used by APCs.

req_access

List (string (access_*)). Access requirements for the area. Used for autosetting access on doors, etc.

requires_power

Boolean. Whether or not the area requires power to be considered powered, bypassing all other checks if TRUE. This takes priority over always_unpowered.

secure

Boolean. Whether or not the area is considered 'secure'. Unsecure areas will have doors between them use access diff; secure ones use union.

sound_env

Integer (One of the environments defined in code\game\sound.dm). Sound environment used for modification of sounds played to mobs in the area.

turf_initializer

Type path (Types of /singleton/turf_initializer). If set, uses the provided singleton to modify all turfs in the area during Initialize().

turfs_airless

Boolean (Default FALSE) - If set, floor turfs in the area will be set to airless when they initialize. This is unset during LateInitialize() to avoid interfering with player-placed tiles.

turret_controls

List (/obj/machinery/turretid). A list of all turret control panels in the area. Turrets use this list to see if individual power/lethal settings are allowed. Updated during Initialize() and Destroy() calls on the controllers.

uid

Integer. The area's unique ID number. set to the value of global_uid + 1 when the area is created.

used_environ

Integer. Amount of constant use power drain from the ENVIRON power channel. Do not modify; Use ./power_use_change() instead.

used_equip

Integer. Amount of constant use power drain from the EQUIP power channel. Do not modify; Use ./power_use_change() instead.

used_light

Integer. Amount of constant use power drain from the LIGHT power channel. Do not modify; Use ./power_use_change() instead.

vent_pumps

A lazy list of vent pumps currently in the area

Proc Details

air_doors_close

Sets air_doors_activated and sets all firedoors in all_doors to the closed state. Does nothing if air_doors_activated is already set.

air_doors_open

Clears air_doors_activated and sets all firedoors in all_doors to the open state. Does nothing if air_doors_activated is already cleared.

atmosalert

Defines the area's atmosphere alert level.

Parameters:

Returns boolean. TRUE if the atmosphere alarm level was changed, FALSE otherwise.

can_modify_area

Returns boolean. Whether or not the area can be modified by player actions.

clear_usage

Sets all oneoff_* vars to 0. Helper for APCs. Called every machinery process tick.

copy_contents_to

Attempts to move the contents, including turfs, of one area to another area. Positioning is based on the lower left corner of both areas. Tiles that do not fit into the new area will not be copied. Source atoms are not modified or deleted. Turfs are created using ChangeTurf(). dir, icon, and icon_state are copied. All other vars use the default value for the copied atom. Primarily used for holodecks.

Parameters:

Returns List (/atom). A list containing all atoms that were created at the target area during the process.

fire_alert

Sets a fire alarm in the area, if one is not already active.

fire_reset

Clears an active fire alarm from the area.

get_cameras

Returns list (/obj/machinery/camera). A list of all cameras in the area.

get_dimensions

Returns List (axis => Integer). The width and height, in tiles, of the area, indexed by axis. Axis is "x" or "y".

gravitychange

Sets the area's has_gravity state.

Parameters:

has_gravity

Returns boolean. Whether or not the area is considered to have gravity.

has_turfs

Returns boolean. Whether or not there are any turfs (/turf) in src.

partyalert

Sets a party alarm in the area, if one is not already active.

partyreset

Clears an active party alarm from the area.

play_ambience

Handles playing ambient sounds to a given mob, including ship hum.

power_change

Called whenever the area's power or power usage state should change.

power_use_change

Updates the area's continuous power use (See the used_* vars) for the given channel. This is used by machines to properly update the area of power use changes.

If calling this from a /obj/machine, you should probably use REPORT_POWER_CONSUMPTION_CHANGE() instead.

Parameters:

powered

Returns boolean. Whether or not the area is considered to have power for the given power channel. See requires_power and always_unpowered for some area-level overrides.

prison_break

Trigger for the prison break event. Causes lighting to overload and dooes to open. Has no effect if the area lacks an APC or the APC is turned off.

readyalert

Sets an active evacuation alarm in the area, if one is not already active.

readyreset

Clears an active evacuation alarm from the area.

retally_power

Recomputes the continued power usage; can be used for testing or error recovery, but is not called under normal conditions.

set_emergency_lighting

Calls set_emergency_lighting(enable) on all /obj/machinery/light in src.

set_lightswitch

Sets the area's light switch state to on or off, in turn turning all lights in the area on or off.

thunk

Causes the provided mob to 'slam' down to the floor if certain conditions are not met. Primarily used for gravity changes.

usage

Returns Integer. The total amount of power usage queued for the area from both used_* and oneoff_* for the given power channel, or all channels if TOTAL is passed instead.

use_power

Adds the given amount of power to the used_* var for the given power channel, effectively increasing continuous power usage.

Generally, you probably do not want to use this directly. See power_use_change() and use_power_oneoff() instead.

Parameters:

use_power_oneoff

Adds the given amount of power to the oneoff_* var for the given power channel. This results in a single spike in power usage that is reset on the next power tick. Use this for a one-time power draw from the area, typically for non-machines.

Parameters: