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

apc

Vars

aidisabledIs the AI locked from using the APC
alarm_managerRepresents a signel source of power alarms for this apc
areaReference to our area
areastringMapper helper to tie an apc to another area
auto_nameAutomatically name the APC after the area is in
beenhitused for counting how many times it has been hit, used for Aliens at the moment
cellReference to our internal cell
cell_typeType of cell we start with
chargecountNumber of ticks where the apc is trying to recharge
chargemodeCan the APC charge?
chargingState of the apc charging (not charging, charging, fully charged)
coverlockedIs the apc cover locked?
emergency_lightsShould the emergency lights be on?
environState of the environmental channel (off, auto off, on, auto on)
equipmentState of the equipment channel (off, auto off, on, auto on)
failure_timerTime to allow the APC to regain some power and to turn the channels back online
force_updateForces an update on the power use to ensure that the apc has enough power
has_electronicsState of the electronics inside (missing, installed, secured)
icon_update_neededUsed to stop process from updating the icons too much
last_nightshift_switchTime when the nightshift where turned on last, to prevent spamming
lastused_environAmount of power used by the environmental channel
lastused_equipAmount of power used by the equipment channel
lastused_lightAmount of power used by the lighting channel
lastused_totalTotal amount of power used by the three channels
light_on_rangeRange of the light emitted when on
lightingState of the lighting channel (off, auto off, on, auto on)
lockedIs the apc interface locked?
long_term_powerbuffer state that makes apcs not shut off channels immediately as long as theres some power left, effect visible in apcs only slowly losing power
main_statusState of the apc external power (no power, low power, has power)
malfaiReference to our ai hacker
malfhackIs the apc hacked by a malf ai?
nightshift_lightsShould the nighshift lights be on?
occupierReference to the shunted ai inside
offset_oldOffsets the object by APC_PIXEL_OFFSET (defined in apc_defines.dm) pixels in the direction we want it placed in. This allows the APC to be embedded in a wall, yet still inside an area (like mapping).
openedState of the cover (closed, opened, removed)
operatingIs the apc working
overloadused for the Blackout malf module
remote_controlReference to our remote control
shortedIs the APC shorted and not working?
start_chargeInitial cell charge %
terminalReference to our cable terminal
transfer_in_progressIs there an AI being transferred out of us?
update_overlayStores the flag for the overlays
update_stateStores the flags for the icon state

Procs

DestroyThis is how we test to ensure that mappers use the directional subtypes of APCs, rather than use the parent and pixel-shift it themselves.
autosetReturns the new status value for an APC channel.
check_updatesChecks for what icon updates we will need to handle
setsubsystemUsed by external forces to set the APCs channel status's.

Var Details

aidisabled

Is the AI locked from using the APC

alarm_manager

Represents a signel source of power alarms for this apc

area

Reference to our area

areastring

Mapper helper to tie an apc to another area

auto_name

Automatically name the APC after the area is in

beenhit

used for counting how many times it has been hit, used for Aliens at the moment

cell

Reference to our internal cell

cell_type

Type of cell we start with

chargecount

Number of ticks where the apc is trying to recharge

chargemode

Can the APC charge?

charging

State of the apc charging (not charging, charging, fully charged)

coverlocked

Is the apc cover locked?

emergency_lights

Should the emergency lights be on?

environ

State of the environmental channel (off, auto off, on, auto on)

equipment

State of the equipment channel (off, auto off, on, auto on)

failure_timer

Time to allow the APC to regain some power and to turn the channels back online

force_update

Forces an update on the power use to ensure that the apc has enough power

has_electronics

State of the electronics inside (missing, installed, secured)

icon_update_needed

Used to stop process from updating the icons too much

last_nightshift_switch

Time when the nightshift where turned on last, to prevent spamming

lastused_environ

Amount of power used by the environmental channel

lastused_equip

Amount of power used by the equipment channel

lastused_light

Amount of power used by the lighting channel

lastused_total

Total amount of power used by the three channels

light_on_range

Range of the light emitted when on

lighting

State of the lighting channel (off, auto off, on, auto on)

locked

Is the apc interface locked?

long_term_power

buffer state that makes apcs not shut off channels immediately as long as theres some power left, effect visible in apcs only slowly losing power

main_status

State of the apc external power (no power, low power, has power)

malfai

Reference to our ai hacker

malfhack

Is the apc hacked by a malf ai?

nightshift_lights

Should the nighshift lights be on?

occupier

Reference to the shunted ai inside

offset_old

Offsets the object by APC_PIXEL_OFFSET (defined in apc_defines.dm) pixels in the direction we want it placed in. This allows the APC to be embedded in a wall, yet still inside an area (like mapping).

opened

State of the cover (closed, opened, removed)

operating

Is the apc working

overload

used for the Blackout malf module

remote_control

Reference to our remote control

shorted

Is the APC shorted and not working?

start_charge

Initial cell charge %

terminal

Reference to our cable terminal

transfer_in_progress

Is there an AI being transferred out of us?

update_overlay

Stores the flag for the overlays

update_state

Stores the flags for the icon state

Proc Details

Destroy

This is how we test to ensure that mappers use the directional subtypes of APCs, rather than use the parent and pixel-shift it themselves.

autoset

Returns the new status value for an APC channel.

// val 0=off, 1=off(auto) 2=on 3=on(auto) // on 0=off, 1=on, 2=autooff TODO: Make this use bitflags instead. It should take at most three lines, but it's out of scope for now.

Arguments:

check_updates

Checks for what icon updates we will need to handle

setsubsystem

Used by external forces to set the APCs channel status's.

Arguments: