Space Station 13 - Modules - TypesVar Details - Proc Details

local_powernet

Manages all power related mechanics for a single /area Machines in areas will directly register to this datum in order to receive power

Machine/Turf/Item -> Local Powernet -> APC -> Terminal -> Wirenet

Non-machines cannot register to the local powernet and should instead listen for power change signals

Vars

active_consumptionThe amount of total power consumed consumed in only this cycle
environment_consumptionThe amount of power consumed by environment in this power cycle
environment_poweredIs the environment power channel on?
equipment_consumptionThe amount of power consumed by equipment in this power cycle
equipment_poweredIs the equipment power channel on?
lighting_consumptionThe amount of power consumed by lighting in this power cycle
lighting_poweredIs the lighting power channel on?
passive_environment_consumptionThe amount of power consumed by environment in every power cycle
passive_equipment_consumptionThe amount of power consumed by equipment in every power cycle
passive_lighting_consumptionThe amount of power consumed by lighting in every power cycle
power_flagsBit Flags indicating special behaviour on this powernet, always powered, never powered, etc
powernet_apcThe APC associated with this powernet
powernet_areaThe area this local powernet is attached to
registered_machinesAll machines registered to this local powernet, strictly typed to machines, everything else needs to register power change signals

Procs

adjust_static_powerAdjust static power for a specified channel, does not check to see if channel has power flowing into it
get_channel_usagereturns active + passive power of a channel, if the channel is not powered it returns 0 watts
get_total_usageReturns the local powernets total power usage between all three of its channels, only includes usage on currently powered channels
handle_flickerHandles flicker operations for apc processing, will flicker machines and lights in the powernet's area by random chance
has_powerchecks to see if the given channel in this local powernet has power
power_change
register_machinetethers a machine to this local powernet
set_power_channelsets a power channel on or off and adjusts total power usage accordingly
unregister_machineuntethers a machine to this local powernet
use_active_powerAdd active power usage to the given channel, returns FALSE is channel cannot be found or the channel does not have power to give

Var Details

active_consumption

The amount of total power consumed consumed in only this cycle

environment_consumption

The amount of power consumed by environment in this power cycle

environment_powered

Is the environment power channel on?

equipment_consumption

The amount of power consumed by equipment in this power cycle

equipment_powered

Is the equipment power channel on?

lighting_consumption

The amount of power consumed by lighting in this power cycle

lighting_powered

Is the lighting power channel on?

passive_environment_consumption

The amount of power consumed by environment in every power cycle

passive_equipment_consumption

The amount of power consumed by equipment in every power cycle

passive_lighting_consumption

The amount of power consumed by lighting in every power cycle

power_flags

Bit Flags indicating special behaviour on this powernet, always powered, never powered, etc

powernet_apc

The APC associated with this powernet

powernet_area

The area this local powernet is attached to

registered_machines

All machines registered to this local powernet, strictly typed to machines, everything else needs to register power change signals

Proc Details

adjust_static_power

Adjust static power for a specified channel, does not check to see if channel has power flowing into it

get_channel_usage

returns active + passive power of a channel, if the channel is not powered it returns 0 watts

get_total_usage

Returns the local powernets total power usage between all three of its channels, only includes usage on currently powered channels

handle_flicker

Handles flicker operations for apc processing, will flicker machines and lights in the powernet's area by random chance

has_power

checks to see if the given channel in this local powernet has power

power_change

power_change

Called when the area power status changes calls power change on all machines in the area, and sends the COMSIG_POWERNET_POWER_CHANGE signal.

register_machine

tethers a machine to this local powernet

set_power_channel

sets a power channel on or off and adjusts total power usage accordingly

unregister_machine

untethers a machine to this local powernet

use_active_power

Add active power usage to the given channel, returns FALSE is channel cannot be found or the channel does not have power to give