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] | |
stack_size :: uint [R] | Maximum stack size of the item specified by this prototype. |
fuel_value :: float [R] | Fuel value when burned. |
order :: string [R] | Order string. |
group :: LuaGroup [R] | The group this prototype belongs to. |
subgroup :: LuaGroup [R] | The subgroup this prototype belongs to. |
place_result :: LuaEntityPrototype [R] | Prototype of the entity that will be created by placing this item, or nil if there is no such
entity. |
speed :: float [R] | Mining or repairing speed if this is a mining or repairing tool; otherwise nil . |
magazine_size :: float [R] | Size of full magazine; nil if this is not an ammo item. |
default_request_amount :: uint [R] | The default request value. |
resistances :: Resistances [R] | Resistances of this armour item; nil if not an armour. |
item_to_clear :: LuaItemPrototype [R] | Item required to clear this blueprint; nil if this is not a blueprint. |
stackable :: boolean [R] | Is this item allowed to stack at all? |
module_effects [R] | Effects of this module; nil if this is not a module. |
Prototype of an item.
game.item_prototypes["iron-plate"]
Does this prototype have a flag enabled?
"goes-to-main-inventory"
,
"goes-to-quickbar"
or "hidden"
. Any other value will cause an error.
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. E.g. "gun"
or "mining-tool"
.
Name of this prototype.
Maximum stack size of the item specified by this prototype.
Fuel value when burned.
Order string.
The group this prototype belongs to.
The subgroup this prototype belongs to.
Prototype of the entity that will be created by placing this item, or nil
if there is no such
entity.
Mining or repairing speed if this is a mining or repairing tool; otherwise nil
.
Size of full magazine; nil
if this is not an ammo item.
The default request value.
Resistances of this armour item; nil
if not an armour.
Item required to clear this blueprint; nil
if this is not a blueprint.
Is this item allowed to stack at all?
Effects of this module; nil
if this is not a module.