Prototype of an item.
game.item_prototypes["iron-plate"]
has_flag(flag) → boolean | Does this prototype have a flag enabled? |
get_ammo_type(ammo_source_type) → AmmoType | Type of this ammo prototype or nil if this is not an ammo prototype. |
type :: string [R] | Type of this prototype. |
name :: string [R] | Name of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
order :: string [R] | Order string. |
place_result :: LuaEntityPrototype [R] | Prototype of the entity that will be created by placing this item, or nil if there is no such entity. |
place_as_equipment_result :: LuaEquipmentPrototype [R] | Prototype of the equipment that will be created by placing this item in an equipment grid or nil if there is no equipment defined. |
place_as_tile_result :: PlaceAsTileResult [R] | The place-as-tile result if one is defined, else nil . |
stackable :: boolean [R] | Is this item allowed to stack at all? |
default_request_amount :: uint [R] | The default request value. |
stack_size :: uint [R] | Maximum stack size of the item specified by this prototype. |
wire_count :: uint [R] | The number of items needed to connect 2 entities with this as wire. |
fuel_category :: string [R] | The fuel category or nil . |
burnt_result :: LuaItemPrototype [R] | The result of burning this item as fuel or nil . |
fuel_value :: float [R] | Fuel value when burned. |
fuel_acceleration_multiplier :: double [R] | The acceleration multiplier when this item is used as fuel in a vehicle. |
fuel_top_speed_multiplier :: double [R] | The fuel top speed multiplier when this item is used as fuel in a vehicle. |
fuel_emissions_multiplier :: double [R] | The emissions multiplier if this is used as fuel. |
subgroup :: LuaGroup [R] | The subgroup this prototype belongs to. |
group :: LuaGroup [R] | The group this prototype belongs to. |
flags :: ItemPrototypeFlags [R] | The item prototype flags for this item prototype. |
rocket_launch_products :: array[Product] [R] | The results from launching this item in a rocket. |
can_be_mod_opened :: boolean [R] | If this item can be mod-opened. |
magazine_size :: float [R] | Size of full magazine; nil if this is not an ammo item. |
reload_time :: float [R] | Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine or nil if this is not an ammo item. |
equipment_grid :: LuaEquipmentGridPrototype [R] | The prototype of this armor equipment grid or nil if none or this is not an armor item. |
resistances :: dictionary[string → Resistance] [R] | Resistances of this armour item, indexed by damage type name. |
inventory_size_bonus :: uint [R] | The inventory size bonus for this armor prototype. |
capsule_action :: CapsuleAction [R] | The capsule action for this capsule item prototype or nil if this isn't a capsule item prototype. |
attack_parameters :: AttackParameters [R] | The gun attack parameters or nil if not a gun item prototype. |
inventory_size :: uint [R] | The main inventory size for item-with-inventory-prototype. |
item_filters :: dictionary[string → LuaItemPrototype] [R] | |
item_group_filters :: dictionary[string → LuaGroup] [R] | |
item_subgroup_filters :: dictionary[string → LuaGroup] [R] | |
filter_mode :: string [R] | The filter mode used by this item with inventory. |
insertion_priority_mode :: string [R] | The insertion priority mode used by this item with inventory. |
localised_filter_message :: LocalisedString [R] | The localised string used when the player attempts to put items into this item with inventory that aren't allowed. |
extend_inventory_by_default :: boolean [R] | If this item with inventory extends the inventory it resides in by default. |
default_label_color :: Color [R] | The default label color used for this item with label. |
draw_label_for_cursor_render :: boolean [R] | If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor. |
speed :: float [R] | The repairing speed if this is a repairing tool; otherwise nil . |
module_effects :: ModuleEffects [R] | Effects of this module; nil if this is not a module. |
category :: string [R] | The name of a LuaModuleCategoryPrototype. |
tier :: uint [R] | Tier of the module inside its category. |
limitations :: array[string] [R] | An array of recipe names this module is allowed to work with. |
limitation_message_key :: string [R] | The limitation message key used when the player attempts to use this modules in some place it's not allowed. |
straight_rail :: LuaEntityPrototype [R] | The straight rail prototype used for this rail planner prototype. |
curved_rail :: LuaEntityPrototype [R] | The curved rail prototype used for this rail planner prototype. |
repair_result :: array[TriggerItem] [R] | The repair result of this repair tool prototype or nil if this isn't a repair tool prototype. |
selection_border_color :: Color [R] | The color used when doing normal selection with this selection tool prototype. |
alt_selection_border_color :: Color [R] | The color used when doing alt selection with this selection tool prototype. |
selection_mode_flags :: SelectionModeFlags [R] | Flags that affect which entities will be selected. |
alt_selection_mode_flags :: SelectionModeFlags [R] | Flags that affect which entities will be selected during alternate selection. |
selection_cursor_box_type :: string [R] | |
alt_selection_cursor_box_type :: string [R] | |
always_include_tiles :: boolean [R] | If tiles area always included when doing selection with this selection tool prototype. |
entity_filter_mode :: string [R] | The entity filter mode used by this selection tool. |
alt_entity_filter_mode :: string [R] | The alt entity filter mode used by this selection tool. |
tile_filter_mode :: string [R] | The tile filter mode used by this selection tool. |
alt_tile_filter_mode :: string [R] | The alt tile filter mode used by this selection tool. |
entity_filters :: dictionary[string → LuaEntityPrototype] [R] | The entity filters used by this selection tool indexed by entity name. |
alt_entity_filters :: dictionary[string → LuaEntityPrototype] [R] | The alt entity filters used by this selection tool indexed by entity name. |
entity_type_filters :: dictionary[string → boolean] [R] | The entity type filters used by this selection tool indexed by entity type. |
alt_entity_type_filters :: dictionary[string → boolean] [R] | The alt entity type filters used by this selection tool indexed by entity type. |
tile_filters :: dictionary[string → LuaTilePrototype] [R] | The tile filters used by this selection tool indexed by tile name. |
alt_tile_filters :: dictionary[string → LuaTilePrototype] [R] | The alt tile filters used by this selection tool indexed by tile name. |
entity_filter_slots :: uint [R] | The number of entity filters this deconstruction item has or nil if this isn't a deconstruction item prototype. |
tile_filter_slots :: uint [R] | The number of tile filters this deconstruction item has or nil if this isn't a deconstruction item prototype. |
durability_description_key :: string [R] | The durability message key used when displaying the durability of this tool. |
durability :: double [R] | The durability of this tool item or nil if not a tool item. |
infinite :: boolean [R] | If this tool item has infinite durability. |
mapper_count :: uint [R] | How many filters an upgrade item has. |
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. |
Does this prototype have a flag enabled?
Any other value will cause an error.
Type of this ammo prototype or nil
if this is not an ammo prototype.
Type of this prototype. E.g. "gun"
or "mining-tool"
.
Name of this prototype.
Order string.
Prototype of the entity that will be created by placing this item, or nil
if there is no such entity.
Prototype of the equipment that will be created by placing this item in an equipment grid or nil
if there is no equipment defined.
The place-as-tile result if one is defined, else nil
.
Is this item allowed to stack at all?
The default request value.
Maximum stack size of the item specified by this prototype.
The number of items needed to connect 2 entities with this as wire.
The fuel category or nil
.
The result of burning this item as fuel or nil
.
Fuel value when burned.
The acceleration multiplier when this item is used as fuel in a vehicle.
The fuel top speed multiplier when this item is used as fuel in a vehicle.
The emissions multiplier if this is used as fuel.
The subgroup this prototype belongs to.
The group this prototype belongs to.
The item prototype flags for this item prototype.
The results from launching this item in a rocket.
If this item can be mod-opened.
Size of full magazine; nil
if this is not an ammo item.
Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine or nil
if this is not an ammo item.
The prototype of this armor equipment grid or nil
if none or this is not an armor item.
Resistances of this armour item, indexed by damage type name. nil
if not an armor or the armor has no resistances.
The inventory size bonus for this armor prototype. nil
if this isn't an armor prototype.
The capsule action for this capsule item prototype or nil
if this isn't a capsule item prototype.
The gun attack parameters or nil
if not a gun item prototype.
The main inventory size for item-with-inventory-prototype. nil
if not an item-with-inventory-prototype.
The filter mode used by this item with inventory.
The insertion priority mode used by this item with inventory.
The localised string used when the player attempts to put items into this item with inventory that aren't allowed.
If this item with inventory extends the inventory it resides in by default.
The default label color used for this item with label. nil
if not defined or if this isn't an item with label.
If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor.
The repairing speed if this is a repairing tool; otherwise nil
.
Effects of this module; nil
if this is not a module.
The name of a LuaModuleCategoryPrototype. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.
Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.
An array of recipe names this module is allowed to work with. Empty when all recipes are allowed.
The limitation message key used when the player attempts to use this modules in some place it's not allowed.
The straight rail prototype used for this rail planner prototype.
The curved rail prototype used for this rail planner prototype.
The repair result of this repair tool prototype or nil
if this isn't a repair tool prototype.
The color used when doing normal selection with this selection tool prototype.
The color used when doing alt selection with this selection tool prototype.
Flags that affect which entities will be selected.
Flags that affect which entities will be selected during alternate selection.
If tiles area always included when doing selection with this selection tool prototype.
The entity filter mode used by this selection tool.
The alt entity filter mode used by this selection tool.
The tile filter mode used by this selection tool.
The alt tile filter mode used by this selection tool.
The entity filters used by this selection tool indexed by entity name.
The alt entity filters used by this selection tool indexed by entity name.
The entity type filters used by this selection tool indexed by entity type.
The alt entity type filters used by this selection tool indexed by entity type.
The tile filters used by this selection tool indexed by tile name.
The alt tile filters used by this selection tool indexed by tile name.
The number of entity filters this deconstruction item has or nil
if this isn't a deconstruction item prototype.
The number of tile filters this deconstruction item has or nil
if this isn't a deconstruction item prototype.
The durability message key used when displaying the durability of this tool.
The durability of this tool item or nil
if not a tool item.
If this tool item has infinite durability. nil
if not a tool type item.
How many filters an upgrade item has. nil
if not a upgrade item.