ClassLuaItemPrototypeextendsLuaPrototypeBasechanged
| Inherits from LuaPrototypeBase |
Members
| has_flag(flag) | → boolean | Test whether this item prototype has a certain flag set. |
Test whether this item prototype has a certain flag set. | ||
| get_spoil_ticks(quality?) | → uint32 | The number of ticks before this item spoils, or |
The number of ticks before this item spoils, or | ||
| get_ammo_type(ammo_source_type?) | → AmmoType? | The type of this ammo prototype. |
The type of this ammo prototype. | ||
| get_inventory_size_bonus(quality?) | → uint32? | The inventory size bonus for this armor prototype. |
The inventory size bonus for this armor prototype. | ||
| get_inventory_size(quality?) new | → uint32? | The main inventory size for item-with-inventory-prototype. |
The main inventory size for item-with-inventory-prototype. | ||
| get_module_effects(quality?) | → ModuleEffects? | Effects of this module at the specified quality. |
Effects of this module at the specified quality. | ||
| get_selection_border_color(selection_mode) | → Color? | The color used when doing normal selection with this selection tool prototype. |
The color used when doing normal selection with this selection tool prototype. | ||
| get_selection_mode_flags(selection_mode) | → SelectionModeFlags? | Flags that affect which entities will be selected. |
Flags that affect which entities will be selected. | ||
| get_cursor_box_type(selection_mode) | → CursorBoxRenderType? | |
| get_entity_filter_mode(selection_mode) | → PrototypeFilterMode? | The entity filter mode used by this selection tool. |
The entity filter mode used by this selection tool. | ||
| get_tile_filter_mode(selection_mode) | → PrototypeFilterMode? | The tile filter mode used by this selection tool. |
The tile filter mode used by this selection tool. | ||
| get_entity_filters(selection_mode) | → array[LuaEntityPrototype]? | The entity filters used by this selection tool. |
The entity filters used by this selection tool. | ||
| get_entity_type_filters(selection_mode) | → dictionary[string → true]? | The entity type filters used by this selection tool indexed by entity type. [...] |
The entity type filters used by this selection tool indexed by entity type. [...] | ||
| get_tile_filters(selection_mode) | → array[LuaTilePrototype]? | The tile filters used by this selection tool. |
The tile filters used by this selection tool. | ||
| get_durability(quality?) | → double? | The durability of this tool item prototype. |
The durability of this tool item prototype. | ||
| place_result | :: R LuaEntityPrototype? | Prototype of the entity that will be created by placing this item, if any. |
Prototype of the entity that will be created by placing this item, if any. | ||
| place_as_equipment_result | :: R LuaEquipmentPrototype? | Prototype of the equipment that will be created by placing this item in an equipment grid, if any. |
Prototype of the equipment that will be created by placing this item in an equipment grid, if any. | ||
| place_as_tile_result | :: R PlaceAsTileResult? | The place-as-tile result if one is defined, if any. |
The place-as-tile result if one is defined, if any. | ||
| stackable | :: R boolean | Is this item allowed to stack at all? |
Is this item allowed to stack at all? | ||
| stack_size | :: R uint32 | Maximum stack size of the item specified by this prototype. |
Maximum stack size of the item specified by this prototype. | ||
| fuel_category | :: R string? | The fuel category, if any. |
The fuel category, if any. | ||
| burnt_result | :: R LuaItemPrototype? | The result of burning this item as fuel, if any. |
The result of burning this item as fuel, if any. | ||
| fuel_value | :: R float | Fuel value when burned. |
Fuel value when burned. | ||
| fuel_acceleration_multiplier | :: R double | The acceleration multiplier when this item is used as fuel in a vehicle. |
The acceleration multiplier when this item is used as fuel in a vehicle. | ||
| fuel_top_speed_multiplier | :: R double | The fuel top speed 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. | ||
| fuel_emissions_multiplier | :: R double | The emissions multiplier if this is used as fuel. |
The emissions multiplier if this is used as fuel. | ||
| fuel_acceleration_multiplier_quality_bonus | :: R double | Additional fuel acceleration multiplier per quality level. |
Additional fuel acceleration multiplier per quality level. | ||
| fuel_top_speed_multiplier_quality_bonus | :: R double | Additional fuel top speed multiplier per quality level. |
Additional fuel top speed multiplier per quality level. | ||
| flags | :: R ItemPrototypeFlags | The flags for this item prototype. |
The flags for this item prototype. | ||
| rocket_launch_products | :: R array[Product] | The results of launching this item in a rocket. |
The results of launching this item in a rocket. | ||
| send_to_orbit_mode | :: R "not-sendable" or "manual" or "automated" | How this item interacts when being sent to orbit. |
How this item interacts when being sent to orbit. | ||
| can_be_mod_opened | :: R boolean | If this item can be mod-opened. |
If this item can be mod-opened. | ||
| spoil_result | :: R LuaItemPrototype? | The spoil result of this item, if any |
The spoil result of this item, if any | ||
| spoil_quality_min new | :: R LuaQualityPrototype? | |
| spoil_quality_max new | :: R LuaQualityPrototype? | |
| spoil_quality_change new | :: R int8 | |
| plant_result | :: R LuaEntityPrototype? | The result entity when planting this item as a seed. |
The result entity when planting this item as a seed. | ||
| spoil_to_trigger_result | :: R SpoilToTriggerResult? | |
| destroyed_by_dropping_trigger | :: R array[TriggerItem]? | |
| weight | :: R Weight | Weight of this item. [...] |
Weight of this item. [...] | ||
| ingredient_to_weight_coefficient | :: R double | |
| fuel_glow_color | :: R Color? | |
| default_import_location | :: R LuaSpaceLocationPrototype | |
| factoriopedia_alternative | :: R LuaItemPrototype? | An alternative prototype that will be used to display info about this prototype in Factoriopedia. |
An alternative prototype that will be used to display info about this prototype in Factoriopedia. | ||
| moved_to_hub_when_building | :: R boolean | |
| lab_ignores_spoil_percent new | :: R boolean | |
| space_platform_request_priority new | :: R boolean | |
| color_hint new | :: R ColorHintSpecification | |
| spoil_level new | :: R uint8 | |
| used_by_labs new | :: R boolean | Whether this item is referenced by any lab input. |
Whether this item is referenced by any lab input. | ||
| ammo_category | :: R LuaAmmoCategoryPrototype? | |
| magazine_size | :: R float? | Size of full magazine. |
Size of full magazine. | ||
| reload_time | :: R float? | Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. |
Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. | ||
| shoot_protected new | :: R boolean? | |
| equipment_grid | :: R LuaEquipmentGridPrototype? | The prototype of this armor's equipment grid, if any. |
The prototype of this armor's equipment grid, if any. | ||
| resistances | :: R dictionary[string → Resistance]? | Resistances of this armor item, if any, indexed by damage type name. |
Resistances of this armor item, if any, indexed by damage type name. | ||
| collision_box | :: R BoundingBox? | The collision box used by character entities when wearing this armor. |
The collision box used by character entities when wearing this armor. | ||
| drawing_box | :: R BoundingBox? | The drawing box used by character entities when wearing this armor. |
The drawing box used by character entities when wearing this armor. | ||
| provides_flight | :: R boolean? | If this armor provides flight to character entities when worm. |
If this armor provides flight to character entities when worm. | ||
| capsule_action | :: R CapsuleAction? | The capsule action for this capsule item prototype. |
The capsule action for this capsule item prototype. | ||
| radius_color | :: R Color? | |
| cuts new | :: R boolean? | |
| attack_parameters | :: R AttackParameters? | The gun attack parameters. |
The gun attack parameters. | ||
| item_filters | :: R array[LuaItemPrototype]? | |
| item_group_filters | :: R array[LuaGroup]? | |
| item_subgroup_filters | :: R array[LuaGroup]? | |
| filter_mode | :: R PrototypeFilterMode? | The filter mode used by this item with inventory. |
The filter mode used by this item with inventory. | ||
| localised_filter_message | :: R LocalisedString? | The localised string used when the player attempts to put items into this item with inventory that aren't allowed. |
The localised string used when the player attempts to put items into this item with inventory that aren't allowed. | ||
| quality_affects_inventory_size new | :: R boolean? | |
| default_label_color | :: R Color? | The default label color used for this item with label, if any. |
The default label color used for this item with label, if any. | ||
| draw_label_for_cursor_render | :: R boolean? | If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor. |
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 | :: R float? | The repairing speed if this is a repairing tool. |
The repairing speed if this is a repairing tool. | ||
| module_effects | :: R ModuleEffects? | Effects of this module. |
Effects of this module. | ||
| category | :: R string? | The name of a LuaModuleCategoryPrototype. [...] |
The name of a LuaModuleCategoryPrototype. [...] | ||
| tier | :: R uint32? | Tier of the module inside its category. [...] |
Tier of the module inside its category. [...] | ||
| requires_beacon_alt_mode | :: R boolean? | |
| beacon_tint | :: R array[Color]? | |
| consumption_quality_multiplier new | :: R float? | |
| speed_quality_multiplier new | :: R float? | |
| productivity_quality_multiplier new | :: R float? | |
| pollution_quality_multiplier new | :: R float? | |
| quality_quality_multiplier new | :: R float? | |
| rails | :: R array[LuaEntityPrototype]? | Prototypes of all rails possible to be used by this rail planner prototype. |
Prototypes of all rails possible to be used by this rail planner prototype. | ||
| support | :: R LuaEntityPrototype? | The rail support used by this rail planner. |
The rail support used by this rail planner. | ||
| manual_length_limit | :: R double? | |
| always_include_tiles | :: R boolean? | If tiles area always included when doing selection with this selection tool prototype. |
If tiles area always included when doing selection with this selection tool prototype. | ||
| skip_fog_of_war | :: R boolean? | If this selection tool skips things covered by fog of war. |
If this selection tool skips things covered by fog of war. | ||
| durability_description_key | :: R string? | The durability message key used when displaying the durability of this tool. |
The durability message key used when displaying the durability of this tool. | ||
| factoriopedia_durability_description_key | :: R string? | The durability message key used when displaying the durability of this tool in Factoriopedia. |
The durability message key used when displaying the durability of this tool in Factoriopedia. | ||
| durability_description_value | :: R string? | The durability message value used when displaying the durability of this tool. |
The durability message value used when displaying the durability of this tool. | ||
| infinite | :: R boolean? | If this tool item has infinite durability. |
If this tool item has infinite durability. | ||
| trigger | :: R TriggerItem? | |
| surface | :: R LuaSurfacePrototype? | |
| create_electric_network | :: R boolean? | |
| tiles | :: R array[SpacePlatformTileDefinition]? | |
| initial_items | :: R array[ItemProduct]? | |
| valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
| object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] | ||
| type | :: R string | Type of this prototype. |
Type of this prototype. | ||
| name | :: R string | Name of this prototype. |
Name of this prototype. | ||
| order | :: R string | The string used to alphabetically sort these prototypes. [...] |
The string used to alphabetically sort these prototypes. [...] | ||
| localised_name | :: R LocalisedString | |
| localised_description | :: R LocalisedString | |
| factoriopedia_description | :: R LocalisedString | Provides additional description used in factoriopedia. |
Provides additional description used in factoriopedia. | ||
| group | :: R LuaGroup | Group of this prototype. |
Group of this prototype. | ||
| subgroup | :: R LuaGroup | Subgroup of this prototype. |
Subgroup of this prototype. | ||
| hidden | :: R boolean | |
| hidden_in_factoriopedia | :: R boolean | |
| parameter | :: R boolean | |
| custom_tooltip_fields | :: R array[CustomTooltipField]? | Extra description items in the tooltip and Factoriopedia. |
Extra description items in the tooltip and Factoriopedia. | ||
Methods
has_flag(flag) → boolean
get_ammo_type(ammo_source_type?) → AmmoType?
Parameters
| ammo_source_type | :: "default" or "player" or "turret" or "vehicle"? | Defaults to |
Defaults to | ||
get_inventory_size_bonus(quality?) → uint32?
get_inventory_size(quality?) → uint32?new
get_module_effects(quality?) → ModuleEffects?
get_selection_border_color(selection_mode) → Color?
get_selection_mode_flags(selection_mode) → SelectionModeFlags?
get_cursor_box_type(selection_mode) → CursorBoxRenderType?
get_entity_filter_mode(selection_mode) → PrototypeFilterMode?
get_tile_filter_mode(selection_mode) → PrototypeFilterMode?
get_entity_filters(selection_mode) → array[LuaEntityPrototype]?
get_tile_filters(selection_mode) → array[LuaTilePrototype]?
Attributes
place_result :: Read LuaEntityPrototype?
place_as_equipment_result :: Read LuaEquipmentPrototype?
place_as_tile_result :: Read PlaceAsTileResult?
stackable :: Read boolean
stack_size :: Read uint32
fuel_category :: Read string?
burnt_result :: Read LuaItemPrototype?
fuel_value :: Read float
fuel_acceleration_multiplier :: Read double
fuel_top_speed_multiplier :: Read double
fuel_emissions_multiplier :: Read double
fuel_acceleration_multiplier_quality_bonus :: Read double
fuel_top_speed_multiplier_quality_bonus :: Read double
flags :: Read ItemPrototypeFlags
rocket_launch_products :: Read array[Product] 
can_be_mod_opened :: Read boolean
spoil_result :: Read LuaItemPrototype?
spoil_quality_min :: Read LuaQualityPrototype?new
spoil_quality_max :: Read LuaQualityPrototype?new
spoil_quality_change :: Read int8new
plant_result :: Read LuaEntityPrototype?
spoil_to_trigger_result :: Read SpoilToTriggerResult?
destroyed_by_dropping_trigger :: Read array[TriggerItem]?
weight :: Read Weight
ingredient_to_weight_coefficient :: Read double
fuel_glow_color :: Read Color?
default_import_location :: Read LuaSpaceLocationPrototype
factoriopedia_alternative :: Read LuaItemPrototype?
moved_to_hub_when_building :: Read boolean
lab_ignores_spoil_percent :: Read booleannew
space_platform_request_priority :: Read booleannew
color_hint :: Read ColorHintSpecificationnew
spoil_level :: Read uint8new
used_by_labs :: Read booleannew
ammo_category :: Read LuaAmmoCategoryPrototype?
magazine_size :: Read float?
reload_time :: Read float?
shoot_protected :: Read boolean?new
equipment_grid :: Read LuaEquipmentGridPrototype?
resistances :: Read dictionary[string → Resistance]?
collision_box :: Read BoundingBox?
drawing_box :: Read BoundingBox?
provides_flight :: Read boolean?
capsule_action :: Read CapsuleAction?
radius_color :: Read Color?
cuts :: Read boolean?new
attack_parameters :: Read AttackParameters?
item_filters :: Read array[LuaItemPrototype]?
item_group_filters :: Read array[LuaGroup]?
item_subgroup_filters :: Read array[LuaGroup]?
filter_mode :: Read PrototypeFilterMode?
localised_filter_message :: Read LocalisedString?
quality_affects_inventory_size :: Read boolean?new
default_label_color :: Read Color?
draw_label_for_cursor_render :: Read boolean?
speed :: Read float?
module_effects :: Read ModuleEffects?
category :: Read string?
tier :: Read uint32?
requires_beacon_alt_mode :: Read boolean?
beacon_tint :: Read array[Color]?
consumption_quality_multiplier :: Read float?new
speed_quality_multiplier :: Read float?new
productivity_quality_multiplier :: Read float?new
pollution_quality_multiplier :: Read float?new
quality_quality_multiplier :: Read float?new
rails :: Read array[LuaEntityPrototype]?
support :: Read LuaEntityPrototype?
manual_length_limit :: Read double?
always_include_tiles :: Read boolean?
skip_fog_of_war :: Read boolean?
durability_description_key :: Read string?
factoriopedia_durability_description_key :: Read string?
durability_description_value :: Read string?
infinite :: Read boolean?
trigger :: Read TriggerItem?
surface :: Read LuaSurfacePrototype?
create_electric_network :: Read boolean?
tiles :: Read array[SpacePlatformTileDefinition]?
initial_items :: Read array[ItemProduct]?
valid :: Read boolean
object_name :: Read string
Class used in
- LuaAchievementPrototype::dont_research
- LuaAchievementPrototype::research_with
- LuaAchievementPrototype::armor
- LuaAchievementPrototype::alternative_armor
- LuaAchievementPrototype::module
- LuaAchievementPrototype::item_product
- LuaAchievementPrototype::science_pack
- LuaAchievementPrototype::ammo_type
- LuaAchievementPrototype::to_use
- LuaAsteroidChunkPrototype::item_signal_alias
- LuaBurnerPrototype::initial_fuel
- LuaCustomInputPrototype::item_to_spawn
- LuaEntityPrototype::guns
- LuaEntityPrototype::indexed_guns
- LuaEquipmentPrototype::take_result
- LuaItem::prototype
- LuaItemPrototype::burnt_result
- LuaItemPrototype::spoil_result
- LuaItemPrototype::factoriopedia_alternative
- LuaItemPrototype::item_filters
- LuaItemStack::prototype
- LuaPrototypes::get_item_filtered()
- LuaPrototypes::item
- LuaRecipePrototype::trash
- LuaShortcutPrototype::item_to_spawn
- FactoriopediaID
- ItemID
- ItemWithQualityID
- PipetteID
- WorkerRobotOrder
- on_gui_inventory_action
- on_mod_item_opened
- on_player_built_tile
- on_player_pipette
- on_player_used_capsule
- on_pre_robot_exploded_cliff
- on_robot_built_tile
- on_robot_exploded_cliff
- on_space_platform_built_tile

