Home

LuaPrototypes

Provides read-only access to prototypes. It is accessible through the global object named prototypes.

Attributes

object_name

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

font

A dictionary containing every LuaFontPrototype indexed by name.

map_gen_preset

A dictionary containing every MapGenPreset indexed by name.

A MapGenPreset is an exact copy of the prototype table provided from the data stage.

style

A map of styles that LuaGuiElement can use.

Maps from the style's name to its type, as seen on StyleSpecification.

utility_constants

All utility constants.

See UtilityConstants for possible values.

entity

A dictionary containing every LuaEntityPrototype indexed by name.

item

A dictionary containing every LuaItemPrototype indexed by name.

fluid

A dictionary containing every LuaFluidPrototype indexed by name.

tile

A dictionary containing every LuaTilePrototype indexed by name.

equipment

A dictionary containing every LuaEquipmentPrototype indexed by name.

damage

A dictionary containing every LuaDamagePrototype indexed by name.

virtual_signal

A dictionary containing every LuaVirtualSignalPrototype indexed by name.

equipment_grid

A dictionary containing every LuaEquipmentGridPrototype indexed by name.

recipe

A dictionary containing every LuaRecipePrototype indexed by name.

technology

A dictionary containing every LuaTechnologyPrototype indexed by name.

decorative

A dictionary containing every LuaDecorativePrototype indexed by name.

particle

A dictionary containing every LuaParticlePrototype indexed by name.

autoplace_control

A dictionary containing every LuaAutoplaceControlPrototype indexed by name.

mod_setting

A dictionary containing every LuaModSettingPrototype indexed by name.

custom_input

A dictionary containing every LuaCustomInputPrototype indexed by name.

ammo_category

A dictionary containing every LuaAmmoCategoryPrototype indexed by name.

named_noise_expression

A dictionary containing every LuaNamedNoiseExpression indexed by name.

named_noise_function

A dictionary containing every LuaNamedNoiseFunction indexed by name.

item_subgroup

A dictionary containing every ItemSubgroup indexed by name.

item_group

A dictionary containing every ItemGroup indexed by name.

fuel_category

A dictionary containing every LuaFuelCategoryPrototype indexed by name.

resource_category

A dictionary containing every LuaResourceCategoryPrototype indexed by name.

achievement

A dictionary containing every LuaAchievementPrototype indexed by name.

module_category

A dictionary containing every LuaModuleCategoryPrototype indexed by name.

equipment_category

A dictionary containing every LuaEquipmentCategoryPrototype indexed by name.

trivial_smoke

A dictionary containing every LuaTrivialSmokePrototype indexed by name.

shortcut

A dictionary containing every LuaShortcutPrototype indexed by name.

recipe_category

A dictionary containing every LuaRecipeCategoryPrototype indexed by name.

quality

surface_property

space_location

space_connection

custom_event

A dictionary containing every defined custom event, indexed by name.

active_trigger

A dictionary containing every LuaActiveTriggerPrototype indexed by name.

asteroid_chunk

A dictionary containing every LuaAsteroidChunkPrototype indexed by name.

collision_layer

A dictionary containing every LuaCollisionLayerPrototype indexed by name.

airborne_pollutant

A dictionary containing every LuaAirbornePollutantPrototype indexed by name.

burner_usage

A dictionary containing every LuaBurnerUsagePrototype indexed by name.

mod_data

A dictionary containing every LuaModData indexed by name.

surface

A dictionary containing every LuaSurfacePrototype indexed by name.

procession

A dictionary containing every LuaProcessionPrototype indexed by name.

procession_layer_inheritance_group

A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by name.

max_force_distraction_distance

max_force_distraction_chunk_distance

max_electric_pole_supply_area_distance

max_electric_pole_connection_distance

max_beacon_supply_area_distance

max_gate_activation_distance

max_inserter_reach_distance

max_pipe_to_ground_distance

max_underground_belt_distance

Methods

get_entity_filtered

LuaPrototypes.get_entity_filtered(filters: Array<EntityPrototypeFilter>) -> LuaCustomTable<string, LuaEntityPrototype>

Call As

prototypes.get_entity_filtered(filters)

Call Convention

Returns a dictionary of all LuaEntityPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_item_filtered

LuaPrototypes.get_item_filtered(filters: Array<ItemPrototypeFilter>) -> LuaCustomTable<string, LuaItemPrototype>

Call As

prototypes.get_item_filtered(filters)

Call Convention

Returns a dictionary of all LuaItemPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_equipment_filtered

LuaPrototypes.get_equipment_filtered(filters: Array<EquipmentPrototypeFilter>) -> LuaCustomTable<string, LuaEquipmentPrototype>

Call As

prototypes.get_equipment_filtered(filters)

Call Convention

Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_mod_setting_filtered

LuaPrototypes.get_mod_setting_filtered(filters: Array<ModSettingPrototypeFilter>) -> LuaCustomTable<string, LuaModSettingPrototype>

Call As

prototypes.get_mod_setting_filtered(filters)

Call Convention

Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_achievement_filtered

LuaPrototypes.get_achievement_filtered(filters: Array<AchievementPrototypeFilter>) -> LuaCustomTable<string, LuaAchievementPrototype>

Call As

prototypes.get_achievement_filtered(filters)

Call Convention

Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_tile_filtered

LuaPrototypes.get_tile_filtered(filters: Array<TilePrototypeFilter>) -> LuaCustomTable<string, LuaTilePrototype>

Call As

prototypes.get_tile_filtered(filters)

Call Convention

Returns a dictionary of all LuaTilePrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_decorative_filtered

LuaPrototypes.get_decorative_filtered(filters: Array<DecorativePrototypeFilter>) -> LuaCustomTable<string, LuaDecorativePrototype>

Call As

prototypes.get_decorative_filtered(filters)

Call Convention

Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_fluid_filtered

LuaPrototypes.get_fluid_filtered(filters: Array<FluidPrototypeFilter>) -> LuaCustomTable<string, LuaFluidPrototype>

Call As

prototypes.get_fluid_filtered(filters)

Call Convention

Returns a dictionary of all LuaFluidPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_recipe_filtered

LuaPrototypes.get_recipe_filtered(filters: Array<RecipePrototypeFilter>) -> LuaCustomTable<string, LuaRecipePrototype>

Call As

prototypes.get_recipe_filtered(filters)

Call Convention

Returns a dictionary of all LuaRecipePrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_technology_filtered

LuaPrototypes.get_technology_filtered(filters: Array<TechnologyPrototypeFilter>) -> LuaCustomTable<string, LuaTechnologyPrototype>

Call As

prototypes.get_technology_filtered(filters)

Call Convention

Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. The prototypes are indexed by name.

Parameters

Returns

get_history

LuaPrototypes.get_history(type: string, name: string) -> PrototypeHistory

Call As

prototypes.get_history(type, name)

Call Convention

Gets the prototype history for the given type and name.

Parameters

Returns