LuaEquipmentPrototype

Prototype of a modular equipment.

class LuaEquipmentPrototype - sort
name :: string [R] Name of this prototype.
type :: string [R] Type of this equipment prototype.
order :: string [R] Order string of this prototype.
localised_name :: LocalisedString [R]
localised_description :: LocalisedString [R]
shape :: table [R] Shape of this equipment prototype.
take_result :: LuaItemPrototype [R] The result item when taking this equipment out of an equipment grid.
energy_production :: double [R] The max power generated by this equipment.
shield :: float [R] The shield value of this equipment.
energy_per_shield :: double [R] The energy per shield point restored.
logistic_parameters :: table [R] The logistic parameters for this roboport equipment.
energy_consumption :: double [R]
movement_bonus :: float [R]
energy_source :: LuaElectricEnergySourcePrototype [R] The energy source prototype for the equipment.
equipment_categories :: array[string] [R] Category names for this equipment.
burner_prototype :: LuaBurnerPrototype [R] The burner energy source prototype this equipment uses or nil.
electric_energy_source_prototype :: LuaElectricEnergySourcePrototype [R] The electric energy source prototype this equipment uses or nil.
background_color :: Color [R] The background color of this equipment prototype.
attack_parameters :: AttackParameters [R] The equipment attack parameters or nil.
automatic :: boolean [R] Is this active defense equipment automatic.
valid :: boolean [R] Is this object valid?
object_name :: string [R] The class name of this object.
help() → string All methods and properties that this object supports.
name :: string [Read-only]

Name of this prototype.

type :: string [Read-only]

Type of this equipment prototype.

order :: string [Read-only]

Order string of this prototype.

localised_name :: LocalisedString [Read-only]

localised_description :: LocalisedString [Read-only]

shape :: table [Read-only]

Shape of this equipment prototype.

Table with the following fields:

take_result :: LuaItemPrototype [Read-only]

The result item when taking this equipment out of an equipment grid. nil if there is no result item.

energy_production :: double [Read-only]

The max power generated by this equipment.

shield :: float [Read-only]

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

energy_per_shield :: double [Read-only]

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

logistic_parameters :: table [Read-only]

The logistic parameters for this roboport equipment.

Table with the following fields:
  • spawn_and_station_height :: float
  • spawn_and_station_shadow_height_offset :: float
  • charge_approach_distance :: float
  • logistic_radius :: float
  • construction_radius :: float
  • charging_station_count :: uint
  • charging_distance :: float
  • charging_station_shift :: Vector
  • charging_energy :: double
  • charging_threshold_distance :: float
  • robot_vertical_acceleration :: float
  • stationing_offset :: Vector
  • robot_limit :: uint
  • logistics_connection_distance :: float
  • robots_shrink_when_entering_and_exiting :: boolean

Note: Both the charging_station_shift and stationing_offset vectors are tables with x and y keys instead of an array.
energy_consumption :: double [Read-only]

movement_bonus :: float [Read-only]

Can only be used if this is MovementBonusEquipmentPrototype
energy_source :: LuaElectricEnergySourcePrototype [Read-only]

The energy source prototype for the equipment.

equipment_categories :: array[string] [Read-only]

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

burner_prototype :: LuaBurnerPrototype [Read-only]

The burner energy source prototype this equipment uses or nil.

electric_energy_source_prototype :: LuaElectricEnergySourcePrototype [Read-only]

The electric energy source prototype this equipment uses or nil.

background_color :: Color [Read-only]

The background color of this equipment prototype.

attack_parameters :: AttackParameters [Read-only]

The equipment attack parameters or nil.

automatic :: boolean [Read-only]

Is this active defense equipment automatic. Returns false if not active defense equipment.