PowerCell

Stores electricity, and is used to power many devices using wires or by directly attaching it. Has a maximum capacity of 200000. It is a craftable and spawnable flammable solid.
Here is a list of possible sizes that reach the maximum malleability (1000) that have integer components: 1x1x1000, 1x2x500, 1x4x250, 1x5x200, 1x8x125, 1x10x100, 1x20x50, 1x25x40, 2x2x250, 2x4x125, 2x5x100, 2x10x50, 2x20x25, 4x5x50, 4x10x25, 5x5x40, 5x8x25, 5x10x20, 10x10x10
At its default size (2x2x2) it has a durability of 1, at its maximum size it has a durability of 5.
By default, its colour is #646464.
Methods
GetResource() → resource
Gets the name of the resource contained, will return the string "nil"
if nothing is stored, rather than actually returning nil
.
The resource return can be any of the following types:
-
string
-
"nil"
GetResourceAmount() → amount
Gives you the total amount of objects in the container.
The amount return is a number
.
GetAmount() → amount
This method is deprecated. Use :GetResourceAmount()
instead.
Gives you the total amount of objects in the container.
The amount return is a number
.
Events
ContainerChanged(resourceType, resourceAmount)
Fires when the amount of the resource in the container changes.
The parameters for ContainerChanged
are as follows:
- The resourceType parameter is a string that can be
Power
,Solid
, orFluid
- The resourceAmount parameter is a
number
.