robot_storage
# The robot_energy_storage datum
Used to handle robot stack items, such as metal, wood, nanopaste, etc.
To make things simple, the default `cost` of using 1 item from a borg stack, is 1.
So then for example, when we have a `max_energy` of 50, the borg can use 50 of that item before it runs out.
The `recharge_rate` will be affected by the charge rate of a borg recharger, depending on the level of parts. By default it is 1.
This amount will be given every 2 seconds. So at round start, rechargers will give 1 energy back every 2 seconds, to each stack the borg has.
Vars | |
amount | Current amount of materials. |
---|---|
max_amount | The max amount of materials the stack can hold at once. |
name | The name of the storage. |
statpanel_name | The name that will be displayed in the status panel. |
Procs | |
add_charge | Called whenever the cyborg is recharging and gains charge on its stack, or when clicking on other same-type stacks in the world. |
use_charge | Called whenever the cyborg uses one of its stacks. Subtract the amount used from this datum's amount variable. |
Var Details
amount
Current amount of materials.
max_amount
The max amount of materials the stack can hold at once.
name
The name of the storage.
statpanel_name
The name that will be displayed in the status panel.
Proc Details
add_charge
Called whenever the cyborg is recharging and gains charge on its stack, or when clicking on other same-type stacks in the world.
Arguments:
- addition - the number to add to the
energy
var.
use_charge
Called whenever the cyborg uses one of its stacks. Subtract the amount used from this datum's amount
variable.
Arguments:
- reduction - the number to subtract from the
amount
var.