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

Power store abstract type

Abstract type for a stock part that holds power.

Vars

cell_size_prefixThe size icon overlay prefix.
chargeCurrent charge in cell units
charge_light_typeWhat charge lige sprite to use, null if no light
chargerateHow much power is given per second in a recharger.
connector_typeWhat connector sprite to use when in a cell charger, null if no connectors
corruptedIf the power cell was damaged by an explosion, chance for it to become corrupted and function the same as rigged.
emptyDoes the cell start without any charge?
grown_batteryIf it's a grown that acts as a battery, add a wire overlay to it.
maxchargeMaximum charge in cell units
rating_baseStandard cell charge used for rating
ratingdescIf true, the cell will state it's maximum charge in it's description
riggedIf the cell has been booby-trapped by injecting it with plasma. Chance on use() to explode.

Procs

changeChanges the charge of the cell. Args:
chargeReturns the current charge of the cell.
giveRecharge the cell. Args:
max_chargeReturns the maximum charge of the cell.
on_magic_chargeSignal proc for COMSIG_ITEM_MAGICALLY_CHARGED
on_reagents_delHandles properly detaching signal hooks.
percentReturns the percentage of the cell's charge.
useUse power from the cell. Args:
used_chargeReturns the amount of charge used on the cell.

Var Details

cell_size_prefix

The size icon overlay prefix.

charge

Current charge in cell units

charge_light_type

What charge lige sprite to use, null if no light

chargerate

How much power is given per second in a recharger.

connector_type

What connector sprite to use when in a cell charger, null if no connectors

corrupted

If the power cell was damaged by an explosion, chance for it to become corrupted and function the same as rigged.

empty

Does the cell start without any charge?

grown_battery

If it's a grown that acts as a battery, add a wire overlay to it.

maxcharge

Maximum charge in cell units

rating_base

Standard cell charge used for rating

ratingdesc

If true, the cell will state it's maximum charge in it's description

rigged

If the cell has been booby-trapped by injecting it with plasma. Chance on use() to explode.

Proc Details

change

Changes the charge of the cell. Args:

charge

Returns the current charge of the cell.

give

Recharge the cell. Args:

max_charge

Returns the maximum charge of the cell.

on_magic_charge

Signal proc for COMSIG_ITEM_MAGICALLY_CHARGED

If we, or the item we're located in, is subject to the charge spell, gain some charge back

on_reagents_del

Handles properly detaching signal hooks.

percent

Returns the percentage of the cell's charge.

use

Use power from the cell. Args:

used_charge

Returns the amount of charge used on the cell.