apc ![code/modules/power/apc.dm 110](git.png)
Vars | |
alarm_manager | Represents a signel source of power alarms for this apc |
---|---|
arc_shielded | Has the APC been protected against arcing? |
force_arcing | Should we be forcing arcing, assuming there isn't arc shielding? |
Procs | |
autoset | Returns the new status value for an APC channel. |
bronze_act | Handles interaction of adding arc shielding to apc with bronze |
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
alarm_manager ![code/modules/power/apc.dm 174](git.png)
Represents a signel source of power alarms for this apc
arc_shielded ![modular_bluemoon/code/modules/apc_arcing/apc.dm 10](git.png)
Has the APC been protected against arcing?
force_arcing ![modular_bluemoon/code/modules/apc_arcing/apc.dm 12](git.png)
Should we be forcing arcing, assuming there isn't arc shielding?
Proc Details
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.
bronze_act
Handles interaction of adding arc shielding to apc with bronze
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.