Home

LuaEquipmentPrototype

Prototype of a modular equipment.

Parent

Attributes

shape

Shape of this equipment prototype.

take_result

The result item when taking this equipment out of an equipment grid, if any.

energy_production

The max power generated by this equipment.

energy_per_shield

The energy per shield point restored. 0 for non-shield equipment.

logistic_parameters

The logistic parameters for this roboport equipment.

energy_source

The energy source prototype for the equipment.

equipment_categories

Category names for this equipment. These categories will be used to determine whether this equipment is allowed in a particular equipment grid.

burner_prototype

The burner energy source prototype this equipment uses, if any.

electric_energy_source_prototype

The electric energy source prototype this equipment uses, if any.

background_color

The background color of this equipment prototype.

attack_parameters

The equipment attack parameters.

automatic

Whether this active defense equipment is automatic. Returns false if not active defense equipment.

solar_panel_performance_at_day

solar_panel_performance_at_night

solar_panel_solar_coefficient_property

valid

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.

object_name

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

Methods

get_shield

LuaEquipmentPrototype.get_shield(quality?: QualityID) -> float

Call As

equipmentPrototype.get_shield()

Call Convention

The shield value of this equipment. 0 for non-shield equipment.

Parameters

Returns

get_energy_consumption

LuaEquipmentPrototype.get_energy_consumption(quality?: QualityID) -> double

Call As

equipmentPrototype.get_energy_consumption()

Call Convention

Parameters

Returns

get_inventory_bonus

LuaEquipmentPrototype.get_inventory_bonus(quality?: QualityID) -> uint32?

Call As

equipmentPrototype.get_inventory_bonus()

Call Convention

Parameters

Returns

get_movement_bonus

LuaEquipmentPrototype.get_movement_bonus(quality?: QualityID) -> float?

Call As

equipmentPrototype.get_movement_bonus()

Call Convention

Parameters

Returns