/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
away_general_accessUsed for apc helper called away_general_access to make apc's required access away_general_access.
beenhitused for counting how many times it has been hit, used for Aliens at the moment
cellReference to our internal cell
cell_10kUsed for apc helper called cell_10k to install 10k cell into apc.
cell_5kUsed for apc helper called cell_5k to install 5k cell into apc.
cell_typeType of cell we start with
chargemodeCan the APC charge?
chargingState of the apc charging (not charging, charging, fully charged)
coverlockedIs the apc cover locked?
cut_AI_wireUsed for apc helper called cut_AI_wire to make apc's wore responsible for ai connectione mended.
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
full_chargeUsed for apc helper called full_charge to make apc's charge at 100% meter.
hacked_flicker_counterCounter for displaying the hacked overlay to mobs within view
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
low_power_nightshift_lightsTracks if lights channel was set to nightshift / reduced power usage mode automatically due to low 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?
no_chargeUsed for apc helper called no_charge to make apc's charge at 0% meter.
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_control_userReference to our remote control
shortedIs the APC shorted and not working?
start_chargeInitial cell charge %
syndicate_accessUsed for apc helper called syndicate_access to make apc's required access syndicate_access.
terminalReference to our cable terminal
transfer_in_progressIs there an AI being transferred out of us?
unlockedUsed for apc helper called unlocked to make apc unlocked.
update_overlayStores the flag for the overlays
update_stateStores the flags for the icon state

Procs

AICtrlClickToggle APC power settings
AICtrlShiftClickToggle APC environment settings (atmos)
AIShiftClickToggle APC lighting settings
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.
add_loadAdds load (energy) to the terminal's grid.
ai_click_altToggle APC equipment settings
autosetReturns the new status value for an APC channel.
availReturns the amount of energy the terminal's grid has.
available_energyReturns the surplus energy from the terminal's grid and the cell.
cable_actCalled when we interact with the APC with a cable, attempts to wire the APC and create a terminal
can_place_terminalChecks if we can place a terminal on the APC
cell_actCalled when we interact with the APC with a cell, attempts to insert it
chargeReturns the cell's current charge.
check_updatesChecks for what icon updates we will need to handle
draw_energyDraws energy from the connected grid. When there isn't enough surplus energy from the grid, draws the rest of the demand from its cell. Returns the energy used.
draw_powerDraws power from the connected grid. When there isn't enough surplus energy from the grid, draws the rest of the demand from its cell. Returns the energy used.
early_processAPC early processing. This gets processed before any other machine does. This adds up the total static power usage for the apc's area, then draw that power usage from the grid or APC cell. This is done early so machines that use dynamic power get a more truthful surplus when accessing available energy.
electronics_actCalled when we interact with the APC with APC electronics, attempts to install the board
ethereal_interactSpecial behavior for when an ethereal interacts with an APC.
fork_outlet_actCalled when we interact with the APC with an item with which we can get shocked when we stuff it into an APC
give_away_general_accessUsed for away_general_access apc helper, which set apc's required access to away_general_access.
give_syndicate_accessUsed for syndicate_access apc helper, which sets apc's required access to syndicate_access.
install_cell_10kUsed for cell_10k apc helper, which installs 10k cell into apc.
install_cell_5kUsed for cell_5k apc helper, which installs 5k cell into apc.
pseudocircuit_actCalled when we interact with the APC with an electroadaptive pseudocircuit, used by cyborgs to install a board or weak cell
set_full_chargeUsed for full_charge apc helper, which sets apc charge to 100%.
set_hacked_hudApplies hacked overlay for malf AIs
set_no_chargeUsed for no_charge apc helper, which sets apc charge to 0%.
setsubsystemUsed by external forces to set the APCs channel status's.
surplusReturns the surplus energy from the terminal's grid.
time_to_chargeReturns the amount of time it will take the APC at its current trickle charge rate to reach a charge level. If the APC is functionally not charging, returns null.
unlockUsed for unlocked apc helper, which unlocks the apc.
wallframe_actCalled when we interact with the APC with and APC frame, used for replacing a damaged cover/frame

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

