LuaEquipment

class LuaEquipment
valid :: boolean [R] Is this object valid?
name :: string [R] Name of this equipment.
type :: string [R] Type of this equipment.
position :: Position [R] Position of this equipment in the equipment grid.
shape [R] Shape of this equipment.
shield :: double [RW] Current shield value of the equipment.
max_shield :: double [R] Maximum shield value.
max_solar_power :: double [R] Maximum solar power generated.
movement_bonus :: double [R] Movement speed bonus.
generator_power :: double [R] Energy generated per tick.
energy :: double [RW] Current available energy.
max_energy :: double [R] Maximum amount of energy that can be stored in this equipment.

An item in one's power armour.

Note: An equipment reference becomes invalid once the equipment is removed or the equipment grid (see LuaEquipmentGrid) it resides in is destroyed.
valid :: boolean [Read-only]

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.

name :: string [Read-only]

Name of this equipment.

type :: string [Read-only]

Type of this equipment.

position :: Position [Read-only]

Position of this equipment in the equipment grid.

shape [Read-only]

Shape of this equipment. It is a table:

shield :: double [Read-Write]

Current shield value of the equipment.

Note: Can't be set higher than LuaEquipment::max_shield.
max_shield :: double [Read-only]

Maximum shield value.

max_solar_power :: double [Read-only]

Maximum solar power generated.

movement_bonus :: double [Read-only]

Movement speed bonus.

generator_power :: double [Read-only]

Energy generated per tick.

energy :: double [Read-Write]

Current available energy.

max_energy :: double [Read-only]

Maximum amount of energy that can be stored in this equipment.