take{position=…, equipment=…} → SimpleItemStack | Remove an equipment from the grid. |
take_all() → dictionary string → uint | Remove all equipment from the grid. |
clear() | Clear all equipment from the grid. |
put{name=…, position=…} → LuaEquipment | Insert an equipment into the grid. |
can_move{equipment=…, position=…} → boolean | Check whether moving an equipment would succeed. |
move{equipment=…, position=…} → boolean | Move an equipment within this grid. |
valid :: boolean [R] | Is this object valid? |
width :: uint [R] | Width of the equipment grid. |
height :: uint [R] | Height of the equipment grid. |
equipment :: array of LuaEquipment [R] | All the equipment in this grid. |
generator_energy :: double [R] | Total energy per tick generated by the equipment inside this grid. |
max_solar_energy :: double [R] | Maximum energy per tick that can be created by any solar panels in the equipment grid. |
available_in_batteries :: double [R] | The total energy stored in all batteries in the equipment grid. |
battery_capacity :: double [R] | Total energy storage capacity of all batteries in the equipment grid. |
An equipment grid is the inside of a power armour.
Remove an equipment from the grid.
position
or equipment
must be specified.nil
if no equipment was removed.Remove all equipment from the grid.
Clear all equipment from the grid. I.e. remove it without actually returning it.
Check whether moving an equipment would succeed.
Move an equipment within this grid.
true
if the equipment was successfully moved.
Is this object valid? This Lua object holds a reference to an object within
the game engine. It is possible that the game-engine object is removed whilst
a mod still holds the corresponding Lua object. If that happens, the object
becomes invalid, i.e. this attribute will be false
. Mods are advised to
check for object validity if any change to the game state might have occurred
between the creation of the Lua object and its access.
Width of the equipment grid.
Height of the equipment grid.
All the equipment in this grid.
Total energy per tick generated by the equipment inside this grid.
Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generated energy varies depending on the daylight levels.
The total energy stored in all batteries in the equipment grid.
Total energy storage capacity of all batteries in the equipment grid.