away_general_access

Used for apc helper called away_general_access to make apc's required access away_general_access.

beenhit

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

cell

Reference to our internal cell

cell_10k

Used for apc helper called cell_10k to install 10k cell into apc.

cell_5k

Used for apc helper called cell_5k to install 5k cell into apc.

cell_type

Type of cell we start with

chargemode

Can the APC charge?

charging

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

coverlocked

Is the apc cover locked?

cut_AI_wire

Used for apc helper called cut_AI_wire to make apc's wore responsible for ai connectione mended.

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

full_charge

Used for apc helper called full_charge to make apc's charge at 100% meter.

hacked_flicker_counter

Counter for displaying the hacked overlay to mobs within view

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

low_power_nightshift_lights

Tracks if lights channel was set to nightshift / reduced power usage mode automatically due to low 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?

no_charge

Used for apc helper called no_charge to make apc's charge at 0% meter.

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_user

Reference to our remote control

shorted

Is the APC shorted and not working?

start_charge

Initial cell charge %

syndicate_access

Used for apc helper called syndicate_access to make apc's required access syndicate_access.

terminal

Reference to our cable terminal

transfer_in_progress

Is there an AI being transferred out of us?

unlocked

Used for apc helper called unlocked to make apc unlocked.

update_overlay

Stores the flag for the overlays

update_state

Stores the flags for the icon state

Proc Details

AICtrlClick

Toggle APC power settings

AICtrlShiftClick

Toggle APC environment settings (atmos)

AIShiftClick

Toggle APC lighting settings

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.

add_load

Adds load (energy) to the terminal's grid.

ai_click_alt

Toggle APC equipment settings

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:

avail

Returns the amount of energy the terminal's grid has.

available_energy

Returns the surplus energy from the terminal's grid and the cell.

cable_act

Called when we interact with the APC with a cable, attempts to wire the APC and create a terminal

can_place_terminal

Checks if we can place a terminal on the APC

cell_act

Called when we interact with the APC with a cell, attempts to insert it

charge

Returns the cell's current charge.

check_updates

Checks for what icon updates we will need to handle

draw_energy

Draws energy from the connected grid. When there isn't enough surplus energy from the grid, draws the rest of the demand from its cell. Returns the energy used.

draw_power

Draws power from the connected grid. When there isn't enough surplus energy from the grid, draws the rest of the demand from its cell. Returns the energy used.

early_process

APC early processing. This gets processed before any other machine does. This adds up the total static power usage for the apc's area, then draw that power usage from the grid or APC cell. This is done early so machines that use dynamic power get a more truthful surplus when accessing available energy.

electronics_act

Called when we interact with the APC with APC electronics, attempts to install the board

ethereal_interact

Special behavior for when an ethereal interacts with an APC.

fork_outlet_act

Called when we interact with the APC with an item with which we can get shocked when we stuff it into an APC

give_away_general_access

Used for away_general_access apc helper, which set apc's required access to away_general_access.

give_syndicate_access

Used for syndicate_access apc helper, which sets apc's required access to syndicate_access.

install_cell_10k

Used for cell_10k apc helper, which installs 10k cell into apc.

install_cell_5k

Used for cell_5k apc helper, which installs 5k cell into apc.

pseudocircuit_act

Called when we interact with the APC with an electroadaptive pseudocircuit, used by cyborgs to install a board or weak cell

set_full_charge

Used for full_charge apc helper, which sets apc charge to 100%.

set_hacked_hud

Applies hacked overlay for malf AIs

set_no_charge

Used for no_charge apc helper, which sets apc charge to 0%.

setsubsystem

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

Arguments:

surplus

Returns the surplus energy from the terminal's grid.

time_to_charge

Returns the amount of time it will take the APC at its current trickle charge rate to reach a charge level. If the APC is functionally not charging, returns null.

unlock

Used for unlocked apc helper, which unlocks the apc.

wallframe_act

Called when we interact with the APC with and APC frame, used for replacing a damaged cover/frame