apc
Vars | |
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_inner_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 |
Procs | |
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. |
check_updates | Checks for what icon updates we will need to handle |
setsubsystem | Used 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_inner_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:
- val: The current status of the power channel.
- APC_CHANNEL_OFF: The APCs channel has been manually set to off. This channel will not automatically change.
- APC_CHANNEL_AUTO_OFF: The APCs channel is running on automatic and is currently off. Can be automatically set to APC_CHANNEL_AUTO_ON.
- APC_CHANNEL_ON: The APCs channel has been manually set to on. This will be automatically changed only if the APC runs completely out of power or is disabled.
- APC_CHANNEL_AUTO_ON: The APCs channel is running on automatic and is currently on. Can be automatically set to APC_CHANNEL_AUTO_OFF.
- on: An enum dictating how to change the channel's status.
- AUTOSET_FORCE_OFF: The APC forces the channel to turn off. This includes manually set channels.
- AUTOSET_ON: The APC allows automatic channels to turn back on.
- AUTOSET_OFF: The APC turns automatic channels off.
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:
- val: The desired value of the subsystem:
- 1: Manually sets the APCs channel to be APC_CHANNEL_OFF.
- 2: Manually sets the APCs channel to be APC_CHANNEL_AUTO_ON. If the APC doesn't have any power this defaults to APC_CHANNEL_OFF instead.
- 3: Sets the APCs channel to be APC_CHANNEL_AUTO_ON. If the APC doesn't have enough power this defaults to APC_CHANNEL_AUTO_OFF instead.