has_flag(flag) → boolean | Does this prototype have a flag enabled? |
get_inventory_size(index) → uint | Gets the base size of the given inventory on this entity or nil if the given inventory doesn't exist. |
type :: string [R] | Type of this prototype. |
name :: string [R] | Name of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
max_health :: float [R] | Max health of this entity. |
infinite_resource :: boolean [R] | Is this resource infinite? |
minimum_resource_amount :: uint [R] | Minimum amount of this resource. |
normal_resource_amount :: uint [R] | The normal amount for this resource. |
infinite_depletion_resource_amount :: uint [R] | Every time this infinite resource 'ticks' down it is reduced by this amount. |
resource_category :: string [R] | Category of this resource. |
mineable_properties [R] | |
items_to_place_this :: dictionary string → LuaItemPrototype [R] | Items that when placed will produce this entity. |
collision_box :: BoundingBox [R] | The bounding box used for collision checking. |
selection_box :: BoundingBox [R] | The bounding box used for drawing selection. |
order :: string [R] | Order string of this prototype. |
group :: LuaGroup [R] | Group of this entity. |
subgroup :: LuaGroup [R] | Subgroup of this entity. |
healing_per_tick :: uint [R] | Amount this entity can heal per tick. |
emissions_per_tick :: double [R] | Amount of pollution emissions per tick this entity will create. |
corpses :: dictionary string → LuaEntityPrototype [R] | Corpses used when this entity is destroyed. |
selectable_in_game :: boolean [R] | Is this entity selectable? |
weight :: double [R] | The weight of this vehicle prototype or nil if not a vehicle prototype. |
resistances :: Resistances [R] | |
fast_replaceable_group :: string [R] | The group of mutually fast-replaceable entities. |
loot :: Loot [R] | Loot that will be dropped when this entity is killed. |
repair_speed_modifier :: uint [R] | Repair-speed modifier for this entity. |
turret_range :: uint [R] | |
autoplace_specification :: AutoplaceSpecification [R] | Autoplace specification for this entity prototype. |
collision_mask :: array of string [R] | The collison masks this entity uses |
belt_speed :: double [R] | The speed of this transport belt or nil if this isn't a transport belt related prototype. |
result_units :: array of UnitSpawnDefinition [R] | The result units and spawn points with weight and evolution factor for a biter spawner entity. |
attack_result [R] | The attack result of this entity if the entity has one else nil . |
final_attack_result [R] | The final attack result for projectiles nil if not a projectile
|
attack_parameters [R] | The attack parameters for this entity or nil if the entity doesn't use attack parameters. |
spawn_cooldown [R] | The spawning cooldown for this enemy spawner prototype or nil . |
mining_drill_radius :: double [R] | The mining radius of this mining drill prototype or nil if this isn't a mining drill prototype. |
mining_speed :: double [R] | The mining speed of this mining drill/character prototype or nil . |
mining_power :: double [R] | The mining power of this mining drill prototype or nil if this isn't a mining drill prototype. |
logistic_mode :: string [R] | The logistic mode of this logistic container or nil if this isn't a logistic container prototype. |
max_underground_distance :: uint [R] | The max underground distance for underground belts and underground pipes or nil if this isn't one of those prototypes. |
drawing_box :: BoundingBox [R] | The bounding box used for drawing the entity icon. |
sticker_box :: BoundingBox [R] | The bounding box used to attach sticker type entities. |
flags :: array of string [R] | The entity prototype flags for this entitiy. |
remains_when_mined :: array of LuaEntityPrototype [R] | The remains left behind when this entity is mined. |
additional_pastable_entities :: array of LuaEntityPrototype [R] | Entities this entity can be pasted onto in addition to the normal allowed ones. |
allow_copy_paste :: boolean [R] | When false copy-paste is not allowed for this entity. |
shooting_cursor_size :: double [R] | The cursor size used when shooting at this entity. |
created_smoke [R] | The smoke trigger run when this entity is built or nil . |
created_effect [R] | The trigger run when this entity is created or nil . |
map_color :: Color [R] | The map color used when charting this entity if a friendly or enemy color isn't defined or nil . |
friendly_map_color :: Color [R] | The friendly map color used when charting this entity. |
enemy_map_color :: Color [R] | The enemy map color used when charting this entity. |
build_base_evolution_requirement :: double [R] | The evolution requirement to build this entity as a base when expanding enemy bases. |
instruments :: array of ProgrammableSpeakerInstrument [R] | The instruments for this programmable speaker or nil . |
max_polyphony :: uint [R] | The maximum polyphony for this programmable speaker or nil . |
module_inventory_size :: uint [R] | The module inventory size or nil if this entity doesn't suport modules. |
ingredient_count :: uint [R] | The max number of ingredients this crafting-machine prototype supports or nil if this isn't a crafting-machine prototype. |
crafting_speed :: double [R] | The crafting speed of this crafting-machine or nil . |
crafting_categories :: dictionary string → boolean [R] | The crafting categories this entity supports. |
resource_categories :: dictionary string → boolean [R] | The resource categories this mining drill supports or nil if not a mining dill. |
supply_area_distance :: double [R] | The supply area of this electric pole, beacon, or nil if this is neither. |
max_wire_distance :: double [R] | The maximum wire distance for this electric pole/power switch or nil if this isn't an electric pole/power switch. |
max_circuit_wire_distance :: double [R] | The maximum circuit wire distance for this entity. |
energy_usage :: double [R] | The direct energy usage of this entity or nil if this entity doesn't have a direct energy usage. |
max_energy_usage :: double [R] | The theoretical maximum energy usage for this entity. |
effectivity :: double [R] | The effectivity of this car prototype, generator prototype or nil . |
consumption :: double [R] | The energy consumption of this car prototype or nil if not a car prototype. |
friction_force :: double [R] | The friction of this vehicle prototype or nil if not a vehicle prototype. |
braking_force :: double [R] | The braking force of this vehicle prototype or nil if not a vehicle prototype. |
tank_driving :: boolean [R] | If this car prototype uses tank controls to drive or nil if this is not a car prototype. |
rotation_speed :: double [R] | The rotation speed of this car prototype or nil if not a car prototype. |
turret_rotation_speed :: double [R] | The turret rotation speed of this car prototype or nil if not a car prototype. |
guns :: dictionary string → LuaItemPrototype [R] | The guns this car prototype uses or nil if not a car prototype. |
speed :: double [R] | The default speed of this flying robot, rolling stock or nil . |
speed_multiplier_when_out_of_energy :: float [R] | The speed multiplier when this flying robot is out of energy or nil . |
max_payload_size :: uint [R] | The max payload size of this logistics or construction robot or nil . |
energy_per_move :: double [R] | The energy consumed per tile moved for this flying robot or nil . |
energy_per_tick :: double [R] | The energy consumed per tick for this flying robot or nil . |
max_energy :: double [R] | The max energy for this flying robot or nil . |
min_to_charge :: float [R] | The minimum energy for this flying robot before it tries to recharge or nil . |
max_to_charge :: float [R] | The maximum energy for this flying robot above which it won't try to recharge when stationing or nil . |
burner_prototype :: LuaBurnerPrototype [R] | The burner energy source prototype this entity uses or nil . |
electric_energy_source_prototype :: LuaElectricEnergySourcePrototype [R] | The electric energy source prototype this entity uses or nil . |
building_grid_bit_shift :: uint [R] | The log2 of grid size of the building |
fluid_usage_per_tick :: double [R] | The fluid usage of this generator prototype or nil . |
maximum_temperature :: double [R] | The maximum fluid temperature of this generator prototype or nil . |
target_temperature :: double [R] | The target temperature of this boiler prototyper or nil . |
fluid :: LuaFluidPrototype [R] | The fluid this offshore pump produces or nil . |
pumping_speed :: double [R] | The pumping speed of this offshore pump, normal pump, or nil . |
stack :: boolean [R] | If this inserter is a stack-type. |
allow_custom_vectors :: boolean [R] | If this inserter allows custom pickup and drop vectors. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
Prototype of an entity.
Does this prototype have a flag enabled?
"pushable"
"placeable-neutral"
"placeable-player"
"placeable-enemy"
"placeable-off-grid"
"player-creation"
"building-direction-8-way"
"filter-directions"
"fast-replaceable-no-build-while-moving"
"breaths-air"
"not-repairable"
"not-on-map"
"not-blueprintable"
"not-deconstructable"
Gets the base size of the given inventory on this entity or nil if the given inventory doesn't exist.
Type of this prototype.
Name of this prototype.
Max health of this entity. Will be 0
if this is not an entity with health.
Is this resource infinite? Will be nil
when used on a non-resource.
Minimum amount of this resource. Will be nil
when used on a non-resource.
The normal amount for this resource. nil
when not a resource.
Every time this infinite resource 'ticks' down it is reduced by this amount. nil
when not a resource. Meaningless if this isn't an infinite type resource.
Category of this resource. "basic-solid"
, "basic-fluid"
or nil
(when not a resource).
Table with the following fields:
Items that when placed will produce this entity. It is a dictionary indexed by the item prototype name.
The bounding box used for collision checking.
The bounding box used for drawing selection.
Order string of this prototype.
Group of this entity.
Subgroup of this entity.
Amount this entity can heal per tick.
Amount of pollution emissions per tick this entity will create.
Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototype name.
Is this entity selectable?
The weight of this vehicle prototype or nil
if not a vehicle prototype.
The group of mutually fast-replaceable entities. Possibly nil
.
Loot that will be dropped when this entity is killed. nil
if there is no loot.
Repair-speed modifier for this entity. Actual repair speed will be
tool_repair_speed * entity_repair_speed_modifier
. May be nil
.
Autoplace specification for this entity prototype. nil
if none.
The collison masks this entity uses
The speed of this transport belt or nil
if this isn't a transport belt related prototype.
The result units and spawn points with weight and evolution factor for a biter spawner entity.
Each UnitSpawnDefinition is a table:
The attack result of this entity if the entity has one else nil
.
The final attack result for projectiles nil
if not a projectile
The attack parameters for this entity or nil
if the entity doesn't use attack parameters.
The mining radius of this mining drill prototype or nil
if this isn't a mining drill prototype.
The mining speed of this mining drill/character prototype or nil
.
The mining power of this mining drill prototype or nil
if this isn't a mining drill prototype.
The logistic mode of this logistic container or nil
if this isn't a logistic container prototype.
The max underground distance for underground belts and underground pipes or nil
if this isn't one of those prototypes.
The bounding box used for drawing the entity icon.
The bounding box used to attach sticker type entities.
The entity prototype flags for this entitiy.
The remains left behind when this entity is mined.
Entities this entity can be pasted onto in addition to the normal allowed ones.
When false copy-paste is not allowed for this entity.
The cursor size used when shooting at this entity.
The smoke trigger run when this entity is built or nil
.
The trigger run when this entity is created or nil
.
The map color used when charting this entity if a friendly or enemy color isn't defined or nil
.
The friendly map color used when charting this entity.
The enemy map color used when charting this entity.
The evolution requirement to build this entity as a base when expanding enemy bases.
The instruments for this programmable speaker or nil
.
The maximum polyphony for this programmable speaker or nil
.
The module inventory size or nil if this entity doesn't suport modules.
The max number of ingredients this crafting-machine prototype supports or nil
if this isn't a crafting-machine prototype.
The crafting speed of this crafting-machine or nil
.
The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity type.
The resource categories this mining drill supports or nil
if not a mining dill.
The supply area of this electric pole, beacon, or nil
if this is neither.
The maximum wire distance for this electric pole/power switch or nil
if this isn't an electric pole/power switch.
The maximum circuit wire distance for this entity. 0 when the entity doesn't support circuit wires.
The direct energy usage of this entity or nil
if this entity doesn't have a direct energy usage.
The theoretical maximum energy usage for this entity.
The effectivity of this car prototype, generator prototype or nil
.
The energy consumption of this car prototype or nil
if not a car prototype.
The friction of this vehicle prototype or nil
if not a vehicle prototype.
The braking force of this vehicle prototype or nil
if not a vehicle prototype.
If this car prototype uses tank controls to drive or nil
if this is not a car prototype.
The rotation speed of this car prototype or nil
if not a car prototype.
The turret rotation speed of this car prototype or nil
if not a car prototype.
The guns this car prototype uses or nil
if not a car prototype.
The default speed of this flying robot, rolling stock or nil
.
The speed multiplier when this flying robot is out of energy or nil
.
The max payload size of this logistics or construction robot or nil
.
The energy consumed per tile moved for this flying robot or nil
.
The energy consumed per tick for this flying robot or nil
.
The max energy for this flying robot or nil
.
The minimum energy for this flying robot before it tries to recharge or nil
.
The maximum energy for this flying robot above which it won't try to recharge when stationing or nil
.
The burner energy source prototype this entity uses or nil
.
The electric energy source prototype this entity uses or nil
.
The log2 of grid size of the building
The fluid usage of this generator prototype or nil
.
The maximum fluid temperature of this generator prototype or nil
.
The target temperature of this boiler prototyper or nil
.
The fluid this offshore pump produces or nil
.
The pumping speed of this offshore pump, normal pump, or nil
.
If this inserter is a stack-type.
If this inserter allows custom pickup and drop vectors.