has_flag(flag) → boolean | Does this prototype have a flag enabled? |
valid :: boolean [R] | Is this object valid? |
type :: string [R] | Type of this prototype. |
name :: string [R] | Name of this prototype. |
localised_name :: 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. |
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 :: uint [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 :: uint [R] | |
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. |
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"
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.
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.
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 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.