Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# LuaEquipmentPrototype - Runtime Docs

## Class LuaEquipmentPrototype extends LuaPrototypeBase

Prototype of a modular equipment.

Inherits from LuaPrototypeBase

## Members

get_shield(quality?) | → float | The shield value of this equipment. [...]
The shield value of this equipment. [...]
get_energy_consumption(quality?) | → double |
get_inventory_bonus(quality?) | → uint32? |
get_movement_bonus(quality?) | → float? |
shape | :: R table | Shape of this equipment prototype.
Shape of this equipment prototype.
take_result | :: R LuaItemPrototype? | The result item when taking this equipment out of an equipment grid, if any.
The result item when taking this equipment out of an equipment grid, if any.
energy_production | :: R double | The max power generated by this equipment.
The max power generated by this equipment.
energy_per_shield | :: R double | The energy per shield point restored. [...]
The energy per shield point restored. [...]
logistic_parameters | :: R table? | The logistic parameters for this roboport equipment.
The logistic parameters for this roboport equipment.
energy_source | :: R LuaElectricEnergySourcePrototype | The energy source prototype for the equipment.
The energy source prototype for the equipment.
equipment_categories | :: R array[string] | Category names for this equipment. [...]
Category names for this equipment. [...]
burner_prototype | :: R LuaBurnerPrototype? | The burner energy source prototype this equipment uses, if any.
The burner energy source prototype this equipment uses, if any.
electric_energy_source_prototype | :: R LuaElectricEnergySourcePrototype? | The electric energy source prototype this equipment uses, if any.
The electric energy source prototype this equipment uses, if any.
background_color | :: R Color | The background color of this equipment prototype.
The background color of this equipment prototype.
attack_parameters | :: R AttackParameters? | The equipment attack parameters.
The equipment attack parameters.
automatic | :: R boolean | Whether this active defense equipment is automatic. [...]
Whether this active defense equipment is automatic. [...]
solar_panel_performance_at_day | :: R double |
solar_panel_performance_at_night | :: R double |
solar_panel_solar_coefficient_property | :: R LuaSurfacePropertyPrototype |
valid | :: R boolean | Is this object valid? [...]
Is this object valid? [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

Inherited from LuaPrototypeBase

type | :: R string | Type of this prototype.
Type of this prototype.
name | :: R string | Name of this prototype.
Name of this prototype.
order | :: R string | The string used to alphabetically sort these prototypes. [...]
The string used to alphabetically sort these prototypes. [...]
localised_name | :: R LocalisedString |
localised_description | :: R LocalisedString |
factoriopedia_description | :: R LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
group | :: R LuaGroup | Group of this prototype.
Group of this prototype.
subgroup | :: R LuaGroup | Subgroup of this prototype.
Subgroup of this prototype.
hidden | :: R boolean |
hidden_in_factoriopedia | :: R boolean |
parameter | :: R boolean |
custom_tooltip_fields | :: R array[CustomTooltipField]? | Extra description items in the tooltip and Factoriopedia.
Extra description items in the tooltip and Factoriopedia.

## Methods

### get_shield(quality?) → float

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

#### Parameters

quality | :: QualityID? |

### get_energy_consumption(quality?) → double

#### Parameters

quality | :: QualityID? |

### get_inventory_bonus(quality?) → uint32?

#### Parameters

quality | :: QualityID? |

Can only be used if this is InventoryBonusEquipment

### get_movement_bonus(quality?) → float?

#### Parameters

quality | :: QualityID? |

Can only be used if this is MovementBonusEquipment

## Attributes

### shape :: Read table

Shape of this equipment prototype.

#### Table fields

width | :: uint32 |
height | :: uint32 |
points | :: array[EquipmentPoint]? | Only set when the shape is "manual"
Only set when the shape is "manual"

### take_result :: Read LuaItemPrototype?

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

### energy_production :: Read double

The max power generated by this equipment.

### energy_per_shield :: Read double

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

### logistic_parameters :: Read table?

The logistic parameters for this roboport equipment.

#### Table fields

spawn_and_station_height | :: float |
spawn_and_station_shadow_height_offset | :: float |
stationing_render_layer_swap_height | :: float |
charge_approach_distance | :: float |
logistic_radius | :: float |
construction_radius | :: float |
charging_station_count | :: uint32 |
charging_distance | :: float |
charging_station_shift | :: Vector |
charging_energy | :: double |
charging_threshold_distance | :: float |
robot_vertical_acceleration | :: float |
stationing_offset | :: Vector |
robot_limit | :: uint32 |
logistics_connection_distance | :: float |
robots_shrink_when_entering_and_exiting | :: boolean |

Can only be used if this is RoboportEquipment

### energy_source :: Read LuaElectricEnergySourcePrototype

The energy source prototype for the equipment.

### equipment_categories :: Read array[string]

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

### burner_prototype :: Read LuaBurnerPrototype?

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

### electric_energy_source_prototype :: Read LuaElectricEnergySourcePrototype?

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

### background_color :: Read Color

The background color of this equipment prototype.

### attack_parameters :: Read AttackParameters?

The equipment attack parameters.

Can only be used if this is ActiveDefenseEquipment

### automatic :: Read boolean

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

### solar_panel_performance_at_day :: Read double

Can only be used if this is SolarPanelEquipment

### solar_panel_performance_at_night :: Read double

Can only be used if this is SolarPanelEquipment

### solar_panel_solar_coefficient_property :: Read LuaSurfacePropertyPrototype

Can only be used if this is SolarPanelEquipment

### valid :: Read boolean

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 :: Read string

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.

Class used in

- LuaEquipment::prototype
- LuaEquipment::ghost_prototype
- LuaItemPrototype::place_as_equipment_result
- LuaPrototypes::get_equipment_filtered()
- LuaPrototypes::equipment
- EquipmentID
- EquipmentWithQualityID
- PipetteID