Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# Classes - Runtime Docs

## Classes

As described on the home page, it is necessary to have access to instances of classes to use the scripting API. Using the provided global classes, instances of all other classes can be accessed.

#### Example

This will print the first player's username, making use of LuaGameScript::get_player to gain access to players' information, and LuaPlayer::print to display a string in the player's game console.
    local first_player = game.get_player(1)
    first_player.print(first_player.name)

This is a list of all Lua classes defined by Factorio. Each class also has an individual page with details on its methods and attributes.

LuaAISettings | Collection of settings for overriding default ai behavior.
LuaAccumulatorControlBehavior | Control behavior for accumulators.
LuaAchievementPrototype | Prototype of a achievement.
LuaActiveTriggerPrototype | Prototype of an Active Trigger.
LuaAgriculturalTowerControlBehavior | Control behavior for agricultural tower
LuaAirbornePollutantPrototype | Airborne pollutant prototype.
LuaAmmoCategoryPrototype | Prototype of a ammo category.
LuaArithmeticCombinatorControlBehavior | Control behavior for arithmetic combinators.
LuaArtilleryTurretControlBehavior | Control behavior for artillery turrets.
LuaAssemblingMachineControlBehavior | Control behavior for assembling machines.
LuaAsteroidChunkPrototype | Prototype of an asteroid chunk.
LuaAsteroidCollectorControlBehavior | Control behavior for asteroid collectors.
LuaAutoplaceControlPrototype | Prototype of an autoplace control.
LuaBootstrap | Entry point for registering event handlers. [...]
LuaBurner | A reference to the burner energy source owned by a specific LuaEntity or LuaEquipment.
LuaBurnerPrototype | Prototype of a burner energy source.
LuaBurnerUsagePrototype | Description of burner usage.
LuaCargoHatch | A cargo hatch.
LuaCargoLandingPadControlBehavior | Control behavior for cargo landing pad.
LuaChunkIterator | A chunk iterator can be used for iterating chunks coordinates of a surface. [...]
LuaCircuitNetwork | A circuit network associated with a given entity, connector, and wire type.
LuaCollisionLayerPrototype | Prototype of a collision layer.
LuaCombinatorControlBehavior |
LuaCommandProcessor | Allows for the registration of custom console commands through the global object named `commands`. [...]
LuaCommandable | AI object which can be ordered commands. [...]
LuaConstantCombinatorControlBehavior | Control behavior for constant combinators.
LuaContainerControlBehavior | Control behavior for container entities.
LuaControl | This is an abstract base class containing the common functionality between LuaPlayer and entities (see LuaEntity). [...]
LuaControlBehavior | The control behavior for an entity. [...]
LuaCustomChartTag | A custom tag that shows on the map view.
LuaCustomEventPrototype | Prototype of a custom event.
LuaCustomInputPrototype | Prototype of a custom input.
LuaCustomTable | Lazily evaluated table. [...]
LuaDamagePrototype | Prototype of a damage.
LuaDeciderCombinatorControlBehavior | Control behavior for decider combinators.
LuaDecorativePrototype | Prototype of an optimized decorative.
LuaDisplayPanelControlBehavior | Control behavior for display panels.
LuaElectricEnergySourcePrototype | Prototype of an electric energy source.
LuaEntity | The primary interface for interacting with entities through the Lua API. [...]
LuaEntityPrototype | Prototype of an entity.
LuaEquipment | An item in a LuaEquipmentGrid, for example a fusion reactor placed in one's power armor. [...]
LuaEquipmentCategoryPrototype | Prototype of an equipment category.
LuaEquipmentGrid | An equipment grid is for example the inside of a power armor.
LuaEquipmentGridPrototype | Prototype of an equipment grid.
LuaEquipmentPrototype | Prototype of a modular equipment.
LuaFlowStatistics | Encapsulates statistic data for different parts of the game. [...]
LuaFluidBox | An array of fluid boxes of an entity. [...]
LuaFluidBoxPrototype | A prototype of a fluidbox owned by some LuaEntityPrototype.
LuaFluidEnergySourcePrototype | Prototype of a fluid energy source.
LuaFluidPrototype | Prototype of a fluid.
LuaFontPrototype | Prototype of a font.
LuaForce | `LuaForce` encapsulates data local to each "force" or "faction" of the game. [...]
LuaFuelCategoryPrototype | Prototype of a fuel category.
LuaFurnaceControlBehavior | Control behavior for furnaces.
LuaGameScript | Main toplevel type, provides access to most of the API though its members. [...]
LuaGenericOnOffControlBehavior | An abstract base class for behaviors that support switching the entity on or off based on some condition.
LuaGroup | Item group or subgroup.
LuaGui | The root of the GUI. [...]
LuaGuiElement | An element of a custom GUI. [...]
LuaHeatBufferPrototype | Prototype of a heat buffer.
LuaHeatEnergySourcePrototype | Prototype of a heat energy source.
LuaHelpers | Provides various helper and utility functions. [...]
LuaInserterControlBehavior | Control behavior for inserters.
LuaInventory | A storage of item stacks.
LuaItem | A reference to an item with data. [...]
LuaItemCommon | Common methods related to usage of item with data. [...]
LuaItemPrototype | Prototype of an item. [...]
LuaItemStack | A reference to an item and count owned by some external entity. [...]
LuaLampControlBehavior | Control behavior for lamps.
LuaLazyLoadedValue | A lazily loaded value. [...]
LuaLoaderControlBehavior | Control behavior for loaders.
LuaLogisticCell | Logistic cell of a particular LuaEntity. [...]
LuaLogisticContainerControlBehavior | Control behavior for logistic chests.
LuaLogisticNetwork | A single logistic network of a given force on a given surface.
LuaLogisticPoint | Logistic point of a particular LuaEntity. [...]
LuaLogisticSection | Logistic section of a particular LuaLogisticPoint or LuaConstantCombinatorControlBehavior.
LuaLogisticSections | Logistic sections of an entity.
LuaMiningDrillControlBehavior | Control behavior for mining drills.
LuaModData | Arbitrary data provided by mods.
LuaModSettingPrototype | Prototype of a mod setting.
LuaModuleCategoryPrototype | Prototype of a module category.
LuaNamedNoiseExpression | Prototype of a named noise expression.
LuaNamedNoiseFunction | Prototype of a named noise function.
LuaParticlePrototype | Prototype of an optimized particle.
LuaPermissionGroup | A permission group that defines what players in this group are allowed to do.
LuaPermissionGroups | All permission groups.
LuaPlanet | The runtime values of a planet
LuaPlayer | A player in the game. [...]
LuaProcessionLayerInheritanceGroupPrototype | Prototype of a procession inheritance group which synchronizes offsets between procession steps.
LuaProcessionPrototype | Prototype of a procession.
LuaProfiler | An object used to measure script performance. [...]
LuaProgrammableSpeakerControlBehavior | Control behavior for programmable speakers.
LuaPrototypeBase | Base for all prototype classes.
LuaPrototypes | Provides read-only access to prototypes. [...]
LuaProxyContainerControlBehavior | Control behavior for proxy container.
LuaPumpControlBehavior | Control behavior for pumps.
LuaQualityPrototype | Prototype of a quality.
LuaRCON | An interface to send messages to the calling RCON interface through the global object named `rcon`.
LuaRadarControlBehavior | Control behavior for radars
LuaRailEnd | Utility object that binds to a rail entity and rail_direction to allow easier traversal over rails
LuaRailPath | A rail path.
LuaRailSignalBaseControlBehavior | Control behavior for rail signals and rail chain signals.
LuaRandomGenerator | A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. [...]
LuaReactorControlBehavior | Control behavior for Reactor
LuaRecipe | A crafting recipe. [...]
LuaRecipeCategoryPrototype | Prototype of a recipe category.
LuaRecipePrototype | A crafting recipe prototype.
LuaRecord | A reference to a record in the blueprint library. [...]
LuaRemote | Registry of interfaces between scripts. [...]
LuaRenderObject | Reference to a single LuaRendering object.
LuaRendering | Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. [...]
LuaResourceCategoryPrototype | Prototype of a resource category.
LuaRoboportControlBehavior | Control behavior for roboports.
LuaRocketSiloControlBehavior | Control behavior for rocket silos.
LuaSchedule | The schedule of a particular LuaTrain or LuaSpacePlatform.
LuaSegment | An individual segment of a LuaSegmentedUnit. [...]
LuaSegmentedUnit | A surface-level object composed of one SegmentedUnitPrototype followed by up to 63 SegmentPrototypes. [...]
LuaSelectorCombinatorControlBehavior | Control behavior for selector combinators.
LuaSettings | Object containing the three different types of mod settings: startup settings, global runtime settings and per-player runtime settings. [...]
LuaShortcutPrototype | Prototype of a shortcut.
LuaSimulation | Functions for use during simulations. [...]
LuaSpaceConnectionPrototype | Prototype of a space connection.
LuaSpaceLocationPrototype | Prototype of a space location, such as a planet.
LuaSpacePlatform | A space platform.
LuaSpacePlatformHubControlBehavior | Control behavior for space platform hubs
LuaSplitterControlBehavior | Control behavior for splitter.
LuaStorageTankControlBehavior | Control behavior for storage tanks.
LuaStyle | Style of a GUI element. [...]
LuaSurface | A "domain" of the world, such as a planet or space platform. [...]
LuaSurfacePropertyPrototype | Prototype of a surface property.
LuaSurfacePrototype | Prototype of a surface.
LuaTechnology | One research item.
LuaTechnologyPrototype | A Technology prototype.
LuaTerritory | A set of chunks on a single LuaSurface that can be guarded by one or more LuaSegmentedUnits. [...]
LuaTile | A single "square" on the map.
LuaTilePrototype | Prototype of a tile.
LuaTrain | A train. [...]
LuaTrainManager | The train manager manages all the train in the game. [...]
LuaTrainStopControlBehavior | Control behavior for train stops.
LuaTransportBeltControlBehavior | Control behavior for transport belts.
LuaTransportLine | One line on a transport belt.
LuaTrivialSmokePrototype | Prototype of a trivial smoke.
LuaTurretControlBehavior | Control behavior for turrets.
LuaUndoRedoStack | The undo queue for a player. [...]
LuaVirtualSignalPrototype | Prototype of a virtual signal.
LuaVoidEnergySourcePrototype | Prototype of a void energy source.
LuaWallControlBehavior | Control behavior for walls.
LuaWireConnector | A wire connector of a given entity. [...]

## Class LuaAISettings

allow_destroy_when_commands_fail | :: RW boolean | If enabled, units that repeatedly fail to succeed at commands will be destroyed.
If enabled, units that repeatedly fail to succeed at commands will be destroyed.
allow_try_return_to_spawner | :: RW boolean | If enabled, units that have nothing else to do will attempt to return to a spawner.
If enabled, units that have nothing else to do will attempt to return to a spawner.
do_separation | :: RW boolean | If enabled, units will try to separate themselves from nearby friendly units.
If enabled, units will try to separate themselves from nearby friendly units.
path_resolution_modifier | :: RW int8 | Defines how coarse the pathfinder's grid is, where smaller values mean a coarser grid. [...]
Defines how coarse the pathfinder's grid is, where smaller values mean a coarser grid. [...]
size_in_group | :: RW float | The number of "slots" that the unit takes up in a unit group. [...]
The number of "slots" that the unit takes up in a unit group. [...]
join_attacks | :: RW boolean | If enabled, the unit will join attack groups.
If enabled, the unit will join attack groups.
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. [...]

## Class LuaAccumulatorControlBehavior extends LuaControlBehavior

read_charge | :: RW boolean | `true` if this accumulator sends its charge percent to circuit network.
`true` if this accumulator sends its charge percent to circuit network.
output_signal | :: RW SignalID? |
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. [...]

## Class LuaAchievementPrototype extends LuaPrototypeBase

allowed_without_fight | :: R boolean |
objective_condition | :: R string? |
amount | :: R uint32? |
limited_to_one_game | :: R boolean? |
within | :: R uint32? |
to_build | :: R LuaEntityPrototype? |
surface | :: R string? |
count | :: R uint32? |
more_than_manually | :: R boolean? |
dont_build | :: R array[LuaEntityPrototype]? |
excluded | :: R array[LuaEntityPrototype]? |
included | :: R array[LuaEntityPrototype]? |
dont_research | :: R array[LuaItemPrototype]? |
research_with | :: R array[LuaItemPrototype]? |
last_hour_only | :: R boolean? |
minimum_energy_produced | :: R double? |
armor | :: R LuaItemPrototype? |
alternative_armor | :: R LuaItemPrototype? |
limit_quality | :: R LuaQualityPrototype? |
damage_type | :: R LuaDamagePrototype? |
damage_dealer | :: R array[LuaEntityPrototype]? |
to_kill | :: R array[LuaEntityPrototype]? |
personally | :: R boolean? |
in_vehicle | :: R boolean? |
type_to_kill | :: R string? |
not_to_kill | :: R LuaEntityPrototype? |
type_not_to_kill | :: R string? |
module | :: R array[LuaItemPrototype]? |
limit_equip_quality | :: R LuaQualityPrototype? |
minimum_damage | :: R float? |
should_survive | :: R boolean? |
type_of_dealer | :: R string? |
item_product | :: R LuaItemPrototype? |
quality | :: R LuaQualityPrototype? |
fluid_product | :: R LuaFluidPrototype? |
technology | :: R LuaTechnologyPrototype? |
research_all | :: R boolean? |
science_pack | :: R LuaItemPrototype? |
ammo_type | :: R LuaItemPrototype? |
minimum_distance | :: R double? |
to_use | :: R LuaItemPrototype? |
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. [...]

## Class LuaActiveTriggerPrototype extends LuaPrototypeBase

max_jumps | :: R uint32 | The max number of jumps per trigger. [...]
The max number of jumps per trigger. [...]
max_range_per_jump | :: R double | The max length of jumps. [...]
The max length of jumps. [...]
max_range | :: R double | The max distance jumps are allowed to travel away from the original target. [...]
The max distance jumps are allowed to travel away from the original target. [...]
jump_delay_ticks | :: R uint32 | The tick delay between each jump. [...]
The tick delay between each jump. [...]
fork_chance | :: R double | The chance that a new fork will spawn after each jump [0,1]. [...]
The chance that a new fork will spawn after each jump [0,1]. [...]
max_forks_per_jump | :: R uint32 | The maximum number of forks that can spawn from a single jump. [...]
The maximum number of forks that can spawn from a single jump. [...]
max_forks | :: R uint32 | maximum number of forks allowed to spawn for the entire chain. [...]
maximum number of forks allowed to spawn for the entire chain. [...]
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. [...]

## Class LuaAgriculturalTowerControlBehavior extends LuaGenericOnOffControlBehavior

read_contents | :: RW boolean | `true` if the agricultural tower reads seeds and harvested plants.
`true` if the agricultural tower reads seeds and harvested plants.
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. [...]

## Class LuaAirbornePollutantPrototype extends LuaPrototypeBase

chart_color | :: R Color |
affects_evolution | :: R boolean |
damages_trees | :: R boolean |
localised_name_with_amount_key | :: R string |
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. [...]

## Class LuaAmmoCategoryPrototype extends LuaPrototypeBase

bonus_gui_order | :: R string |
factoriopedia_alternative | :: R LuaAmmoCategoryPrototype? | 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.
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. [...]

## Class LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBehavior

parameters | :: RW ArithmeticCombinatorParameters? | This arithmetic combinator's parameters. [...]
This arithmetic combinator's parameters. [...]
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. [...]

## Class LuaArtilleryTurretControlBehavior extends LuaGenericOnOffControlBehavior

read_ammo | :: RW boolean | `true` if the turret will send the ammunition or fluid it contains to the circuit network.
`true` if the turret will send the ammunition or fluid it contains to the circuit network.
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. [...]

## Class LuaAssemblingMachineControlBehavior extends LuaGenericOnOffControlBehavior

circuit_set_recipe | :: RW boolean | `true` if the assembling machine sets its recipe from the circuit network.
`true` if the assembling machine sets its recipe from the circuit network.
circuit_read_contents | :: RW boolean | `true` if the assembling machine reads its ingredients contents, product contents, materials in crafting and trash inventories.
`true` if the assembling machine reads its ingredients contents, product contents, materials in crafting and trash inventories.
include_in_crafting | :: RW boolean | `true` if the read contents should include items in crafting.
`true` if the read contents should include items in crafting.
include_fuel | :: RW boolean | `true` if the read contents should include fuel (content of energy source)
`true` if the read contents should include fuel (content of energy source)
circuit_read_ingredients | :: RW boolean | `true` if the assembling machine outputs ingredients of current recipe as a signals to circuit network.
`true` if the assembling machine outputs ingredients of current recipe as a signals to circuit network.
circuit_read_recipe_finished | :: RW boolean | `true` if the the assembling machine sends a signal when the recipe finishes.
`true` if the the assembling machine sends a signal when the recipe finishes.
circuit_recipe_finished_signal | :: RW SignalID? | The signal sent when the assembling machine finishes a recipe.
The signal sent when the assembling machine finishes a recipe.
circuit_read_working | :: RW boolean | `true` if the the assembling machine sends a signal when it is working.
`true` if the the assembling machine sends a signal when it is working.
circuit_working_signal | :: RW SignalID? | The signal sent when the assembling machine is working.
The signal sent when the assembling machine is working.
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. [...]

## Class LuaAsteroidChunkPrototype extends LuaPrototypeBase

mineable_properties | :: R MineableProperties |
hide_from_signal_gui | :: R boolean |
item_signal_alias | :: R LuaItemPrototype? |
factoriopedia_alternative | :: R LuaAsteroidChunkPrototype? | 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.
dying_trigger_effect | :: R array[TriggerEffectItem]? |
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. [...]

## Class LuaAsteroidCollectorControlBehavior extends LuaGenericOnOffControlBehavior

set_filter | :: RW boolean | `true` if this asteroid collector has filters set from circuit network
`true` if this asteroid collector has filters set from circuit network
read_content | :: RW boolean | `true` if this asteroid collector reads its content and sends it to a circuit network
`true` if this asteroid collector reads its content and sends it to a circuit network
include_hands | :: RW boolean | `true` if read contents should include content of hands (items that were captured but are not yet in the asteroid collector's main inventory).
`true` if read contents should include content of hands (items that were captured but are not yet in the asteroid collector's main inventory).
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. [...]

## Class LuaAutoplaceControlPrototype extends LuaPrototypeBase

richness | :: R boolean |
can_be_disabled | :: R boolean |
category | :: R `"resource"` or `"terrain"` or `"cliff"` or `"enemy"` | Category name of this prototype.
Category name of this prototype.
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. [...]

## Class LuaBootstrap

on_init(handler) |  | Register a function to be run on mod initialization. [...]
Register a function to be run on mod initialization. [...]
on_load(handler) |  | Register a function to be run on save load. [...]
Register a function to be run on save load. [...]
on_configuration_changed(handler) |  | Register a function to be run when mod configuration changes. [...]
Register a function to be run when mod configuration changes. [...]
on_event(event, handler, filters?) |  | Register a handler to run on the specified event(s). [...]
Register a handler to run on the specified event(s). [...]
on_nth_tick(tick, handler) |  | Register a handler to run every nth-tick(s). [...]
Register a handler to run every nth-tick(s). [...]
register_on_object_destroyed(object) | → uint64, uint64, defines.target_type | Registers an object so that after it's destroyed, on_object_destroyed is called. [...]
Registers an object so that after it's destroyed, on_object_destroyed is called. [...]
register_metatable(name, metatable) |  | Register a metatable to have linkage recorded and restored when saving/loading. [...]
Register a metatable to have linkage recorded and restored when saving/loading. [...]
generate_event_name() | → defines.events | Generate a new, unique event ID that can be used to raise custom events with LuaBootstrap::raise_event.
Generate a new, unique event ID that can be used to raise custom events with LuaBootstrap::raise_event.
get_event_id(event) | → defines.events | Converts LuaEventType into related value of defines.events. [...]
Converts LuaEventType into related value of defines.events. [...]
get_event_handler(event) | → function(EventData)? | Find the event handler for an event.
Find the event handler for an event.
get_event_order() | → string | Gets the mod event order as a string.
Gets the mod event order as a string.
set_event_filter(event, filters?) |  | Sets the filters for the given event. [...]
Sets the filters for the given event. [...]
get_event_filter(event) | → EventFilter? | Gets the filters for the given event.
Gets the filters for the given event.
raise_event(event, data) |  | Raise an event. [...]
Raise an event. [...]
raise_console_chat{player_index=…, message=…} |  |
raise_player_crafted_item{item_stack=…, player_index=…, recipe=…} |  |
raise_player_fast_transferred{player_index=…, entity=…, from_player=…, is_split=…} |  |
raise_biter_base_built{entity=…} |  |
raise_market_item_purchased{player_index=…, market=…, offer_index=…, count=…} |  |
raise_script_built{entity=…} |  |
raise_script_destroy{entity=…} |  |
raise_script_revive{entity=…, tags?=…} |  |
raise_script_teleported{entity=…, old_surface_index=…, old_position=…} |  |
raise_script_set_tiles{surface_index=…, tiles=…} |  |
raise_script_destroy_segmented_unit{segmented_unit=…} |  |
mod_name | :: R string | The name of the mod from the environment this is used in.
The name of the mod from the environment this is used in.
level | :: R table | Information about the currently running scenario/campaign/tutorial.
Information about the currently running scenario/campaign/tutorial.
active_mods | :: R dictionary[string → string] | A dictionary listing the names of all currently active mods and mapping them to their version.
A dictionary listing the names of all currently active mods and mapping them to their version.
feature_flags | :: R table | A dictionary of feature flags mapping to whether they are enabled.
A dictionary of feature flags mapping to whether they are enabled.
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

## Class LuaBurner

owner | :: R LuaEntity or LuaEquipment | The owner of this burner energy source
The owner of this burner energy source
inventory | :: R LuaInventory | The fuel inventory.
The fuel inventory.
burnt_result_inventory | :: R LuaInventory | The burnt result inventory.
The burnt result inventory.
heat | :: RW double | The current heat (energy) stored in this burner.
The current heat (energy) stored in this burner.
heat_capacity | :: R double | The maximum heat (maximum energy) that this burner can store.
The maximum heat (maximum energy) that this burner can store.
remaining_burning_fuel | :: RW double | The amount of energy left in the currently-burning fuel item. [...]
The amount of energy left in the currently-burning fuel item. [...]
currently_burning | :: R ItemIDAndQualityIDPair| W ItemWithQualityID? | The currently burning item. [...]
The currently burning item. [...]
fuel_categories | :: R dictionary[string → `true`] | The fuel categories this burner uses. [...]
The fuel categories this burner uses. [...]
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. [...]

## Class LuaBurnerPrototype

emissions_per_joule | :: R dictionary[string → double] | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
render_no_network_icon | :: R boolean |
render_no_power_icon | :: R boolean |
effectivity | :: R double |
fuel_inventory_size | :: R uint32 |
burnt_inventory_size | :: R uint32 |
smoke | :: R array[SmokeSource]? | The smoke sources for this burner prototype.
The smoke sources for this burner prototype.
light_flicker | :: R table? | The light flicker definition for this burner prototype.
The light flicker definition for this burner prototype.
fuel_categories | :: R dictionary[string → `true`] | The value in the dictionary is meaningless and exists just to allow for easy lookup.
The value in the dictionary is meaningless and exists just to allow for easy lookup.
initial_fuel | :: R LuaItemPrototype? |
initial_fuel_percent | :: R double |
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. [...]

## Class LuaBurnerUsagePrototype extends LuaPrototypeBase

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. [...]

## Class LuaCargoHatch

create_cargo_pod() | → LuaEntity | Creates a cargo pod for output at the owning entity hatch location.
Creates a cargo pod for output at the owning entity hatch location.
owner | :: R LuaEntity |
busy | :: R boolean |
reserved | :: R boolean |
is_input_compatible | :: R boolean |
is_output_compatible | :: R boolean |
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. [...]

## Class LuaCargoLandingPadControlBehavior extends LuaControlBehavior

circuit_exclusive_mode_of_operation | :: RW defines.control_behavior.cargo_landing_pad.exclusive_mode | The circuit mode of operations for the cargo landing pad.
The circuit mode of operations for the cargo landing pad.
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. [...]

## Class LuaChunkIterator

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. [...]
() (call) | → ChunkPositionAndArea? | Gets the next chunk position if the iterator is not yet done and increments the it.
Gets the next chunk position if the iterator is not yet done and increments the it.

## Class LuaCircuitNetwork

get_signal(signal) | → int32 |
entity | :: R LuaEntity | The entity this circuit network reference is associated with.
The entity this circuit network reference is associated with.
wire_type | :: R defines.wire_type | The wire type this network is associated with.
The wire type this network is associated with.
wire_connector_id | :: R defines.wire_connector_id | Wire connector ID on associated entity this network was gotten from.
Wire connector ID on associated entity this network was gotten from.
signals | :: R array[Signal]? | The circuit network signals last tick. [...]
The circuit network signals last tick. [...]
network_id | :: R uint32 | The circuit networks ID.
The circuit networks ID.
connected_circuit_count | :: R uint32 | The number of circuits connected to this network.
The number of circuits connected to this network.
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. [...]

## Class LuaCollisionLayerPrototype extends LuaPrototypeBase

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. [...]

## Class LuaCombinatorControlBehavior extends LuaControlBehavior abstract

get_signal_last_tick(signal) | → int32? | Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.
Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.
signals_last_tick | :: R array[Signal] | The circuit network signals sent by this combinator last tick.
The circuit network signals sent by this combinator last tick.

## Class LuaCommandProcessor

add_command(name, help, function) |  | Add a custom console command. [...]
Add a custom console command. [...]
remove_command(name) | → boolean | Remove a custom console command.
Remove a custom console command.
commands | :: R dictionary[string → LocalisedString] | Lists the custom commands registered by scripts through `LuaCommandProcessor`.
Lists the custom commands registered by scripts through `LuaCommandProcessor`.
game_commands | :: R dictionary[string → LocalisedString] | Lists the built-in commands of the core game. [...]
Lists the built-in commands of the core game. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

## Class LuaCommandable

destroy() |  | Destroys this commandable. [...]
Destroys this commandable. [...]
set_command(command) |  | Give this commandable a command.
Give this commandable a command.
set_distraction_command(command) |  | Give this commandable a distraction command.
Give this commandable a distraction command.
release_from_spawner() |  | Release the commandable from the spawner. [...]
Release the commandable from the spawner. [...]
add_member(member) |  | Adds a member to this UnitGroup. [...]
Adds a member to this UnitGroup. [...]
set_autonomous() |  | Make this group autonomous. [...]
Make this group autonomous. [...]
start_moving() |  | Make the group start moving even if some of its members haven't yet arrived.
Make the group start moving even if some of its members haven't yet arrived.
is_unit_group | :: R boolean | If this commandable is UnitGroup.
If this commandable is UnitGroup.
is_entity | :: R boolean | If this commandable is Entity.
If this commandable is Entity.
surface | :: R LuaSurface | Surface this commandable is on.
Surface this commandable is on.
position | :: R MapPosition | Current position of this commandable. [...]
Current position of this commandable. [...]
force | :: R LuaForce | The force of this commandable.
The force of this commandable.
unique_id | :: R uint32 | Unique identifier of this commandable.
Unique identifier of this commandable.
has_command | :: R boolean | If this commandable has a command assigned.
If this commandable has a command assigned.
command | :: R Command? | The command of this commandable, if any.
The command of this commandable, if any.
distraction_command | :: R Command? | The distraction command of this commandable, if any.
The distraction command of this commandable, if any.
parent_group | :: R LuaCommandable? | The unit group this commandable is a member of, if any.
The unit group this commandable is a member of, if any.
spawner | :: R LuaEntity? | The spawner associated with this commandable, if any.
The spawner associated with this commandable, if any.
moving_state | :: R defines.moving_state | Current moving state of the commandable's behavior
Current moving state of the commandable's behavior
state | :: R defines.group_state | Whether this group is gathering, moving or attacking.
Whether this group is gathering, moving or attacking.
members | :: R array[LuaEntity] | All entity members of this unit group, recursive (if unit group is member of this unit group, its members will be returned here).
All entity members of this unit group, recursive (if unit group is member of this unit group, its members will be returned here).
commandable_members | :: R array[LuaCommandable] | Non recursively returns all members of this unit group.
Non recursively returns all members of this unit group.
is_script_driven | :: R boolean | Whether this unit group is controlled by a script or by the game engine. [...]
Whether this unit group is controlled by a script or by the game engine. [...]
entity | :: R LuaEntity | Returns entity object for this commandable.
Returns entity object for this commandable.
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. [...]

## Class LuaConstantCombinatorControlBehavior extends LuaControlBehavior

add_section(group?) | → LuaLogisticSection? | Adds a new logistic section to this constant combinator if possible.
Adds a new logistic section to this constant combinator if possible.
remove_section(section_index) | → boolean | Removes the given logistic section if possible. [...]
Removes the given logistic section if possible. [...]
get_section(section_index) | → LuaLogisticSection? | Gets section on the selected index, if it exists.
Gets section on the selected index, if it exists.
enabled | :: RW boolean | Turns this constant combinator on and off.
Turns this constant combinator on and off.
sections | :: R array[LuaLogisticSection] | All logistic sections of this constant combinator.
All logistic sections of this constant combinator.
sections_count | :: R uint32 | Amount of logistic sections this constant combinator has.
Amount of logistic sections this constant combinator has.
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. [...]

## Class LuaContainerControlBehavior extends LuaControlBehavior

read_contents | :: RW boolean | `true` if this container is sending its content to a circuit network
`true` if this container is sending its content to a circuit network
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. [...]

## Class LuaControl abstract

get_inventory(inventory) | → LuaInventory? | Get an inventory belonging to this entity. [...]
Get an inventory belonging to this entity. [...]
get_inventory_name(inventory) | → string? | Get name of inventory. [...]
Get name of inventory. [...]
get_max_inventory_index() | → defines.inventory | The highest index of all inventories this entity can use. [...]
The highest index of all inventories this entity can use. [...]
get_main_inventory() | → LuaInventory? | Gets the main inventory for this character or player if this is a character or player.
Gets the main inventory for this character or player if this is a character or player.
can_insert(items) | → boolean | Can at least some items be inserted?
Can at least some items be inserted?
insert(items) | → uint32 | Insert items into this entity. [...]
Insert items into this entity. [...]
set_gui_arrow{margin=…, type=…} |  | Create an arrow which points at this entity. [...]
Create an arrow which points at this entity. [...]
clear_gui_arrow() |  | Removes the arrow created by `set_gui_arrow`.
Removes the arrow created by `set_gui_arrow`.
get_item_count(item?) | → uint32 | Get the number of all or some items in this entity.
Get the number of all or some items in this entity.
has_items_inside() | → boolean | Does this entity have any item inside it?
Does this entity have any item inside it?
can_reach_entity(entity) | → boolean | Can a given entity be opened or accessed?
Can a given entity be opened or accessed?
clear_items_inside() |  | Remove all items from this entity.
Remove all items from this entity.
remove_item(items) | → uint32 | Remove items from this entity.
Remove items from this entity.
teleport(position, surface?, raise_teleported?, snap_to_grid?, build_check_type?) | → boolean | Teleport the entity to a given position, possibly on another surface. [...]
Teleport the entity to a given position, possibly on another surface. [...]
update_selected_entity(position) |  | Select an entity, as if by hovering the mouse above it.
Select an entity, as if by hovering the mouse above it.
clear_selected_entity() |  | Unselect any selected entity.
Unselect any selected entity.
disable_flashlight() |  | Disable the flashlight. [...]
Disable the flashlight. [...]
enable_flashlight() |  | Enable the flashlight. [...]
Enable the flashlight. [...]
is_flashlight_enabled() | → boolean | Is the flashlight enabled for the current controller. [...]
Is the flashlight enabled for the current controller. [...]
get_craftable_count(recipe) | → uint32 | Gets the count of the given recipe that can be crafted.
Gets the count of the given recipe that can be crafted.
begin_crafting{count=…, recipe=…, silent?=…} | → uint32 | Begins crafting the given count of the given recipe.
Begins crafting the given count of the given recipe.
cancel_crafting{index=…, count=…} |  | Cancels the given amount of crafts at the given crafting queue position. [...]
Cancels the given amount of crafts at the given crafting queue position. [...]
mine_entity(entity, force?) | → boolean | Mines the given entity as if this player (or character) mined it.
Mines the given entity as if this player (or character) mined it.
mine_tile(tile) | → boolean | Mines the given tile as if this player (or character) mined it.
Mines the given tile as if this player (or character) mined it.
is_player() | → boolean | When `true` control adapter is a LuaPlayer object, `false` for entities including characters with players.
When `true` control adapter is a LuaPlayer object, `false` for entities including characters with players.
open_technology_gui(technology?) |  | Open the technology GUI and select a given technology.
Open the technology GUI and select a given technology.
open_factoriopedia_gui(prototype?) |  | Open the Factoriopedia GUI and select a given entry, if any valid ID is given.
Open the Factoriopedia GUI and select a given entry, if any valid ID is given.
close_factoriopedia_gui() |  | Closes the Factoriopedia GUI if it's open.
Closes the Factoriopedia GUI if it's open.
is_cursor_blueprint() | → boolean | Returns whether the player is holding a blueprint. [...]
Returns whether the player is holding a blueprint. [...]
is_cursor_empty() | → boolean | Returns whether the player is holding something in the cursor. [...]
Returns whether the player is holding something in the cursor. [...]
get_requester_point() | → LuaLogisticPoint? | Gets the requester logistic point for this entity if it has one.
Gets the requester logistic point for this entity if it has one.
set_driving(driving, force?) |  | Sets if this character or player is driving. [...]
Sets if this character or player is driving. [...]
can_place_entity{name=…, position=…, direction?=…} | → boolean | Checks if this character or player can build the given entity at the given location on the surface the character or player is on.
Checks if this character or player can build the given entity at the given location on the surface the character or player is on.
surface | :: R LuaSurface | The surface this entity is currently on.
The surface this entity is currently on.
surface_index | :: R uint32 | Unique index (ID) associated with the surface this entity is currently on.
Unique index (ID) associated with the surface this entity is currently on.
position | :: R MapPosition | The current position of the entity.
The current position of the entity.
render_position | :: R MapPosition | The current render position of the entity.
The current render position of the entity.
is_flying | :: R boolean | If this player or character entity is flying. [...]
If this player or character entity is flying. [...]
flight_height | :: R double | The current flight height for this player or character entity. [...]
The current flight height for this player or character entity. [...]
vehicle | :: R LuaEntity? | The vehicle the player is currently sitting in.
The vehicle the player is currently sitting in.
cargo_pod | :: R LuaEntity? | The cargo pod the player is currently sitting in or the cargo pod attached to this rocket silo.
The cargo pod the player is currently sitting in or the cargo pod attached to this rocket silo.
hub | :: R LuaEntity? | The space platform hub the player is currently sitting in.
The space platform hub the player is currently sitting in.
force | :: R LuaForce| W ForceID | The force of this entity. [...]
The force of this entity. [...]
force_index | :: R uint32 | Unique index (ID) associated with the force of this entity.
Unique index (ID) associated with the force of this entity.
selected | :: RW LuaEntity? | The currently selected entity. [...]
The currently selected entity. [...]
opened | :: RW LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or LuaInventory or LuaLogisticNetwork or LuaItemStack or defines.gui_type? | The GUI the player currently has open. [...]
The GUI the player currently has open. [...]
crafting_queue_size | :: R uint32 | Size of the crafting queue.
Size of the crafting queue.
crafting_queue_progress | :: RW double | The crafting queue progress in the range `[0-1]`. [...]
The crafting queue progress in the range `[0-1]`. [...]
walking_state | :: RW table | Current walking state of the player, or the spider-vehicle the character is driving.
Current walking state of the player, or the spider-vehicle the character is driving.
riding_state | :: RW RidingState | Current riding state of this car, or of the car this player is riding in.
Current riding state of this car, or of the car this player is riding in.
mining_state | :: RW table | Current mining state. [...]
Current mining state. [...]
shooting_state | :: RW table | Current shooting state.
Current shooting state.
picking_state | :: RW boolean | Current item-picking state.
Current item-picking state.
repair_state | :: RW table | Current repair state.
Current repair state.
cursor_stack | :: R LuaItemStack? | The player's cursor stack. [...]
The player's cursor stack. [...]
cursor_ghost | :: R ItemIDAndQualityIDPair| W ItemWithQualityID? | The ghost prototype in the player's cursor. [...]
The ghost prototype in the player's cursor. [...]
cursor_record | :: R LuaRecord? | The blueprint record in the player's cursor.
The blueprint record in the player's cursor.
driving | :: RW boolean | `true` if the player is in a vehicle. [...]
`true` if the player is in a vehicle. [...]
crafting_queue | :: R array[CraftingQueueItem]? | The current crafting queue items.
The current crafting queue items.
following_robots | :: R array[LuaEntity] | The current combat robots following the character. [...]
The current combat robots following the character. [...]
cheat_mode | :: RW boolean | When `true` hand crafting is free and instant.
When `true` hand crafting is free and instant.
character_crafting_speed_modifier | :: RW double | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_mining_speed_modifier | :: RW double | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_additional_mining_categories | :: RW array[string] | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_running_speed_modifier | :: RW double | Modifies the running speed of this character by the given value as a percentage. [...]
Modifies the running speed of this character by the given value as a percentage. [...]
character_build_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_item_drop_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_reach_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_resource_reach_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_item_pickup_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_loot_pickup_distance_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_inventory_slots_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_trash_slot_count_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_maximum_following_robot_count_bonus | :: RW uint32 | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
character_health_bonus | :: RW float | When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
When called on a LuaPlayer, it must be associated with a character (see LuaPlayer::character).
opened_gui_type | :: R defines.gui_type? |
build_distance | :: R uint32 | The build distance of this character or max uint when not a character or player connected to a character.
The build distance of this character or max uint when not a character or player connected to a character.
drop_item_distance | :: R uint32 | The item drop distance of this character or max uint when not a character or player connected to a character.
The item drop distance of this character or max uint when not a character or player connected to a character.
reach_distance | :: R uint32 | The reach distance of this character or max uint when not a character or player connected to a character.
The reach distance of this character or max uint when not a character or player connected to a character.
item_pickup_distance | :: R double | The item pickup distance of this character or max double when not a character or player connected to a character.
The item pickup distance of this character or max double when not a character or player connected to a character.
loot_pickup_distance | :: R double | The loot pickup distance of this character or max double when not a character or player connected to a character.
The loot pickup distance of this character or max double when not a character or player connected to a character.
resource_reach_distance | :: R double | The resource reach distance of this character or max double when not a character or player connected to a character.
The resource reach distance of this character or max double when not a character or player connected to a character.
in_combat | :: R boolean | Whether this character entity is in combat.
Whether this character entity is in combat.
character_running_speed | :: R double | The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
character_mining_progress | :: R double | The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.
The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.

## Class LuaControlBehavior abstract

get_circuit_network(wire_connector_id) | → LuaCircuitNetwork? |
type | :: R defines.control_behavior.type | The concrete type of this control behavior.
The concrete type of this control behavior.
entity | :: R LuaEntity | The entity this control behavior belongs to.
The entity this control behavior belongs to.

## Class LuaCustomChartTag

destroy() |  | Destroys this tag.
Destroys this tag.
icon | :: RW SignalID? | This tag's icon, if it has one. [...]
This tag's icon, if it has one. [...]
last_user | :: R LuaPlayer| W PlayerIdentification? | The player who last edited this tag.
The player who last edited this tag.
position | :: RW MapPosition | The position of this tag.
The position of this tag.
text | :: RW string |
tag_number | :: R uint32 | The unique ID for this tag on this force.
The unique ID for this tag on this force.
force | :: R LuaForce | The force this tag belongs to.
The force this tag belongs to.
surface | :: RW LuaSurface | The surface this tag belongs to.
The surface this tag belongs to.
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. [...]

## Class LuaCustomEventPrototype extends LuaPrototypeBase

event_id | :: R defines.events | Event identifier associated with this custom event.
Event identifier associated with this custom event.
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. [...]

## Class LuaCustomInputPrototype extends LuaPrototypeBase

event_id | :: R defines.events | Event identifier associated with this custom input.
Event identifier associated with this custom input.
key_sequence | :: R string | The default key sequence for this custom input.
The default key sequence for this custom input.
alternative_key_sequence | :: R string? | The default alternative key sequence for this custom input, if any
The default alternative key sequence for this custom input, if any
controller_key_sequence | :: R string? | The default controller key sequence for this custom input, if any
The default controller key sequence for this custom input, if any
controller_alternative_key_sequence | :: R string? | The default controller alternative key sequence for this custom input, if any
The default controller alternative key sequence for this custom input, if any
linked_game_control | :: R LinkedGameControl? | The linked game control name, if any.
The linked game control name, if any.
consuming | :: R `"none"` or `"game-only"` | The consuming type.
The consuming type.
action | :: R string | The action that happens when this custom input is triggered.
The action that happens when this custom input is triggered.
enabled | :: R boolean | Whether this custom input is enabled. [...]
Whether this custom input is enabled. [...]
enabled_while_spectating | :: R boolean | Whether this custom input is enabled while using the spectator controller.
Whether this custom input is enabled while using the spectator controller.
enabled_while_in_cutscene | :: R boolean | Whether this custom input is enabled while using the cutscene controller.
Whether this custom input is enabled while using the cutscene controller.
include_selected_prototype | :: R boolean | Whether this custom input will include the selected prototype (if any) when triggered.
Whether this custom input will include the selected prototype (if any) when triggered.
item_to_spawn | :: R LuaItemPrototype? | The item that gets spawned when this custom input is fired, if any.
The item that gets spawned when this custom input is fired, if any.
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. [...]

## Class LuaCustomTable

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. [...]
[] (index) | :: R Any | Access an element of this custom table.
Access an element of this custom table.
# (length) | :: R uint32 | Number of elements in this table.
Number of elements in this table.

## Class LuaDamagePrototype extends LuaPrototypeBase

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. [...]

## Class LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavior

get_condition(index) | → DeciderCombinatorCondition | Gets the condition at `index`.
Gets the condition at `index`.
set_condition(index, condition) |  | Sets the condition at `index`.
Sets the condition at `index`.
add_condition(condition, index?) |  | Adds a new condition.
Adds a new condition.
remove_condition(index) |  | Removes the condition at `index`.
Removes the condition at `index`.
get_output(index) | → DeciderCombinatorOutput | Gets the output at `index`.
Gets the output at `index`.
set_output(index, output) |  | Sets the output at `index`.
Sets the output at `index`.
add_output(output, index?) |  | Adds a new output.
Adds a new output.
remove_output(index) |  | Removes the output at `index`.
Removes the output at `index`.
parameters | :: RW DeciderCombinatorParameters? | This decider combinator's parameters. [...]
This decider combinator's parameters. [...]
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. [...]

## Class LuaDecorativePrototype extends LuaPrototypeBase

collision_box | :: R BoundingBox | The bounding box used for collision checking.
The bounding box used for collision checking.
collision_mask | :: R CollisionMask | The collision masks this decorative uses
The collision masks this decorative uses
autoplace_specification | :: R AutoplaceSpecification? | Autoplace specification for this decorative prototype, if any.
Autoplace specification for this decorative prototype, if any.
render_layer | :: R RenderLayer |
decal | :: R boolean |
grows_through_rail_path | :: R boolean |
trigger_effect | :: R array[TriggerEffectItem]? |
placed_effect | :: R array[TriggerEffectItem]? |
minimal_separation | :: R double |
target_count | :: R uint32 |
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. [...]

## Class LuaDisplayPanelControlBehavior extends LuaControlBehavior

get_message(index) | → DisplayPanelMessageDefinition | Get a specific message definition
Get a specific message definition
set_message(index, message) |  | Set the message at the specified index
Set the message at the specified index
messages | :: RW array[DisplayPanelMessageDefinition] | The full list of configured messages.
The full list of configured messages.
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. [...]

## Class LuaElectricEnergySourcePrototype

get_input_flow_limit(quality?) | → double |
get_output_flow_limit(quality?) | → double |
buffer_capacity | :: R double |
usage_priority | :: R string |
drain | :: R double |
emissions_per_joule | :: R dictionary[string → double] | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
render_no_network_icon | :: R boolean |
render_no_power_icon | :: R boolean |
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. [...]

## Class LuaEntity extends LuaControl

get_output_inventory() | → LuaInventory? | Gets the entity's output inventory if it has one.
Gets the entity's output inventory if it has one.
get_module_inventory() | → LuaInventory? | Inventory for storing modules of this entity; `nil` if this entity has no module inventory.
Inventory for storing modules of this entity; `nil` if this entity has no module inventory.
get_fuel_inventory() | → LuaInventory? | The fuel inventory for this entity or `nil` if this entity doesn't have a fuel inventory.
The fuel inventory for this entity or `nil` if this entity doesn't have a fuel inventory.
get_burnt_result_inventory() | → LuaInventory? | The burnt result inventory for this entity or `nil` if this entity doesn't have a burnt result inventory.
The burnt result inventory for this entity or `nil` if this entity doesn't have a burnt result inventory.
damage(damage, force, type?, source?, cause?) | → float | Damages the entity.
Damages the entity.
can_be_destroyed() | → boolean | Whether the entity can be destroyed
Whether the entity can be destroyed
destroy{do_cliff_correction?=…, raise_destroy?=…, player?=…, undo_index?=…} | → boolean | Destroys the entity. [...]
Destroys the entity. [...]
die(force?, cause?) | → boolean | Immediately kills the entity. [...]
Immediately kills the entity. [...]
has_flag(flag) | → boolean | Test whether this entity's prototype has a certain flag set. [...]
Test whether this entity's prototype has a certain flag set. [...]
ghost_has_flag(flag) | → boolean | Same as LuaEntity::has_flag, but targets the inner entity on a entity ghost.
Same as LuaEntity::has_flag, but targets the inner entity on a entity ghost.
add_market_item(offer) |  | Offer a thing on the market.
Offer a thing on the market.
remove_market_item(offer) | → boolean | Remove an offer from a market. [...]
Remove an offer from a market. [...]
get_market_items() | → array[Offer] | Get all offers in a market as an array.
Get all offers in a market as an array.
clear_market_items() |  | Removes all offers from a market.
Removes all offers from a market.
order_deconstruction(force, player?, undo_index?) | → boolean | Sets the entity to be deconstructed by construction robots.
Sets the entity to be deconstructed by construction robots.
cancel_deconstruction(force, player?) |  | Cancels deconstruction if it is scheduled, does nothing otherwise.
Cancels deconstruction if it is scheduled, does nothing otherwise.
to_be_deconstructed() | → boolean | Is this entity marked for deconstruction?
Is this entity marked for deconstruction?
order_upgrade{target=…, force=…, player?=…, undo_index?=…} | → boolean | Sets the entity to be upgraded by construction robots.
Sets the entity to be upgraded by construction robots.
cancel_upgrade(force, player?) | → boolean | Cancels upgrade if it is scheduled, does nothing otherwise.
Cancels upgrade if it is scheduled, does nothing otherwise.
to_be_upgraded() | → boolean | Is this entity marked for upgrade?
Is this entity marked for upgrade?
apply_upgrade() | → LuaEntity?, LuaEntity? | Upgrades this entity in place if it's marked to be upgraded.
Upgrades this entity in place if it's marked to be upgraded.
is_crafting() | → boolean | Returns whether a craft is currently in process. [...]
Returns whether a craft is currently in process. [...]
is_opened() | → boolean |
is_opening() | → boolean |
is_closed() | → boolean |
is_closing() | → boolean |
request_to_open(force, extra_time?) |  |
request_to_close(force) |  |
get_transport_line(index) | → LuaTransportLine | Get a transport line of a belt or belt connectable entity.
Get a transport line of a belt or belt connectable entity.
get_item_insert_specification(position) | → uint32, float | Get an item insert specification onto a belt connectable: for a given map position provides into which line at what position item should be inserted to be closest to the provided position.
Get an item insert specification onto a belt connectable: for a given map position provides into which line at what position item should be inserted to be closest to the provided position.
get_line_item_position(index, position) | → MapPosition | Get a map position related to a position on a transport line.
Get a map position related to a position on a transport line.
get_max_transport_line_index() | → defines.transport_line | Get the maximum transport line index of a belt or belt connectable entity.
Get the maximum transport line index of a belt or belt connectable entity.
launch_rocket(destination?, character?) | → boolean |
revive{raise_revive?=…, overflow?=…} | → array[ItemWithQualityCount]?, LuaEntity?, LuaEntity? | Revive a ghost, which turns it from a ghost into a real entity or tile.
Revive a ghost, which turns it from a ghost into a real entity or tile.
silent_revive{raise_revive?=…, overflow?=…} | → array[ItemWithQualityCount], LuaEntity?, LuaEntity? | Revives a ghost silently, so the revival makes no sound and no smoke is created.
Revives a ghost silently, so the revival makes no sound and no smoke is created.
get_connected_rail{rail_direction=…, rail_connection_direction=…} | → LuaEntity?, defines.rail_direction?, defines.rail_connection_direction? |
get_connected_rails() | → array[LuaEntity] | Get the rails that this signal is connected to.
Get the rails that this signal is connected to.
get_rail_segment_signal(direction, in_else_out) | → LuaEntity? | Get the rail signal at the start/end of the rail segment this rail is in. [...]
Get the rail signal at the start/end of the rail segment this rail is in. [...]
get_rail_segment_stop(direction) | → LuaEntity? | Get train stop at the start/end of the rail segment this rail is in. [...]
Get train stop at the start/end of the rail segment this rail is in. [...]
get_rail_segment_end(direction) | → LuaEntity, defines.rail_direction | Get the rail at the end of the rail segment this rail is in. [...]
Get the rail at the end of the rail segment this rail is in. [...]
get_rail_segment_rails(direction) | → array[LuaEntity] | Get all rails of a rail segment this rail is in A rail segment is a continuous section of rail with no branches, signals, nor train stops.
Get all rails of a rail segment this rail is in A rail segment is a continuous section of rail with no branches, signals, nor train stops.
get_rail_segment_length() | → double | Get the length of the rail segment this rail is in. [...]
Get the length of the rail segment this rail is in. [...]
get_rail_segment_overlaps() | → array[LuaEntity] | Get a rail from each rail segment that overlaps with this rail's rail segment. [...]
Get a rail from each rail segment that overlaps with this rail's rail segment. [...]
is_rail_in_same_rail_segment_as(other_rail) | → boolean | Checks if this rail and other rail both belong to the same rail segment.
Checks if this rail and other rail both belong to the same rail segment.
is_rail_in_same_rail_block_as(other_rail) | → boolean | Checks if this rail and other rail both belong to the same rail block.
Checks if this rail and other rail both belong to the same rail block.
get_parent_signals() | → array[LuaEntity] | Returns all parent signals. [...]
Returns all parent signals. [...]
get_child_signals() | → array[LuaEntity] | Returns all child signals. [...]
Returns all child signals. [...]
get_inbound_signals() | → array[LuaEntity] | Returns all signals guarding entrance to a rail block this rail belongs to.
Returns all signals guarding entrance to a rail block this rail belongs to.
get_outbound_signals() | → array[LuaEntity] | Returns all signals guarding exit from a rail block this rail belongs to.
Returns all signals guarding exit from a rail block this rail belongs to.
get_filter(slot_index) | → ItemFilter or EntityID or AsteroidChunkID? | Get the filter for a slot in an inserter, loader, mining drill, asteroid collector, or logistic storage container. [...]
Get the filter for a slot in an inserter, loader, mining drill, asteroid collector, or logistic storage container. [...]
set_filter(index, filter?) |  | Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID), asteroid collector (AsteroidChunkID) or logistic storage container (ItemWithQualityID). [...]
Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID), asteroid collector (AsteroidChunkID) or logistic storage container (ItemWithQualityID). [...]
get_infinity_container_filter(index) | → InfinityInventoryFilter? | Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
set_infinity_container_filter(index, filter) |  | Sets the filter for this infinity container at the given index.
Sets the filter for this infinity container at the given index.
get_infinity_pipe_filter() | → InfinityPipeFilter? | Gets the filter for this infinity pipe, or `nil` if the filter is empty.
Gets the filter for this infinity pipe, or `nil` if the filter is empty.
set_infinity_pipe_filter(filter) |  | Sets the filter for this infinity pipe.
Sets the filter for this infinity pipe.
get_heat_setting() | → HeatSetting | Gets the heat setting for this heat interface.
Gets the heat setting for this heat interface.
set_heat_setting(filter) |  | Sets the heat setting for this heat interface.
Sets the heat setting for this heat interface.
get_control_behavior() | → LuaControlBehavior? | Gets the control behavior of the entity (if any).
Gets the control behavior of the entity (if any).
get_or_create_control_behavior() | → LuaControlBehavior? | Gets (and or creates if needed) the control behavior of the entity.
Gets (and or creates if needed) the control behavior of the entity.
get_circuit_network(wire_connector_id) | → LuaCircuitNetwork? |
get_signal(signal, wire_connector_id, extra_wire_connector_id?) | → int32 | Read a single signal from the selected wire connector
Read a single signal from the selected wire connector
get_signals(wire_connector_id, extra_wire_connector_id?) | → array[Signal]? | Read all signals from the selected wire connector.
Read all signals from the selected wire connector.
supports_backer_name() | → boolean | Whether this entity supports a backer name.
Whether this entity supports a backer name.
copy_settings(entity, by_player?) | → array[ItemWithQualityCount] | Copies settings from the given entity onto this entity.
Copies settings from the given entity onto this entity.
get_logistic_point(index?) | → LuaLogisticPoint or array[LuaLogisticPoint]? | Gets all the `LuaLogisticPoint`s that this entity owns. [...]
Gets all the `LuaLogisticPoint`s that this entity owns. [...]
play_note(instrument, note, stop_playing_sounds?) | → boolean | Plays a note with the given instrument and note.
Plays a note with the given instrument and note.
connect_rolling_stock(direction) | → boolean | Connects the rolling stock in the given direction.
Connects the rolling stock in the given direction.
disconnect_rolling_stock(direction) | → boolean | Tries to disconnect this rolling stock in the given direction.
Tries to disconnect this rolling stock in the given direction.
update_connections() |  | Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. [...]
Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. [...]
get_recipe() | → LuaRecipe?, LuaQualityPrototype? | Current recipe being assembled by this machine, if any.
Current recipe being assembled by this machine, if any.
set_recipe(recipe?, quality?) | → array[ItemWithQualityCount] | Sets the given recipe in this assembly machine.
Sets the given recipe in this assembly machine.
rotate{reverse?=…, by_player?=…} | → boolean | Rotates this entity as if the player rotated it.
Rotates this entity as if the player rotated it.
get_driver() | → LuaEntity or LuaPlayer? | Gets the driver of this vehicle if any.
Gets the driver of this vehicle if any.
set_driver(driver) |  | Sets the driver of this vehicle. [...]
Sets the driver of this vehicle. [...]
get_passenger() | → LuaEntity or LuaPlayer? | Gets the passenger of this car, spidertron, or cargo pod if any. [...]
Gets the passenger of this car, spidertron, or cargo pod if any. [...]
set_passenger(passenger) |  | Sets the passenger of this car, spidertron, or cargo pod. [...]
Sets the passenger of this car, spidertron, or cargo pod. [...]
is_connected_to_electric_network() | → boolean | Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power.
Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power.
get_train_stop_trains() | → array[LuaTrain] | The trains scheduled to stop at this train stop.
The trains scheduled to stop at this train stop.
get_stopped_train() | → LuaTrain? | The train currently stopped at this train stop, if any.
The train currently stopped at this train stop, if any.
clone{position=…, surface?=…, force?=…, create_build_effect_smoke?=…} | → LuaEntity? | Clones this entity.
Clones this entity.
get_fluid_count(fluid?) | → double | Get the amount of all or some fluid in this entity. [...]
Get the amount of all or some fluid in this entity. [...]
get_fluid_contents() | → dictionary[string → FluidAmount] | Get amounts of all fluids in this entity. [...]
Get amounts of all fluids in this entity. [...]
remove_fluid{name=…, amount=…, minimum_temperature?=…, maximum_temperature?=…, temperature?=…} | → double | Remove fluid from this entity. [...]
Remove fluid from this entity. [...]
insert_fluid(fluid) | → double | Insert fluid into this entity. [...]
Insert fluid into this entity. [...]
clear_fluid_inside() |  | Remove all fluids from this entity.
Remove all fluids from this entity.
get_beam_source() | → BeamTarget? | Get the source of this beam.
Get the source of this beam.
set_beam_source(source) |  | Set the source of this beam.
Set the source of this beam.
get_beam_target() | → BeamTarget? | Get the target of this beam.
Get the target of this beam.
set_beam_target(target) |  | Set the target of this beam.
Set the target of this beam.
get_radius() | → double | The radius of this entity. [...]
The radius of this entity. [...]
get_health_ratio() | → float? | The health ratio of this entity between 1 and 0 (for full health and no health respectively).
The health ratio of this entity between 1 and 0 (for full health and no health respectively).
create_build_effect_smoke() |  | Creates the same smoke that is created when you place a building by hand. [...]
Creates the same smoke that is created when you place a building by hand. [...]
release_from_spawner() |  | Release the unit from the spawner which spawned it. [...]
Release the unit from the spawner which spawned it. [...]
toggle_equipment_movement_bonus() |  | Toggle this entity's equipment movement bonus. [...]
Toggle this entity's equipment movement bonus. [...]
can_shoot(target, position) | → boolean | Whether this character can shoot the given entity or position.
Whether this character can shoot the given entity or position.
start_fading_out() |  | Only works if the entity is a speech-bubble, with an "effect" defined in its wrapper_flow_style. [...]
Only works if the entity is a speech-bubble, with an "effect" defined in its wrapper_flow_style. [...]
get_upgrade_target() | → LuaEntityPrototype?, LuaQualityPrototype? | Returns the new entity prototype and its quality.
Returns the new entity prototype and its quality.
get_damage_to_be_taken() | → float? | Returns the amount of damage to be taken by this entity.
Returns the amount of damage to be taken by this entity.
deplete() |  | Depletes and destroys this resource entity.
Depletes and destroys this resource entity.
mine{inventory?=…, force?=…, raise_destroyed?=…, ignore_minable?=…} | → boolean | Mines this entity. [...]
Mines this entity. [...]
spawn_decorations() |  | Triggers spawn_decoration actions defined in the entity prototype or does nothing if entity is not "turret" or "unit-spawner".
Triggers spawn_decoration actions defined in the entity prototype or does nothing if entity is not "turret" or "unit-spawner".
get_priority_target(index) | → LuaEntityPrototype? | Get the entity ID at the specified position in the turret's priority list.
Get the entity ID at the specified position in the turret's priority list.
set_priority_target(index, entity_id?) |  | Set the entity ID name at the specified position in the turret's priority list.
Set the entity ID name at the specified position in the turret's priority list.
can_wires_reach(entity) | → boolean | Can wires reach between these entities.
Can wires reach between these entities.
get_connected_rolling_stock(direction) | → LuaEntity?, defines.rail_direction? | Gets rolling stock connected to the given end of this stock.
Gets rolling stock connected to the given end of this stock.
is_registered_for_construction() | → boolean | Is this entity or tile ghost or item request proxy registered for construction? [...]
Is this entity or tile ghost or item request proxy registered for construction? [...]
is_registered_for_deconstruction(force) | → boolean | Is this entity registered for deconstruction with this force? [...]
Is this entity registered for deconstruction with this force? [...]
is_registered_for_upgrade() | → boolean | Is this entity registered for upgrade? [...]
Is this entity registered for upgrade? [...]
is_registered_for_repair() | → boolean | Is this entity registered for repair? [...]
Is this entity registered for repair? [...]
add_autopilot_destination(position) |  | Adds the given position to this spidertron's autopilot's queue of destinations.
Adds the given position to this spidertron's autopilot's queue of destinations.
connect_linked_belts(neighbour?) |  | Connects current linked belt with another one. [...]
Connects current linked belt with another one. [...]
disconnect_linked_belts() |  | Disconnects linked belt from its neighbour.
Disconnects linked belt from its neighbour.
get_spider_legs() | → array[LuaEntity] | Gets legs of given SpiderVehicle.
Gets legs of given SpiderVehicle.
stop_spider() |  | Sets the speed of the given SpiderVehicle to zero. [...]
Sets the speed of the given SpiderVehicle to zero. [...]
get_wire_connector(wire_connector_id, or_create) | → LuaWireConnector? | Gets a single wire connector of this entity, if any.
Gets a single wire connector of this entity, if any.
get_wire_connectors(or_create) | → dictionary[defines.wire_connector_id → LuaWireConnector] | Gets all wire connectors of this entity
Gets all wire connectors of this entity
get_rail_end(direction) | → LuaRailEnd | Gets a LuaRailEnd object for specified end of this rail
Gets a LuaRailEnd object for specified end of this rail
get_electric_input_flow_limit(quality?) | → double? | The input flow limit for the electric energy source. [...]
The input flow limit for the electric energy source. [...]
get_electric_output_flow_limit(quality?) | → double? | The output flow limit for the electric energy source. [...]
The output flow limit for the electric energy source. [...]
get_beacons() | → array[LuaEntity]? | Returns a table with all beacons affecting this effect receiver. [...]
Returns a table with all beacons affecting this effect receiver. [...]
get_beacon_effect_receivers() | → array[LuaEntity] | Returns a table with all entities affected by this beacon
Returns a table with all entities affected by this beacon
force_finish_ascending() |  | Take an ascending cargo pod and safely make it skip all animation and immediately switch surface.
Take an ascending cargo pod and safely make it skip all animation and immediately switch surface.
force_finish_descending() |  | Take a descending cargo pod and safely make it arrive and deposit cargo.
Take a descending cargo pod and safely make it arrive and deposit cargo.
create_cargo_pod(cargo_hatch?) | → LuaEntity? | Creates a cargo pod if possible. [...]
Creates a cargo pod if possible. [...]
get_cargo_bays() | → array[LuaEntity] | Gets the cargo bays connected to this cargo landing pad or space platform hub.
Gets the cargo bays connected to this cargo landing pad or space platform hub.
inventory_supports_bar(inventory_index) | → boolean | The same as LuaInventory::supports_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::supports_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
get_inventory_bar(inventory_index) | → uint32 | The same as LuaInventory::get_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::get_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
set_inventory_bar(inventory_index, bar?) |  | The same as LuaInventory::set_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::set_bar but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
inventory_supports_filters(inventory_index) | → boolean | The same as LuaInventory::supports_filters but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::supports_filters but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
is_inventory_filtered(inventory_index) | → boolean | The same as LuaInventory::is_filtered but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::is_filtered but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
can_set_inventory_filter(inventory_index, index, filter) | → boolean | The same as LuaInventory::can_set_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::can_set_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
get_inventory_filter(inventory_index, index) | → ItemFilter? | The same as LuaInventory::get_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::get_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
set_inventory_filter(inventory_index, index, filter) | → boolean | The same as LuaInventory::set_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
The same as LuaInventory::set_filter but also works for ghosts where the inventory is not available through LuaControl::get_inventory.
register_tree(tree) | → boolean | Registers the given tree in this agricultural tower. [...]
Registers the given tree in this agricultural tower. [...]
get_movement() | → Vector | Gets the combined movement vector (direction and speed) of this combat robot or asteroid. [...]
Gets the combined movement vector (direction and speed) of this combat robot or asteroid. [...]
set_movement(direction, speed) |  | Sets the movement direction and movement speed for this combat robot or asteroid. [...]
Sets the movement direction and movement speed for this combat robot or asteroid. [...]
get_fluid(index) | → Fluid? | Gets fluid of the index-th fluid storage. [...]
Gets fluid of the index-th fluid storage. [...]
set_fluid(index, fluid?) | → Fluid? | Sets fluid to the index-th fluid storage. [...]
Sets fluid to the index-th fluid storage. [...]
get_logistic_sections() | → LuaLogisticSections? | Gives logistic sections of this entity if it uses logistic sections.
Gives logistic sections of this entity if it uses logistic sections.
set_inventory_size_override(inventory_index, size_override, overflow?) |  | Sets inventory size override. [...]
Sets inventory size override. [...]
get_inventory_size_override(inventory_index) | → uint16? | Gets the inventory size override of the selected inventory if size override was set using set_inventory_size_override.
Gets the inventory size override of the selected inventory if size override was set using set_inventory_size_override.
get_fluid_source_tile() | → TilePosition | Gives TilePosition of a tile which this offshore pump uses to check what fluid should be produced.
Gives TilePosition of a tile which this offshore pump uses to check what fluid should be produced.
get_fluid_source_fluid() | → string? | Checks what is expected fluid to be produced from the offshore pump's source tile. [...]
Checks what is expected fluid to be produced from the offshore pump's source tile. [...]
rail_length | :: R double | Length of this rail piece.
Length of this rail piece.
name | :: R string | Name of the entity prototype. [...]
Name of the entity prototype. [...]
ghost_name | :: R string | Name of the entity or tile contained in this ghost.
Name of the entity or tile contained in this ghost.
localised_name | :: R LocalisedString | Localised name of the entity.
Localised name of the entity.
localised_description | :: R LocalisedString |
ghost_localised_name | :: R LocalisedString | Localised name of the entity or tile contained in this ghost.
Localised name of the entity or tile contained in this ghost.
ghost_localised_description | :: R LocalisedString |
type | :: R string | The entity prototype type of this entity.
The entity prototype type of this entity.
ghost_type | :: R string | The prototype type of the entity or tile contained in this ghost.
The prototype type of the entity or tile contained in this ghost.
use_filters | :: RW boolean | If set to 'true', this inserter will use filtering logic. [...]
If set to 'true', this inserter will use filtering logic. [...]
active | :: RW boolean | Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc). [...]
Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc). [...]
destructible | :: RW boolean | If set to `false`, this entity can't be damaged and won't be attacked automatically. [...]
If set to `false`, this entity can't be damaged and won't be attacked automatically. [...]
minable | :: RW boolean | Not minable entities can still be destroyed. [...]
Not minable entities can still be destroyed. [...]
minable_flag | :: RW boolean | Script controlled flag that allows entity to be mined.
Script controlled flag that allows entity to be mined.
rotatable | :: RW boolean | When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key. [...]
When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key. [...]
operable | :: RW boolean | Player can't open gui of this entity and he can't quick insert/input stuff in to the entity when it is not operable.
Player can't open gui of this entity and he can't quick insert/input stuff in to the entity when it is not operable.
health | :: RW float? | The current health of the entity, if any. [...]
The current health of the entity, if any. [...]
max_health | :: R float | Max health of this entity.
Max health of this entity.
direction | :: RW defines.direction | The current direction this entity is facing.
The current direction this entity is facing.
mirroring | :: RW boolean | Whether the entity is currently mirrored. [...]
Whether the entity is currently mirrored. [...]
supports_direction | :: R boolean | Whether the entity has direction. [...]
Whether the entity has direction. [...]
orientation | :: RW RealOrientation | The smooth orientation of this entity. [...]
The smooth orientation of this entity. [...]
cliff_orientation | :: R CliffOrientation | The orientation of this cliff.
The orientation of this cliff.
relative_turret_orientation | :: RW RealOrientation? | The relative orientation of the vehicle turret, artillery turret, artillery wagon. [...]
The relative orientation of the vehicle turret, artillery turret, artillery wagon. [...]
torso_orientation | :: RW RealOrientation | The torso orientation of this spider vehicle.
The torso orientation of this spider vehicle.
amount | :: RW uint32 | Count of resource units contained.
Count of resource units contained.
initial_amount | :: RW uint32? | Count of initial resource units contained. [...]
Count of initial resource units contained. [...]
effectivity_modifier | :: RW float | Multiplies the acceleration the car can create for one unit of energy. [...]
Multiplies the acceleration the car can create for one unit of energy. [...]
consumption_modifier | :: RW float | Multiplies the energy consumption.
Multiplies the energy consumption.
friction_modifier | :: RW float | Multiplies the car friction rate.
Multiplies the car friction rate.
driver_is_gunner | :: RW boolean? | Whether the driver of this car or spidertron is the gunner. [...]
Whether the driver of this car or spidertron is the gunner. [...]
vehicle_automatic_targeting_parameters | :: RW VehicleAutomaticTargetingParameters | Read when this spidertron auto-targets enemies
Read when this spidertron auto-targets enemies
speed | :: RW float? | The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. [...]
The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. [...]
effective_speed | :: R float? | The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. [...]
The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. [...]
stack | :: R LuaItemStack |
prototype | :: R LuaEntityPrototype | The entity prototype of this entity.
The entity prototype of this entity.
ghost_prototype | :: R LuaEntityPrototype or LuaTilePrototype | The prototype of the entity or tile contained in this ghost.
The prototype of the entity or tile contained in this ghost.
drop_position | :: RW MapPosition | Position where the entity puts its stuff. [...]
Position where the entity puts its stuff. [...]
pickup_position | :: RW MapPosition | Where the inserter will pick up items from. [...]
Where the inserter will pick up items from. [...]
drop_target | :: RW LuaEntity? | The entity this entity is putting its items to. [...]
The entity this entity is putting its items to. [...]
pickup_target | :: RW LuaEntity? | The entity this inserter will attempt to pick up items from. [...]
The entity this inserter will attempt to pick up items from. [...]
selected_gun_index | :: RW uint32? | Index of the currently selected weapon slot of this character, car, or spidertron. [...]
Index of the currently selected weapon slot of this character, car, or spidertron. [...]
energy | :: RW double | Energy stored in the entity's energy buffer (energy stored in electrical devices etc.). [...]
Energy stored in the entity's energy buffer (energy stored in electrical devices etc.). [...]
temperature | :: RW double? | The temperature of this entity's heat energy source. [...]
The temperature of this entity's heat energy source. [...]
previous_recipe | :: R RecipeIDAndQualityIDPair? | The previous recipe this furnace was using, if any.
The previous recipe this furnace was using, if any.
held_stack | :: R LuaItemStack | The item stack currently held in an inserter's hand.
The item stack currently held in an inserter's hand.
held_stack_position | :: R MapPosition | Current position of the inserter's "hand".
Current position of the inserter's "hand".
train | :: R LuaTrain? | The train this rolling stock belongs to, if any. [...]
The train this rolling stock belongs to, if any. [...]
neighbours | :: R dictionary[string → LuaEntity] or array[array[LuaEntity]] or LuaEntity? | A list of neighbours for certain types of entities. [...]
A list of neighbours for certain types of entities. [...]
belt_neighbours | :: R table | The belt connectable neighbours of this belt connectable entity. [...]
The belt connectable neighbours of this belt connectable entity. [...]
heat_neighbours | :: R array[LuaEntity] | The entities connected to this entities heat buffer.
The entities connected to this entities heat buffer.
fluidbox | :: R LuaFluidBox | Fluidboxes of this entity.
Fluidboxes of this entity.
backer_name | :: RW string? | The backer name assigned to this entity. [...]
The backer name assigned to this entity. [...]
entity_label | :: RW string? | The label on this spider-vehicle entity, if any. [...]
The label on this spider-vehicle entity, if any. [...]
time_to_live | :: RW uint64 | The ticks left before a combat robot, highlight box, smoke, or sticker entity is destroyed.
The ticks left before a combat robot, highlight box, smoke, or sticker entity is destroyed.
color | :: RW Color? | The color of this character, rolling stock, corpse, character corpse, train stop, simple-entity-with-owner, car, spider-vehicle, or lamp. [...]
The color of this character, rolling stock, corpse, character corpse, train stop, simple-entity-with-owner, car, spider-vehicle, or lamp. [...]
signal_state | :: R defines.signal_state | The state of this rail signal.
The state of this rail signal.
chain_signal_state | :: R defines.chain_signal_state | The state of this chain signal.
The state of this chain signal.
to_be_looted | :: RW boolean | Will this item entity be picked up automatically when the player walks over it?
Will this item entity be picked up automatically when the player walks over it?
crafting_speed | :: R double | The current crafting speed, including speed bonuses from modules and beacons.
The current crafting speed, including speed bonuses from modules and beacons.
crafting_progress | :: RW float | The current crafting progress, as a number in range `[0, 1]`.
The current crafting progress, as a number in range `[0, 1]`.
bonus_progress | :: RW double | The current productivity bonus progress, as a number in range `[0, 1]`.
The current productivity bonus progress, as a number in range `[0, 1]`.
result_quality | :: R LuaQualityPrototype| W QualityID? | The quality produced when this crafting machine finishes crafting. [...]
The quality produced when this crafting machine finishes crafting. [...]
productivity_bonus | :: R double | The productivity bonus of this entity. [...]
The productivity bonus of this entity. [...]
pollution_bonus | :: R double | The pollution bonus of this entity.
The pollution bonus of this entity.
speed_bonus | :: R double | The speed bonus of this entity. [...]
The speed bonus of this entity. [...]
consumption_bonus | :: R double | The consumption bonus of this entity.
The consumption bonus of this entity.
belt_to_ground_type | :: R BeltConnectionType | Whether this underground belt goes into or out of the ground.
Whether this underground belt goes into or out of the ground.
loader_type | :: RW BeltConnectionType | Whether this loader gets items from or puts item into a container.
Whether this loader gets items from or puts item into a container.
use_transitional_requests | :: RW boolean | When true, the rocket silo will automatically request items for space platforms in orbit. [...]
When true, the rocket silo will automatically request items for space platforms in orbit. [...]
transitional_request_target | :: R LuaSpacePlatform? | The space platform in orbit this rocket silo is automatically requesting items for.
The space platform in orbit this rocket silo is automatically requesting items for.
rocket_parts | :: RW uint32 | Number of rocket parts in this rocket silo.
Number of rocket parts in this rocket silo.
send_to_orbit_automatically | :: RW boolean | Whether this rocket silo is set to send items to orbit automatically. [...]
Whether this rocket silo is set to send items to orbit automatically. [...]
logistic_network | :: RW LuaLogisticNetwork | The logistic network this entity is a part of, or `nil` if this entity is not a part of any logistic network.
The logistic network this entity is a part of, or `nil` if this entity is not a part of any logistic network.
logistic_cell | :: R LuaLogisticCell | The logistic cell this entity is a part of. [...]
The logistic cell this entity is a part of. [...]
item_requests | :: R array[ItemWithQualityCount] | Items this ghost will request when revived or items this item request proxy is requesting.
Items this ghost will request when revived or items this item request proxy is requesting.
insert_plan | :: RW array[BlueprintInsertPlan] | The insert plan for this ghost or item request proxy.
The insert plan for this ghost or item request proxy.
removal_plan | :: RW array[BlueprintInsertPlan] | The removal plan for this item request proxy.
The removal plan for this item request proxy.
player | :: R LuaPlayer? | The player connected to this character, if any.
The player connected to this character, if any.
damage_dealt | :: RW double | The damage dealt by this turret, artillery turret, or artillery wagon.
The damage dealt by this turret, artillery turret, or artillery wagon.
kills | :: RW uint32 | The number of units killed by this turret, artillery turret, or artillery wagon.
The number of units killed by this turret, artillery turret, or artillery wagon.
ignore_unprioritised_targets | :: RW boolean | Whether this turret shoots at targets that are not on its priority list.
Whether this turret shoots at targets that are not on its priority list.
last_user | :: R LuaPlayer| W PlayerIdentification? | The last player that changed any setting on this entity. [...]
The last player that changed any setting on this entity. [...]
electric_buffer_size | :: RW double? | The buffer size for the electric energy source. [...]
The buffer size for the electric energy source. [...]
electric_drain | :: R double? | The electric drain for the electric energy source. [...]
The electric drain for the electric energy source. [...]
electric_emissions_per_joule | :: R dictionary[string → double]? | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
unit_number | :: R uint64? | A unique number identifying this entity for the lifetime of the save. [...]
A unique number identifying this entity for the lifetime of the save. [...]
ghost_unit_number | :: R uint64? | The unit_number of the entity contained in this ghost. [...]
The unit_number of the entity contained in this ghost. [...]
mining_progress | :: RW double? | The mining progress for this mining drill. [...]
The mining progress for this mining drill. [...]
bonus_mining_progress | :: RW double? | The bonus mining progress for this mining drill. [...]
The bonus mining progress for this mining drill. [...]
mining_area | :: R BoundingBox | Area in which this mining drill looks for resources to mine.
Area in which this mining drill looks for resources to mine.
power_production | :: RW double | The power production specific to the ElectricEnergyInterface entity type.
The power production specific to the ElectricEnergyInterface entity type.
power_usage | :: RW double | The power usage specific to the ElectricEnergyInterface entity type.
The power usage specific to the ElectricEnergyInterface entity type.
bounding_box | :: R BoundingBox | LuaEntityPrototype::collision_box around entity's given position and respecting the current entity orientation.
LuaEntityPrototype::collision_box around entity's given position and respecting the current entity orientation.
secondary_bounding_box | :: R BoundingBox? | The secondary bounding box of this entity or `nil` if it doesn't have one. [...]
The secondary bounding box of this entity or `nil` if it doesn't have one. [...]
selection_box | :: R BoundingBox | LuaEntityPrototype::selection_box around entity's given position and respecting the current entity orientation.
LuaEntityPrototype::selection_box around entity's given position and respecting the current entity orientation.
secondary_selection_box | :: R BoundingBox? | The secondary selection box of this entity or `nil` if it doesn't have one. [...]
The secondary selection box of this entity or `nil` if it doesn't have one. [...]
mining_target | :: R LuaEntity? | The mining target, if any.
The mining target, if any.
filter_slot_count | :: R uint32 | The number of filter slots this inserter, loader, mining drill, asteroid collector or logistic storage container has. [...]
The number of filter slots this inserter, loader, mining drill, asteroid collector or logistic storage container has. [...]
loader_container | :: R LuaEntity? | The container entity this loader is pointing at/pulling from depending on the LuaEntity::loader_type, if any.
The container entity this loader is pointing at/pulling from depending on the LuaEntity::loader_type, if any.
grid | :: R LuaEquipmentGrid? | This entity's equipment grid, if any.
This entity's equipment grid, if any.
graphics_variation | :: RW uint8? | The graphics variation for this entity. [...]
The graphics variation for this entity. [...]
tree_color_index | :: RW uint8 | Index of the tree color.
Index of the tree color.
tree_color_index_max | :: R uint8 | Maximum index of the tree colors.
Maximum index of the tree colors.
tree_stage_index | :: RW uint8 | Index of the tree stage.
Index of the tree stage.
tree_stage_index_max | :: R uint8 | Maximum index of the tree stages.
Maximum index of the tree stages.
tree_gray_stage_index | :: RW uint8 | Index of the tree gray stage
Index of the tree gray stage
tree_gray_stage_index_max | :: R uint8 | Maximum index of the tree gray stages.
Maximum index of the tree gray stages.
burner | :: R LuaBurner? | The burner energy source for this entity, if any.
The burner energy source for this entity, if any.
shooting_target | :: RW LuaEntity? | The shooting target for this turret, if any. [...]
The shooting target for this turret, if any. [...]
proxy_target | :: R LuaEntity? | The target entity for this item-request-proxy, if any.
The target entity for this item-request-proxy, if any.
stickers | :: R array[LuaEntity]? | The sticker entities attached to this entity, if any.
The sticker entities attached to this entity, if any.
sticked_to | :: R LuaEntity | The entity this sticker is sticked to.
The entity this sticker is sticked to.
sticker_vehicle_modifiers | :: R table? | The vehicle modifiers applied to this entity through the attached stickers.
The vehicle modifiers applied to this entity through the attached stickers.
parameters | :: RW ProgrammableSpeakerParameters |
alert_parameters | :: RW ProgrammableSpeakerAlertParameters |
electric_network_statistics | :: R LuaFlowStatistics | The electric network statistics for this electric pole.
The electric network statistics for this electric pole.
inserter_target_pickup_count | :: R uint32 | Returns the current target pickup count of the inserter. [...]
Returns the current target pickup count of the inserter. [...]
inserter_stack_size_override | :: RW uint32 | Sets the stack size limit on this inserter. [...]
Sets the stack size limit on this inserter. [...]
products_finished | :: RW uint32 | The number of products this machine finished crafting in its lifetime.
The number of products this machine finished crafting in its lifetime.
spawning_cooldown | :: R double |
absorbed_pollution | :: R double |
spawn_shift | :: R double |
units | :: R array[LuaEntity] | The units associated with this spawner entity.
The units associated with this spawner entity.
power_switch_state | :: RW boolean | The state of this power switch.
The state of this power switch.
combinator_description | :: RW string | The description on this combinator.
The description on this combinator.
effects | :: R ModuleEffects? | The effects being applied to this entity, if any. [...]
The effects being applied to this entity, if any. [...]
beacons_count | :: R uint32? | Number of beacons affecting this effect receiver. [...]
Number of beacons affecting this effect receiver. [...]
infinity_container_filters | :: RW array[InfinityInventoryFilter] | The filters for this infinity container.
The filters for this infinity container.
remove_unfiltered_items | :: RW boolean | Whether items not included in this infinity container filters should be removed from the container.
Whether items not included in this infinity container filters should be removed from the container.
character_corpse_player_index | :: RW uint32 | The player index associated with this character corpse. [...]
The player index associated with this character corpse. [...]
character_corpse_tick_of_death | :: RW uint32 | The tick this character corpse died at.
The tick this character corpse died at.
character_corpse_death_cause | :: RW LocalisedString | The reason this character corpse character died. [...]
The reason this character corpse character died. [...]
associated_player | :: R LuaPlayer| W PlayerIdentification? | The player this character is associated with, if any. [...]
The player this character is associated with, if any. [...]
tick_of_last_attack | :: RW uint32 | The last tick this character entity was attacked.
The last tick this character entity was attacked.
tick_of_last_damage | :: RW uint32 | The last tick this character entity was damaged.
The last tick this character entity was damaged.
splitter_filter | :: RW ItemFilter? | The filter for this splitter, if any is set.
The filter for this splitter, if any is set.
inserter_filter_mode | :: RW `"whitelist"` or `"blacklist"`? | The filter mode for this filter inserter. [...]
The filter mode for this filter inserter. [...]
loader_filter_mode | :: RW PrototypeFilterMode? | The filter mode for this loader. [...]
The filter mode for this loader. [...]
loader_belt_stack_size_override | :: RW uint8 | The belt stack size override for this loader. [...]
The belt stack size override for this loader. [...]
mining_drill_filter_mode | :: RW `"whitelist"` or `"blacklist"`? | The filter mode for this mining drill. [...]
The filter mode for this mining drill. [...]
splitter_input_priority | :: RW `"left"` or `"none"` or `"right"` | The input priority for this splitter.
The input priority for this splitter.
splitter_output_priority | :: RW `"left"` or `"none"` or `"right"` | The output priority for this splitter.
The output priority for this splitter.
inserter_spoil_priority | :: RW SpoilPriority | The spoil priority for this inserter.
The spoil priority for this inserter.
armed | :: R boolean | Whether this land mine is armed.
Whether this land mine is armed.
recipe_locked | :: RW boolean | When locked; the recipe in this assembling machine can't be changed by the player.
When locked; the recipe in this assembling machine can't be changed by the player.
connected_rail | :: R LuaEntity? | The rail entity this train stop is connected to, if any.
The rail entity this train stop is connected to, if any.
connected_rail_direction | :: R defines.rail_direction | Rail direction to which this train stop is binding. [...]
Rail direction to which this train stop is binding. [...]
trains_in_block | :: R uint32 | The number of trains in this rail block for this rail entity.
The number of trains in this rail block for this rail entity.
timeout | :: RW uint32 | The timeout that's left on this landmine in ticks. [...]
The timeout that's left on this landmine in ticks. [...]
neighbour_bonus | :: R double | The current total neighbour bonus of this reactor.
The current total neighbour bonus of this reactor.
ai_settings | :: R LuaAISettings | The ai settings of this unit.
The ai settings of this unit.
highlight_box_type | :: RW CursorBoxRenderType | The highlight box type of this highlight box entity.
The highlight box type of this highlight box entity.
highlight_box_blink_interval | :: RW uint32 | The blink interval of this highlight box entity. [...]
The blink interval of this highlight box entity. [...]
status | :: R defines.entity_status? | The status of this entity, if any. [...]
The status of this entity, if any. [...]
custom_status | :: RW CustomEntityStatus? | A custom status for this entity that will be displayed in the GUI.
A custom status for this entity that will be displayed in the GUI.
enable_logistics_while_moving | :: RW boolean | Whether equipment grid logistics are enabled while this vehicle is moving.
Whether equipment grid logistics are enabled while this vehicle is moving.
render_player | :: R LuaPlayer| W PlayerIdentification? | The player that this `simple-entity-with-owner`, `simple-entity-with-force`, or `highlight-box` is visible to. [...]
The player that this `simple-entity-with-owner`, `simple-entity-with-force`, or `highlight-box` is visible to. [...]
render_to_forces | :: R array[LuaForce]| W ForceSet? | The forces that this `simple-entity-with-owner` or `simple-entity-with-force` is visible to. [...]
The forces that this `simple-entity-with-owner` or `simple-entity-with-force` is visible to. [...]
pump_rail_target | :: R LuaEntity? | The rail target of this pump, if any.
The rail target of this pump, if any.
valve_threshold_override | :: RW float? | The threshold override of this valve, or `nil` if an override is not defined. [...]
The threshold override of this valve, or `nil` if an override is not defined. [...]
electric_network_id | :: R uint32? | Returns the id of the electric network that this entity is connected to, if any.
Returns the id of the electric network that this entity is connected to, if any.
allow_dispatching_robots | :: RW boolean | Whether this character's personal roboports are allowed to dispatch robots.
Whether this character's personal roboports are allowed to dispatch robots.
energy_generated_last_tick | :: R double | How much energy this generator generated in the last tick.
How much energy this generator generated in the last tick.
storage_filter | :: R ItemIDAndQualityIDPair| W ItemWithQualityID? | The storage filter for this logistic storage container. [...]
The storage filter for this logistic storage container. [...]
request_from_buffers | :: RW boolean | Whether this requester chest is set to also request from buffer chests. [...]
Whether this requester chest is set to also request from buffer chests. [...]
corpse_expires | :: RW boolean | Whether this corpse will ever fade away.
Whether this corpse will ever fade away.
corpse_immune_to_entity_placement | :: RW boolean | If true, corpse won't be destroyed when entities are placed over it. [...]
If true, corpse won't be destroyed when entities are placed over it. [...]
tags | :: RW Tags? | The tags associated with this entity ghost. [...]
The tags associated with this entity ghost. [...]
time_to_next_effect | :: RW uint32 | The ticks until the next trigger effect of this smoke-with-trigger.
The ticks until the next trigger effect of this smoke-with-trigger.
autopilot_destination | :: RW MapPosition? | Destination of this spidertron's autopilot, if any. [...]
Destination of this spidertron's autopilot, if any. [...]
autopilot_destinations | :: R array[MapPosition] | The queued destination positions of spidertron's autopilot.
The queued destination positions of spidertron's autopilot.
trains_count | :: R uint32 | Amount of trains related to this particular train stop. [...]
Amount of trains related to this particular train stop. [...]
trains_limit | :: RW uint32 | Amount of trains above which no new trains will be sent to this train stop. [...]
Amount of trains above which no new trains will be sent to this train stop. [...]
is_military_target | :: RW boolean | Whether this entity is a MilitaryTarget. [...]
Whether this entity is a MilitaryTarget. [...]
is_entity_with_owner | :: R boolean | If this entity is EntityWithOwner
If this entity is EntityWithOwner
is_entity_with_health | :: R boolean | If this entity is EntityWithHealth
If this entity is EntityWithHealth
combat_robot_owner | :: RW LuaEntity? | The owner of this combat robot, if any.
The owner of this combat robot, if any.
link_id | :: RW uint32 | The link ID this linked container is using.
The link ID this linked container is using.
follow_target | :: RW LuaEntity? | The follow target of this spidertron, if any.
The follow target of this spidertron, if any.
follow_offset | :: RW Vector? | The follow offset of this spidertron, if any entity is being followed. [...]
The follow offset of this spidertron, if any entity is being followed. [...]
linked_belt_type | :: RW BeltConnectionType | Type of linked belt. [...]
Type of linked belt. [...]
linked_belt_neighbour | :: R LuaEntity? | Neighbour to which this linked belt is connected to, if any. [...]
Neighbour to which this linked belt is connected to, if any. [...]
quality | :: R LuaQualityPrototype | The quality of this entity. [...]
The quality of this entity. [...]
rail_layer | :: R defines.rail_layer | Gets rail layer of a given signal
Gets rail layer of a given signal
radar_scan_progress | :: R float | The current radar scan progress, as a number in range `[0, 1]`.
The current radar scan progress, as a number in range `[0, 1]`.
name_tag | :: RW string | Name tag of this entity. [...]
Name tag of this entity. [...]
rocket_silo_status | :: R defines.rocket_silo_status | The status of this rocket silo entity.
The status of this rocket silo entity.
tile_width | :: R uint32 | Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). [...]
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). [...]
tile_height | :: R uint32 | Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). [...]
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). [...]
crane_end_position_3d | :: R Vector3D | Returns current position in 3D for the end of the crane of this entity.
Returns current position in 3D for the end of the crane of this entity.
crane_destination | :: RW MapPosition | Destination of the crane of this entity. [...]
Destination of the crane of this entity. [...]
crane_destination_3d | :: RW Vector3D | Destination of the crane of this entity in 3D. [...]
Destination of the crane of this entity in 3D. [...]
crane_grappler_destination | :: W MapPosition | Will set destination for the grappler of crane of this entity. [...]
Will set destination for the grappler of crane of this entity. [...]
crane_grappler_destination_3d | :: W Vector3D | Will set destination in 3D for the grappler of crane of this entity. [...]
Will set destination in 3D for the grappler of crane of this entity. [...]
owned_plants | :: R array[LuaEntity] | Plants registered by this agricultural tower. [...]
Plants registered by this agricultural tower. [...]
copy_color_from_train_stop | :: RW boolean | If this rolling stock has 'copy color from train stop' enabled.
If this rolling stock has 'copy color from train stop' enabled.
is_headed_to_trains_front | :: R boolean | If the rolling stock is facing train's front.
If the rolling stock is facing train's front.
draw_data | :: R RollingStockDrawData | Gives a draw data of the given entity if it supports such data.
Gives a draw data of the given entity if it supports such data.
train_stop_priority | :: RW uint8 | Priority of this train stop.
Priority of this train stop.
belt_shape | :: R `"straight"` or `"left"` or `"right"` | Gives what is the current shape of a transport-belt.
Gives what is the current shape of a transport-belt.
gps_tag | :: R string | Returns a rich text string containing this entity's position and surface name as a gps tag. [...]
Returns a rich text string containing this entity's position and surface name as a gps tag. [...]
commandable | :: R LuaCommandable? | Returns a LuaCommandable for this entity or nil if entity is not commandable. [...]
Returns a LuaCommandable for this entity or nil if entity is not commandable. [...]
fluids_count | :: R uint32 | Returns count of fluid storages. [...]
Returns count of fluid storages. [...]
tick_grown | :: RW MapTick | The tick when this plant is fully grown.
The tick when this plant is fully grown.
always_on | :: RW boolean | If the lamp is always on when not driven by control behavior.
If the lamp is always on when not driven by control behavior.
artillery_auto_targeting | :: RW boolean | If this artillery auto-targets enemies.
If this artillery auto-targets enemies.
robot_order_queue | :: R array[WorkerRobotOrder] | Get the current queue of robot orders.
Get the current queue of robot orders.
procession_tick | :: RW MapTick | how far into the current procession the cargo pod is.
how far into the current procession the cargo pod is.
is_updatable | :: R boolean | Whether the entity is updatable and considered an UpdatableEntity.
Whether the entity is updatable and considered an UpdatableEntity.
disabled_by_script | :: RW boolean | If the updatable entity is disabled by script. [...]
If the updatable entity is disabled by script. [...]
disabled_by_control_behavior | :: R boolean | If the updatable entity is disabled by control behavior. [...]
If the updatable entity is disabled by control behavior. [...]
disabled_by_recipe | :: R boolean | If the assembling machine is disabled by recipe, e.g. [...]
If the assembling machine is disabled by recipe, e.g. [...]
is_freezable | :: R boolean | Whether the entity is freezable and considered a FreezableEntity.
Whether the entity is freezable and considered a FreezableEntity.
frozen | :: R boolean | Whether the freezable entity is currently frozen. [...]
Whether the freezable entity is currently frozen. [...]
cargo_hatches | :: R array[LuaCargoHatch] | The cargo hatches owned by this entity if any.
The cargo hatches owned by this entity if any.
cargo_pod_state | :: R `"awaiting_launch"` or `"ascending"` or `"surface_transition"` or `"descending"` or `"parking"` | The state of this cargo pod entity.
The state of this cargo pod entity.
cargo_pod_destination | :: RW CargoDestination | The destination of this cargo pod entity. [...]
The destination of this cargo pod entity. [...]
cargo_pod_origin | :: RW LuaEntity? | The origin of this cargo pod entity. [...]
The origin of this cargo pod entity. [...]
attached_cargo_pod | :: R LuaEntity? | The cargo pod attached to this rocket silo rocket if any.
The cargo pod attached to this rocket silo rocket if any.
rocket | :: R LuaEntity? | The rocket silo rocket this cargo pod is attached to, or rocket silo rocket attached to this rocket silo - if any.
The rocket silo rocket this cargo pod is attached to, or rocket silo rocket attached to this rocket silo - if any.
item_request_proxy | :: R LuaEntity? | The first found item request proxy targeting this entity.
The first found item request proxy targeting this entity.
base_damage_modifiers | :: RW TriggerModifierData |
bonus_damage_modifiers | :: RW TriggerModifierData |
cargo_bay_connection_owner | :: R LuaEntity? | The space platform hub or cargo landing pad this cargo bay is connected to if any.
The space platform hub or cargo landing pad this cargo bay is connected to if any.
pickup_from_left_lane | :: RW boolean | For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the left lane.
For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the left lane.
pickup_from_right_lane | :: RW boolean | For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the right lane.
For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the right lane.
segmented_unit | :: R LuaSegmentedUnit? | The segmented unit object that the segment entity is a part of.
The segmented unit object that the segment entity is a part of.
pumped_last_tick | :: R double | The amount of fluid moved by this offshore pump or normal pump in the last tick.
The amount of fluid moved by this offshore pump or normal pump in the last tick.
created_by_corpse | :: R LuaEntity? | The corpse that caused this entity ghost to be created, if any.
The corpse that caused this entity ghost to be created, if any.
priority_targets | :: R array[LuaEntityPrototype] | The priority targets for this turret (if any).
The priority targets for this turret (if any).
proxy_target_entity | :: RW LuaEntity? | Entity of which inventory is exposed by this ProxyContainer
Entity of which inventory is exposed by this ProxyContainer
proxy_target_inventory | :: RW defines.inventory | Inventory index of the inventory that is exposed by this ProxyContainer
Inventory index of the inventory that is exposed by this ProxyContainer
display_panel_text | :: RW LocalisedString | Text visible on the display panel. [...]
Text visible on the display panel. [...]
display_panel_icon | :: RW SignalID? | Icon visible on the display panel. [...]
Icon visible on the display panel. [...]
display_panel_always_show | :: RW boolean |
display_panel_show_in_chart | :: RW boolean |
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. [...]

## Class LuaEntityPrototype extends LuaPrototypeBase

has_flag(flag) | → boolean | Test whether this entity prototype has a certain flag set.
Test whether this entity prototype has a certain flag set.
get_inventory_size(index, quality?) | → uint32? | Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
get_crafting_speed(quality?) | → double | The crafting speed of this crafting-machine or character.
The crafting speed of this crafting-machine or character.
get_supply_area_distance(quality?) | → double | The supply area of this electric pole or beacon prototype.
The supply area of this electric pole or beacon prototype.
get_max_wire_distance(quality?) | → double | The maximum wire distance for this entity. [...]
The maximum wire distance for this entity. [...]
get_max_circuit_wire_distance(quality?) | → double | The maximum circuit wire distance for this entity. [...]
The maximum circuit wire distance for this entity. [...]
get_max_energy_usage(quality?) | → double | The theoretical maximum energy usage for this entity.
The theoretical maximum energy usage for this entity.
get_max_energy_production(quality?) | → double | The theoretical maximum energy production for this entity.
The theoretical maximum energy production for this entity.
get_max_energy(quality?) | → double? | The max energy for this flying robot prototype.
The max energy for this flying robot prototype.
get_inserter_extension_speed(quality?) | → double? | The extension speed of this inserter.
The extension speed of this inserter.
get_inserter_rotation_speed(quality?) | → double? | The rotation speed of this inserter.
The rotation speed of this inserter.
get_researching_speed(quality?) | → double? | The base researching speed of this lab prototype.
The base researching speed of this lab prototype.
get_max_distance_of_sector_revealed(quality?) | → uint32? | The radius of the area this radar can chart, in chunks.
The radius of the area this radar can chart, in chunks.
get_max_distance_of_nearby_sector_revealed(quality?) | → uint32? | The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.
The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.
get_max_health(quality?) | → float | Max health of this entity. [...]
Max health of this entity. [...]
get_fluid_usage_per_tick(quality?) | → double? | The fluid usage of this generator, fusion generator or fusion reactor prototype.
The fluid usage of this generator, fusion generator or fusion reactor prototype.
get_max_power_output(quality?) | → double? | The maximum power output of this burner generator or generator prototype.
The maximum power output of this burner generator or generator prototype.
get_pumping_speed(quality?) | → double | The pumping speed of this offshore pump or normal pump.
The pumping speed of this offshore pump or normal pump.
get_valve_flow_rate(quality?) | → double | The maximum flow rate through this valve.
The maximum flow rate through this valve.
get_mining_drill_radius(quality?) | → double? | The mining radius of this mining drill prototype.
The mining radius of this mining drill prototype.
get_fluid_capacity(quality?) | → double | Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids. [...]
Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids. [...]
get_attraction_range_elongation(quality?) | → double? |
get_energy_distribution_efficiency(quality?) | → double? |
infinite_resource | :: R boolean? | Whether this resource is infinite.
Whether this resource is infinite.
minimum_resource_amount | :: R uint32? | Minimum amount of this resource.
Minimum amount of this resource.
normal_resource_amount | :: R uint32? | The normal amount for this resource.
The normal amount for this resource.
infinite_depletion_resource_amount | :: R uint32? | Every time this infinite resource 'ticks' down, it is reduced by this amount. [...]
Every time this infinite resource 'ticks' down, it is reduced by this amount. [...]
resource_category | :: R string? | Name of the category of this resource. [...]
Name of the category of this resource. [...]
mineable_properties | :: R MineableProperties | Whether this entity is minable and what can be obtained by mining it.
Whether this entity is minable and what can be obtained by mining it.
items_to_place_this | :: R array[ItemToPlace]? | Items that when placed will produce this entity, if any. [...]
Items that when placed will produce this entity, if any. [...]
collision_box | :: R BoundingBox | The bounding box used for collision checking.
The bounding box used for collision checking.
secondary_collision_box | :: R BoundingBox? | The secondary bounding box used for collision checking, if any. [...]
The secondary bounding box used for collision checking, if any. [...]
map_generator_bounding_box | :: R BoundingBox | The bounding box used for map generator collision checking.
The bounding box used for map generator collision checking.
selection_box | :: R BoundingBox | The bounding box used for drawing selection.
The bounding box used for drawing selection.
drawing_box_vertical_extension | :: R double | Extra vertical space needed to see the whole entity in GUIs. [...]
Extra vertical space needed to see the whole entity in GUIs. [...]
sticker_box | :: R BoundingBox | The bounding box used to attach sticker type entities.
The bounding box used to attach sticker type entities.
collision_mask | :: R CollisionMask | The collision masks this entity uses
The collision masks this entity uses
trigger_target_mask | :: R dictionary[string → boolean] | The trigger target mask for this entity prototype type. [...]
The trigger target mask for this entity prototype type. [...]
healing_per_tick | :: R float? | Amount this entity can heal per tick, if any.
Amount this entity can heal per tick, if any.
emissions_per_second | :: R dictionary[string → double] | A table of pollution emissions per second the entity will create, grouped by the name of the pollution type.
A table of pollution emissions per second the entity will create, grouped by the name of the pollution type.
corpses | :: R dictionary[string → LuaEntityPrototype]? | Corpses used when this entity is destroyed. [...]
Corpses used when this entity is destroyed. [...]
selectable_in_game | :: R boolean | Is this entity selectable?
Is this entity selectable?
selection_priority | :: R uint32 | The selection priority of this entity - a value between `0` and `255`.
The selection priority of this entity - a value between `0` and `255`.
weight | :: R double? | The weight of this vehicle prototype.
The weight of this vehicle prototype.
resistances | :: R dictionary[string → Resistance]? | List of resistances towards each damage type. [...]
List of resistances towards each damage type. [...]
fast_replaceable_group | :: R string? | The group of mutually fast-replaceable entities, if any.
The group of mutually fast-replaceable entities, if any.
next_upgrade | :: R LuaEntityPrototype? | The next upgrade for this entity, if any.
The next upgrade for this entity, if any.
icons_positioning | :: R array[IconSequencePositioning]? | The icon positioning for inventories of this entity, if defined.
The icon positioning for inventories of this entity, if defined.
icon_draw_specification | :: R IconDrawSpecification | The definition of where and how the alt-mode icons of this entity should be drawn.
The definition of where and how the alt-mode icons of this entity should be drawn.
loot | :: R array[Loot]? | Loot that will be dropped when this entity is killed, if any.
Loot that will be dropped when this entity is killed, if any.
repair_speed_modifier | :: R float? | Repair-speed modifier for this entity, if any. [...]
Repair-speed modifier for this entity, if any. [...]
turret_range | :: R uint32? | The range of this turret.
The range of this turret.
autoplace_specification | :: R AutoplaceSpecification? | Autoplace specification for this entity prototype, if any.
Autoplace specification for this entity prototype, if any.
belt_speed | :: R double? | The speed of this transport belt.
The speed of this transport belt.
result_units | :: R array[UnitSpawnDefinition]? | The result units and spawn points with weight and evolution factor for a biter spawner entity.
The result units and spawn points with weight and evolution factor for a biter spawner entity.
attack_result | :: R array[TriggerItem]? | The attack result of this entity, if any.
The attack result of this entity, if any.
final_attack_result | :: R array[TriggerItem]? | The final attack result for this projectile.
The final attack result for this projectile.
attack_parameters | :: R AttackParameters? | The attack parameters for this entity, if any.
The attack parameters for this entity, if any.
revenge_attack_parameters | :: R AttackParameters? | The revenge attack parameters for this entity, if any. [...]
The revenge attack parameters for this entity, if any. [...]
spawn_cooldown | :: R table? | The spawning cooldown for this enemy spawner prototype.
The spawning cooldown for this enemy spawner prototype.
mining_drill_radius | :: R double? | The mining radius of this mining drill prototype.
The mining radius of this mining drill prototype.
drops_full_belt_stacks | :: R boolean? | If this mining drill puts full belt stacks onto belts.
If this mining drill puts full belt stacks onto belts.
quality_affects_mining_radius | :: R boolean? |
mining_speed | :: R double? | The mining speed of this mining drill/character prototype.
The mining speed of this mining drill/character prototype.
resource_drain_rate_percent | :: R uint8? | The resource drain rate percent of this mining drill prototype.
The resource drain rate percent of this mining drill prototype.
uses_force_mining_productivity_bonus | :: R boolean? | If this drill uses force productivity bonus
If this drill uses force productivity bonus
logistic_mode | :: R `"requester"` or `"active-provider"` or `"passive-provider"` or `"buffer"` or `"storage"` or `"none"`? | The logistic mode of this logistic container.
The logistic mode of this logistic container.
max_underground_distance | :: R uint8? | The max underground distance for underground belts and underground pipes.
The max underground distance for underground belts and underground pipes.
flags | :: R EntityPrototypeFlags | The flags for this entity prototype.
The flags for this entity prototype.
remains_when_mined | :: R array[LuaEntityPrototype] | The remains left behind when this entity is mined.
The remains left behind when this entity is mined.
additional_pastable_entities | :: R array[LuaEntityPrototype] | Entities this entity can be pasted onto in addition to the normal allowed ones.
Entities this entity can be pasted onto in addition to the normal allowed ones.
allow_copy_paste | :: R boolean | When false copy-paste is not allowed for this entity.
When false copy-paste is not allowed for this entity.
shooting_cursor_size | :: R float | The cursor size used when shooting at this entity.
The cursor size used when shooting at this entity.
created_smoke | :: R table? | The smoke trigger run when this entity is built, if any.
The smoke trigger run when this entity is built, if any.
created_effect | :: R array[TriggerItem]? | The trigger to run when this entity is created, if any.
The trigger to run when this entity is created, if any.
update_effects | :: R array[TriggerEffectWithCooldown]? | The trigger effects to run every tick when on cooldown.
The trigger effects to run every tick when on cooldown.
update_effects_while_enraged | :: R array[TriggerEffectWithCooldown]? | The trigger effects to run every tick when on cooldown while the owning LuaSegmentedUnit is enraged.
The trigger effects to run every tick when on cooldown while the owning LuaSegmentedUnit is enraged.
map_color | :: R Color? | The map color used when charting this entity if a friendly or enemy color isn't defined, if any.
The map color used when charting this entity if a friendly or enemy color isn't defined, if any.
friendly_map_color | :: R Color | The friendly map color used when charting this entity.
The friendly map color used when charting this entity.
enemy_map_color | :: R Color | The enemy map color used when charting this entity.
The enemy map color used when charting this entity.
build_base_evolution_requirement | :: R double | The evolution requirement to build this entity as a base when expanding enemy bases.
The evolution requirement to build this entity as a base when expanding enemy bases.
instruments | :: R array[ProgrammableSpeakerInstrument]? | The instruments for this programmable speaker.
The instruments for this programmable speaker.
max_polyphony | :: R uint32? | The maximum polyphony for this programmable speaker.
The maximum polyphony for this programmable speaker.
module_inventory_size | :: R uint32? | The module inventory size. [...]
The module inventory size. [...]
quality_affects_module_slots | :: R boolean? |
module_slots_quality_bonus | :: R dictionary[QualityID → ItemStackIndex] |
inventory_type | :: R `"normal"` or `"with_bar"` or `"with_filters"` or `"with_filters_and_bar"` or `"with_weight_limit"` or `"with_custom_stack_size"`? | The inventory type this container or linked container uses.
The inventory type this container or linked container uses.
inventory_weight_limit | :: R Weight? | Weight limit of the inventory if inventory_type is `"with_weight_limit"`.
Weight limit of the inventory if inventory_type is `"with_weight_limit"`.
quality_affects_inventory_size | :: R boolean? |
inventory_properties | :: R InventoryWithCustomStackSizeSpecification? | Properties of custom inventory. [...]
Properties of custom inventory. [...]
ingredient_count | :: R uint32? | The max number of ingredients this crafting machine prototype supports.
The max number of ingredients this crafting machine prototype supports.
max_item_product_count | :: R uint32? | The max number of item products this crafting machine prototype supports.
The max number of item products this crafting machine prototype supports.
crafting_speed_quality_multiplier | :: R dictionary[QualityID → double] |
crafting_categories | :: R dictionary[string → `true`]? | The crafting categories this entity prototype supports. [...]
The crafting categories this entity prototype supports. [...]
quality_affects_energy_usage | :: R boolean? |
energy_usage_quality_multiplier | :: R dictionary[QualityID → double] |
resource_categories | :: R dictionary[string → `true`]? | The resource categories this character or mining drill supports. [...]
The resource categories this character or mining drill supports. [...]
energy_usage | :: R double? | The direct energy usage of this entity, if any.
The direct energy usage of this entity, if any.
effectivity | :: R double? | The effectivity of this car prototype, generator prototype.
The effectivity of this car prototype, generator prototype.
consumption | :: R double? | The energy consumption of this car prototype.
The energy consumption of this car prototype.
friction_force | :: R double? | The friction of this vehicle prototype.
The friction of this vehicle prototype.
braking_force | :: R double? | The braking force of this vehicle prototype.
The braking force of this vehicle prototype.
air_resistance | :: R double? | The air resistance of this rolling stock prototype.
The air resistance of this rolling stock prototype.
tank_driving | :: R boolean? | If this car prototype uses tank controls to drive.
If this car prototype uses tank controls to drive.
rotation_speed | :: R double? | The rotation speed of this car prototype.
The rotation speed of this car prototype.
rotation_snap_angle | :: R double? | The rotation snap angle of this car prototype.
The rotation snap angle of this car prototype.
turret_rotation_speed | :: R float? | The turret rotation speed of this car prototype.
The turret rotation speed of this car prototype.
guns | :: R dictionary[string → LuaItemPrototype]? | A mapping of the gun name to the gun prototype this prototype uses. [...]
A mapping of the gun name to the gun prototype this prototype uses. [...]
indexed_guns | :: R array[LuaItemPrototype]? | A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
speed | :: R double? | The default speed of this flying robot, rolling stock or unit. [...]
The default speed of this flying robot, rolling stock or unit. [...]
speed_multiplier_when_out_of_energy | :: R float? | The speed multiplier when this flying robot is out of energy.
The speed multiplier when this flying robot is out of energy.
max_payload_size | :: R uint32? | The cargo carrying capacity of this logistics or construction robot.
The cargo carrying capacity of this logistics or construction robot.
max_payload_size_after_bonus | :: R uint32? | The maximum possible cargo carrying capacity of this logistics or construction robot. [...]
The maximum possible cargo carrying capacity of this logistics or construction robot. [...]
draw_cargo | :: R boolean? | Whether this logistics or construction robot renders its cargo when flying.
Whether this logistics or construction robot renders its cargo when flying.
energy_per_move | :: R double? | The energy consumed per tile moved for this flying robot.
The energy consumed per tile moved for this flying robot.
energy_per_tick | :: R double? | The energy consumed per tick for this flying robot.
The energy consumed per tick for this flying robot.
min_to_charge | :: R float? | The minimum energy for this flying robot before it tries to recharge.
The minimum energy for this flying robot before it tries to recharge.
max_to_charge | :: R float? | The maximum energy for this flying robot above which it won't try to recharge when stationing.
The maximum energy for this flying robot above which it won't try to recharge when stationing.
burner_prototype | :: R LuaBurnerPrototype? | The burner energy source prototype this entity uses, if any.
The burner energy source prototype this entity uses, if any.
electric_energy_source_prototype | :: R LuaElectricEnergySourcePrototype? | The electric energy source prototype this entity uses, if any.
The electric energy source prototype this entity uses, if any.
heat_energy_source_prototype | :: R LuaHeatEnergySourcePrototype? | The heat energy source prototype this entity uses, if any.
The heat energy source prototype this entity uses, if any.
fluid_energy_source_prototype | :: R LuaFluidEnergySourcePrototype? | The fluid energy source prototype this entity uses, if any.
The fluid energy source prototype this entity uses, if any.
void_energy_source_prototype | :: R LuaVoidEnergySourcePrototype? | The void energy source prototype this entity uses, if any.
The void energy source prototype this entity uses, if any.
heat_buffer_prototype | :: R LuaHeatBufferPrototype? | The heat buffer prototype this entity uses, if any.
The heat buffer prototype this entity uses, if any.
building_grid_bit_shift | :: R uint32 | The log2 of grid size of the building.
The log2 of grid size of the building.
fluid_usage_per_tick | :: R double? | The fluid usage of this generator prototype. [...]
The fluid usage of this generator prototype. [...]
maximum_temperature | :: R double? | The maximum fluid temperature of this generator prototype.
The maximum fluid temperature of this generator prototype.
burns_fluid | :: R boolean? | Whether this generator prototype burns fluid.
Whether this generator prototype burns fluid.
scale_fluid_usage | :: R boolean? | Whether this generator prototype scales fluid usage.
Whether this generator prototype scales fluid usage.
destroy_non_fuel_fluid | :: R boolean? | Whether this generator prototype destroys non-fuel fluids.
Whether this generator prototype destroys non-fuel fluids.
max_power_output | :: R double? | The default maximum power output of this generator prototype. [...]
The default maximum power output of this generator prototype. [...]
target_temperature | :: R float? | The target temperature of this boiler or fusion reactor prototype. [...]
The target temperature of this boiler or fusion reactor prototype. [...]
boiler_mode | :: R `"heat-fluid-inside"` or `"output-to-separate-pipe"`? | The boiler operation mode of this boiler prototype.
The boiler operation mode of this boiler prototype.
fluid_capacity | :: R double | The fluid capacity of this entity or 0 if this entity doesn't support fluids. [...]
The fluid capacity of this entity or 0 if this entity doesn't support fluids. [...]
pumping_speed | :: R double? | The pumping speed of this offshore pump or normal pump. [...]
The pumping speed of this offshore pump or normal pump. [...]
valve_mode | :: R ValveMode? | The mode of operation of this valve.
The mode of operation of this valve.
valve_threshold | :: R float? | The default threshold of this valve.
The default threshold of this valve.
bulk | :: R boolean? | Whether this inserter is a bulk-type.
Whether this inserter is a bulk-type.
uses_inserter_stack_size_bonus | :: R boolean? |
fluid_source_offset | :: R Vector? |
flow_scaling | :: R boolean? |
allow_custom_vectors | :: R boolean? | Whether this inserter allows custom pickup and drop vectors.
Whether this inserter allows custom pickup and drop vectors.
allow_burner_leech | :: R boolean? | Whether this inserter allows burner leeching.
Whether this inserter allows burner leeching.
inserter_pickup_position | :: R Vector? | The pickup position for this inserter.
The pickup position for this inserter.
inserter_drop_position | :: R Vector? | The drop position for this inserter.
The drop position for this inserter.
inserter_chases_belt_items | :: R boolean? | True if this inserter chases items on belts for pickup.
True if this inserter chases items on belts for pickup.
inserter_max_belt_stack_size | :: R uint8? | The max belt stack size for this inserter.
The max belt stack size for this inserter.
loader_max_belt_stack_size | :: R uint8? | The max belt stack size for this loader.
The max belt stack size for this loader.
loader_adjustable_belt_stack_size | :: R boolean? | True if this loader supports a runtime-adjustable belt stack size.
True if this loader supports a runtime-adjustable belt stack size.
loader_wait_for_full_stack | :: R boolean? | True if this loader will not drop items for which total amount is less than a full belt stack.
True if this loader will not drop items for which total amount is less than a full belt stack.
loader_respect_insert_limits | :: R boolean? |
count_as_rock_for_filtered_deconstruction | :: R boolean? | If this simple-entity is counted as a rock for the deconstruction planner "trees and rocks only" filter.
If this simple-entity is counted as a rock for the deconstruction planner "trees and rocks only" filter.
filter_count | :: R uint32? | The filter count of this inserter, loader, mining drill or logistic chest. [...]
The filter count of this inserter, loader, mining drill or logistic chest. [...]
time_to_live | :: R uint32 | The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
distribution_effectivity | :: R double? | The distribution effectivity for this beacon prototype.
The distribution effectivity for this beacon prototype.
distribution_effectivity_bonus_per_quality_level | :: R double? | The distribution effectivity bonus per quality level for this beacon prototype.
The distribution effectivity bonus per quality level for this beacon prototype.
profile | :: R array[double]? | The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
beacon_counter | :: R `"total"` or `"same_type"`? | The beacon counter used by effect receiver when deciding which sample to take from beacon profile.
The beacon counter used by effect receiver when deciding which sample to take from beacon profile.
quality_affects_supply_area_distance | :: R boolean? |
explosion_beam | :: R double? | Whether this explosion has a beam.
Whether this explosion has a beam.
explosion_rotate | :: R double? | Whether this explosion rotates.
Whether this explosion rotates.
tree_color_count | :: R uint8? | If it is a tree, return the number of colors it supports.
If it is a tree, return the number of colors it supports.
alert_when_damaged | :: R boolean? | Whether this entity raises an alert when damaged.
Whether this entity raises an alert when damaged.
alert_when_attacking | :: R boolean? | Whether this turret raises an alert when attacking
Whether this turret raises an alert when attacking
color | :: R Color? | The color of the prototype, if any.
The color of the prototype, if any.
collision_mask_collides_with_self | :: R boolean | Does this prototype collision mask collide with itself?
Does this prototype collision mask collide with itself?
collision_mask_collides_with_tiles_only | :: R boolean | Does this prototype collision mask collide with tiles only?
Does this prototype collision mask collide with tiles only?
collision_mask_considers_tile_transitions | :: R boolean | Does this prototype collision mask consider tile transitions?
Does this prototype collision mask consider tile transitions?
allowed_effects | :: R dictionary[string → boolean]? | The allowed module effects for this entity, if any.
The allowed module effects for this entity, if any.
allowed_module_categories | :: R dictionary[string → `true`]? | The allowed module categories for this entity, if any.
The allowed module categories for this entity, if any.
rocket_parts_required | :: R uint32? | The rocket parts required for this rocket silo prototype.
The rocket parts required for this rocket silo prototype.
rocket_rising_delay | :: R uint8? | The rocket rising delay for this rocket silo prototype.
The rocket rising delay for this rocket silo prototype.
launch_wait_time | :: R uint8? | The rocket launch delay for this rocket silo prototype.
The rocket launch delay for this rocket silo prototype.
light_blinking_speed | :: R double? | The light blinking speed for this rocket silo prototype.
The light blinking speed for this rocket silo prototype.
door_opening_speed | :: R double? | The door opening speed for this rocket silo prototype.
The door opening speed for this rocket silo prototype.
launch_to_space_platforms | :: R boolean? |
rising_speed | :: R double? | The rising speed for this rocket silo rocket prototype.
The rising speed for this rocket silo rocket prototype.
engine_starting_speed | :: R double? | The engine starting speed for this rocket silo rocket prototype.
The engine starting speed for this rocket silo rocket prototype.
flying_speed | :: R double? | The flying speed for this rocket silo rocket prototype.
The flying speed for this rocket silo rocket prototype.
flying_acceleration | :: R double? | The flying acceleration for this rocket silo rocket prototype.
The flying acceleration for this rocket silo rocket prototype.
fixed_recipe | :: R string? | The fixed recipe name for this assembling machine prototype, if any.
The fixed recipe name for this assembling machine prototype, if any.
construction_radius | :: R double? | The construction radius for this roboport prototype.
The construction radius for this roboport prototype.
logistic_radius | :: R double? | The logistic radius for this roboport prototype.
The logistic radius for this roboport prototype.
energy_per_hit_point | :: R double? | The energy used per hit point taken for this vehicle during collisions.
The energy used per hit point taken for this vehicle during collisions.
create_ghost_on_death | :: R boolean | If this prototype will attempt to create a ghost of itself on death. [...]
If this prototype will attempt to create a ghost of itself on death. [...]
ammo_category | :: R string? | Name of the ammo category of this land mine.
Name of the ammo category of this land mine.
timeout | :: R uint32? | The time it takes this land mine to arm.
The time it takes this land mine to arm.
trigger_collision_mask | :: R CollisionMask? | The collision mask entities must collide with to make this landmine blow up.
The collision mask entities must collide with to make this landmine blow up.
fluidbox_prototypes | :: R array[LuaFluidBoxPrototype] | The fluidbox prototypes for this entity.
The fluidbox prototypes for this entity.
neighbour_bonus | :: R double? |
container_distance | :: R double? |
belt_distance | :: R double? |
belt_length | :: R double? |
per_lane_filters | :: R boolean? |
is_building | :: R boolean |
automated_ammo_count | :: R uint32? | The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
max_speed | :: R double? | The max speed of this projectile or flying robot prototype.
The max speed of this projectile or flying robot prototype.
darkness_for_all_lamps_on | :: R float? | Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
darkness_for_all_lamps_off | :: R float? | Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
always_on | :: R boolean? | Whether the lamp is always on (except when out of power or turned off by the circuit network).
Whether the lamp is always on (except when out of power or turned off by the circuit network).
min_darkness_to_spawn | :: R float? | The minimum darkness at which this unit spawner can spawn entities.
The minimum darkness at which this unit spawner can spawn entities.
max_darkness_to_spawn | :: R float? | The maximum darkness at which this unit spawner can spawn entities.
The maximum darkness at which this unit spawner can spawn entities.
call_for_help_radius | :: R double? |
max_count_of_owned_units | :: R double? | Count of enemies this spawner can sustain.
Count of enemies this spawner can sustain.
max_count_of_owned_defensive_units | :: R double? | Count of defensive enemies this spawner can sustain.
Count of defensive enemies this spawner can sustain.
max_friends_around_to_spawn | :: R double? | How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
max_defensive_friends_around_to_spawn | :: R double? | How many defensive friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
How many defensive friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
spawning_radius | :: R double? | How far from the spawner can the units be spawned.
How far from the spawner can the units be spawned.
spawning_spacing | :: R double? | What spaces should be between the spawned units.
What spaces should be between the spawned units.
radius | :: R double | The radius of this entity prototype. [...]
The radius of this entity prototype. [...]
cliff_explosive_prototype | :: R string? | The item prototype name used to destroy this cliff.
The item prototype name used to destroy this cliff.
rocket_entity_prototype | :: R LuaEntityPrototype? | The rocket entity prototype associated with this rocket silo prototype.
The rocket entity prototype associated with this rocket silo prototype.
has_belt_immunity | :: R boolean? | Whether this unit, car, or character prototype has belt immunity.
Whether this unit, car, or character prototype has belt immunity.
vision_distance | :: R double? | The vision distance of this unit prototype.
The vision distance of this unit prototype.
absorptions_to_join_attack | :: R dictionary[string → float]? | A table of pollutions amounts that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.
A table of pollutions amounts that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.
min_pursue_time | :: R uint32? | The minimum pursue time of this unit prototype.
The minimum pursue time of this unit prototype.
max_pursue_distance | :: R double? | The maximum pursue distance of this unit prototype.
The maximum pursue distance of this unit prototype.
radar_range | :: R uint32? | The radar range of this unit prototype.
The radar range of this unit prototype.
move_while_shooting | :: R boolean? | Whether this unit prototype can move while shooting.
Whether this unit prototype can move while shooting.
can_open_gates | :: R boolean? | Whether this unit prototype can open gates.
Whether this unit prototype can open gates.
affected_by_tiles | :: R boolean? | Whether this unit prototype is affected by tile walking speed modifiers.
Whether this unit prototype is affected by tile walking speed modifiers.
distraction_cooldown | :: R uint32? | The distraction cooldown of this unit prototype.
The distraction cooldown of this unit prototype.
spawning_time_modifier | :: R double? | The spawning time modifier of this unit prototype.
The spawning time modifier of this unit prototype.
alert_icon_shift | :: R Vector | The alert icon shift of this entity prototype.
The alert icon shift of this entity prototype.
alert_icon_scale | :: R float | The alert icon scale of this entity prototype.
The alert icon scale of this entity prototype.
lab_inputs | :: R array[string]? | The item prototype names that are the inputs of this lab prototype.
The item prototype names that are the inputs of this lab prototype.
uses_quality_drain_modifier | :: R boolean | If this lab uses the quality drain modifier when consuming science packs.
If this lab uses the quality drain modifier when consuming science packs.
science_pack_drain_rate_percent | :: R uint8 | How much science pack durability is required to research one science point.
How much science pack durability is required to research one science point.
effect_receiver | :: R EffectReceiver? | Effect receiver prototype of this crafting machine, lab, or mining drill.
Effect receiver prototype of this crafting machine, lab, or mining drill.
allow_access_to_all_forces | :: R boolean? | Whether this market allows access to all forces or just friendly ones.
Whether this market allows access to all forces or just friendly ones.
supports_direction | :: R boolean | Whether this entity prototype could possibly ever be rotated.
Whether this entity prototype could possibly ever be rotated.
terrain_friction_modifier | :: R float? | The terrain friction modifier for this vehicle.
The terrain friction modifier for this vehicle.
allow_passengers | :: R boolean? | Whether this vehicle allows passengers.
Whether this vehicle allows passengers.
grid_prototype | :: R LuaEquipmentGridPrototype? | The equipment grid prototype for this entity, if any.
The equipment grid prototype for this entity, if any.
remove_decoratives | :: R `"automatic"` or `"true"` or `"false"` | Whether this entity should remove decoratives that collide with it when this entity is built.
Whether this entity should remove decoratives that collide with it when this entity is built.
related_underground_belt | :: R LuaEntityPrototype? |
inserter_stack_size_bonus | :: R uint32? | The built-in stack size bonus of this inserter prototype.
The built-in stack size bonus of this inserter prototype.
protected_from_tile_building | :: R boolean | True if this entity prototype should be included during tile collision checks with LuaTilePrototype::check_collision_with_entities enabled.
True if this entity prototype should be included during tile collision checks with LuaTilePrototype::check_collision_with_entities enabled.
is_entity_with_owner | :: R boolean | True if this is entity-with-owner
True if this is entity-with-owner
is_military_target | :: R boolean? | True if this entity-with-owner is military target
True if this entity-with-owner is military target
allow_run_time_change_of_is_military_target | :: R boolean? | True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)
True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)
logistic_parameters | :: R table? | The logistic parameters for this roboport.
The logistic parameters for this roboport.
height | :: R double? | The height of this spider vehicle prototype.
The height of this spider vehicle prototype.
torso_rotation_speed | :: R double? | The torso rotation speed of this spider vehicle prototype.
The torso rotation speed of this spider vehicle prototype.
torso_bob_speed | :: R double? | The torso bob speed of this spider vehicle prototype.
The torso bob speed of this spider vehicle prototype.
automatic_weapon_cycling | :: R boolean? | Whether this spider vehicle prototype automatically cycles weapons.
Whether this spider vehicle prototype automatically cycles weapons.
chain_shooting_cooldown_modifier | :: R double? | The chain shooting cooldown modifier of this spider vehicle prototype.
The chain shooting cooldown modifier of this spider vehicle prototype.
spider_engine | :: R SpiderEngineSpecification? |
chunk_exploration_radius | :: R double? | The chunk exploration radius of this vehicle prototype.
The chunk exploration radius of this vehicle prototype.
animation_speed_coefficient | :: R double? | The animation speed coefficient of this belt connectable prototype.
The animation speed coefficient of this belt connectable prototype.
manual_range_modifier | :: R double? | The manual range modifier for this artillery turret or wagon prototype.
The manual range modifier for this artillery turret or wagon prototype.
dying_speed | :: R float? | The dying time of this corpse prototype.
The dying time of this corpse prototype.
active_energy_usage | :: R double? | The active energy usage of this rocket silo or combinator prototype.
The active energy usage of this rocket silo or combinator prototype.
lamp_energy_usage | :: R double? | The lamp energy usage of this rocket silo prototype.
The lamp energy usage of this rocket silo prototype.
crane_energy_usage | :: R double? | The crane energy usage of this agricultural tower prototype.
The crane energy usage of this agricultural tower prototype.
use_exact_mode | :: R boolean? | Whether this logistic container prototype uses exact mode
Whether this logistic container prototype uses exact mode
tile_width | :: R uint32 | Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
tile_height | :: R uint32 | Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
vertical_selection_shift | :: R double? | Vertical selection shift used by rolling stocks. [...]
Vertical selection shift used by rolling stocks. [...]
spawn_decoration | :: R array[TriggerEffectItem]? |
spawn_decorations_on_expansion | :: R boolean? |
connection_distance | :: R double? |
joint_distance | :: R double? |
radius_visualisation_specification | :: R RadiusVisualisationSpecification? |
growth_ticks | :: R uint32? |
harvest_emissions | :: R dictionary[string → double]? | A table of pollutants that this plant will release when it is harvested.
A table of pollutants that this plant will release when it is harvested.
agricultural_tower_radius | :: R double? |
growth_area_radius | :: R double? |
growth_grid_tile_size | :: R uint32? |
vector_to_place_result | :: R Vector? |
surface_conditions | :: R array[SurfaceCondition]? | The surface conditions required to build this entity.
The surface conditions required to build this entity.
heating_energy | :: R double | The energy required to keep this entity from freezing. [...]
The energy required to keep this entity from freezing. [...]
auto_setup_collision_box | :: R boolean |
factoriopedia_alternative | :: R LuaEntityPrototype? | 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.
rewire_neighbours_when_destroying | :: R boolean |
solar_panel_performance_at_day | :: R double |
solar_panel_performance_at_night | :: R double |
solar_panel_solar_coefficient_property | :: R LuaSurfacePropertyPrototype |
accepted_seeds | :: R array[string]? |
captured_spawner_entity | :: R LuaEntityPrototype? |
min_performance | :: R ThrusterPerformancePoint? |
max_performance | :: R ThrusterPerformancePoint? |
two_direction_only | :: R boolean? |
perceived_performance | :: R PerceivedPerformance? |
overkill_fraction | :: R float? |
dying_explosion | :: R array[ExplosionDefinition]? |
dying_trigger_effect | :: R array[TriggerEffectItem]? |
damaged_trigger_effect | :: R array[TriggerEffectItem]? |
attack_reaction | :: R array[AttackReactionItem]? |
hide_resistances | :: R boolean? |
random_corpse_variation | :: R boolean? |
neighbour_connectable | :: R NeighbourConnectable? |
tile_buildability_rules | :: R array[TileBuildabilityRule]? |
support_range | :: R float? |
reversing_power_modifier | :: R double? |
territory_radius | :: R uint32? |
enraged_duration | :: R MapTick? |
patrolling_speed | :: R double? |
investigating_speed | :: R double? |
attacking_speed | :: R double? |
enraged_speed | :: R double |
acceleration_rate | :: R double |
turn_radius | :: R double? |
patrolling_turn_radius | :: R double? |
turn_smoothing | :: R double? |
ticks_per_scan | :: R uint32? |
segment_engine | :: R SegmentEngineSpecification? |
running_speed | :: R double? | The movement speed of this character prototype.
The movement speed of this character prototype.
maximum_corner_sliding_distance | :: R double? |
build_distance | :: R uint32? |
drop_item_distance | :: R uint32? |
reach_distance | :: R uint32? |
reach_resource_distance | :: R double? |
item_pickup_distance | :: R double? |
loot_pickup_distance | :: R double? |
enter_vehicle_distance | :: R double? |
ticks_to_keep_gun | :: R uint32? |
ticks_to_keep_aiming_direction | :: R uint32? |
ticks_to_stay_in_combat | :: R uint32? |
respawn_time | :: R uint32? |
damage_hit_tint | :: R Color? |
character_corpse | :: R LuaEntityPrototype? |
arm_inventory_size_quality_increase | :: R uint32? |
inventory_size_quality_increase | :: R uint32? |
passive_energy_usage | :: R double? |
arm_energy_usage | :: R double? |
arm_slow_energy_usage | :: R double? |
energy_usage_quality_scaling | :: R float? |
arm_count_base | :: R uint32? |
arm_count_quality_scaling | :: R uint32? |
head_collection_radius | :: R float? |
collection_box_offset | :: R float? |
deposit_radius | :: R float? |
arm_speed_base | :: R float? |
arm_speed_quality_scaling | :: R float? |
arm_angular_speed_cap_base | :: R float? |
arm_angular_speed_cap_quality_scaling | :: R float? |
tether_size | :: R float? |
unpowered_arm_speed_scale | :: R float? |
minimal_arm_swing_segment_retraction | :: R uint32? |
held_items_offset | :: R float? |
held_items_spread | :: R float? |
held_items_display_count | :: R uint8? |
arm_color_gradient | :: R array[Color]? |
fluid_buffer_size | :: R FluidAmount? |
activation_buffer_ratio | :: R FluidAmount? |
fluid_buffer_input_flow | :: R FluidAmount? |
range_from_player | :: R double? |
combat_robot_friction | :: R double? |
destroy_action | :: R array[TriggerItem]? |
follows_player | :: R boolean? |
strike_effect | :: R array[TriggerItem]? |
attractor_hit_effect | :: R array[TriggerItem]? |
damage | :: R double? | When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
energy | :: R double? | When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
connection_category | :: R array[string] |
quality_affects_capacity | :: R boolean? |
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. [...]

## Class LuaEquipment

name | :: R string | Name of this equipment.
Name of this equipment.
ghost_name | :: R string | Name of the equipment contained in this ghost
Name of the equipment contained in this ghost
type | :: R string | Type of this equipment.
Type of this equipment.
ghost_type | :: R string | Type of the equipment contained in this ghost.
Type of the equipment contained in this ghost.
quality | :: R LuaQualityPrototype | Quality of this equipment.
Quality of this equipment.
position | :: R EquipmentPosition | Position of this equipment in the equipment grid.
Position of this equipment in the equipment grid.
shape | :: R table | Shape of this equipment.
Shape of this equipment.
shield | :: RW double | Current shield value of the equipment. [...]
Current shield value of the equipment. [...]
max_shield | :: R double | Maximum shield value. [...]
Maximum shield value. [...]
max_solar_power | :: R double | Maximum energy per tick crated by this equipment on the current surface. [...]
Maximum energy per tick crated by this equipment on the current surface. [...]
inventory_bonus | :: R uint32 | Inventory size bonus.
Inventory size bonus.
movement_bonus | :: R double | Movement speed bonus.
Movement speed bonus.
generator_power | :: R double | Energy generated per tick.
Energy generated per tick.
energy | :: RW double | Current available energy.
Current available energy.
max_energy | :: R double | Maximum amount of energy that can be stored in this equipment.
Maximum amount of energy that can be stored in this equipment.
prototype | :: R LuaEquipmentPrototype |
ghost_prototype | :: R LuaEquipmentPrototype | The prototype of the equipment contained in this ghost.
The prototype of the equipment contained in this ghost.
burner | :: R LuaBurner? | The burner energy source for this equipment, if any.
The burner energy source for this equipment, if any.
to_be_removed | :: R boolean | If this equipment is marked to be removed.
If this equipment is marked to be removed.
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. [...]

## Class LuaEquipmentCategoryPrototype extends LuaPrototypeBase

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. [...]

## Class LuaEquipmentGrid

take{position?=…, equipment?=…, by_player?=…} | → ItemWithQualityCount? | Remove an equipment from the grid.
Remove an equipment from the grid.
take_all(by_player?) | → array[ItemWithQualityCount] | Remove all equipment from the grid.
Remove all equipment from the grid.
clear(by_player?) |  | Clear all equipment from the grid, removing it without actually returning it.
Clear all equipment from the grid, removing it without actually returning it.
put{name=…, quality?=…, position?=…, by_player?=…, ghost?=…} | → LuaEquipment? | Insert an equipment into the grid.
Insert an equipment into the grid.
can_move{equipment=…, position=…} | → boolean | Check whether moving an equipment would succeed.
Check whether moving an equipment would succeed.
move{equipment=…, position=…} | → boolean | Move an equipment within this grid.
Move an equipment within this grid.
get(position) | → LuaEquipment? | Find equipment in the Equipment Grid colliding with this position.
Find equipment in the Equipment Grid colliding with this position.
get_contents() | → array[EquipmentWithQualityCounts] | Get counts of all equipment in this grid.
Get counts of all equipment in this grid.
get_generator_energy(quality?) | → double | Total energy per tick generated by the equipment inside this grid.
Total energy per tick generated by the equipment inside this grid.
find(equipment, search_ghosts?) | → LuaEquipment? | Find equipment by name.
Find equipment by name.
count(equipment?) | → uint32 | Get the number of all or some equipment in this grid.
Get the number of all or some equipment in this grid.
revive(equipment) | → LuaEquipment | Revives the given equipment ghost if possible.
Revives the given equipment ghost if possible.
order_removal(equipment) | → boolean | Marks the given equipment for removal. [...]
Marks the given equipment for removal. [...]
cancel_removal(equipment) | → boolean | Cancels removal for the given equipment.
Cancels removal for the given equipment.
prototype | :: R LuaEquipmentGridPrototype |
width | :: R uint32 | Width of the equipment grid.
Width of the equipment grid.
height | :: R uint32 | Height of the equipment grid.
Height of the equipment grid.
equipment | :: R array[LuaEquipment] | All the equipment in this grid.
All the equipment in this grid.
max_solar_energy | :: R double | Maximum energy per tick that can be created by all solar panels in the equipment grid on the current surface. [...]
Maximum energy per tick that can be created by all solar panels in the equipment grid on the current surface. [...]
available_in_batteries | :: R double | The total energy stored in all batteries in the equipment grid.
The total energy stored in all batteries in the equipment grid.
battery_capacity | :: R double | Total energy storage capacity of all batteries in the equipment grid.
Total energy storage capacity of all batteries in the equipment grid.
shield | :: R float | The amount of shield hitpoints this equipment grid currently has across all shield equipment.
The amount of shield hitpoints this equipment grid currently has across all shield equipment.
max_shield | :: R float | The maximum amount of shield hitpoints this equipment grid has across all shield equipment.
The maximum amount of shield hitpoints this equipment grid has across all shield equipment.
inventory_bonus | :: R uint32 | The total amount of inventory bonus this equipment grid gives.
The total amount of inventory bonus this equipment grid gives.
movement_bonus | :: R double | The total amount of movement bonus this equipment grid gives. [...]
The total amount of movement bonus this equipment grid gives. [...]
inhibit_movement_bonus | :: RW boolean | Whether this grid's equipment movement bonus is active.
Whether this grid's equipment movement bonus is active.
unique_id | :: R uint32 | Unique identifier of this equipment grid.
Unique identifier of this equipment grid.
entity_owner | :: R LuaEntity? | The entity that this equipment grid is owned by (in some inventory or item stack.) If the owning entity is a character owned by some player and the player is disconnected this will return `nil`.
The entity that this equipment grid is owned by (in some inventory or item stack.) If the owning entity is a character owned by some player and the player is disconnected this will return `nil`.
player_owner | :: R LuaPlayer? | The player that this equipment grid is owned by (in some inventory or item stack.)
The player that this equipment grid is owned by (in some inventory or item stack.)
itemstack_owner | :: R LuaItemStack? | The item stack that this equipment grid is owned by.
The item stack that this equipment grid is owned by.
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. [...]

## Class LuaEquipmentGridPrototype extends LuaPrototypeBase

equipment_categories | :: R array[string] | Equipment category names for the categories that may be inserted into this equipment grid. [...]
Equipment category names for the categories that may be inserted into this equipment grid. [...]
width | :: R uint32 |
height | :: R uint32 |
locked | :: R boolean | If the player can move equipment into or out of this grid.
If the player can move equipment into or out of this grid.
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. [...]

## Class LuaEquipmentPrototype extends LuaPrototypeBase

get_shield(quality?) | → float | The shield value of this equipment. [...]
The shield value of this equipment. [...]
get_energy_consumption(quality?) | → double |
get_inventory_bonus(quality?) | → uint32? |
get_movement_bonus(quality?) | → float? |
shape | :: R table | Shape of this equipment prototype.
Shape of this equipment prototype.
take_result | :: R LuaItemPrototype? | The result item when taking this equipment out of an equipment grid, if any.
The result item when taking this equipment out of an equipment grid, if any.
energy_production | :: R double | The max power generated by this equipment.
The max power generated by this equipment.
energy_per_shield | :: R double | The energy per shield point restored. [...]
The energy per shield point restored. [...]
logistic_parameters | :: R table? | The logistic parameters for this roboport equipment.
The logistic parameters for this roboport equipment.
energy_source | :: R LuaElectricEnergySourcePrototype | The energy source prototype for the equipment.
The energy source prototype for the equipment.
equipment_categories | :: R array[string] | Category names for this equipment. [...]
Category names for this equipment. [...]
burner_prototype | :: R LuaBurnerPrototype? | The burner energy source prototype this equipment uses, if any.
The burner energy source prototype this equipment uses, if any.
electric_energy_source_prototype | :: R LuaElectricEnergySourcePrototype? | The electric energy source prototype this equipment uses, if any.
The electric energy source prototype this equipment uses, if any.
background_color | :: R Color | The background color of this equipment prototype.
The background color of this equipment prototype.
attack_parameters | :: R AttackParameters? | The equipment attack parameters.
The equipment attack parameters.
automatic | :: R boolean | Whether this active defense equipment is automatic. [...]
Whether this active defense equipment is automatic. [...]
solar_panel_performance_at_day | :: R double |
solar_panel_performance_at_night | :: R double |
solar_panel_solar_coefficient_property | :: R LuaSurfacePropertyPrototype |
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. [...]

## Class LuaFlowStatistics

get_input_count(id) | → uint64 or double | Gets the total input count for a given prototype.
Gets the total input count for a given prototype.
set_input_count(id, count) |  | Sets the total input count for a given prototype.
Sets the total input count for a given prototype.
get_output_count(id) | → uint64 or double | Gets the total output count for a given prototype.
Gets the total output count for a given prototype.
set_output_count(id, count) |  | Sets the total output count for a given prototype.
Sets the total output count for a given prototype.
get_storage_count(id) | → uint64 or double | Gets the total storage count for a given prototype.
Gets the total storage count for a given prototype.
set_storage_count(id, count) |  | Sets the total storage count for a given prototype.
Sets the total storage count for a given prototype.
get_flow_count{name=…, category=…, precision_index=…, sample_index?=…, count?=…} | → double | Gets the flow count value for the given time frame. [...]
Gets the flow count value for the given time frame. [...]
on_flow(id, count) |  | Adds a value to this flow statistics.
Adds a value to this flow statistics.
clear() |  | Reset all the statistics data to 0.
Reset all the statistics data to 0.
input_counts | :: R dictionary[string → uint64 or double] | List of input counts indexed by prototype name. [...]
List of input counts indexed by prototype name. [...]
output_counts | :: R dictionary[string → uint64 or double] | List of output counts indexed by prototype name. [...]
List of output counts indexed by prototype name. [...]
storage_counts | :: R dictionary[string → uint64 or double] | List of storage counts indexed by prototype name. [...]
List of storage counts indexed by prototype name. [...]
force | :: R LuaForce? | The force these statistics belong to. [...]
The force these statistics belong to. [...]
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. [...]

## Class LuaFluidBox

get_prototype(index) | → LuaFluidBoxPrototype or array[LuaFluidBoxPrototype] | The prototype of this fluidbox index. [...]
The prototype of this fluidbox index. [...]
get_capacity(index) | → double | The capacity of the given fluidbox segment.
The capacity of the given fluidbox segment.
get_connections(index) | → array[LuaFluidBox] | The fluidboxes to which the fluidbox at the given index is connected.
The fluidboxes to which the fluidbox at the given index is connected.
get_pipe_connections(index) | → array[PipeConnection] | Get the fluid box's connections and associated data.
Get the fluid box's connections and associated data.
get_filter(index) | → FluidBoxFilter? | Get a fluid box filter
Get a fluid box filter
set_filter(index, filter) | → boolean | Set a fluid box filter. [...]
Set a fluid box filter. [...]
get_locked_fluid(index) | → string? | Returns the fluid the fluidbox is locked onto
Returns the fluid the fluidbox is locked onto
get_fluid_segment_id(index) | → uint32? | Gets the unique ID of the fluid segment this fluid box belongs to. [...]
Gets the unique ID of the fluid segment this fluid box belongs to. [...]
get_fluid_segment_contents(index) | → dictionary[string → uint32]? | Gets counts of all fluids in the fluid segment. [...]
Gets counts of all fluids in the fluid segment. [...]
get_fluid_segment_extent_bounding_box(index) | → BoundingBox? | Gets the current extent bounding box of the fluid segment this fluid box belongs to. [...]
Gets the current extent bounding box of the fluid segment this fluid box belongs to. [...]
flush(index, fluid?) | → dictionary[string → FluidAmount] | Flushes all fluid from this fluidbox and its fluid system.
Flushes all fluid from this fluidbox and its fluid system.
add_linked_connection(this_linked_connection_id, other_entity, other_linked_connection_id) |  | Registers a linked connection between this entity and other entity. [...]
Registers a linked connection between this entity and other entity. [...]
remove_linked_connection(this_linked_connection_id) |  | Removes linked connection record. [...]
Removes linked connection record. [...]
get_linked_connection(this_linked_connection_id) | → LuaEntity?, uint32? | Returns other end of a linked connection.
Returns other end of a linked connection.
get_linked_connections() | → array[FluidBoxConnectionRecord] | Returns list of all linked connections registered for this entity.
Returns list of all linked connections registered for this entity.
owner | :: R LuaEntity | The entity that owns this fluidbox.
The entity that owns this fluidbox.
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. [...]
[] (index) | :: R Fluid? | Access, set or clear a fluid box. [...]
Access, set or clear a fluid box. [...]
# (length) | :: R uint32 | Number of fluid boxes.
Number of fluid boxes.

## Class LuaFluidBoxPrototype

entity | :: R LuaEntityPrototype | The entity that this belongs to.
The entity that this belongs to.
index | :: R uint32 | The index of this fluidbox prototype in the owning entity.
The index of this fluidbox prototype in the owning entity.
pipe_connections | :: R array[PipeConnectionDefinition] | The pipe connection points.
The pipe connection points.
production_type | :: R ProductionType | The production type.
The production type.
volume | :: R double |
filter | :: R LuaFluidPrototype? | The filter, if any is set.
The filter, if any is set.
minimum_temperature | :: R double? | The minimum temperature, if any is set.
The minimum temperature, if any is set.
maximum_temperature | :: R double? | The maximum temperature, if any is set.
The maximum temperature, if any is set.
secondary_draw_orders | :: R array[int32] | The secondary draw orders for the 4 possible connection directions.
The secondary draw orders for the 4 possible connection directions.
render_layer | :: R RenderLayer | The render layer.
The render layer.
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. [...]

## Class LuaFluidEnergySourcePrototype

emissions_per_joule | :: R dictionary[string → double] | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
render_no_network_icon | :: R boolean |
render_no_power_icon | :: R boolean |
effectivity | :: R double |
burns_fluid | :: R boolean |
scale_fluid_usage | :: R boolean |
destroy_non_fuel_fluid | :: R boolean |
fluid_usage_per_tick | :: R double |
smoke | :: R array[SmokeSource] | The smoke sources for this prototype, if any.
The smoke sources for this prototype, if any.
maximum_temperature | :: R double |
fluid_box | :: R LuaFluidBoxPrototype | The fluid box for this energy source.
The fluid box for this energy source.
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. [...]

## Class LuaFluidPrototype extends LuaPrototypeBase

default_temperature | :: R double | Default temperature of this fluid.
Default temperature of this fluid.
max_temperature | :: R double | Maximum temperature this fluid can reach.
Maximum temperature this fluid can reach.
heat_capacity | :: R double | The amount of energy in Joules required to heat one unit of this fluid by 1°C.
The amount of energy in Joules required to heat one unit of this fluid by 1°C.
base_color | :: R Color |
flow_color | :: R Color |
visualization_color | :: R Color |
gas_temperature | :: R double | The temperature above which this fluid will be shown as gaseous inside tanks and pipes.
The temperature above which this fluid will be shown as gaseous inside tanks and pipes.
emissions_multiplier | :: R double | A multiplier on the amount of emissions produced when this fluid is burnt in a generator. [...]
A multiplier on the amount of emissions produced when this fluid is burnt in a generator. [...]
fuel_value | :: R double | The amount of energy in Joules one unit of this fluid will produce when burnt in a generator. [...]
The amount of energy in Joules one unit of this fluid will produce when burnt in a generator. [...]
factoriopedia_alternative | :: R LuaFluidPrototype? | 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.
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. [...]

## Class LuaFontPrototype

name | :: R string | Name of this prototype.
Name of this prototype.
from | :: R string |
size | :: R int32 |
spacing | :: R float |
border | :: R boolean |
filtered | :: R boolean |
border_color | :: R Color? | The border color, if any.
The border color, if any.
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. [...]

## Class LuaForce

get_entity_count(name) | → uint32 | Count entities of given type. [...]
Count entities of given type. [...]
disable_research() |  | Disable research for this force.
Disable research for this force.
enable_research() |  | Enable research for this force.
Enable research for this force.
disable_all_prototypes() |  | Disable all recipes and technologies. [...]
Disable all recipes and technologies. [...]
enable_all_prototypes() |  | Enables all recipes and technologies. [...]
Enables all recipes and technologies. [...]
reset_recipes() |  | Load the original version of all recipes from the prototypes.
Load the original version of all recipes from the prototypes.
enable_all_recipes() |  | Unlock all recipes.
Unlock all recipes.
enable_all_technologies() |  | Unlock all technologies.
Unlock all technologies.
research_all_technologies(include_disabled_prototypes?) |  | Research all technologies.
Research all technologies.
reset_technologies() |  | Load the original versions of technologies from prototypes. [...]
Load the original versions of technologies from prototypes. [...]
reset() |  | Reset everything. [...]
Reset everything. [...]
reset_technology_effects() |  | Reapplies all possible research effects, including unlocked recipes. [...]
Reapplies all possible research effects, including unlocked recipes. [...]
chart(surface, area) |  | Chart a portion of the map. [...]
Chart a portion of the map. [...]
clear_chart(surface?) |  | Erases chart data for this force.
Erases chart data for this force.
rechart(surface?) |  | Force a rechart of the whole chart.
Force a rechart of the whole chart.
chart_all(surface?) |  | Chart all generated chunks.
Chart all generated chunks.
copy_from(force) |  | Copies all of the given changeable values (except charts) from the given force to this force.
Copies all of the given changeable values (except charts) from the given force to this force.
copy_chart(source_force, source_surface, destination_surface) |  | Copies the given surface's chart from the given force to this force.
Copies the given surface's chart from the given force to this force.
is_chunk_charted(surface, chunk_position) | → boolean | Has a chunk been charted?
Has a chunk been charted?
is_chunk_visible(surface, chunk_position) | → boolean | Is the given chunk currently charted and visible (not covered by fog of war) on the map.
Is the given chunk currently charted and visible (not covered by fog of war) on the map.
is_chunk_requested_for_charting(surface, chunk_position) | → boolean | Has a chunk been requested for charting?
Has a chunk been requested for charting?
cancel_charting(surface?) |  | Cancels pending chart requests for the given surface or all surfaces.
Cancels pending chart requests for the given surface or all surfaces.
get_ammo_damage_modifier(ammo) | → double |
set_ammo_damage_modifier(ammo, modifier) |  |
get_gun_speed_modifier(ammo) | → double |
set_gun_speed_modifier(ammo, modifier) |  |
get_turret_attack_modifier(turret) | → double |
set_turret_attack_modifier(turret, modifier) |  |
set_cease_fire(other, cease_fire) |  | Add `other` force to this force's cease fire list. [...]
Add `other` force to this force's cease fire list. [...]
get_cease_fire(other) | → boolean | Is `other` force in this force's cease fire list?
Is `other` force in this force's cease fire list?
set_friend(other, friend) |  | Add `other` force to this force's friends list. [...]
Add `other` force to this force's friends list. [...]
get_friend(other) | → boolean | Is `other` force in this force's friends list.
Is `other` force in this force's friends list.
is_pathfinder_busy() | → boolean | Is pathfinder busy? [...]
Is pathfinder busy? [...]
kill_all_units() |  | Kill all units and flush the pathfinder.
Kill all units and flush the pathfinder.
find_logistic_network_by_position(position, surface) | → LuaLogisticNetwork? |
set_spawn_position(position, surface) |  |
get_spawn_position(surface) | → MapPosition |
set_surface_hidden(surface, hidden) |  |
get_surface_hidden(surface) | → boolean |
unchart_chunk(chunk_position, surface) |  |
get_item_launched(item) | → uint32 | Gets the count of a given item launched in rockets.
Gets the count of a given item launched in rockets.
set_item_launched(item, count) |  | Sets the count of a given item launched in rockets.
Sets the count of a given item launched in rockets.
print(message, print_settings?) |  | Print text to the chat console of all players on this force. [...]
Print text to the chat console of all players on this force. [...]
add_chart_tag(surface, tag) | → LuaCustomChartTag? | Adds a custom chart tag to the given surface and returns the new tag or `nil` if the given position isn't valid for a chart tag. [...]
Adds a custom chart tag to the given surface and returns the new tag or `nil` if the given position isn't valid for a chart tag. [...]
find_chart_tags(surface, area?) | → array[LuaCustomChartTag] | Finds all custom chart tags within a given area on the given surface. [...]
Finds all custom chart tags within a given area on the given surface. [...]
reset_evolution() |  | Resets evolution for this force to zero.
Resets evolution for this force to zero.
play_sound(sound_specification) |  | Play a sound for every player in this force. [...]
Play a sound for every player in this force. [...]
get_hand_crafting_disabled_for_recipe(recipe) | → boolean | Gets if the given recipe is explicitly disabled from being hand crafted.
Gets if the given recipe is explicitly disabled from being hand crafted.
set_hand_crafting_disabled_for_recipe(recipe, hand_crafting_disabled) |  | Sets if the given recipe can be hand-crafted. [...]
Sets if the given recipe can be hand-crafted. [...]
add_research(technology) | → boolean | Add this technology to the back of the research queue if the queue is enabled. [...]
Add this technology to the back of the research queue if the queue is enabled. [...]
cancel_current_research() |  | Stop the research currently in progress. [...]
Stop the research currently in progress. [...]
get_linked_inventory(prototype, link_id) | → LuaInventory? | Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
is_friend(other) | → boolean | Is this force a friend? [...]
Is this force a friend? [...]
is_enemy(other) | → boolean | Is this force an enemy? [...]
Is this force an enemy? [...]
lock_space_location(name) |  | Locks the planet to not be accessible to this force.
Locks the planet to not be accessible to this force.
unlock_space_location(name) |  | Unlocks the planet to be accessible to this force.
Unlocks the planet to be accessible to this force.
is_space_location_unlocked(name) |  | Is the specified planet unlocked for this force?
Is the specified planet unlocked for this force?
lock_quality(quality) |  | Locks the quality to not be accessible to this force.
Locks the quality to not be accessible to this force.
unlock_quality(quality) |  | Unlocks the quality to be accessible to this force.
Unlocks the quality to be accessible to this force.
is_quality_unlocked(quality) |  | Is the specified quality unlocked for this force?
Is the specified quality unlocked for this force?
lock_space_platforms() |  | Locks the space platforms, which disables the space platforms button
Locks the space platforms, which disables the space platforms button
unlock_space_platforms() |  | Unlocks the space platforms, which enables the space platforms button
Unlocks the space platforms, which enables the space platforms button
is_space_platforms_unlocked() | → boolean | Are the space platforms unlocked? [...]
Are the space platforms unlocked? [...]
create_space_platform{name?=…, planet=…, starter_pack=…} | → LuaSpacePlatform? | Creates a new space platform on this force.
Creates a new space platform on this force.
get_evolution_factor(surface?) | → double | Fetches the evolution factor of this force on the given surface.
Fetches the evolution factor of this force on the given surface.
get_evolution_factor_by_pollution(surface?) | → double | Fetches the pollution part of the evolution factor of this force on the given surface.
Fetches the pollution part of the evolution factor of this force on the given surface.
get_evolution_factor_by_time(surface?) | → double | Fetches the time part of the evolution factor of this force on the given surface.
Fetches the time part of the evolution factor of this force on the given surface.
get_evolution_factor_by_killing_spawners(surface?) | → double | Fetches the spawner kill part of the evolution factor of this force on the given surface.
Fetches the spawner kill part of the evolution factor of this force on the given surface.
set_evolution_factor(factor, surface?) |  | Sets the evolution factor of this force on the given surface.
Sets the evolution factor of this force on the given surface.
set_evolution_factor_by_pollution(factor, surface?) |  | Sets the pollution part of the evolution factor of this force on the given surface.
Sets the pollution part of the evolution factor of this force on the given surface.
set_evolution_factor_by_time(factor, surface?) |  | Sets the time part of the evolution factor of this force on the given surface.
Sets the time part of the evolution factor of this force on the given surface.
set_evolution_factor_by_killing_spawners(factor, surface?) |  | Sets the spawner kill part of the evolution factor of this force on the given surface.
Sets the spawner kill part of the evolution factor of this force on the given surface.
get_item_production_statistics(surface) | → LuaFlowStatistics | The item production statistics for this force for the given surface.
The item production statistics for this force for the given surface.
get_fluid_production_statistics(surface) | → LuaFlowStatistics | The fluid production statistics for this force for the given surface.
The fluid production statistics for this force for the given surface.
get_kill_count_statistics(surface) | → LuaFlowStatistics | The kill counter statistics for this force for the given surface.
The kill counter statistics for this force for the given surface.
get_entity_build_count_statistics(surface) | → LuaFlowStatistics | The entity build statistics for this force (built and mined) for the given surface.
The entity build statistics for this force (built and mined) for the given surface.
get_logistic_groups(type?) | → array[string] | Gets the names of the current logistic groups.
Gets the names of the current logistic groups.
get_logistic_group(name, type?) | → LogisticGroup? | Gets the information about the given logistic group.
Gets the information about the given logistic group.
create_logistic_group(name, type?) |  | Creates the given group if it doesn't already exist.
Creates the given group if it doesn't already exist.
delete_logistic_group(name, type?) |  | Deletes the given logistic group if it exists.
Deletes the given logistic group if it exists.
get_chunk_chart(surface, chunk_position) | → string? | Gets the raw chart data for a given chunk as a binary string. [...]
Gets the raw chart data for a given chunk as a binary string. [...]
script_trigger_research(technology) |  | Trigger the "scripted" research trigger of a technology, researching it. [...]
Trigger the "scripted" research trigger of a technology, researching it. [...]
name | :: R string | Name of the force.
Name of the force.
technologies | :: R LuaCustomTable[string → LuaTechnology] | Technologies owned by this force, indexed by `name`.
Technologies owned by this force, indexed by `name`.
recipes | :: R LuaCustomTable[string → LuaRecipe] | Recipes available to this force, indexed by `name`.
Recipes available to this force, indexed by `name`.
manual_mining_speed_modifier | :: RW double | Multiplier of the manual mining speed. [...]
Multiplier of the manual mining speed. [...]
manual_crafting_speed_modifier | :: RW double | Multiplier of the manual crafting speed. [...]
Multiplier of the manual crafting speed. [...]
laboratory_speed_modifier | :: RW double |
laboratory_productivity_bonus | :: RW double |
worker_robots_speed_modifier | :: RW double |
worker_robots_battery_modifier | :: RW double |
worker_robots_storage_bonus | :: RW double |
current_research | :: R LuaTechnology? | The currently ongoing technology research, if any.
The currently ongoing technology research, if any.
research_progress | :: RW double | Progress of current research, as a number in range `[0, 1]`.
Progress of current research, as a number in range `[0, 1]`.
previous_research | :: RW LuaTechnology? | The previous research, if any.
The previous research, if any.
inserter_stack_size_bonus | :: RW double | The inserter stack size bonus for non stack inserters
The inserter stack size bonus for non stack inserters
bulk_inserter_capacity_bonus | :: RW uint32 | Number of items that can be transferred by bulk inserters. [...]
Number of items that can be transferred by bulk inserters. [...]
belt_stack_size_bonus | :: RW uint32 | Belt stack size bonus.
Belt stack size bonus.
character_trash_slot_count | :: RW double | Number of character trash slots.
Number of character trash slots.
maximum_following_robot_count | :: RW uint32 | Maximum number of follower robots.
Maximum number of follower robots.
following_robots_lifetime_modifier | :: RW double | Additional lifetime for following robots.
Additional lifetime for following robots.
create_ghost_on_entity_death | :: RW boolean | When an entity dies, a ghost will be placed for automatic reconstruction.
When an entity dies, a ghost will be placed for automatic reconstruction.
circuit_network_enabled | :: RW boolean |
cliff_deconstruction_enabled | :: RW boolean | When true, cliffs will be marked for deconstruction when trying to force-build things that collide.
When true, cliffs will be marked for deconstruction when trying to force-build things that collide.
mining_with_fluid | :: RW boolean |
rail_support_on_deep_oil_ocean | :: RW boolean |
rail_planner_allow_elevated_rails | :: RW boolean |
vehicle_logistics | :: RW boolean | When true, cars/tanks that support logistics will be able to use them.
When true, cars/tanks that support logistics will be able to use them.
players | :: R array[LuaPlayer] | Players belonging to this force.
Players belonging to this force.
ai_controllable | :: RW boolean | Enables some higher-level AI behaviour for this force. [...]
Enables some higher-level AI behaviour for this force. [...]
logistic_networks | :: R dictionary[string → array[LuaLogisticNetwork]] | List of logistic networks, grouped by surface.
List of logistic networks, grouped by surface.
character_running_speed_modifier | :: RW double | Modifies the running speed of all characters in this force by the given value as a percentage. [...]
Modifies the running speed of all characters in this force by the given value as a percentage. [...]
artillery_range_modifier | :: RW double |
beacon_distribution_modifier | :: RW double |
character_build_distance_bonus | :: RW uint32 |
character_item_drop_distance_bonus | :: RW uint32 |
character_reach_distance_bonus | :: RW uint32 |
character_resource_reach_distance_bonus | :: RW double |
character_item_pickup_distance_bonus | :: RW double |
character_loot_pickup_distance_bonus | :: RW double |
character_inventory_slots_bonus | :: RW uint32 | The number of additional inventory slots the character main inventory has.
The number of additional inventory slots the character main inventory has.
deconstruction_time_to_live | :: RW uint32 | The time, in ticks, before a deconstruction order is removed.
The time, in ticks, before a deconstruction order is removed.
character_health_bonus | :: RW double |
max_successful_attempts_per_tick_per_construction_queue | :: RW uint32 |
max_failed_attempts_per_tick_per_construction_queue | :: RW uint32 |
character_logistic_requests | :: RW boolean | `true` if character requester logistics is enabled.
`true` if character requester logistics is enabled.
rockets_launched | :: RW uint32 | The number of rockets launched.
The number of rockets launched.
items_launched | :: R dictionary[string → ItemCountType] | All of the items that have been launched in rockets.
All of the items that have been launched in rockets.
connected_players | :: R array[LuaPlayer] | The connected players belonging to this force. [...]
The connected players belonging to this force. [...]
mining_drill_productivity_bonus | :: RW double |
train_braking_force_bonus | :: RW double |
friendly_fire | :: RW boolean | If friendly fire is enabled for this force.
If friendly fire is enabled for this force.
share_chart | :: RW boolean | If sharing chart data is enabled for this force.
If sharing chart data is enabled for this force.
index | :: R uint32 | This force's index in LuaGameScript::forces (unique ID). [...]
This force's index in LuaGameScript::forces (unique ID). [...]
research_queue | :: RW array[TechnologyID] | The research queue of this force. [...]
The research queue of this force. [...]
research_enabled | :: R boolean | Whether research is enabled for this force, see LuaForce::enable_research and LuaForce::disable_research.
Whether research is enabled for this force, see LuaForce::enable_research and LuaForce::disable_research.
platforms | :: R dictionary[uint32 → LuaSpacePlatform] | The space platforms that belong to this force mapped by their index value. [...]
The space platforms that belong to this force mapped by their index value. [...]
custom_color | :: RW Color? | Custom color for this force. [...]
Custom color for this force. [...]
color | :: R Color | Effective color of this force.
Effective color of this force.
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. [...]

## Class LuaFuelCategoryPrototype extends LuaPrototypeBase

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. [...]

## Class LuaFurnaceControlBehavior extends LuaGenericOnOffControlBehavior

circuit_read_contents | :: RW boolean | `true` if the furnace reads its ingredients contents, product contents and materials in crafting.
`true` if the furnace reads its ingredients contents, product contents and materials in crafting.
include_in_crafting | :: RW boolean | `true` if the read contents should include items in crafting.
`true` if the read contents should include items in crafting.
include_fuel | :: RW boolean | `true` if the read contents should include fuel (content of energy source)
`true` if the read contents should include fuel (content of energy source)
circuit_read_ingredients | :: RW boolean | `true` if the furnace outputs ingredients of current recipe as a signals to circuit network.
`true` if the furnace outputs ingredients of current recipe as a signals to circuit network.
circuit_read_recipe_finished | :: RW boolean | `true` if the the furnace sends a signal when the recipe finishes.
`true` if the the furnace sends a signal when the recipe finishes.
circuit_recipe_finished_signal | :: RW SignalID? | The signal sent when the furnace finishes a recipe.
The signal sent when the furnace finishes a recipe.
circuit_read_working | :: RW boolean | `true` if the the furnace sends a signal when it is working.
`true` if the the furnace sends a signal when it is working.
circuit_working_signal | :: RW SignalID? | The signal sent when the furnace is working.
The signal sent when the furnace is working.
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. [...]

## Class LuaGameScript

set_game_state{game_finished?=…, player_won?=…, next_level?=…, can_continue?=…} |  | Set scenario state. [...]
Set scenario state. [...]
reset_game_state() |  | Reset scenario state (game_finished, player_won, etc.).
Reset scenario state (game_finished, player_won, etc.).
set_win_ending_info{title=…, message?=…, bullet_points?=…, final_message?=…, image_path?=…} |  | Set winning ending information for the current scenario.
Set winning ending information for the current scenario.
set_lose_ending_info{title=…, message?=…, bullet_points?=…, final_message?=…, image_path?=…} |  | Set losing ending information for the current scenario.
Set losing ending information for the current scenario.
get_entity_by_tag(tag) | → LuaEntity? | Gets an entity by its name tag. [...]
Gets an entity by its name tag. [...]
show_message_dialog{text=…, image?=…, point_to?=…, style?=…, wrapper_frame_style?=…} |  | Show an in-game message dialog. [...]
Show an in-game message dialog. [...]
is_demo() | → boolean | Is this the demo version of Factorio?
Is this the demo version of Factorio?
reload_script() |  | Forces a reload of the scenario script from the original scenario location. [...]
Forces a reload of the scenario script from the original scenario location. [...]
reload_mods() |  | Forces a reload of all mods. [...]
Forces a reload of all mods. [...]
save_atlas() |  | Saves the current configuration of Atlas to a file. [...]
Saves the current configuration of Atlas to a file. [...]
check_consistency() |  | Run internal consistency checks. [...]
Run internal consistency checks. [...]
regenerate_entity(entities) |  | Regenerate autoplacement of some entities on all surfaces. [...]
Regenerate autoplacement of some entities on all surfaces. [...]
take_screenshot{player?=…, by_player?=…, surface?=…, position?=…, resolution?=…, zoom?=…, path?=…, show_gui?=…, show_entity_info?=…, show_cursor_building_preview?=…, anti_alias?=…, hide_clouds?=…, hide_fog?=…, quality?=…, allow_in_replay?=…, daytime?=…, water_tick?=…, force_render?=…} |  | Take a screenshot of the game and save it to the `script-output` folder, located in the game's user data directory. [...]
Take a screenshot of the game and save it to the `script-output` folder, located in the game's user data directory. [...]
set_wait_for_screenshots_to_finish() |  | Forces the screenshot saving system to wait until all queued screenshots have been written to disk.
Forces the screenshot saving system to wait until all queued screenshots have been written to disk.
take_technology_screenshot{path?=…, player=…, selected_technology?=…, skip_disabled?=…, quality?=…} |  | Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's user data directory. [...]
Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's user data directory. [...]
remove_offline_players(players?) |  | Remove players who are currently not connected from the map.
Remove players who are currently not connected from the map.
force_crc() |  | Force a CRC check. [...]
Force a CRC check. [...]
create_force(force) | → LuaForce | Create a new force. [...]
Create a new force. [...]
merge_forces(source, destination) |  | Marks two forces to be merged together. [...]
Marks two forces to be merged together. [...]
create_surface(name, settings?) | → LuaSurface | Create a new surface. [...]
Create a new surface. [...]
server_save(name?) |  | Instruct the server to save the map. [...]
Instruct the server to save the map. [...]
auto_save(name?) |  | Instruct the game to perform an auto-save. [...]
Instruct the game to perform an auto-save. [...]
delete_surface(surface) | → boolean | Deletes the given surface and all entities on it if possible.
Deletes the given surface and all entities on it if possible.
disable_replay() |  | Disables replay saving for the current save file. [...]
Disables replay saving for the current save file. [...]
print(message, print_settings?) |  | Print text to the chat console all players. [...]
Print text to the chat console all players. [...]
create_random_generator(seed?) | → LuaRandomGenerator | Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used. [...]
Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used. [...]
play_sound(sound_specification) |  | Play a sound for every player in the game. [...]
Play a sound for every player in the game. [...]
kick_player(player, reason?) |  | Kicks the given player from this multiplayer game. [...]
Kicks the given player from this multiplayer game. [...]
ban_player(player, reason?) |  | Bans the given player from this multiplayer game. [...]
Bans the given player from this multiplayer game. [...]
unban_player(player) |  | Unbans the given player from this multiplayer game. [...]
Unbans the given player from this multiplayer game. [...]
purge_player(player) |  | Purges the given players messages from the game. [...]
Purges the given players messages from the game. [...]
mute_player(player) |  | Mutes the given player. [...]
Mutes the given player. [...]
unmute_player(player) |  | Unmutes the given player. [...]
Unmutes the given player. [...]
is_multiplayer() | → boolean | Whether the save is loaded as a multiplayer map.
Whether the save is loaded as a multiplayer map.
get_map_exchange_string() | → string | Gets the map exchange string for the map generation settings that were used to create this map.
Gets the map exchange string for the map generation settings that were used to create this map.
get_player(player) | → LuaPlayer? | Gets the given player or returns `nil` if no player is found.
Gets the given player or returns `nil` if no player is found.
get_surface(surface) | → LuaSurface? | Gets the given surface or returns `nil` if no surface is found. [...]
Gets the given surface or returns `nil` if no surface is found. [...]
create_profiler(stopped?) | → LuaProfiler | Creates a LuaProfiler, which is used for measuring script performance. [...]
Creates a LuaProfiler, which is used for measuring script performance. [...]
create_inventory(size, gui_title?) | → LuaInventory | Creates an inventory that is not owned by any game object. [...]
Creates an inventory that is not owned by any game object. [...]
get_script_inventories(mod?) | → dictionary[string → array[LuaInventory]] | Gets the inventories created through LuaGameScript::create_inventory. [...]
Gets the inventories created through LuaGameScript::create_inventory. [...]
reset_time_played() |  | Resets the amount of time played for this map.
Resets the amount of time played for this map.
get_pollution_statistics(surface) | → LuaFlowStatistics | The pollution statistics for this the given surface.
The pollution statistics for this the given surface.
get_vehicles{unit_number?=…, force?=…, surface?=…, type?=…, is_moving?=…, has_passenger?=…} | → array[LuaEntity] | Returns vehicles in game.
Returns vehicles in game.
get_entity_by_unit_number(unit_number) | → LuaEntity? | Returns entity with a specified unit number or nil if entity with such number was not found or prototype does not have EntityPrototypeFlags::get-by-unit-number flag set.
Returns entity with a specified unit number or nil if entity with such number was not found or prototype does not have EntityPrototypeFlags::get-by-unit-number flag set.
allow_debug_settings | :: RW boolean | Whether players who are not admins can access all debug settings. [...]
Whether players who are not admins can access all debug settings. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]
player | :: R LuaPlayer? | This property is only populated inside custom command handlers and when writing Lua console commands. [...]
This property is only populated inside custom command handlers and when writing Lua console commands. [...]
players | :: R LuaCustomTable[uint32 or string → LuaPlayer] | Get a table of all the players that currently exist. [...]
Get a table of all the players that currently exist. [...]
map_settings | :: R MapSettings | The currently active set of map settings. [...]
The currently active set of map settings. [...]
difficulty_settings | :: R DifficultySettings | The currently active set of difficulty settings. [...]
The currently active set of difficulty settings. [...]
difficulty | :: R defines.difficulty | Current scenario difficulty.
Current scenario difficulty.
forces | :: R LuaCustomTable[uint32 or string → LuaForce] | Get a table of all the forces that currently exist. [...]
Get a table of all the forces that currently exist. [...]
console_command_used | :: R boolean | Whether a console command has been used.
Whether a console command has been used.
simulation | :: R LuaSimulation | Simulation-related functions, or `nil` if the current game is not a simulation.
Simulation-related functions, or `nil` if the current game is not a simulation.
tick | :: R MapTick | Current map tick.
Current map tick.
ticks_played | :: R MapTick | The number of ticks since this game was created using either "new game" or "new game from scenario". [...]
The number of ticks since this game was created using either "new game" or "new game from scenario". [...]
tick_paused | :: RW boolean | If the tick has been paused. [...]
If the tick has been paused. [...]
ticks_to_run | :: RW uint32 | The number of ticks to be run while the tick is paused. [...]
The number of ticks to be run while the tick is paused. [...]
finished | :: R boolean | True while the victory screen is shown.
True while the victory screen is shown.
finished_but_continuing | :: R boolean | True after players finished the game and clicked "continue".
True after players finished the game and clicked "continue".
speed | :: RW float | Speed to update the map at. [...]
Speed to update the map at. [...]
surfaces | :: R LuaCustomTable[uint32 or string → LuaSurface] | Get a table of all the surfaces that currently exist. [...]
Get a table of all the surfaces that currently exist. [...]
planets | :: R LuaCustomTable[string → LuaPlanet] |
connected_players | :: R array[LuaPlayer] | The players that are currently online. [...]
The players that are currently online. [...]
permissions | :: R LuaPermissionGroups |
backer_names | :: R LuaCustomTable[uint32 → string] | Array of the names of all the backers that supported the game development early on. [...]
Array of the names of all the backers that supported the game development early on. [...]
default_map_gen_settings | :: R MapGenSettings | The default map gen settings for this save.
The default map gen settings for this save.
enemy_has_vision_on_land_mines | :: RW boolean | Determines if enemy land mines are completely invisible or not.
Determines if enemy land mines are completely invisible or not.
autosave_enabled | :: RW boolean | True by default. [...]
True by default. [...]
draw_resource_selection | :: RW boolean | True by default. [...]
True by default. [...]
train_manager | :: R LuaTrainManager |
blueprints | :: R array[LuaRecord] | Records contained in the "game blueprints" tab of the blueprint library.
Records contained in the "game blueprints" tab of the blueprint library.
technology_notifications_enabled | :: RW boolean | True by default. [...]
True by default. [...]
allow_tip_activation | :: RW boolean | If the tips are allowed to be activated in this scenario, it is false by default. [...]
If the tips are allowed to be activated in this scenario, it is false by default. [...]

## Class LuaGenericOnOffControlBehavior extends LuaControlBehavior abstract

disabled | :: R boolean | If the entity is currently disabled because of the control behavior.
If the entity is currently disabled because of the control behavior.
circuit_enable_disable | :: RW boolean | `true` if this entity enable/disable state is controlled by circuit condition
`true` if this entity enable/disable state is controlled by circuit condition
circuit_condition | :: RW CircuitConditionDefinition? | The circuit condition. [...]
The circuit condition. [...]
connect_to_logistic_network | :: RW boolean | `true` if this should connect to the logistic network.
`true` if this should connect to the logistic network.
logistic_condition | :: RW CircuitConditionDefinition? | The logistic condition. [...]
The logistic condition. [...]

## Class LuaGroup

name | :: R string |
localised_name | :: R LocalisedString | Localised name of the group.
Localised name of the group.
type | :: R string |
group | :: R LuaGroup | The parent group.
The parent group.
subgroups | :: R array[LuaGroup] | Subgroups of this group.
Subgroups of this group.
order_in_recipe | :: R string | The additional order value used in recipe ordering.
The additional order value used in recipe ordering.
order | :: R string | The string used to alphabetically sort these prototypes. [...]
The string used to alphabetically sort these prototypes. [...]
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. [...]

## Class LuaGui

player | :: R LuaPlayer | The player who owns this gui.
The player who owns this gui.
children | :: R dictionary[string → LuaGuiElement] | The children GUI elements mapped by name <> element.
The children GUI elements mapped by name <> element.
top | :: R LuaGuiElement | The top part of the GUI. [...]
The top part of the GUI. [...]
left | :: R LuaGuiElement | The left part of the GUI. [...]
The left part of the GUI. [...]
center | :: R LuaGuiElement | The center part of the GUI. [...]
The center part of the GUI. [...]
goal | :: R LuaGuiElement | The flow used in the objectives window. [...]
The flow used in the objectives window. [...]
screen | :: R LuaGuiElement | For showing a GUI somewhere on the entire screen. [...]
For showing a GUI somewhere on the entire screen. [...]
relative | :: R LuaGuiElement | For showing a GUI somewhere relative to one of the game GUIs. [...]
For showing a GUI somewhere relative to one of the game GUIs. [...]
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. [...]

## Class LuaGuiElement

add{type=…, name?=…, caption?=…, tooltip?=…, elem_tooltip?=…, enabled?=…, visible?=…, locked?=…, ignored_by_interaction?=…, style?=…, tags?=…, index?=…, anchor?=…, game_controller_interaction?=…, raise_hover_events?=…} | → LuaGuiElement | Add a new child element to this GuiElement.
Add a new child element to this GuiElement.
clear() |  | Remove children of this element. [...]
Remove children of this element. [...]
destroy() |  | Remove this element, along with its children. [...]
Remove this element, along with its children. [...]
get_mod() | → string? | The mod that owns this Gui element or `nil` if it's owned by the scenario script. [...]
The mod that owns this Gui element or `nil` if it's owned by the scenario script. [...]
get_index_in_parent() | → uint32 | Gets the index that this element has in its parent element. [...]
Gets the index that this element has in its parent element. [...]
swap_children(index_1, index_2) |  | Swaps the children at the given indices in this element.
Swaps the children at the given indices in this element.
clear_items() |  | Removes the items in this dropdown or listbox.
Removes the items in this dropdown or listbox.
get_item(index) | → LocalisedString | Gets the item at the given index from this dropdown or listbox.
Gets the item at the given index from this dropdown or listbox.
set_item(index, string) |  | Sets the given string at the given index in this dropdown or listbox.
Sets the given string at the given index in this dropdown or listbox.
add_item(string, index?) |  | Inserts a string at the end or at the given index of this dropdown or listbox.
Inserts a string at the end or at the given index of this dropdown or listbox.
remove_item(index) |  | Removes the item at the given index from this dropdown or listbox.
Removes the item at the given index from this dropdown or listbox.
get_slider_minimum() | → double | Gets this sliders minimum value.
Gets this sliders minimum value.
get_slider_maximum() | → double | Gets this sliders maximum value.
Gets this sliders maximum value.
set_slider_minimum_maximum(minimum, maximum) |  | Sets this sliders minimum and maximum values. [...]
Sets this sliders minimum and maximum values. [...]
get_slider_value_step() | → double | Gets the minimum distance this slider can move.
Gets the minimum distance this slider can move.
get_slider_discrete_values() | → boolean | Returns whether this slider only allows discrete values.
Returns whether this slider only allows discrete values.
set_slider_value_step(value) |  | Sets the minimum distance this slider can move. [...]
Sets the minimum distance this slider can move. [...]
set_slider_discrete_values(value) |  | Sets whether this slider only allows discrete values.
Sets whether this slider only allows discrete values.
focus() |  | Focuses this GUI element if possible.
Focuses this GUI element if possible.
scroll_to_top() |  | Scrolls this scroll bar to the top.
Scrolls this scroll bar to the top.
scroll_to_bottom() |  | Scrolls this scroll bar to the bottom.
Scrolls this scroll bar to the bottom.
scroll_to_left() |  | Scrolls this scroll bar to the left.
Scrolls this scroll bar to the left.
scroll_to_right() |  | Scrolls this scroll bar to the right.
Scrolls this scroll bar to the right.
scroll_to_element(element, scroll_mode?) |  | Scrolls this scroll bar such that the specified GUI element is visible to the player.
Scrolls this scroll bar such that the specified GUI element is visible to the player.
select_all() |  | Selects all the text in this textbox.
Selects all the text in this textbox.
select(start_index, end_index) |  | Selects a range of text in this textbox.
Selects a range of text in this textbox.
add_tab(tab, content) |  | Adds the given tab and content widgets to this tabbed pane as a new tab.
Adds the given tab and content widgets to this tabbed pane as a new tab.
remove_tab(tab?) |  | Removes the given tab and its associated content from this tabbed pane. [...]
Removes the given tab and its associated content from this tabbed pane. [...]
force_auto_center() |  | Forces this frame to re-auto-center. [...]
Forces this frame to re-auto-center. [...]
scroll_to_item(index, scroll_mode?) |  | Scrolls the scroll bar such that the specified listbox item is visible to the player.
Scrolls the scroll bar such that the specified listbox item is visible to the player.
bring_to_front() |  | Moves this GUI element to the "front" so it will draw over other elements. [...]
Moves this GUI element to the "front" so it will draw over other elements. [...]
close_dropdown() |  | Closes the dropdown list if this is a dropdown and it is open.
Closes the dropdown list if this is a dropdown and it is open.
index | :: R uint32 | The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
gui | :: R LuaGui | The GUI this element is a child of.
The GUI this element is a child of.
parent | :: R LuaGuiElement? | The direct parent of this element. [...]
The direct parent of this element. [...]
name | :: RW string | The name of this element. [...]
The name of this element. [...]
caption | :: RW LocalisedString | The text displayed on this element. [...]
The text displayed on this element. [...]
value | :: RW double | How much this progress bar is filled. [...]
How much this progress bar is filled. [...]
direction | :: R GuiDirection | Direction of this element's layout.
Direction of this element's layout.
style | :: RW LuaStyle or string | The style of this element. [...]
The style of this element. [...]
visible | :: RW boolean | Sets whether this GUI element is visible or completely hidden, taking no space in the layout.
Sets whether this GUI element is visible or completely hidden, taking no space in the layout.
text | :: RW string | The text contained in this textfield or text-box.
The text contained in this textfield or text-box.
children_names | :: R array[string] | Names of all the children of this element. [...]
Names of all the children of this element. [...]
state | :: RW boolean | Is this checkbox or radiobutton checked?
Is this checkbox or radiobutton checked?
player_index | :: R uint32 | Index into LuaGameScript::players specifying the player who owns this element.
Index into LuaGameScript::players specifying the player who owns this element.
sprite | :: RW SpritePath | The sprite to display on this sprite-button or sprite in the default state.
The sprite to display on this sprite-button or sprite in the default state.
resize_to_sprite | :: RW boolean | Whether the sprite widget should resize according to the sprite in it. [...]
Whether the sprite widget should resize according to the sprite in it. [...]
hovered_sprite | :: RW SpritePath | The sprite to display on this sprite-button when it is hovered.
The sprite to display on this sprite-button when it is hovered.
clicked_sprite | :: RW SpritePath | The sprite to display on this sprite-button when it is clicked.
The sprite to display on this sprite-button when it is clicked.
tooltip | :: RW LocalisedString | The text to display when hovering over this element. [...]
The text to display when hovering over this element. [...]
elem_tooltip | :: RW ElemID? | The element tooltip to display when hovering over this element, or `nil`.
The element tooltip to display when hovering over this element, or `nil`.
horizontal_scroll_policy | :: RW ScrollPolicy | Policy of the horizontal scroll bar.
Policy of the horizontal scroll bar.
vertical_scroll_policy | :: RW ScrollPolicy | Policy of the vertical scroll bar.
Policy of the vertical scroll bar.
type | :: R GuiElementType | The type of this GUI element.
The type of this GUI element.
children | :: R array[LuaGuiElement] | The child-elements of this GUI element.
The child-elements of this GUI element.
items | :: RW array[LocalisedString] | The items in this dropdown or listbox.
The items in this dropdown or listbox.
selected_index | :: RW uint32 | The selected index for this dropdown or listbox. [...]
The selected index for this dropdown or listbox. [...]
quality | :: R LuaQualityPrototype| W QualityID? | The quality to be shown in the bottom left corner of this sprite-button, or `nil` to show nothing.
The quality to be shown in the bottom left corner of this sprite-button, or `nil` to show nothing.
number | :: RW double? | The number to be shown in the bottom right corner of this sprite-button, or `nil` to show nothing.
The number to be shown in the bottom right corner of this sprite-button, or `nil` to show nothing.
show_percent_for_small_numbers | :: RW boolean | Related to the number to be shown in the bottom right corner of this sprite-button. [...]
Related to the number to be shown in the bottom right corner of this sprite-button. [...]
location | :: RW GuiLocation? | The location of this widget when stored in LuaGui::screen. [...]
The location of this widget when stored in LuaGui::screen. [...]
auto_center | :: RW boolean | Whether this frame auto-centers on window resize when stored in LuaGui::screen.
Whether this frame auto-centers on window resize when stored in LuaGui::screen.
badge_text | :: RW LocalisedString | The text to display after the normal tab text (designed to work with numbers)
The text to display after the normal tab text (designed to work with numbers)
auto_toggle | :: RW boolean | Whether this button will automatically toggle when clicked.
Whether this button will automatically toggle when clicked.
toggled | :: RW boolean | Whether this button is currently toggled. [...]
Whether this button is currently toggled. [...]
game_controller_interaction | :: RW defines.game_controller_interaction | How this element should interact with game controllers.
How this element should interact with game controllers.
position | :: RW MapPosition | The position this camera or minimap is focused on, if any.
The position this camera or minimap is focused on, if any.
surface_index | :: RW uint32 | The surface index this camera or minimap is using.
The surface index this camera or minimap is using.
zoom | :: RW double | The zoom this camera or minimap is using. [...]
The zoom this camera or minimap is using. [...]
minimap_player_index | :: RW uint32 | The player index this minimap is using.
The player index this minimap is using.
force | :: RW string? | The force this minimap is using, if any.
The force this minimap is using, if any.
elem_type | :: R ElemType | The elem type of this choose-elem-button.
The elem type of this choose-elem-button.
elem_value | :: RW string or SignalID or PrototypeWithQuality? | The elem value of this choose-elem-button, if any. [...]
The elem value of this choose-elem-button, if any. [...]
elem_filters | :: RW PrototypeFilter? | The elem filters of this choose-elem-button, if any. [...]
The elem filters of this choose-elem-button, if any. [...]
selectable | :: RW boolean | Whether the contents of this text-box are selectable. [...]
Whether the contents of this text-box are selectable. [...]
word_wrap | :: RW boolean | Whether this text-box will word-wrap automatically. [...]
Whether this text-box will word-wrap automatically. [...]
read_only | :: RW boolean | Whether this text-box is read-only. [...]
Whether this text-box is read-only. [...]
enabled | :: RW boolean | Whether this GUI element is enabled. [...]
Whether this GUI element is enabled. [...]
ignored_by_interaction | :: RW boolean | Whether this GUI element is ignored by interaction. [...]
Whether this GUI element is ignored by interaction. [...]
locked | :: RW boolean | Whether this choose-elem-button can be changed by the player.
Whether this choose-elem-button can be changed by the player.
draw_vertical_lines | :: RW boolean | Whether this table should draw vertical grid lines.
Whether this table should draw vertical grid lines.
draw_horizontal_lines | :: RW boolean | Whether this table should draw horizontal grid lines.
Whether this table should draw horizontal grid lines.
draw_horizontal_line_after_headers | :: RW boolean | Whether this table should draw a horizontal grid line below the first table row.
Whether this table should draw a horizontal grid line below the first table row.
column_count | :: R uint32 | The number of columns in this table.
The number of columns in this table.
vertical_centering | :: RW boolean | Whether the content of this table should be vertically centered. [...]
Whether the content of this table should be vertically centered. [...]
slider_value | :: RW double | The value of this slider element.
The value of this slider element.
mouse_button_filter | :: RW MouseButtonFlags | The mouse button filters for this button or sprite-button.
The mouse button filters for this button or sprite-button.
numeric | :: RW boolean | Whether this textfield is limited to only numeric characters.
Whether this textfield is limited to only numeric characters.
allow_decimal | :: RW boolean | Whether this textfield (when in numeric mode) allows decimal numbers.
Whether this textfield (when in numeric mode) allows decimal numbers.
allow_negative | :: RW boolean | Whether this textfield (when in numeric mode) allows negative numbers.
Whether this textfield (when in numeric mode) allows negative numbers.
is_password | :: RW boolean | Whether this textfield displays as a password field, which renders all characters as `*`.
Whether this textfield displays as a password field, which renders all characters as `*`.
lose_focus_on_confirm | :: RW boolean | Whether this textfield loses focus after defines.events.on_gui_confirmed is fired.
Whether this textfield loses focus after defines.events.on_gui_confirmed is fired.
icon_selector | :: R boolean | Whether this textfield or text-box was created with an icon selector.
Whether this textfield or text-box was created with an icon selector.
drag_target | :: RW LuaGuiElement? | The `frame` that is being moved when dragging this GUI element, if any. [...]
The `frame` that is being moved when dragging this GUI element, if any. [...]
selected_tab_index | :: RW uint32? | The selected tab index for this tabbed pane, if any.
The selected tab index for this tabbed pane, if any.
tabs | :: R array[TabAndContent] | The tabs and contents being shown in this tabbed-pane.
The tabs and contents being shown in this tabbed-pane.
entity | :: RW LuaEntity? | The entity associated with this entity-preview, camera, minimap, if any.
The entity associated with this entity-preview, camera, minimap, if any.
anchor | :: RW GuiAnchor? | The anchor for this relative widget, if any. [...]
The anchor for this relative widget, if any. [...]
tags | :: RW Tags | The tags associated with this LuaGuiElement.
The tags associated with this LuaGuiElement.
raise_hover_events | :: RW boolean | Whether this element will raise on_gui_hover and on_gui_leave.
Whether this element will raise on_gui_hover and on_gui_leave.
switch_state | :: RW SwitchState | The switch state for this switch. [...]
The switch state for this switch. [...]
allow_none_state | :: RW boolean | Whether the `"none"` state is allowed for this switch. [...]
Whether the `"none"` state is allowed for this switch. [...]
left_label_caption | :: RW LocalisedString | The text shown for the left switch label.
The text shown for the left switch label.
left_label_tooltip | :: RW LocalisedString | The tooltip shown on the left switch label.
The tooltip shown on the left switch label.
right_label_caption | :: RW LocalisedString | The text shown for the right switch label.
The text shown for the right switch label.
right_label_tooltip | :: RW LocalisedString | The tooltip shown on the right switch label.
The tooltip shown on the right switch label.
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. [...]
[] (index) | :: R LuaGuiElement? | The indexing operator. [...]
The indexing operator. [...]

## Class LuaHeatBufferPrototype

max_temperature | :: R double |
default_temperature | :: R double |
specific_heat | :: R double |
max_transfer | :: R double |
min_temperature_gradient | :: R double |
min_working_temperature | :: R double |
minimum_glow_temperature | :: R double |
connections | :: R array[HeatConnection] |
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. [...]

## Class LuaHeatEnergySourcePrototype

emissions_per_joule | :: R dictionary[string → double] | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
render_no_network_icon | :: R boolean |
render_no_power_icon | :: R boolean |
max_temperature | :: R double |
default_temperature | :: R double |
specific_heat | :: R double |
max_transfer | :: R double |
min_temperature_gradient | :: R double |
min_working_temperature | :: R double |
minimum_glow_temperature | :: R double |
connections | :: R array[HeatConnection] |
heat_buffer_prototype | :: R LuaHeatBufferPrototype |
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. [...]

## Class LuaHelpers

table_to_json(data) | → string | Convert a table to a JSON string
Convert a table to a JSON string
json_to_table(json) | → AnyBasic? | Convert a JSON string to a table.
Convert a JSON string to a table.
write_file(filename, data, append?, for_player?) |  | Write a file to the `script-output` folder, located in the game's user data directory. [...]
Write a file to the `script-output` folder, located in the game's user data directory. [...]
send_udp(port, data, for_player?) |  | Send data to a UDP port on localhost for a specified player, if enabled. [...]
Send data to a UDP port on localhost for a specified player, if enabled. [...]
recv_udp(for_player?) |  | Dispatch defines.events.on_udp_packet_received events for any new packets received by the specified player or the server. [...]
Dispatch defines.events.on_udp_packet_received events for any new packets received by the specified player or the server. [...]
remove_path(path) |  | Remove a file or directory in the `script-output` folder, located in the game's user data directory. [...]
Remove a file or directory in the `script-output` folder, located in the game's user data directory. [...]
direction_to_string(direction) | → string | Converts the given direction into the string version of the direction.
Converts the given direction into the string version of the direction.
evaluate_expression(expression, variables?) | → double | Evaluate an expression, substituting variables as provided.
Evaluate an expression, substituting variables as provided.
encode_string(string) | → string? | Deflates and base64 encodes the given string.
Deflates and base64 encodes the given string.
decode_string(string) | → string? | Base64 decodes and inflates the given string.
Base64 decodes and inflates the given string.
parse_map_exchange_string(map_exchange_string) | → MapExchangeStringData | Convert a map exchange string to map gen settings and map settings. [...]
Convert a map exchange string to map gen settings and map settings. [...]
check_prototype_translations() |  | Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect. [...]
Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect. [...]
is_valid_sound_path(sound_path) | → boolean | Checks if the given SoundPath is valid. [...]
Checks if the given SoundPath is valid. [...]
is_valid_sprite_path(sprite_path) | → boolean | Checks if the given SpritePath is valid and contains a loaded sprite. [...]
Checks if the given SpritePath is valid and contains a loaded sprite. [...]
create_profiler(stopped?) | → LuaProfiler | Creates a LuaProfiler, which is used for measuring script performance. [...]
Creates a LuaProfiler, which is used for measuring script performance. [...]
compare_versions(first, second) | → int32 | Compares 2 version strings.
Compares 2 version strings.
multilingual_to_lower(input) | → string | Converts the given string to lowercase and returns it. [...]
Converts the given string to lowercase and returns it. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]
game_version | :: R string | Current version of game
Current version of game

## Class LuaInserterControlBehavior extends LuaGenericOnOffControlBehavior

circuit_set_filters | :: RW boolean | `true` if filters are set from circuit network
`true` if filters are set from circuit network
circuit_read_hand_contents | :: RW boolean | `true` if the contents of the inserter hand should be sent to the circuit network
`true` if the contents of the inserter hand should be sent to the circuit network
circuit_hand_read_mode | :: RW defines.control_behavior.inserter.hand_read_mode | The hand read mode for the inserter.
The hand read mode for the inserter.
circuit_set_stack_size | :: RW boolean | If the stack size of the inserter is set through the circuit network or not.
If the stack size of the inserter is set through the circuit network or not.
circuit_stack_control_signal | :: RW SignalID? | The signal used to set the stack size of the inserter.
The signal used to set the stack size of the inserter.
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. [...]

## Class LuaInventory

clear() |  | Clear this inventory of all items so that it becomes empty.
Clear this inventory of all items so that it becomes empty.
can_insert(items) | → boolean | Can at least some items be inserted?
Can at least some items be inserted?
insert(items) | → uint32 | Insert items into this inventory.
Insert items into this inventory.
remove(items) | → uint32 | Remove items from this inventory.
Remove items from this inventory.
get_item_count(item?) | → uint32 | Get the number of all or some items in this inventory.
Get the number of all or some items in this inventory.
get_item_count_filtered(filter) | → uint32 | Get the number of items in this inventory that match provided filter.
Get the number of items in this inventory that match provided filter.
get_item_quality_counts(item?) | → dictionary[string → uint32] | Get the number of all or some items in this inventory, aggregated by quality.
Get the number of all or some items in this inventory, aggregated by quality.
is_empty() | → boolean | Does this inventory contain nothing?
Does this inventory contain nothing?
is_full() | → boolean | Is every stack in this inventory full? [...]
Is every stack in this inventory full? [...]
get_contents() | → array[ItemWithQualityCount] | Get counts of all items in this inventory.
Get counts of all items in this inventory.
supports_bar() | → boolean | Does this inventory support a bar? [...]
Does this inventory support a bar? [...]
get_bar() | → uint32 | Get the current bar. [...]
Get the current bar. [...]
set_bar(bar?) |  | Set the current bar. [...]
Set the current bar. [...]
supports_filters() | → boolean | If this inventory supports filters.
If this inventory supports filters.
is_filtered() | → boolean | If this inventory supports filters and has at least 1 filter set.
If this inventory supports filters and has at least 1 filter set.
can_set_filter(index, filter) | → boolean | If the given inventory slot filter can be set to the given filter.
If the given inventory slot filter can be set to the given filter.
get_filter(index) | → ItemFilter? | Gets the filter for the given item stack index.
Gets the filter for the given item stack index.
set_filter(index, filter) | → boolean | Sets the filter for the given item stack index. [...]
Sets the filter for the given item stack index. [...]
find_item_stack(item) | → LuaItemStack?, uint32? | Finds the first LuaItemStack in the inventory that matches the given item name.
Finds the first LuaItemStack in the inventory that matches the given item name.
find_empty_stack(item?) | → LuaItemStack?, uint32? | Finds the first empty stack. [...]
Finds the first empty stack. [...]
count_empty_stacks(include_filtered?, include_bar?) | → uint32 | Counts the number of empty stacks.
Counts the number of empty stacks.
get_insertable_count(item) | → uint32 | Gets the number of the given item that can be inserted into this inventory. [...]
Gets the number of the given item that can be inserted into this inventory. [...]
sort_and_merge() |  | Sorts and merges the items in this inventory.
Sorts and merges the items in this inventory.
resize(size) |  | Resizes the inventory. [...]
Resizes the inventory. [...]
destroy() |  | Destroys this inventory. [...]
Destroys this inventory. [...]
index | :: R defines.inventory? | The inventory index this inventory uses, if any.
The inventory index this inventory uses, if any.
name | :: R string? | Name of this inventory, if any. [...]
Name of this inventory, if any. [...]
entity_owner | :: R LuaEntity? | The entity that owns this inventory, if any.
The entity that owns this inventory, if any.
player_owner | :: R LuaPlayer? | The player that owns this inventory, if any.
The player that owns this inventory, if any.
equipment_owner | :: R LuaEquipment? | The equipment that owns this inventory, if any.
The equipment that owns this inventory, if any.
mod_owner | :: R string? | The mod that owns this inventory, if any.
The mod that owns this inventory, if any.
weight | :: R Weight | Gives a total weight of all items currently in this inventory.
Gives a total weight of all items currently in this inventory.
max_weight | :: R Weight? | Gives a maximum weight of items that can be inserted into this inventory.
Gives a maximum weight of items that can be inserted into this inventory.
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. [...]
[] (index) | :: R LuaItemStack | The indexing operator.
The indexing operator.
# (length) | :: R uint32 | Get the number of slots in this inventory.
Get the number of slots in this inventory.

## Class LuaItem extends LuaItemCommon

type | :: R string | Type of the item prototype
Type of the item prototype
name | :: R string | Name of the item prototype
Name of the item prototype
prototype | :: R LuaItemPrototype | Item prototype of this item
Item prototype of this item
quality | :: R LuaQualityPrototype | The quality of this item.
The quality of this item.
item_stack | :: R LuaItemStack? | Object representing the item stack this item is located in right now. [...]
Object representing the item stack this item is located in right now. [...]
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. [...]

## Class LuaItemCommon abstract

get_inventory(inventory) | → LuaInventory? | Access the inner inventory of an item.
Access the inner inventory of an item.
clear_blueprint() |  | Clears this blueprint item.
Clears this blueprint item.
is_blueprint_setup() | → boolean | Is this blueprint item setup? [...]
Is this blueprint item setup? [...]
build_blueprint{surface=…, force=…, position=…, direction?=…, build_mode?=…, skip_fog_of_war?=…, by_player?=…, raise_built?=…} | → array[LuaEntity] | Build this blueprint at the given location. [...]
Build this blueprint at the given location. [...]
create_blueprint{surface=…, force=…, area=…, always_include_tiles?=…, include_entities?=…, include_modules?=…, include_station_names?=…, include_trains?=…, include_fuel?=…} | → dictionary[uint32 → LuaEntity] | Sets up this blueprint using the found blueprintable entities/tiles on the surface.
Sets up this blueprint using the found blueprintable entities/tiles on the surface.
get_blueprint_entity_tags(index) | → Tags | Gets the tags for the given blueprint entity index in this blueprint item.
Gets the tags for the given blueprint entity index in this blueprint item.
set_blueprint_entity_tags(index, tags) |  | Sets the tags on the given blueprint entity index in this blueprint item.
Sets the tags on the given blueprint entity index in this blueprint item.
get_blueprint_entity_tag(index, tag) | → AnyBasic? | Gets the given tag on the given blueprint entity index in this blueprint item.
Gets the given tag on the given blueprint entity index in this blueprint item.
set_blueprint_entity_tag(index, tag, value) |  | Sets the given tag on the given blueprint entity index in this blueprint item.
Sets the given tag on the given blueprint entity index in this blueprint item.
get_blueprint_entities() | → array[BlueprintEntity]? | The entities in this blueprint.
The entities in this blueprint.
set_blueprint_entities(entities) |  | Set new entities to be a part of this blueprint.
Set new entities to be a part of this blueprint.
get_blueprint_tiles() | → array[Tile]? | A list of the tiles in this blueprint.
A list of the tiles in this blueprint.
set_blueprint_tiles(tiles) |  | Set specific tiles in this blueprint.
Set specific tiles in this blueprint.
get_blueprint_entity_count() | → uint32 | Gets the number of entities in this blueprint item.
Gets the number of entities in this blueprint item.
get_tag(tag_name) | → AnyBasic? | Gets the tag with the given name or returns `nil` if it doesn't exist.
Gets the tag with the given name or returns `nil` if it doesn't exist.
set_tag(tag_name, tag) |  | Sets the tag with the given name and value.
Sets the tag with the given name and value.
remove_tag(tag) | → boolean | Removes a tag with the given name.
Removes a tag with the given name.
get_entity_filter(index) | → ItemFilter? | Gets the entity filter at the given index for this deconstruction item.
Gets the entity filter at the given index for this deconstruction item.
set_entity_filter(index, filter) | → boolean | Sets the entity filter at the given index for this deconstruction item.
Sets the entity filter at the given index for this deconstruction item.
get_tile_filter(index) | → string? | Gets the tile filter at the given index for this deconstruction item.
Gets the tile filter at the given index for this deconstruction item.
set_tile_filter(index, filter) | → boolean | Sets the tile filter at the given index for this deconstruction item.
Sets the tile filter at the given index for this deconstruction item.
deconstruct_area{surface=…, force=…, area=…, skip_fog_of_war?=…, by_player?=…, super_forced?=…} |  | Deconstruct the given area with this deconstruction item.
Deconstruct the given area with this deconstruction item.
cancel_deconstruct_area{surface=…, force=…, area=…, skip_fog_of_war?=…, by_player?=…, super_forced?=…} |  | Cancel deconstruct the given area with this deconstruction item.
Cancel deconstruct the given area with this deconstruction item.
clear_deconstruction_item() |  | Clears all settings/filters on this deconstruction item resetting it to default values.
Clears all settings/filters on this deconstruction item resetting it to default values.
clear_upgrade_item() |  | Clears all settings/filters on this upgrade item resetting it to default values.
Clears all settings/filters on this upgrade item resetting it to default values.
get_mapper(index, type) | → UpgradeMapperSource or UpgradeMapperDestination? | Gets the filter at the given index for this upgrade item. [...]
Gets the filter at the given index for this upgrade item. [...]
set_mapper(index, type, mapper) |  | Sets the module filter at the given index for this upgrade item. [...]
Sets the module filter at the given index for this upgrade item. [...]
is_blueprint | :: R boolean | If this is a blueprint item.
If this is a blueprint item.
is_blueprint_book | :: R boolean | If this is a blueprint book item.
If this is a blueprint book item.
is_item_with_label | :: R boolean | If this is an item with label item.
If this is an item with label item.
is_item_with_inventory | :: R boolean | If this is an item with inventory item.
If this is an item with inventory item.
is_item_with_entity_data | :: R boolean | If this is an item with entity data item.
If this is an item with entity data item.
is_selection_tool | :: R boolean | If this is a selection tool item.
If this is a selection tool item.
is_item_with_tags | :: R boolean | If this is an item with tags item.
If this is an item with tags item.
is_deconstruction_item | :: R boolean | If this is a deconstruction tool item.
If this is a deconstruction tool item.
is_upgrade_item | :: R boolean | If this is a upgrade item.
If this is a upgrade item.
is_tool | :: R boolean | If this is a tool item.
If this is a tool item.
is_ammo | :: R boolean | If this is an ammo item.
If this is an ammo item.
is_armor | :: R boolean | If this is an armor item.
If this is an armor item.
is_repair_tool | :: R boolean | If this is a repair tool item.
If this is a repair tool item.
item_number | :: R uint64? | The unique identifier for this item, if any. [...]
The unique identifier for this item, if any. [...]
preview_icons | :: RW array[BlueprintSignalIcon]? | Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. [...]
Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. [...]
grid | :: R LuaEquipmentGrid? | The equipment grid of this item, if any.
The equipment grid of this item, if any.
owner_location | :: R ItemLocationData | The location of this item if it can be found.
The location of this item if it can be found.
blueprint_snap_to_grid | :: RW TilePosition? | The snapping grid size in this blueprint item. [...]
The snapping grid size in this blueprint item. [...]
blueprint_position_relative_to_grid | :: RW TilePosition? | The offset from the absolute grid. [...]
The offset from the absolute grid. [...]
blueprint_absolute_snapping | :: RW boolean | If absolute snapping is enabled on this blueprint item.
If absolute snapping is enabled on this blueprint item.
blueprint_description | :: RW string | The description for this blueprint or blueprint book
The description for this blueprint or blueprint book
cost_to_build | :: R array[ItemWithQualityCount] | List of raw materials required to build this blueprint.
List of raw materials required to build this blueprint.
default_icons | :: R array[BlueprintSignalIcon] | The default icons for a blueprint item.
The default icons for a blueprint item.
active_index | :: RW uint32? | The active blueprint index for this blueprint book. [...]
The active blueprint index for this blueprint book. [...]
label | :: RW string? | The current label for this item, if any.
The current label for this item, if any.
label_color | :: RW Color? | The current label color for this item, if any.
The current label color for this item, if any.
allow_manual_label_change | :: RW boolean | Whether the label for this item can be manually changed. [...]
Whether the label for this item can be manually changed. [...]
entity_label | :: RW string? | If this is an item with entity data, get the stored entity label.
If this is an item with entity data, get the stored entity label.
entity_color | :: RW Color? | If this is an item with entity data, get the stored entity color.
If this is an item with entity data, get the stored entity color.
entity_logistic_sections | :: RW LogisticSections | If this is an item with entity data, get the stored logistic filters.
If this is an item with entity data, get the stored logistic filters.
entity_request_from_buffers | :: RW boolean | If this is an item with entity data, get the stored request from buffer state.
If this is an item with entity data, get the stored request from buffer state.
entity_logistics_enabled | :: RW boolean | If this is an item with entity data, get the stored vehicle logistics enabled state.
If this is an item with entity data, get the stored vehicle logistics enabled state.
entity_enable_logistics_while_moving | :: RW boolean | If this is an item with entity data, get the stored enable logistics while moving state.
If this is an item with entity data, get the stored enable logistics while moving state.
entity_driver_is_gunner | :: RW boolean | If this is an item with entity data, get the stored driver is gunner state.
If this is an item with entity data, get the stored driver is gunner state.
entity_auto_target_without_gunner | :: RW boolean | If this is an item with entity data, get the stored auto target without gunner state.
If this is an item with entity data, get the stored auto target without gunner state.
entity_auto_target_with_gunner | :: RW boolean | If this is an item with entity data, get the stored auto target with gunner state.
If this is an item with entity data, get the stored auto target with gunner state.
tags | :: RW Tags |
custom_description | :: RW LocalisedString | The custom description this item-with-tags. [...]
The custom description this item-with-tags. [...]
entity_filter_count | :: R uint32 | The number of entity filters this deconstruction item supports.
The number of entity filters this deconstruction item supports.
entity_filters | :: RW array[ItemFilter] | The entity filters for this deconstruction item. [...]
The entity filters for this deconstruction item. [...]
tile_filter_count | :: R uint32 | The number of tile filters this deconstruction item supports.
The number of tile filters this deconstruction item supports.
tile_filters | :: RW array[TileID] | The tile filters for this deconstruction item. [...]
The tile filters for this deconstruction item. [...]
entity_filter_mode | :: RW defines.deconstruction_item.entity_filter_mode | The blacklist/whitelist entity filter mode for this deconstruction item.
The blacklist/whitelist entity filter mode for this deconstruction item.
tile_filter_mode | :: RW defines.deconstruction_item.tile_filter_mode | The blacklist/whitelist tile filter mode for this deconstruction item.
The blacklist/whitelist tile filter mode for this deconstruction item.
tile_selection_mode | :: RW defines.deconstruction_item.tile_selection_mode | The tile selection mode for this deconstruction item.
The tile selection mode for this deconstruction item.
trees_and_rocks_only | :: RW boolean | If this deconstruction item is set to allow trees and rocks only.
If this deconstruction item is set to allow trees and rocks only.
mapper_count | :: R uint32 | The current count of mappers in the upgrade item.
The current count of mappers in the upgrade item.
durability | :: RW double | Durability of the contained item. [...]
Durability of the contained item. [...]
ammo | :: RW uint32 | Number of bullets left in the magazine.
Number of bullets left in the magazine.

## Class LuaItemPrototype extends LuaPrototypeBase

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 `0` if it does not spoil.
The number of ticks before this item spoils, or `0` if it does not spoil.
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_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
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 |
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.
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? |
attack_parameters | :: R AttackParameters? | The gun attack parameters.
The gun attack parameters.
inventory_size | :: R uint32? | The main inventory size for item-with-inventory-prototype.
The main inventory size for item-with-inventory-prototype.
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.
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]? |
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.
entity_filter_slots | :: R uint32? | The number of entity filters this deconstruction item has.
The number of entity filters this deconstruction item has.
tile_filter_slots | :: R uint32? | The number of tile filters this deconstruction item has.
The number of tile filters this deconstruction item has.
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. [...]

## Class LuaItemStack extends LuaItemCommon

add_ammo(amount) |  | Add ammo to this ammo item.
Add ammo to this ammo item.
drain_ammo(amount) |  | Remove ammo from this ammo item.
Remove ammo from this ammo item.
add_durability(amount) |  | Add durability to this tool item.
Add durability to this tool item.
drain_durability(amount) |  | Remove durability from this tool item.
Remove durability from this tool item.
use_capsule(entity, target_position) | → array[LuaEntity] | Use the capsule item with the entity as the source, targeting the given position.
Use the capsule item with the entity as the source, targeting the given position.
can_set_stack(stack?) | → boolean | Would a call to LuaItemStack::set_stack succeed?
Would a call to LuaItemStack::set_stack succeed?
set_stack(stack?) | → boolean | Set this item stack to another item stack.
Set this item stack to another item stack.
transfer_stack(stack, amount?) | → boolean | Transfers the given item stack into this item stack.
Transfers the given item stack into this item stack.
export_stack() | → string | Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.
Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.
import_stack(data) | → int32 | Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.
Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.
swap_stack(stack) | → boolean | Swaps this item stack with the given item stack if allowed.
Swaps this item stack with the given item stack if allowed.
clear() |  | Clear this item stack.
Clear this item stack.
create_grid() | → LuaEquipmentGrid | Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grids.
Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grids.
spoil() |  | Spoils this item if the item can spoil.
Spoils this item if the item can spoil.
valid_for_read | :: R boolean | Is this valid for reading? [...]
Is this valid for reading? [...]
prototype | :: R LuaItemPrototype | Prototype of the item held in this stack.
Prototype of the item held in this stack.
name | :: R string | Prototype name of the item held in this stack.
Prototype name of the item held in this stack.
type | :: R string | Type of the item prototype.
Type of the item prototype.
count | :: RW uint32 | Number of items in this stack.
Number of items in this stack.
health | :: RW float | How much health the item has, as a number in range `[0, 1]`.
How much health the item has, as a number in range `[0, 1]`.
quality | :: R LuaQualityPrototype | The quality of this item.
The quality of this item.
spoil_tick | :: RW MapTick | The tick this item spoils, or `0` if it does not spoil. [...]
The tick this item spoils, or `0` if it does not spoil. [...]
spoil_percent | :: RW double | The percent spoiled this item is if it spoils. [...]
The percent spoiled this item is if it spoils. [...]
item | :: R LuaItem? | If the item has additional data, returns LuaItem pointing at the extra data, otherwise returns nil.
If the item has additional data, returns LuaItem pointing at the extra data, otherwise returns nil.
is_module | :: R boolean | If this is a module
If this is a module
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. [...]

## Class LuaLampControlBehavior extends LuaGenericOnOffControlBehavior

use_colors | :: RW boolean | `true` if the lamp should set the color from the circuit network signals.
`true` if the lamp should set the color from the circuit network signals.
color_mode | :: RW defines.control_behavior.lamp.color_mode |
red_signal | :: RW SignalID? |
green_signal | :: RW SignalID? |
blue_signal | :: RW SignalID? |
rgb_signal | :: RW SignalID? |
color | :: R Color? | The color the lamp is showing, if any.
The color the lamp is showing, if any.
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. [...]

## Class LuaLazyLoadedValue

get() | → Any | Gets the value of this lazy loaded value.
Gets the value of this lazy loaded value.
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. [...]

## Class LuaLoaderControlBehavior extends LuaGenericOnOffControlBehavior

circuit_set_filters | :: RW boolean | `true` if filters are set from circuit network
`true` if filters are set from circuit network
circuit_read_transfers | :: RW boolean | `true` if the transfers between loader's belt and container should be pulsed to the circuit network
`true` if the transfers between loader's belt and container should be pulsed to the circuit network
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. [...]

## Class LuaLogisticCell

is_in_logistic_range(position) | → boolean | Is a given position within the logistic range of this cell?
Is a given position within the logistic range of this cell?
is_in_construction_range(position) | → boolean | Is a given position within the construction range of this cell?
Is a given position within the construction range of this cell?
is_neighbour_with(other) | → boolean | Are two cells neighbours?
Are two cells neighbours?
logistic_radius | :: R float | Logistic radius of this cell.
Logistic radius of this cell.
logistics_connection_distance | :: R float | Logistic connection distance of this cell.
Logistic connection distance of this cell.
construction_radius | :: R float | Construction radius of this cell.
Construction radius of this cell.
stationed_logistic_robot_count | :: R uint32 | Number of stationed logistic robots in this cell.
Number of stationed logistic robots in this cell.
stationed_construction_robot_count | :: R uint32 | Number of stationed construction robots in this cell.
Number of stationed construction robots in this cell.
mobile | :: R boolean | `true` if this is a mobile cell. [...]
`true` if this is a mobile cell. [...]
transmitting | :: R boolean | `true` if this cell is active.
`true` if this cell is active.
charge_approach_distance | :: R float | Radius at which the robots hover when waiting to be charged.
Radius at which the robots hover when waiting to be charged.
charging_robot_count | :: R uint32 | Number of robots currently charging.
Number of robots currently charging.
to_charge_robot_count | :: R uint32 | Number of robots waiting to charge.
Number of robots waiting to charge.
owner | :: R LuaEntity | This cell's owner.
This cell's owner.
logistic_network | :: R LuaLogisticNetwork? | The network that owns this cell, if any.
The network that owns this cell, if any.
neighbours | :: R array[LuaLogisticCell] | Neighbouring cells.
Neighbouring cells.
charging_robots | :: R array[LuaEntity] | Robots currently being charged.
Robots currently being charged.
to_charge_robots | :: R array[LuaEntity] | Robots waiting to charge.
Robots waiting to charge.
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. [...]

## Class LuaLogisticContainerControlBehavior extends LuaControlBehavior

circuit_exclusive_mode_of_operation | :: RW defines.control_behavior.logistic_container.exclusive_mode | The circuit mode of operations for the logistic container. [...]
The circuit mode of operations for the logistic container. [...]
circuit_condition_enabled | :: RW boolean | Whether the circuit condition is in effect
Whether the circuit condition is in effect
circuit_condition | :: RW CircuitConditionDefinition | The circuit condition for the logistic container.
The circuit condition for the logistic container.
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. [...]

## Class LuaLogisticNetwork

get_item_count(item?, member?) | → int32 | Count given or all items in the network or given members.
Count given or all items in the network or given members.
get_contents(member?) | → array[ItemWithQualityCount] | Get item counts for the entire network, similar to how LuaInventory::get_contents does.
Get item counts for the entire network, similar to how LuaInventory::get_contents does.
remove_item(item, members?) | → uint32 | Remove items from the logistic network. [...]
Remove items from the logistic network. [...]
insert(item, members?) | → uint32 | Insert items into the logistic network. [...]
Insert items into the logistic network. [...]
find_cell_closest_to(position) | → LuaLogisticCell? | Find logistic cell closest to a given position.
Find logistic cell closest to a given position.
select_pickup_point{name=…, position?=…, include_buffers?=…, members?=…} | → LuaLogisticPoint? | Find the 'best' logistic point with this item ID and from the given position or from given chest type.
Find the 'best' logistic point with this item ID and from the given position or from given chest type.
select_drop_point{stack=…, members?=…} | → LuaLogisticPoint? | Find a logistic point to drop the specific item stack.
Find a logistic point to drop the specific item stack.
can_satisfy_request(item, count?, include_buffers?) | → boolean | Can the network satisfy a request for a given item and count.
Can the network satisfy a request for a given item and count.
get_supply_counts(item) | → LogisticsNetworkSupplyCounts | Get the amount of items of the given type indexed by the storage member.
Get the amount of items of the given type indexed by the storage member.
get_supply_points(item) | → LogisticsNetworkSupplyPoints | Gets the logistic points with of the given type indexed by the storage member.
Gets the logistic points with of the given type indexed by the storage member.
network_id | :: R uint32 | The unique logistic network ID.
The unique logistic network ID.
custom_name | :: RW string? | The custom logistic network name set by the player or by script, if any.
The custom logistic network name set by the player or by script, if any.
force | :: R LuaForce | The force this logistic network belongs to.
The force this logistic network belongs to.
available_logistic_robots | :: R uint32 | Number of logistic robots available for a job.
Number of logistic robots available for a job.
all_logistic_robots | :: R uint32 | The total number of logistic robots in the network (idle and active + in roboports).
The total number of logistic robots in the network (idle and active + in roboports).
available_construction_robots | :: R uint32 | Number of construction robots available for a job.
Number of construction robots available for a job.
all_construction_robots | :: R uint32 | The total number of construction robots in the network (idle and active + in roboports).
The total number of construction robots in the network (idle and active + in roboports).
robot_limit | :: R uint32 | Maximum number of robots the network can work with. [...]
Maximum number of robots the network can work with. [...]
cells | :: R array[LuaLogisticCell] | All cells in this network.
All cells in this network.
providers | :: R array[LuaEntity] | All entities that have logistic provider points in this network.
All entities that have logistic provider points in this network.
empty_providers | :: R array[LuaEntity] | All entities that have empty logistic provider points in this network.
All entities that have empty logistic provider points in this network.
requesters | :: R array[LuaEntity] | All entities that have logistic requester points in this network.
All entities that have logistic requester points in this network.
storages | :: R array[LuaEntity] | All entities that have logistic storage points in this network.
All entities that have logistic storage points in this network.
logistic_members | :: R array[LuaEntity] | All other entities that have logistic points in this network (inserters mostly).
All other entities that have logistic points in this network (inserters mostly).
provider_points | :: R array[LuaLogisticPoint] | All things that have provider points in this network.
All things that have provider points in this network.
passive_provider_points | :: R array[LuaLogisticPoint] | All passive provider points in this network.
All passive provider points in this network.
active_provider_points | :: R array[LuaLogisticPoint] | All active provider points in this network.
All active provider points in this network.
empty_provider_points | :: R array[LuaLogisticPoint] | All things that have empty provider points in this network.
All things that have empty provider points in this network.
requester_points | :: R array[LuaLogisticPoint] | All things that have requester points in this network.
All things that have requester points in this network.
storage_points | :: R array[LuaLogisticPoint] | All things that have storage points in this network.
All things that have storage points in this network.
robots | :: R array[LuaEntity] | All currently deployed robots in this logistic network.
All currently deployed robots in this logistic network.
construction_robots | :: R array[LuaEntity] | All currently deployed construction robots in this logistic network.
All currently deployed construction robots in this logistic network.
logistic_robots | :: R array[LuaEntity] | All currently deployed logistic robots in this logistic network.
All currently deployed logistic robots in this logistic network.
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. [...]

## Class LuaLogisticPoint

add_section(group?) | → LuaLogisticSection? | Adds a new logistic section to this logistic point if possible.
Adds a new logistic section to this logistic point if possible.
remove_section(section_index) | → boolean | Removes the given logistic section if possible. [...]
Removes the given logistic section if possible. [...]
get_section(section_index) | → LuaLogisticSection | Gets section on the selected index, if it exists
Gets section on the selected index, if it exists
owner | :: R LuaEntity | The LuaEntity owner of this LuaLogisticPoint.
The LuaEntity owner of this LuaLogisticPoint.
logistic_network | :: R LuaLogisticNetwork |
logistic_member_index | :: R defines.logistic_member_index | The Logistic member index of this logistic point.
The Logistic member index of this logistic point.
filters | :: R array[CompiledLogisticFilter]? | The logistic filters for this logistic point, if this uses any. [...]
The logistic filters for this logistic point, if this uses any. [...]
mode | :: R defines.logistic_mode | The logistic mode.
The logistic mode.
force | :: R LuaForce | The force of this logistic point. [...]
The force of this logistic point. [...]
targeted_items_pickup | :: R array[ItemWithQualityCount] | Items targeted to be picked up from this logistic point by robots.
Items targeted to be picked up from this logistic point by robots.
targeted_items_deliver | :: R array[ItemWithQualityCount] | Items targeted to be dropped off into this logistic point by robots or cargo pods.
Items targeted to be dropped off into this logistic point by robots or cargo pods.
exact | :: R boolean | If this logistic point is using the exact mode. [...]
If this logistic point is using the exact mode. [...]
trash_not_requested | :: RW boolean | Whether this logistic point is set to trash unrequested items.
Whether this logistic point is set to trash unrequested items.
enabled | :: RW boolean | Whether this logistic point is active, related to disabling logistics on player/spidertron. [...]
Whether this logistic point is active, related to disabling logistics on player/spidertron. [...]
sections | :: R array[LuaLogisticSection] | All logistic sections of this logistic point.
All logistic sections of this logistic point.
sections_count | :: R uint32 | Amount of logistic sections this logistic point has.
Amount of logistic sections this logistic point has.
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. [...]

## Class LuaLogisticSection

set_slot(slot_index, filter) | → LogisticFilterIndex? | Sets logistic request and auto-trash slot to the given value. [...]
Sets logistic request and auto-trash slot to the given value. [...]
get_slot(slot_index) | → LogisticFilter | Gets current settings of logistic request and auto-trash from the given slot.
Gets current settings of logistic request and auto-trash from the given slot.
clear_slot(slot_index) |  | Clears the logistic request and auto-trash from the given slot. [...]
Clears the logistic request and auto-trash from the given slot. [...]
owner | :: R LuaEntity | The LuaEntity owner of this LuaLogisticSection.
The LuaEntity owner of this LuaLogisticSection.
index | :: R uint32 | The section index of this section.
The section index of this section.
filters | :: RW array[LogisticFilter] | The logistic filters for this section. [...]
The logistic filters for this section. [...]
filters_count | :: R uint32 | Amount of filters this section has
Amount of filters this section has
group | :: RW string | The group this section belongs to. [...]
The group this section belongs to. [...]
type | :: R defines.logistic_section_type | The type of this logistic section. [...]
The type of this logistic section. [...]
is_manual | :: R boolean | Shortcut to check whether LuaLogisticSection::type is equal to manual.
Shortcut to check whether LuaLogisticSection::type is equal to manual.
active | :: RW boolean | Whether this section is active. [...]
Whether this section is active. [...]
multiplier | :: RW float | Multiplier applied to all filters before they are used by game. [...]
Multiplier applied to all filters before they are used by game. [...]
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. [...]

## Class LuaLogisticSections

add_section(group?) | → LuaLogisticSection? | Adds a new logistic section if possible.
Adds a new logistic section if possible.
remove_section(section_index) | → boolean | Removes the given logistic section if possible. [...]
Removes the given logistic section if possible. [...]
get_section(section_index) | → LuaLogisticSection? | Gets section on the selected index, if it exists.
Gets section on the selected index, if it exists.
sections | :: R array[LuaLogisticSection] | All logistic sections of this entity.
All logistic sections of this entity.
sections_count | :: R uint32 | Amount of logistic sections this entity has.
Amount of logistic sections this entity has.
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. [...]

## Class LuaMiningDrillControlBehavior extends LuaGenericOnOffControlBehavior

circuit_read_resources | :: RW boolean | `true` if this drill should send the resources in the field to the circuit network. [...]
`true` if this drill should send the resources in the field to the circuit network. [...]
resource_read_mode | :: RW defines.control_behavior.mining_drill.resource_read_mode | If the mining drill should send just the resources in its area or the entire field it's on to the circuit network.
If the mining drill should send just the resources in its area or the entire field it's on to the circuit network.
resource_read_targets | :: R array[LuaEntity] | The resource entities that the mining drill will send information about to the circuit network or an empty array.
The resource entities that the mining drill will send information about to the circuit network or an empty array.
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. [...]

## Class LuaModData extends LuaPrototypeBase

get(key) | → AnyBasic? | Provides partial access to the data.
Provides partial access to the data.
data_type | :: R string |
data | :: R dictionary[string → AnyBasic] | Provides full data of this prototype.
Provides full data of this prototype.
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. [...]

## Class LuaModSettingPrototype extends LuaPrototypeBase

mod | :: R string | The mod that owns this setting.
The mod that owns this setting.
setting_type | :: R `"startup"` or `"runtime-global"` or `"runtime-per-user"` |
default_value | :: R boolean or double or int32 or string or Color | The default value of this setting.
The default value of this setting.
minimum_value | :: R double or int32? | The minimum value for this setting. [...]
The minimum value for this setting. [...]
maximum_value | :: R double or int32? | The maximum value for this setting. [...]
The maximum value for this setting. [...]
allowed_values | :: R array[string] or array[int32] or array[double]? | The allowed values for this setting. [...]
The allowed values for this setting. [...]
allow_blank | :: R boolean? | Whether this string setting allows blank values. [...]
Whether this string setting allows blank values. [...]
auto_trim | :: R boolean? | Whether this string setting auto-trims values. [...]
Whether this string setting auto-trims values. [...]
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. [...]

## Class LuaModuleCategoryPrototype extends LuaPrototypeBase

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. [...]

## Class LuaNamedNoiseExpression extends LuaPrototypeBase

intended_property | :: R string | Name of the property that this expression is intended to provide a value for, if any.
Name of the property that this expression is intended to provide a value for, if any.
expression | :: R string | The expression itself.
The expression itself.
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. [...]

## Class LuaNamedNoiseFunction extends LuaPrototypeBase

expression | :: R string |
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. [...]

## Class LuaParticlePrototype extends LuaPrototypeBase

regular_trigger_effect | :: R TriggerEffectItem |
ended_in_water_trigger_effect | :: R TriggerEffectItem |
ended_on_ground_trigger_effect | :: R TriggerEffectItem |
render_layer | :: R RenderLayer |
render_layer_when_on_ground | :: R RenderLayer |
fade_out_time | :: R uint32 |
life_time | :: R uint32 |
regular_trigger_effect_frequency | :: R uint32 |
movement_modifier_when_on_ground | :: R float |
movement_modifier | :: R float |
vertical_acceleration | :: R float |
mining_particle_frame_speed | :: R float |
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. [...]

## Class LuaPermissionGroup

add_player(player) | → boolean | Adds the given player to this group.
Adds the given player to this group.
remove_player(player) | → boolean | Removes the given player from this group.
Removes the given player from this group.
allows_action(action) | → boolean | Whether this group allows the given action.
Whether this group allows the given action.
set_allows_action(action, allow_action) | → boolean | Sets whether this group allows the performance the given action.
Sets whether this group allows the performance the given action.
destroy() | → boolean | Destroys this group.
Destroys this group.
name | :: RW string | The name of this group. [...]
The name of this group. [...]
players | :: R array[LuaPlayer] | The players in this group.
The players in this group.
group_id | :: R uint32 | The group ID
The group ID
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. [...]

## Class LuaPermissionGroups

create_group(name?) | → LuaPermissionGroup? | Creates a new permission group.
Creates a new permission group.
get_group(group) | → LuaPermissionGroup? | Gets the permission group with the given name or group ID.
Gets the permission group with the given name or group ID.
groups | :: R array[LuaPermissionGroup] | All of the permission groups.
All of the permission groups.
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. [...]

## Class LuaPlanet

create_surface() | → LuaSurface | Creates the associated surface if one doesn't already exist.
Creates the associated surface if one doesn't already exist.
associate_surface(surface) |  | Associates the given surface with this planet. [...]
Associates the given surface with this planet. [...]
reset_map_gen_settings() |  | Resets the map gen settings on this planet to the default from-prototype state.
Resets the map gen settings on this planet to the default from-prototype state.
get_space_platforms(force) | → array[LuaSpacePlatform] | Gets the built space platforms orbiting this planet on the given force. [...]
Gets the built space platforms orbiting this planet on the given force. [...]
name | :: R string | The planets name.
The planets name.
prototype | :: R LuaSpaceLocationPrototype |
surface | :: R LuaSurface? | The surface for this planet if one currently exists. [...]
The surface for this planet if one currently exists. [...]
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. [...]

## Class LuaPlayer extends LuaControl

set_ending_screen_data(message, file?) |  | Setup the screen to be shown when the game is finished.
Setup the screen to be shown when the game is finished.
print(message, print_settings?) |  | Print text to the chat console. [...]
Print text to the chat console. [...]
clear_console() |  | Clear the chat console.
Clear the chat console.
get_goal_description() | → LocalisedString | Get the current goal description, as a localised string.
Get the current goal description, as a localised string.
set_goal_description(text?, only_update?) |  | Set the text in the goal window (top left).
Set the text in the goal window (top left).
set_controller{type=…, character?=…, waypoints?=…, start_position?=…, start_zoom?=…, final_transition_time?=…, chart_mode_cutoff?=…, position?=…, surface?=…} |  | Set the controller type of the player. [...]
Set the controller type of the player. [...]
drag_wire{position=…} | → boolean | Start/end wire dragging at the specified location, wire type is based on the cursor contents
Start/end wire dragging at the specified location, wire type is based on the cursor contents
disable_recipe_groups() |  | Disable recipe groups.
Disable recipe groups.
enable_recipe_groups() |  | Enable recipe groups.
Enable recipe groups.
disable_recipe_subgroups() |  | Disable recipe subgroups.
Disable recipe subgroups.
enable_recipe_subgroups() |  | Enable recipe subgroups.
Enable recipe subgroups.
print_entity_statistics(entities?) |  | Print entity statistics to the player's console.
Print entity statistics to the player's console.
print_robot_jobs() |  | Print construction robot job counts to the player's console.
Print construction robot job counts to the player's console.
print_lua_object_statistics() |  | Print LuaObject counts per mod.
Print LuaObject counts per mod.
unlock_achievement(name) |  | Unlock the achievements of the given player. [...]
Unlock the achievements of the given player. [...]
clear_cursor() | → boolean | Invokes the "clear cursor" action on the player as if the user pressed it.
Invokes the "clear cursor" action on the player as if the user pressed it.
create_character(character?) | → boolean | Creates and attaches a character entity to this player. [...]
Creates and attaches a character entity to this player. [...]
add_alert(entity, type) |  | Adds an alert to this player for the given entity of the given alert type.
Adds an alert to this player for the given entity of the given alert type.
add_custom_alert(entity, icon, message, show_on_map) |  | Adds a custom alert to this player.
Adds a custom alert to this player.
remove_alert{entity?=…, prototype?=…, position?=…, type?=…, surface?=…, icon?=…, message?=…} |  | Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.
Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.
get_alerts{entity?=…, prototype?=…, position?=…, type?=…, surface?=…} | → dictionary[uint32 → dictionary[defines.alert_type → array[Alert]]] | Get all alerts matching the given filters, or all alerts if no filters are given.
Get all alerts matching the given filters, or all alerts if no filters are given.
mute_alert(alert_type) | → boolean | Mutes alerts for the given alert category.
Mutes alerts for the given alert category.
unmute_alert(alert_type) | → boolean | Unmutes alerts for the given alert category.
Unmutes alerts for the given alert category.
is_alert_muted(alert_type) | → boolean | If the given alert type is currently muted.
If the given alert type is currently muted.
enable_alert(alert_type) | → boolean | Enables alerts for the given alert category.
Enables alerts for the given alert category.
disable_alert(alert_type) | → boolean | Disables alerts for the given alert category.
Disables alerts for the given alert category.
is_alert_enabled(alert_type) | → boolean | If the given alert type is currently enabled.
If the given alert type is currently enabled.
add_pin{label?=…, preview_distance?=…, always_visible?=…, entity?=…, player?=…, surface?=…, position?=…} |  | Adds a pin to this player for the given pin specification. [...]
Adds a pin to this player for the given pin specification. [...]
pipette_entity(entity, allow_ghost?) | → boolean | Invokes the "smart pipette" action on the player as if the user pressed it. [...]
Invokes the "smart pipette" action on the player as if the user pressed it. [...]
pipette(id, quality?, allow_ghost?) | → boolean | Invokes the "smart pipette" action on the player as if the user pressed it.
Invokes the "smart pipette" action on the player as if the user pressed it.
can_build_from_cursor{position=…, direction?=…, flip_horizontal?=…, flip_vertical?=…, build_mode?=…, terrain_building_size?=…, skip_fog_of_war?=…} | → boolean | Checks if this player can build what ever is in the cursor on the surface the player is on.
Checks if this player can build what ever is in the cursor on the surface the player is on.
build_from_cursor{position=…, direction?=…, mirror?=…, flip_horizontal?=…, flip_vertical?=…, build_mode?=…, terrain_building_size?=…, skip_fog_of_war?=…} |  | Builds whatever is in the cursor on the surface the player is on. [...]
Builds whatever is in the cursor on the surface the player is on. [...]
clear_inventory_highlights() |  | Clears the blinking of the inventory based on insertion of items
Clears the blinking of the inventory based on insertion of items
use_from_cursor(position) |  | Uses the current item in the cursor if it's a capsule or does nothing if not.
Uses the current item in the cursor if it's a capsule or does nothing if not.
play_sound(sound_specification) |  | Play a sound for this player. [...]
Play a sound for this player. [...]
get_associated_characters() | → array[LuaEntity] | The characters associated with this player. [...]
The characters associated with this player. [...]
associate_character(character) |  | Associates a character with this player. [...]
Associates a character with this player. [...]
disassociate_character(character) |  | Disassociates a character from this player. [...]
Disassociates a character from this player. [...]
swap_characters(player) | → boolean | Swaps this player's character with another player's character.
Swaps this player's character with another player's character.
create_local_flying_text{text=…, position?=…, surface?=…, create_at_cursor?=…, color?=…, time_to_live?=…, speed?=…} |  | Spawn flying text that is only visible to this player. [...]
Spawn flying text that is only visible to this player. [...]
clear_local_flying_texts() |  | Clear any active flying texts for this player.
Clear any active flying texts for this player.
get_quick_bar_slot(index) | → ItemFilter? | Gets the quick bar filter for the given slot or `nil`.
Gets the quick bar filter for the given slot or `nil`.
set_quick_bar_slot(index, filter) |  | Sets the quick bar filter for the given slot. [...]
Sets the quick bar filter for the given slot. [...]
get_active_quick_bar_page(index) | → uint8? | Gets which quick bar page is being used for the given screen page or `nil` if not known.
Gets which quick bar page is being used for the given screen page or `nil` if not known.
set_active_quick_bar_page(screen_index, page_index) |  | Sets which quick bar page is being used for the given screen page.
Sets which quick bar page is being used for the given screen page.
jump_to_cutscene_waypoint(waypoint_index) |  | Jump to the specified cutscene waypoint. [...]
Jump to the specified cutscene waypoint. [...]
exit_cutscene() |  | Exit the current cutscene. [...]
Exit the current cutscene. [...]
exit_remote_view() |  | Exit remote view if possible. [...]
Exit remote view if possible. [...]
is_shortcut_toggled(prototype_name) | → boolean | Is a custom Lua shortcut currently toggled?
Is a custom Lua shortcut currently toggled?
is_shortcut_available(prototype_name) | → boolean | Is a custom Lua shortcut currently available?
Is a custom Lua shortcut currently available?
set_shortcut_toggled(prototype_name, toggled) |  | Toggle or untoggle a custom Lua shortcut
Toggle or untoggle a custom Lua shortcut
set_shortcut_available(prototype_name, available) |  | Make a custom Lua shortcut available or unavailable.
Make a custom Lua shortcut available or unavailable.
connect_to_server{address=…, name?=…, description?=…, password?=…} |  | Asks the player if they would like to connect to the given server. [...]
Asks the player if they would like to connect to the given server. [...]
toggle_map_editor() |  | Toggles this player into or out of the map editor. [...]
Toggles this player into or out of the map editor. [...]
request_translation(localised_string) | → uint32? | Requests a translation for the given localised string. [...]
Requests a translation for the given localised string. [...]
request_translations(localised_strings) | → array[uint32]? | Requests translation for the given set of localised strings. [...]
Requests translation for the given set of localised strings. [...]
get_infinity_inventory_filter(index) | → InfinityInventoryFilter? | Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.
Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.
set_infinity_inventory_filter(index, filter) |  | Sets the filter for this map editor infinity filters at the given index.
Sets the filter for this map editor infinity filters at the given index.
clear_recipe_notifications() |  | Clears all recipe notifications for this player.
Clears all recipe notifications for this player.
add_recipe_notification(recipe) |  | Adds the given recipe to the list of recipe notifications for this player.
Adds the given recipe to the list of recipe notifications for this player.
clear_recipe_notification(recipe) |  | Clears the given recipe from the list of recipe notifications for this player.
Clears the given recipe from the list of recipe notifications for this player.
get_recipe_notifications() | → array[LuaRecipePrototype] | Get all recipes that currently have recipe notifications for this player.
Get all recipes that currently have recipe notifications for this player.
add_to_clipboard(blueprint) |  | Adds the given blueprint to this player's clipboard queue.
Adds the given blueprint to this player's clipboard queue.
activate_paste() |  | Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.
Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.
start_selection(position, selection_mode) |  | Starts selection with selection tool from the specified position. [...]
Starts selection with selection tool from the specified position. [...]
clear_selection() |  | Clears the player's selection tool selection position.
Clears the player's selection tool selection position.
enter_space_platform(space_platform) | → boolean | Enters the given space platform if possible.
Enters the given space platform if possible.
leave_space_platform() |  | Ejects this player from the current space platform if in a platform. [...]
Ejects this player from the current space platform if in a platform. [...]
land_on_planet() | → boolean | Ejects this player from the current space platform and lands on the current planet.
Ejects this player from the current space platform and lands on the current planet.
set_zoom_limits(controller_type, zoom_limits) |  | Sets the zoom limits for a specific controller type. [...]
Sets the zoom limits for a specific controller type. [...]
physical_surface | :: R LuaSurface | The surface this player's physical controller is on.
The surface this player's physical controller is on.
physical_surface_index | :: R uint32 | Unique ID associated with the surface this player's physical controller is currently on.
Unique ID associated with the surface this player's physical controller is currently on.
physical_position | :: R MapPosition | The current position of this player's physical controller.
The current position of this player's physical controller.
physical_vehicle | :: R LuaEntity? | The current vehicle of this player's physical controller.
The current vehicle of this player's physical controller.
character | :: RW LuaEntity? | The character attached to this player, if any. [...]
The character attached to this player, if any. [...]
cutscene_character | :: R LuaEntity? | When in a cutscene; the character this player would be using once the cutscene is over, if any. [...]
When in a cutscene; the character this player would be using once the cutscene is over, if any. [...]
index | :: R uint32 | This player's index in LuaGameScript::players (unique ID). [...]
This player's index in LuaGameScript::players (unique ID). [...]
gui | :: R LuaGui |
opened_self | :: R boolean | `true` if the player opened itself. [...]
`true` if the player opened itself. [...]
controller_type | :: R defines.controllers |
physical_controller_type | :: R defines.controllers | The player's "physical" controller. [...]
The player's "physical" controller. [...]
stashed_controller_type | :: R defines.controllers? | The stashed controller type, if any. [...]
The stashed controller type, if any. [...]
spidertron_remote_selection | :: RW array[LuaEntity]? | All SpiderVehicles currently selected by the player, if they are holding a spidertron remote.
All SpiderVehicles currently selected by the player, if they are holding a spidertron remote.
zoom | :: RW double | The current player controller's zoom level. [...]
The current player controller's zoom level. [...]
zoom_limits | :: RW ZoomLimits | The player's current controller's zoom limits. [...]
The player's current controller's zoom limits. [...]
centered_on | :: RW LuaEntity? | The entity being centered on in remote view. [...]
The entity being centered on in remote view. [...]
game_view_settings | :: RW GameViewSettings | The player's game view settings.
The player's game view settings.
minimap_enabled | :: RW boolean | `true` if the minimap is visible.
`true` if the minimap is visible.
color | :: RW Color | The color associated with the player. [...]
The color associated with the player. [...]
chat_color | :: RW Color | The color used when this player talks in game.
The color used when this player talks in game.
name | :: R string | The player's username.
The player's username.
tag | :: RW string | The tag that is shown after the player in chat, on the map and above multiplayer selection rectangles.
The tag that is shown after the player in chat, on the map and above multiplayer selection rectangles.
connected | :: R boolean | `true` if the player is currently connected to the game.
`true` if the player is currently connected to the game.
admin | :: RW boolean | `true` if the player is an admin. [...]
`true` if the player is an admin. [...]
entity_copy_source | :: R LuaEntity? | The source entity used during entity settings copy-paste, if any.
The source entity used during entity settings copy-paste, if any.
afk_time | :: R uint32 | How many ticks since the last action of this player.
How many ticks since the last action of this player.
online_time | :: R uint32 | How many ticks did this player spend playing this save (all sessions combined).
How many ticks did this player spend playing this save (all sessions combined).
last_online | :: R uint32 | At what tick this player was last online.
At what tick this player was last online.
permission_group | :: RW LuaPermissionGroup? | The permission group this player is part of, if any.
The permission group this player is part of, if any.
mod_settings | :: R LuaCustomTable[string → ModSetting] | The current per-player settings for the this player, indexed by prototype name. [...]
The current per-player settings for the this player, indexed by prototype name. [...]
ticks_to_respawn | :: RW uint32? | The number of ticks until this player will respawn. [...]
The number of ticks until this player will respawn. [...]
display_resolution | :: R DisplayResolution | The display resolution for this player. [...]
The display resolution for this player. [...]
display_scale | :: R double | The display scale for this player. [...]
The display scale for this player. [...]
display_density_scale | :: R double | The display density scale for this player. [...]
The display density scale for this player. [...]
locale | :: R string | The active locale for this player. [...]
The active locale for this player. [...]
blueprint_to_setup | :: R LuaItemStack | The item stack containing a blueprint to be setup.
The item stack containing a blueprint to be setup.
blueprints | :: R array[LuaRecord] | Records contained in the player's blueprint library.
Records contained in the player's blueprint library.
render_mode | :: R defines.render_mode | The render mode of the player, like map or zoom to world.
The render mode of the player, like map or zoom to world.
input_method | :: R defines.input_method | The input method of the player, mouse and keyboard or game controller
The input method of the player, mouse and keyboard or game controller
spectator | :: RW boolean | If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.
If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.
show_on_map | :: RW boolean | If `true`, circle and name of given player is rendered on the map/chart.
If `true`, circle and name of given player is rendered on the map/chart.
remove_unfiltered_items | :: RW boolean | If items not included in this map editor infinity inventory filters should be removed.
If items not included in this map editor infinity inventory filters should be removed.
infinity_inventory_filters | :: RW array[InfinityInventoryFilter] | The filters for this map editor infinity inventory settings.
The filters for this map editor infinity inventory settings.
auto_sort_main_inventory | :: R boolean | If the main inventory will be auto sorted.
If the main inventory will be auto sorted.
hand_location | :: RW ItemStackLocation? | The original location of the item in the cursor, marked with a hand. [...]
The original location of the item in the cursor, marked with a hand. [...]
cursor_stack_temporary | :: RW boolean | Returns true if the current item stack in cursor will be destroyed after clearing the cursor. [...]
Returns true if the current item stack in cursor will be destroyed after clearing the cursor. [...]
undo_redo_stack | :: R LuaUndoRedoStack | The undo and redo stack for this player.
The undo and redo stack for this player.
drag_target | :: R DragTarget? | The wire drag target for this player, if any.
The wire drag target for this player, if any.
map_view_settings | :: W MapViewSettings | The player's map view settings. [...]
The player's map view settings. [...]
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. [...]

## Class LuaProcessionLayerInheritanceGroupPrototype extends LuaPrototypeBase

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. [...]

## Class LuaProcessionPrototype extends LuaPrototypeBase

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. [...]

## Class LuaProfiler

reset() |  | Resets the clock, also restarting it.
Resets the clock, also restarting it.
stop() |  | Stops the clock.
Stops the clock.
restart() |  | Start the clock again, without resetting it.
Start the clock again, without resetting it.
add(other) |  | Add the duration of another timer to this timer. [...]
Add the duration of another timer to this timer. [...]
divide(number) |  | Divides the current duration by a set value. [...]
Divides the current duration by a set value. [...]
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. [...]

## Class LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior

circuit_parameters | :: RW ProgrammableSpeakerCircuitParameters |
circuit_condition | :: RW CircuitConditionDefinition |
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. [...]

## Class LuaPrototypeBase abstract

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.

## Class LuaPrototypes

get_entity_filtered(filters) | → LuaCustomTable[string → LuaEntityPrototype] | Returns a dictionary of all LuaEntityPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaEntityPrototypes that fit the given filters. [...]
get_item_filtered(filters) | → LuaCustomTable[string → LuaItemPrototype] | Returns a dictionary of all LuaItemPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaItemPrototypes that fit the given filters. [...]
get_equipment_filtered(filters) | → LuaCustomTable[string → LuaEquipmentPrototype] | Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. [...]
get_mod_setting_filtered(filters) | → LuaCustomTable[string → LuaModSettingPrototype] | Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. [...]
get_achievement_filtered(filters) | → LuaCustomTable[string → LuaAchievementPrototype] | Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. [...]
get_tile_filtered(filters) | → LuaCustomTable[string → LuaTilePrototype] | Returns a dictionary of all LuaTilePrototypes that fit the given filters. [...]
Returns a dictionary of all LuaTilePrototypes that fit the given filters. [...]
get_decorative_filtered(filters) | → LuaCustomTable[string → LuaDecorativePrototype] | Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. [...]
Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. [...]
get_fluid_filtered(filters) | → LuaCustomTable[string → LuaFluidPrototype] | Returns a dictionary of all LuaFluidPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaFluidPrototypes that fit the given filters. [...]
get_recipe_filtered(filters) | → LuaCustomTable[string → LuaRecipePrototype] | Returns a dictionary of all LuaRecipePrototypes that fit the given filters. [...]
Returns a dictionary of all LuaRecipePrototypes that fit the given filters. [...]
get_technology_filtered(filters) | → LuaCustomTable[string → LuaTechnologyPrototype] | Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. [...]
Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. [...]
get_history(type, name) | → PrototypeHistory | Gets the prototype history for the given type and name.
Gets the prototype history for the given type and name.
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]
font | :: R LuaCustomTable[string → LuaFontPrototype] | A dictionary containing every LuaFontPrototype indexed by `name`.
A dictionary containing every LuaFontPrototype indexed by `name`.
map_gen_preset | :: R LuaCustomTable[string → MapGenPreset] | A dictionary containing every MapGenPreset indexed by `name`. [...]
A dictionary containing every MapGenPreset indexed by `name`. [...]
style | :: R LuaCustomTable[string → string] | A map of styles that LuaGuiElement can use. [...]
A map of styles that LuaGuiElement can use. [...]
utility_constants | :: R LuaCustomTable[string → AnyBasic] | All utility constants. [...]
All utility constants. [...]
entity | :: R LuaCustomTable[string → LuaEntityPrototype] | A dictionary containing every LuaEntityPrototype indexed by `name`.
A dictionary containing every LuaEntityPrototype indexed by `name`.
item | :: R LuaCustomTable[string → LuaItemPrototype] | A dictionary containing every LuaItemPrototype indexed by `name`.
A dictionary containing every LuaItemPrototype indexed by `name`.
fluid | :: R LuaCustomTable[string → LuaFluidPrototype] | A dictionary containing every LuaFluidPrototype indexed by `name`.
A dictionary containing every LuaFluidPrototype indexed by `name`.
tile | :: R LuaCustomTable[string → LuaTilePrototype] | A dictionary containing every LuaTilePrototype indexed by `name`.
A dictionary containing every LuaTilePrototype indexed by `name`.
equipment | :: R LuaCustomTable[string → LuaEquipmentPrototype] | A dictionary containing every LuaEquipmentPrototype indexed by `name`.
A dictionary containing every LuaEquipmentPrototype indexed by `name`.
damage | :: R LuaCustomTable[string → LuaDamagePrototype] | A dictionary containing every LuaDamagePrototype indexed by `name`.
A dictionary containing every LuaDamagePrototype indexed by `name`.
virtual_signal | :: R LuaCustomTable[string → LuaVirtualSignalPrototype] | A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.
A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.
equipment_grid | :: R LuaCustomTable[string → LuaEquipmentGridPrototype] | A dictionary containing every LuaEquipmentGridPrototype indexed by `name`.
A dictionary containing every LuaEquipmentGridPrototype indexed by `name`.
recipe | :: R LuaCustomTable[string → LuaRecipePrototype] | A dictionary containing every LuaRecipePrototype indexed by `name`.
A dictionary containing every LuaRecipePrototype indexed by `name`.
technology | :: R LuaCustomTable[string → LuaTechnologyPrototype] | A dictionary containing every LuaTechnologyPrototype indexed by `name`.
A dictionary containing every LuaTechnologyPrototype indexed by `name`.
decorative | :: R LuaCustomTable[string → LuaDecorativePrototype] | A dictionary containing every LuaDecorativePrototype indexed by `name`.
A dictionary containing every LuaDecorativePrototype indexed by `name`.
particle | :: R LuaCustomTable[string → LuaParticlePrototype] | A dictionary containing every LuaParticlePrototype indexed by `name`.
A dictionary containing every LuaParticlePrototype indexed by `name`.
autoplace_control | :: R LuaCustomTable[string → LuaAutoplaceControlPrototype] | A dictionary containing every LuaAutoplaceControlPrototype indexed by `name`.
A dictionary containing every LuaAutoplaceControlPrototype indexed by `name`.
mod_setting | :: R LuaCustomTable[string → LuaModSettingPrototype] | A dictionary containing every LuaModSettingPrototype indexed by `name`.
A dictionary containing every LuaModSettingPrototype indexed by `name`.
custom_input | :: R LuaCustomTable[string → LuaCustomInputPrototype] | A dictionary containing every LuaCustomInputPrototype indexed by `name`.
A dictionary containing every LuaCustomInputPrototype indexed by `name`.
ammo_category | :: R LuaCustomTable[string → LuaAmmoCategoryPrototype] | A dictionary containing every LuaAmmoCategoryPrototype indexed by `name`.
A dictionary containing every LuaAmmoCategoryPrototype indexed by `name`.
named_noise_expression | :: R LuaCustomTable[string → LuaNamedNoiseExpression] | A dictionary containing every LuaNamedNoiseExpression indexed by `name`.
A dictionary containing every LuaNamedNoiseExpression indexed by `name`.
named_noise_function | :: R LuaCustomTable[string → LuaNamedNoiseFunction] | A dictionary containing every LuaNamedNoiseFunction indexed by `name`.
A dictionary containing every LuaNamedNoiseFunction indexed by `name`.
item_subgroup | :: R LuaCustomTable[string → LuaGroup] | A dictionary containing every ItemSubgroup indexed by `name`.
A dictionary containing every ItemSubgroup indexed by `name`.
item_group | :: R LuaCustomTable[string → LuaGroup] | A dictionary containing every ItemGroup indexed by `name`.
A dictionary containing every ItemGroup indexed by `name`.
fuel_category | :: R LuaCustomTable[string → LuaFuelCategoryPrototype] | A dictionary containing every LuaFuelCategoryPrototype indexed by `name`.
A dictionary containing every LuaFuelCategoryPrototype indexed by `name`.
resource_category | :: R LuaCustomTable[string → LuaResourceCategoryPrototype] | A dictionary containing every LuaResourceCategoryPrototype indexed by `name`.
A dictionary containing every LuaResourceCategoryPrototype indexed by `name`.
achievement | :: R LuaCustomTable[string → LuaAchievementPrototype] | A dictionary containing every LuaAchievementPrototype indexed by `name`.
A dictionary containing every LuaAchievementPrototype indexed by `name`.
module_category | :: R LuaCustomTable[string → LuaModuleCategoryPrototype] | A dictionary containing every LuaModuleCategoryPrototype indexed by `name`.
A dictionary containing every LuaModuleCategoryPrototype indexed by `name`.
equipment_category | :: R LuaCustomTable[string → LuaEquipmentCategoryPrototype] | A dictionary containing every LuaEquipmentCategoryPrototype indexed by `name`.
A dictionary containing every LuaEquipmentCategoryPrototype indexed by `name`.
trivial_smoke | :: R LuaCustomTable[string → LuaTrivialSmokePrototype] | A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.
A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.
shortcut | :: R LuaCustomTable[string → LuaShortcutPrototype] | A dictionary containing every LuaShortcutPrototype indexed by `name`.
A dictionary containing every LuaShortcutPrototype indexed by `name`.
recipe_category | :: R LuaCustomTable[string → LuaRecipeCategoryPrototype] | A dictionary containing every LuaRecipeCategoryPrototype indexed by `name`.
A dictionary containing every LuaRecipeCategoryPrototype indexed by `name`.
quality | :: R LuaCustomTable[string → LuaQualityPrototype] |
surface_property | :: R LuaCustomTable[string → LuaSurfacePropertyPrototype] |
space_location | :: R LuaCustomTable[string → LuaSpaceLocationPrototype] |
space_connection | :: R LuaCustomTable[string → LuaSpaceConnectionPrototype] |
custom_event | :: R LuaCustomTable[string → LuaCustomEventPrototype] | A dictionary containing every defined custom event, indexed by `name`.
A dictionary containing every defined custom event, indexed by `name`.
active_trigger | :: R LuaCustomTable[string → LuaActiveTriggerPrototype] | A dictionary containing every LuaActiveTriggerPrototype indexed by `name`.
A dictionary containing every LuaActiveTriggerPrototype indexed by `name`.
asteroid_chunk | :: R LuaCustomTable[string → LuaAsteroidChunkPrototype] | A dictionary containing every LuaAsteroidChunkPrototype indexed by `name`.
A dictionary containing every LuaAsteroidChunkPrototype indexed by `name`.
collision_layer | :: R LuaCustomTable[string → LuaCollisionLayerPrototype] | A dictionary containing every LuaCollisionLayerPrototype indexed by `name`.
A dictionary containing every LuaCollisionLayerPrototype indexed by `name`.
airborne_pollutant | :: R LuaCustomTable[string → LuaAirbornePollutantPrototype] | A dictionary containing every LuaAirbornePollutantPrototype indexed by `name`.
A dictionary containing every LuaAirbornePollutantPrototype indexed by `name`.
burner_usage | :: R LuaCustomTable[string → LuaBurnerUsagePrototype] | A dictionary containing every LuaBurnerUsagePrototype indexed by `name`.
A dictionary containing every LuaBurnerUsagePrototype indexed by `name`.
mod_data | :: R LuaCustomTable[string → LuaModData] | A dictionary containing every LuaModData indexed by `name`.
A dictionary containing every LuaModData indexed by `name`.
surface | :: R LuaCustomTable[string → LuaSurfacePrototype] | A dictionary containing every LuaSurfacePrototype indexed by `name`.
A dictionary containing every LuaSurfacePrototype indexed by `name`.
procession | :: R LuaCustomTable[string → LuaProcessionPrototype] | A dictionary containing every LuaProcessionPrototype indexed by `name`.
A dictionary containing every LuaProcessionPrototype indexed by `name`.
procession_layer_inheritance_group | :: R LuaCustomTable[string → LuaProcessionLayerInheritanceGroupPrototype] | A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by `name`.
A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by `name`.
max_force_distraction_distance | :: R double |
max_force_distraction_chunk_distance | :: R uint32 |
max_electric_pole_supply_area_distance | :: R float |
max_electric_pole_connection_distance | :: R double |
max_beacon_supply_area_distance | :: R uint32 |
max_gate_activation_distance | :: R double |
max_inserter_reach_distance | :: R double |
max_pipe_to_ground_distance | :: R uint8 |
max_underground_belt_distance | :: R uint8 |

## Class LuaProxyContainerControlBehavior extends LuaControlBehavior

read_contents | :: RW boolean | `true` if this proxy container is sending inventory contents to a circuit network
`true` if this proxy container is sending inventory contents to a circuit network
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. [...]

## Class LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior

set_filter | :: RW boolean | `true` if the pump should set its fluid filter from the circuit network signals.
`true` if the pump should set its fluid filter from the circuit network signals.
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. [...]

## Class LuaQualityPrototype extends LuaPrototypeBase

color | :: R Color | The color of the prototype
The color of the prototype
level | :: R uint32 | Level basically specifies the stat-increasing value of this quality level.
Level basically specifies the stat-increasing value of this quality level.
next | :: R LuaQualityPrototype | The next higher level of the quality
The next higher level of the quality
next_probability | :: R double | The probability multiplier of getting the next level of quality.
The probability multiplier of getting the next level of quality.
draw_sprite_by_default | :: R boolean |
beacon_power_usage_multiplier | :: R float |
mining_drill_resource_drain_multiplier | :: R float |
science_pack_drain_multiplier | :: R float |
default_multiplier | :: R double |
inserter_speed_multiplier | :: R double |
fluid_wagon_capacity_multiplier | :: R double |
inventory_size_multiplier | :: R double |
lab_research_speed_multiplier | :: R double |
crafting_machine_speed_multiplier | :: R double |
crafting_machine_energy_usage_multiplier | :: R double |
logistic_cell_charging_energy_multiplier | :: R double |
tool_durability_multiplier | :: R double |
accumulator_capacity_multiplier | :: R double |
flying_robot_max_energy_multiplier | :: R double |
range_multiplier | :: R double |
equipment_grid_width_bonus | :: R int16 |
equipment_grid_height_bonus | :: R int16 |
electric_pole_wire_reach_bonus | :: R float |
electric_pole_supply_area_distance_bonus | :: R float |
beacon_supply_area_distance_bonus | :: R float |
mining_drill_mining_radius_bonus | :: R float |
logistic_cell_charging_station_count_bonus | :: R uint32 |
asteroid_collector_collection_radius_bonus | :: R uint32 |
beacon_module_slots_bonus | :: R ItemStackIndex |
crafting_machine_module_slots_bonus | :: R ItemStackIndex |
mining_drill_module_slots_bonus | :: R ItemStackIndex |
lab_module_slots_bonus | :: R ItemStackIndex |
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. [...]

## Class LuaRCON

print(message) |  | Print text to the calling RCON interface if any.
Print text to the calling RCON interface if any.
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

## Class LuaRadarControlBehavior extends LuaControlBehavior

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. [...]

## Class LuaRailEnd

make_copy() | → LuaRailEnd | Creates a copy of this LuaRailEnd object.
Creates a copy of this LuaRailEnd object.
flip_direction() |  | Moves to opposite end on the rail this object points to
Moves to opposite end on the rail this object points to
move_forward(connection_direction) | → boolean | Moves forward by 1 rail to the specified connection direction
Moves forward by 1 rail to the specified connection direction
move_natural() | → boolean | Moves forward by 1 rail in the natural direction. [...]
Moves forward by 1 rail in the natural direction. [...]
move_to_segment_end() |  | Moves forward until a rail segment boundary is reached. [...]
Moves forward until a rail segment boundary is reached. [...]
get_rail_extensions(planner_item) | → array[RailExtensionData] | Returns all possible rail extensions from this position as defined by the planner item.
Returns all possible rail extensions from this position as defined by the planner item.
rail | :: R LuaEntity | Rail to which this RailEnd is binding to.
Rail to which this RailEnd is binding to.
direction | :: R defines.rail_direction | Which end of the rail this RailEnd is binding to.
Which end of the rail this RailEnd is binding to.
location | :: R RailLocation | Location of the rail end
Location of the rail end
out_signal_location | :: R RailLocation | Location of an outgoing signal, which goes to the right relative to the rail end movement.
Location of an outgoing signal, which goes to the right relative to the rail end movement.
alternative_out_signal_location | :: R RailLocation? | Location of the alternative outgoing signal, which goes to the right relative to the rail end movement. [...]
Location of the alternative outgoing signal, which goes to the right relative to the rail end movement. [...]
in_signal_location | :: R RailLocation | Location of an incoming signal, which goes to the left relative to the rail end movement.
Location of an incoming signal, which goes to the left relative to the rail end movement.
alternative_in_signal_location | :: R RailLocation? | Location of the alternative incoming signal, which goes to the right relative to the rail end movement. [...]
Location of the alternative incoming signal, which goes to the right relative to the rail end movement. [...]
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. [...]

## Class LuaRailPath

size | :: R uint32 | The total number of rails in this path.
The total number of rails in this path.
current | :: R uint32 | The current rail index.
The current rail index.
total_distance | :: R double | The total path distance.
The total path distance.
travelled_distance | :: R double | The total distance traveled.
The total distance traveled.
rails | :: R LuaCustomTable[uint32 → LuaEntity] | Array of the rails that this path travels over.
Array of the rails that this path travels over.
is_front | :: R boolean | If the path goes from the front of the train
If the path goes from the front of the train
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. [...]

## Class LuaRailSignalBaseControlBehavior extends LuaControlBehavior

red_signal | :: RW SignalID? |
orange_signal | :: RW SignalID? |
green_signal | :: RW SignalID? |
blue_signal | :: RW SignalID? |
close_signal | :: RW boolean | If this will close the rail signal based off the circuit condition.
If this will close the rail signal based off the circuit condition.
read_signal | :: RW boolean | If this will read the rail signal state.
If this will read the rail signal state.
circuit_condition | :: RW CircuitConditionDefinition | The circuit condition when controlling the signal through the circuit network.
The circuit condition when controlling the signal through the circuit network.
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. [...]

## Class LuaRandomGenerator

re_seed(seed) |  | Re-seeds the random generator with the given value. [...]
Re-seeds the random generator with the given value. [...]
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. [...]
() (call) | → double | Generates a random number. [...]
Generates a random number. [...]

## Class LuaReactorControlBehavior extends LuaControlBehavior

read_fuel | :: RW boolean | If this will read fuel inventory and currently burning fuel
If this will read fuel inventory and currently burning fuel
read_temperature | :: RW boolean | If this will read temperature of the reactor
If this will read temperature of the reactor
temperature_signal | :: RW SignalID? |
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. [...]

## Class LuaRecipe

reload() |  | Reload the recipe from the prototype.
Reload the recipe from the prototype.
has_category(category) | → boolean | Checks if recipe has given category
Checks if recipe has given category
name | :: R string | Name of the recipe. [...]
Name of the recipe. [...]
localised_name | :: R LocalisedString | Localised name of the recipe.
Localised name of the recipe.
localised_description | :: R LocalisedString |
prototype | :: R LuaRecipePrototype | The prototype for this recipe.
The prototype for this recipe.
enabled | :: RW boolean | Can the recipe be used?
Can the recipe be used?
category | :: R string | Category of the recipe.
Category of the recipe.
additional_categories | :: R array[string] | Additional categories of this recipe.
Additional categories of this recipe.
ingredients | :: R array[Ingredient] | The ingredients to this recipe.
The ingredients to this recipe.
products | :: R array[Product] | The results/products of this recipe.
The results/products of this recipe.
hidden | :: R boolean | Is the recipe hidden? [...]
Is the recipe hidden? [...]
hidden_from_flow_stats | :: RW boolean | Is the recipe hidden from flow statistics?
Is the recipe hidden from flow statistics?
energy | :: R double | Energy required to execute this recipe. [...]
Energy required to execute this recipe. [...]
order | :: R string | The string used to alphabetically sort these prototypes. [...]
The string used to alphabetically sort these prototypes. [...]
group | :: R LuaGroup | Group of this recipe.
Group of this recipe.
subgroup | :: R LuaGroup | Subgroup of this recipe.
Subgroup of this recipe.
force | :: R LuaForce | The force that owns this recipe.
The force that owns this recipe.
productivity_bonus | :: RW float | The productivity bonus for this recipe.
The productivity bonus for this recipe.
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. [...]

## Class LuaRecipeCategoryPrototype extends LuaPrototypeBase

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. [...]

## Class LuaRecipePrototype extends LuaPrototypeBase

has_category(category) | → boolean | Checks if recipe has given category
Checks if recipe has given category
enabled | :: R boolean | If this recipe prototype is enabled by default (enabled at the beginning of a game).
If this recipe prototype is enabled by default (enabled at the beginning of a game).
category | :: R string | Category of the recipe.
Category of the recipe.
additional_categories | :: R array[string] | Additional categories of the recipe.
Additional categories of the recipe.
ingredients | :: R array[Ingredient] | The ingredients to this recipe.
The ingredients to this recipe.
products | :: R array[Product] | The results/products of this recipe.
The results/products of this recipe.
main_product | :: R Product? | The main product of this recipe, if any.
The main product of this recipe, if any.
hidden_from_flow_stats | :: R boolean | Is the recipe hidden from flow statistics (item/fluid production statistics)?
Is the recipe hidden from flow statistics (item/fluid production statistics)?
hidden_from_player_crafting | :: R boolean | Is the recipe hidden from player crafting? [...]
Is the recipe hidden from player crafting? [...]
always_show_made_in | :: R boolean | Should this recipe always show "Made in" in the tooltip?
Should this recipe always show "Made in" in the tooltip?
energy | :: R double | Energy required to execute this recipe. [...]
Energy required to execute this recipe. [...]
request_paste_multiplier | :: R uint32 | The multiplier used when this recipe is copied from an assembling machine to a requester chest. [...]
The multiplier used when this recipe is copied from an assembling machine to a requester chest. [...]
overload_multiplier | :: R uint32 | Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
maximum_productivity | :: R double | The maximal productivity bonus that can be achieved with this recipe.
The maximal productivity bonus that can be achieved with this recipe.
allow_inserter_overload | :: R boolean | If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).
If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).
allow_as_intermediate | :: R boolean | If this recipe is enabled for the purpose of intermediate hand-crafting.
If this recipe is enabled for the purpose of intermediate hand-crafting.
allow_intermediates | :: R boolean | If this recipe is allowed to use intermediate recipes when hand-crafting.
If this recipe is allowed to use intermediate recipes when hand-crafting.
show_amount_in_title | :: R boolean | If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.
If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.
always_show_products | :: R boolean | If the products are always shown in the recipe tooltip.
If the products are always shown in the recipe tooltip.
emissions_multiplier | :: R double | The emissions multiplier for this recipe.
The emissions multiplier for this recipe.
allow_decomposition | :: R boolean | Is this recipe allowed to be broken down for the recipe tooltip "Total raw" calculations?
Is this recipe allowed to be broken down for the recipe tooltip "Total raw" calculations?
unlock_results | :: R boolean | Is this recipe unlocks the result item(s) so they're shown in filter-select GUIs.
Is this recipe unlocks the result item(s) so they're shown in filter-select GUIs.
hide_from_signal_gui | :: R boolean | Is this recipe is marked to be hidden from the signal GUI.
Is this recipe is marked to be hidden from the signal GUI.
hide_from_flow_stats | :: R boolean |
hide_from_player_crafting | :: R boolean |
hide_from_bonus_gui | :: R boolean |
trash | :: R array[LuaItemPrototype]? | The 'trash' items that this recipe might produce as a result of spoiling.
The 'trash' items that this recipe might produce as a result of spoiling.
preserve_products_in_machine_output | :: R boolean |
is_parameter | :: R boolean |
allowed_effects | :: R dictionary[string → boolean]? | The allowed module effects for this recipe, if any.
The allowed module effects for this recipe, if any.
allowed_module_categories | :: R dictionary[string → `true`]? | The allowed module categories for this recipe, if any.
The allowed module categories for this recipe, if any.
effect_limitation_messages | :: R array[LocalisedString]? |
surface_conditions | :: R array[SurfaceCondition]? | The surface conditions required to craft this recipe.
The surface conditions required to craft this recipe.
alternative_unlock_methods | :: R array[LuaTechnologyPrototype]? | Additional technologies listed under "Unlocked by" on a recipe's Factoriopedia page.
Additional technologies listed under "Unlocked by" on a recipe's Factoriopedia page.
crafting_machine_tints | :: R array[Color] |
factoriopedia_alternative | :: R LuaRecipePrototype? | 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.
result_is_always_fresh | :: R boolean |
reset_freshness_on_craft | :: R boolean |
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. [...]

## Class LuaRecord

export_record() | → string | Exports this record to a string.
Exports this record to a string.
clear_blueprint() |  | Clears this blueprint.
Clears this blueprint.
is_blueprint_setup() | → boolean | Is this blueprint setup? [...]
Is this blueprint setup? [...]
build_blueprint{surface=…, force=…, position=…, direction?=…, build_mode?=…, skip_fog_of_war?=…, by_player?=…, raise_built?=…} | → array[LuaEntity] | Build this blueprint at the given location. [...]
Build this blueprint at the given location. [...]
create_blueprint{surface=…, force=…, area=…, always_include_tiles?=…, include_entities?=…, include_modules?=…, include_station_names?=…, include_trains?=…, include_fuel?=…} | → dictionary[uint32 → LuaEntity] | Sets up this blueprint using the found blueprintable entities/tiles on the surface.
Sets up this blueprint using the found blueprintable entities/tiles on the surface.
get_blueprint_entity_tags(index) | → Tags | Gets the tags for the given blueprint entity index in this blueprint.
Gets the tags for the given blueprint entity index in this blueprint.
set_blueprint_entity_tags(index, tags) |  | Sets the tags on the given blueprint entity index in this blueprint.
Sets the tags on the given blueprint entity index in this blueprint.
get_blueprint_entity_tag(index, tag) | → AnyBasic? | Gets the given tag on the given blueprint entity index in this blueprint.
Gets the given tag on the given blueprint entity index in this blueprint.
set_blueprint_entity_tag(index, tag, value) |  | Sets the given tag on the given blueprint entity index in this blueprint.
Sets the given tag on the given blueprint entity index in this blueprint.
get_blueprint_entities() | → array[BlueprintEntity]? | The entities in this blueprint.
The entities in this blueprint.
set_blueprint_entities(entities) |  | Set new entities to be a part of this blueprint.
Set new entities to be a part of this blueprint.
get_blueprint_tiles() | → array[Tile]? | A list of the tiles in this blueprint.
A list of the tiles in this blueprint.
set_blueprint_tiles(tiles) |  | Set specific tiles in this blueprint.
Set specific tiles in this blueprint.
get_blueprint_entity_count() | → uint32 | Gets the number of entities in this blueprint blueprint.
Gets the number of entities in this blueprint blueprint.
get_active_index(player) | → uint32 | The active index of this BlueprintBookRecord. [...]
The active index of this BlueprintBookRecord. [...]
get_selected_record(player) | → LuaRecord? | Gets the currently selected record of the book for the given player. [...]
Gets the currently selected record of the book for the given player. [...]
get_entity_filter(index) | → ItemFilter? | Gets the entity filter at the given index for this deconstruction planner.
Gets the entity filter at the given index for this deconstruction planner.
set_entity_filter(index, filter) | → boolean | Sets the entity filter at the given index for this deconstruction planner.
Sets the entity filter at the given index for this deconstruction planner.
get_tile_filter(index) | → string? | Gets the tile filter at the given index for this deconstruction planner.
Gets the tile filter at the given index for this deconstruction planner.
set_tile_filter(index, filter) | → boolean | Sets the tile filter at the given index for this deconstruction planner.
Sets the tile filter at the given index for this deconstruction planner.
deconstruct_area{surface=…, force=…, area=…, skip_fog_of_war?=…, by_player?=…, super_forced?=…} |  | Deconstruct the given area with this deconstruction planner.
Deconstruct the given area with this deconstruction planner.
cancel_deconstruct_area{surface=…, force=…, area=…, skip_fog_of_war?=…, by_player?=…, super_forced?=…} |  | Cancel deconstruct the given area with this deconstruction planner.
Cancel deconstruct the given area with this deconstruction planner.
clear_deconstruction_data() |  | Clears all settings/filters on this deconstruction planner, resetting it to default values.
Clears all settings/filters on this deconstruction planner, resetting it to default values.
clear_upgrade_data() |  | Clears all settings/filters on this upgrade planner, resetting it to default values.
Clears all settings/filters on this upgrade planner, resetting it to default values.
get_mapper(index, type) | → UpgradeMapperSource or UpgradeMapperDestination | Gets the filter at the given index for this upgrade item. [...]
Gets the filter at the given index for this upgrade item. [...]
set_mapper(index, type, mapper) |  | Sets the module filter at the given index for this upgrade item. [...]
Sets the module filter at the given index for this upgrade item. [...]
valid_for_write | :: R boolean | Is this record valid for writing? [...]
Is this record valid for writing? [...]
type | :: R `"blueprint"` or `"blueprint-book"` or `"deconstruction-planner"` or `"upgrade-planner"` | The type of this blueprint record.
The type of this blueprint record.
preview_icons | :: RW array[BlueprintSignalIcon] | The preview icons for this record.
The preview icons for this record.
is_preview | :: R boolean | Checks if this record is in a preview state.
Checks if this record is in a preview state.
is_blueprint_preview | :: R boolean | Is this blueprint record a preview? [...]
Is this blueprint record a preview? [...]
blueprint_snap_to_grid | :: RW TilePosition? | The snapping grid size in this blueprint. [...]
The snapping grid size in this blueprint. [...]
blueprint_position_relative_to_grid | :: RW TilePosition? | The offset from the absolute grid. [...]
The offset from the absolute grid. [...]
blueprint_absolute_snapping | :: RW boolean | If absolute snapping is enabled on this blueprint.
If absolute snapping is enabled on this blueprint.
blueprint_description | :: RW string | The description for this blueprint or blueprint book.
The description for this blueprint or blueprint book.
cost_to_build | :: R array[ItemWithQualityCount] | List of raw materials required to build this blueprint.
List of raw materials required to build this blueprint.
default_icons | :: R array[BlueprintSignalIcon] | The default icons for a blueprint blueprint.
The default icons for a blueprint blueprint.
contents | :: R dictionary[ItemStackIndex → LuaRecord] | The contents of this BlueprintBookRecord. [...]
The contents of this BlueprintBookRecord. [...]
contents_size | :: R ItemStackIndex | The highest populated index in the contents of this BlueprintBookRecord.
The highest populated index in the contents of this BlueprintBookRecord.
entity_filters | :: RW array[ItemFilter] | The entity filters for this deconstruction planner. [...]
The entity filters for this deconstruction planner. [...]
tile_filters | :: RW array[TileID] | The tile filters for this deconstruction planner. [...]
The tile filters for this deconstruction planner. [...]
entity_filter_mode | :: RW defines.deconstruction_item.entity_filter_mode | The blacklist/whitelist entity filter mode for this deconstruction planner.
The blacklist/whitelist entity filter mode for this deconstruction planner.
tile_filter_mode | :: RW defines.deconstruction_item.tile_filter_mode | The blacklist/whitelist tile filter mode for this deconstruction planner.
The blacklist/whitelist tile filter mode for this deconstruction planner.
tile_selection_mode | :: RW defines.deconstruction_item.tile_selection_mode | The tile selection mode for this deconstruction planner.
The tile selection mode for this deconstruction planner.
trees_and_rocks_only | :: RW boolean | If this deconstruction planner, is set to allow trees and rocks only.
If this deconstruction planner, is set to allow trees and rocks only.
entity_filter_count | :: R uint32 | The number of entity filters this deconstruction planner supports.
The number of entity filters this deconstruction planner supports.
tile_filter_count | :: R uint32 | The number of tile filters this deconstruction planner supports.
The number of tile filters this deconstruction planner supports.
mapper_count | :: R uint32 | The current count of mappers in the upgrade item.
The current count of mappers in the upgrade item.
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. [...]

## Class LuaRemote

add_interface(name, functions) |  | Add a remote interface.
Add a remote interface.
remove_interface(name) | → boolean | Removes an interface with the given name.
Removes an interface with the given name.
call(interface, function, ...) | → Any? | Call a function of an interface. [...]
Call a function of an interface. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]
interfaces | :: R dictionary[string → dictionary[string → `true`]] | List of all registered interfaces. [...]
List of all registered interfaces. [...]

## Class LuaRenderObject

destroy() |  | Destroys this object. [...]
Destroys this object. [...]
bring_to_front() |  | Reorder this object so that it is drawn in front of the already existing objects.
Reorder this object so that it is drawn in front of the already existing objects.
move_to_back() |  | Reorder this object so that it is drawn in the back of the already existing objects.
Reorder this object so that it is drawn in the back of the already existing objects.
set_dashes(dash_length, gap_length) |  | Set the length of the dashes and the length of the gaps in this line.
Set the length of the dashes and the length of the gaps in this line.
set_corners(left_top, right_bottom) |  | Set the corners of the rectangle with this id.
Set the corners of the rectangle with this id.
id | :: R uint64 | Unique identifier of this render object.
Unique identifier of this render object.
type | :: R `"text"` or `"line"` or `"circle"` or `"rectangle"` or `"arc"` or `"polygon"` or `"sprite"` or `"light"` or `"animation"` | Type of this object.
Type of this object.
surface | :: R LuaSurface | Surface this object is rendered on.
Surface this object is rendered on.
time_to_live | :: RW uint32 | Time to live of this object. [...]
Time to live of this object. [...]
blink_interval | :: RW uint16 | Blink interval of this object based on the internal "update tick". [...]
Blink interval of this object based on the internal "update tick". [...]
forces | :: R array[LuaForce]| W ForceSet? | Forces for which this object is rendered or `nil` if visible to all forces. [...]
Forces for which this object is rendered or `nil` if visible to all forces. [...]
players | :: RW array[LuaPlayer] or array[PlayerIdentification]? | Players for which this object is visible or `nil` if visible to all players. [...]
Players for which this object is visible or `nil` if visible to all players. [...]
visible | :: RW boolean | If this object is rendered to anyone at all.
If this object is rendered to anyone at all.
draw_on_ground | :: RW boolean | If this object is being drawn on the ground, under most entities and sprites. [...]
If this object is being drawn on the ground, under most entities and sprites. [...]
only_in_alt_mode | :: RW boolean | If this object is only rendered in alt-mode.
If this object is only rendered in alt-mode.
render_mode | :: RW ScriptRenderMode | Whether the object is rendered in game world or on the chart (map view). [...]
Whether the object is rendered in game world or on the chart (map view). [...]
use_target_orientation | :: RW boolean | If this object uses the target orientation.
If this object uses the target orientation.
color | :: RW Color | Color or tint of the object.
Color or tint of the object.
width | :: RW float | Width of the object. [...]
Width of the object. [...]
from | :: RW ScriptRenderTarget | Where this line is drawn from.
Where this line is drawn from.
to | :: RW ScriptRenderTarget | Where this line is drawn to.
Where this line is drawn to.
dash_length | :: RW double | Dash length of this line.
Dash length of this line.
gap_length | :: RW double | Length of the gaps in this line.
Length of the gaps in this line.
dash_offset | :: RW double | Starting offset to apply to dashes of this line. [...]
Starting offset to apply to dashes of this line. [...]
target | :: RW ScriptRenderTarget | Where this object is drawn. [...]
Where this object is drawn. [...]
orientation | :: RW RealOrientation | Orientation of this object. [...]
Orientation of this object. [...]
scale | :: RW double | Scale of the text or light.
Scale of the text or light.
text | :: RW LocalisedString | Text that is displayed by this text object.
Text that is displayed by this text object.
font | :: RW string | Font of this text.
Font of this text.
alignment | :: RW TextAlign | Alignment of this text.
Alignment of this text.
vertical_alignment | :: RW VerticalTextAlign | Vertical alignment of this text.
Vertical alignment of this text.
scale_with_zoom | :: RW boolean | If this text scales with player zoom.
If this text scales with player zoom.
use_rich_text | :: RW boolean | If this text parses rich text tags.
If this text parses rich text tags.
filled | :: RW boolean | If this circle or rectangle is filled.
If this circle or rectangle is filled.
radius | :: RW double | Radius of this circle.
Radius of this circle.
left_top | :: RW ScriptRenderTarget | Where top left corner of this rectangle is drawn.
Where top left corner of this rectangle is drawn.
right_bottom | :: RW ScriptRenderTarget | Where bottom right corner of this rectangle is drawn.
Where bottom right corner of this rectangle is drawn.
max_radius | :: RW double | Radius of the outer edge of this arc.
Radius of the outer edge of this arc.
min_radius | :: RW double | Radius of the inner edge of this arc.
Radius of the inner edge of this arc.
start_angle | :: RW float | Where this arc starts. [...]
Where this arc starts. [...]
angle | :: RW float | Angle of this arc. [...]
Angle of this arc. [...]
vertices | :: RW array[ScriptRenderTarget] | Vertices of this polygon.
Vertices of this polygon.
sprite | :: RW SpritePath | Sprite of the sprite or light.
Sprite of the sprite or light.
x_scale | :: RW double | Horizontal scale of this sprite or animation.
Horizontal scale of this sprite or animation.
y_scale | :: RW double | Vertical scale of this sprite or animation.
Vertical scale of this sprite or animation.
render_layer | :: RW RenderLayer | Render layer of this sprite or animation.
Render layer of this sprite or animation.
orientation_target | :: RW ScriptRenderTarget? | Target to which this object rotates so that it faces the target. [...]
Target to which this object rotates so that it faces the target. [...]
oriented_offset | :: RW Vector | Offsets the center of the sprite or animation if `orientation_target` is given. [...]
Offsets the center of the sprite or animation if `orientation_target` is given. [...]
intensity | :: RW float | Intensity of this light.
Intensity of this light.
minimum_darkness | :: RW float | Minimum darkness at which this light is rendered.
Minimum darkness at which this light is rendered.
oriented | :: RW boolean | If this light is rendered with the same orientation as the target entity. [...]
If this light is rendered with the same orientation as the target entity. [...]
animation | :: RW string | Animation prototype name of this animation.
Animation prototype name of this animation.
animation_speed | :: RW double | Animation speed of this animation. [...]
Animation speed of this animation. [...]
animation_offset | :: RW double | Animation offset of this animation. [...]
Animation offset of this animation. [...]
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. [...]

## Class LuaRendering

draw_line{color=…, width=…, gap_length?=…, dash_length?=…, dash_offset?=…, from=…, to=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a line.
Create a line.
draw_text{text=…, surface=…, target=…, color=…, scale?=…, font?=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, orientation?=…, alignment?=…, vertical_alignment?=…, scale_with_zoom?=…, only_in_alt_mode?=…, render_mode?=…, use_rich_text?=…} | → LuaRenderObject | Create a text. [...]
Create a text. [...]
draw_circle{color=…, radius=…, width?=…, filled?=…, target=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a circle.
Create a circle.
draw_rectangle{color=…, width?=…, filled?=…, left_top=…, right_bottom=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a rectangle.
Create a rectangle.
draw_arc{color=…, max_radius=…, min_radius=…, start_angle=…, angle=…, target=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create an arc.
Create an arc.
draw_polygon{color=…, vertices=…, target?=…, orientation?=…, orientation_target?=…, use_target_orientation?=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a triangle mesh defined by a triangle strip.
Create a triangle mesh defined by a triangle strip.
draw_sprite{sprite=…, orientation?=…, x_scale?=…, y_scale?=…, tint?=…, render_layer?=…, orientation_target?=…, use_target_orientation?=…, oriented_offset?=…, target=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a sprite.
Create a sprite.
draw_light{sprite=…, orientation?=…, scale?=…, intensity?=…, minimum_darkness?=…, oriented?=…, color?=…, target=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create a light. [...]
Create a light. [...]
draw_animation{animation=…, orientation?=…, x_scale?=…, y_scale?=…, tint?=…, render_layer?=…, animation_speed?=…, animation_offset?=…, orientation_target?=…, use_target_orientation?=…, oriented_offset?=…, target=…, surface=…, time_to_live?=…, blink_interval?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…, render_mode?=…} | → LuaRenderObject | Create an animation.
Create an animation.
get_all_objects(mod_name?) | → array[LuaRenderObject] | Gets an array of all valid objects.
Gets an array of all valid objects.
clear(mod_name?) |  | Destroys all render objects.
Destroys all render objects.
get_object_by_id(object_id) | → LuaRenderObject? | Gives LuaRenderObject for given object ID. [...]
Gives LuaRenderObject for given object ID. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

## Class LuaResourceCategoryPrototype extends LuaPrototypeBase

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. [...]

## Class LuaRoboportControlBehavior extends LuaControlBehavior

read_items_mode | :: RW defines.control_behavior.roboport.read_items_mode | Selects contents that are to be read from the roboport
Selects contents that are to be read from the roboport
read_logistics | :: RW boolean | Legacy field, please use LuaRoboportControlBehavior::read_items_mode instead. [...]
Legacy field, please use LuaRoboportControlBehavior::read_items_mode instead. [...]
read_robot_stats | :: RW boolean | `true` if the roboport should report the robot statistics to the circuit network.
`true` if the roboport should report the robot statistics to the circuit network.
available_logistic_output_signal | :: RW SignalID? |
total_logistic_output_signal | :: RW SignalID? |
available_construction_output_signal | :: RW SignalID? |
total_construction_output_signal | :: RW SignalID? |
roboport_count_output_signal | :: RW SignalID? |
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. [...]

## Class LuaRocketSiloControlBehavior extends LuaControlBehavior

read_mode | :: RW defines.control_behavior.rocket_silo.read_mode | The items read mode for the rocket silo.
The items read mode for the rocket silo.
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. [...]

## Class LuaSchedule

add_wait_condition(record_position, condition_index, type) |  | Adds the given wait condition to the given record.
Adds the given wait condition to the given record.
remove_wait_condition(record_position, condition_index) |  | Removes the given wait condition from the given record.
Removes the given wait condition from the given record.
set_wait_condition_mode(record_position, condition_index, mode) |  | Sets the comparison on the given wait condition.
Sets the comparison on the given wait condition.
change_wait_condition(record_position, condition_index, wait_condition) |  | Changes the wait condition on the given record to the new values.
Changes the wait condition on the given record to the new values.
add_record(data) | → uint32? | Adds the given record to the end of the current schedule or at the given index using the provided data.
Adds the given record to the end of the current schedule or at the given index using the provided data.
remove_record(record_position) |  | Removes the record at the given record position, if the record position is valid.
Removes the record at the given record position, if the record position is valid.
copy_record(source_schedule, source_index, destination_index) |  | Copies the record from the given schedule at the given index into this schedule at the given index.
Copies the record from the given schedule at the given index into this schedule at the given index.
add_interrupt(interrupt) |  | Adds the given interrupt to the schedule if an interrupt with the given name does not already exist.
Adds the given interrupt to the schedule if an interrupt with the given name does not already exist.
remove_interrupt(index) |  | Removes the interrupt at the given index, if the index is valid.
Removes the interrupt at the given index, if the index is valid.
activate_interrupt(index) |  | Activates the interrupt at the given index, if the index is valid.
Activates the interrupt at the given index, if the index is valid.
change_interrupt(index, interrupt) |  | Changes the interrupt at the given index to the provided values. [...]
Changes the interrupt at the given index to the provided values. [...]
rename_interrupt(old_name, new_name) |  |
go_to_station(schedule_index) |  | Sets the train or space platform to go to a destination, including changing the train/space platform to automatic mode.
Sets the train or space platform to go to a destination, including changing the train/space platform to automatic mode.
set_stopped(stopped) |  | Sets whether this train is in manual mode or this space platform is paused.
Sets whether this train is in manual mode or this space platform is paused.
set_allow_unloading(record_position, allow) |  | Sets if unloading is allowed at the given schedule record position. [...]
Sets if unloading is allowed at the given schedule record position. [...]
drag_record(from, to, interrupt_index?) |  |
drag_interrupt(from, to) |  |
drag_wait_condition(record_position, from, to) |  |
get_record(record_position) | → ScheduleRecord? |
get_records(interrupt_index?) | → array[ScheduleRecord]? |
set_records(records, interrupt_index?) |  |
clear_records(interrupt_index?) |  |
get_interrupt(index) | → ScheduleInterrupt? |
get_interrupts() | → array[ScheduleInterrupt] |
set_interrupts(interrupts) |  |
clear_interrupts() |  | Removes all interrupts.
Removes all interrupts.
get_wait_condition(record_position, condition_index) | → WaitCondition? | Gets the wait condition at the given record position if one exists.
Gets the wait condition at the given record position if one exists.
get_wait_conditions(record_position) | → array[WaitCondition]? | Gets the wait conditions at the given record position if they exist.
Gets the wait conditions at the given record position if they exist.
get_wait_condition_count(record_position) | → uint32? | The number of wait conditions in the given schedule record.
The number of wait conditions in the given schedule record.
get_inside_interrupt(interrupt_index) | → boolean | Gets if the given interrupt can be triggered inside other interrupts.
Gets if the given interrupt can be triggered inside other interrupts.
set_inside_interrupt(interrupt_index, value) |  | Sets if the given interrupt can be triggered inside other interrupts.
Sets if the given interrupt can be triggered inside other interrupts.
get_record_count(interrupt_index?) | → uint32? | If the given index is invalid, `nil` is returned.
If the given index is invalid, `nil` is returned.
owner | :: R LuaTrain or LuaSpacePlatform? | The owner of this schedule.
The owner of this schedule.
interrupt_count | :: R uint32 |
current | :: R uint32 | The schedule index of the current destination.
The schedule index of the current destination.
tick_of_last_schedule_change | :: R MapTick |
tick_of_last_activity | :: RW MapTick | The time when the train or space platform was last considered active for the inactivity condition. [...]
The time when the train or space platform was last considered active for the inactivity condition. [...]
ticks_in_station | :: R MapTick | How long this train or space platform has been in the current station.
How long this train or space platform has been in the current station.
group | :: RW string? | The group this schedule is part of, if any.
The group this schedule is part of, if any.
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. [...]

## Class LuaSegment

prototype | :: R LuaEntityPrototype | The prototype for the entity representation of the segment.
The prototype for the entity representation of the segment.
unit | :: R LuaSegmentedUnit | The segmented unit that owns the segment.
The segmented unit that owns the segment.
entity | :: R LuaEntity? | The actual entity representation of the segment if it exists. [...]
The actual entity representation of the segment if it exists. [...]
position | :: R MapPosition? | The position of the segment if one has been assigned. [...]
The position of the segment if one has been assigned. [...]
orientation | :: R RealOrientation? | The relative orientation of the segment if one has been assigned. [...]
The relative orientation of the segment if one has been assigned. [...]
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. [...]

## Class LuaSegmentedUnit

destroy{raise_destroy?=…} |  | Destroys the segmented unit.
Destroys the segmented unit.
die(force?, cause?, damage_type?) |  | Immediately kills the unit. [...]
Immediately kills the unit. [...]
damage(damage, force, type?, source?, cause?) | → float | Damages the unit.
Damages the unit.
move_forward(distance) |  | Moves the unit forward by a fixed distance according to its natural movement patterns and AI configuration. [...]
Moves the unit forward by a fixed distance according to its natural movement patterns and AI configuration. [...]
clone{position=…, surface?=…, force?=…, territory?=…} | → LuaSegmentedUnit? | Clones this unit.
Clones this unit.
get_body_nodes() | → array[MapPosition] | Gets the nodes that define the shape of the unit's body from front to back. [...]
Gets the nodes that define the shape of the unit's body from front to back. [...]
set_body_nodes(nodes) |  | Overwrites the segmented unit's body nodes, which are a series of points that make up the general shape of the unit. [...]
Overwrites the segmented unit's body nodes, which are a series of points that make up the general shape of the unit. [...]
get_ai_state() | → SegmentedUnitAIState | Gets the state of the unit's AI. [...]
Gets the state of the unit's AI. [...]
set_ai_state(state) |  | Sets the segmented unit's AI.
Sets the segmented unit's AI.
prototype | :: R LuaEntityPrototype | The prototype of the `segmented-unit` entity that defines the traits and behaviors of the unit.
The prototype of the `segmented-unit` entity that defines the traits and behaviors of the unit.
surface | :: R LuaSurface | The surface on which the unit is located.
The surface on which the unit is located.
territory | :: RW LuaTerritory? | The territory that the unit is protecting.
The territory that the unit is protecting.
segments | :: R array[LuaSegment] | The segments that compose the unit.
The segments that compose the unit.
force | :: R LuaForce| W ForceID | The force that the unit belongs to. [...]
The force that the unit belongs to. [...]
unit_number | :: R uint64 | A unique number identifying this unit for the lifetime of the save. [...]
A unique number identifying this unit for the lifetime of the save. [...]
health | :: RW float | The current health of the unit. [...]
The current health of the unit. [...]
max_health | :: R float | The maximum health of the unit.
The maximum health of the unit.
health_ratio | :: RW float | The ratio of LuaSegmentedUnit::health to LuaSegmentedUnit::max_health. [...]
The ratio of LuaSegmentedUnit::health to LuaSegmentedUnit::max_health. [...]
speed | :: RW double | The current instantaneous speed in tiles per map tick. [...]
The current instantaneous speed in tiles per map tick. [...]
target_speed | :: R double | The speed in tiles per tick that the unit is currently attempting to reach, as determined by its AI. [...]
The speed in tiles per tick that the unit is currently attempting to reach, as determined by its AI. [...]
acceleration | :: R double | The rate at which LuaSegmentedUnit::speed is changing over time, in tiles per tick per tick. [...]
The rate at which LuaSegmentedUnit::speed is changing over time, in tiles per tick per tick. [...]
max_body_nodes | :: R uint32 | The maximum length of LuaSegmentedUnit::get_body_nodes.
The maximum length of LuaSegmentedUnit::get_body_nodes.
activity_mode | :: RW defines.segmented_unit_activity_mode | The current activity mode of the unit. [...]
The current activity mode of the unit. [...]
minimum_activity_mode | :: RW defines.segmented_unit_activity_mode | The lowest-level activity mode that the unit is allowed to be in. [...]
The lowest-level activity mode that the unit is allowed to be in. [...]
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. [...]

## Class LuaSelectorCombinatorControlBehavior extends LuaCombinatorControlBehavior

parameters | :: RW SelectorCombinatorParameters | The selector combinator parameters. [...]
The selector combinator parameters. [...]
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. [...]

## Class LuaSettings

get_player_settings(player) | → LuaCustomTable[string → ModSetting] | Gets the current per-player settings for the given player, indexed by prototype name. [...]
Gets the current per-player settings for the given player, indexed by prototype name. [...]
startup | :: R LuaCustomTable[string → ModSetting] | The startup mod settings, indexed by prototype name.
The startup mod settings, indexed by prototype name.
global | :: R LuaCustomTable[string → ModSetting] | The current global mod settings, indexed by prototype name. [...]
The current global mod settings, indexed by prototype name. [...]
player_default | :: R LuaCustomTable[string → ModSetting] | The default player mod settings for this map, indexed by prototype name. [...]
The default player mod settings for this map, indexed by prototype name. [...]
object_name | :: R string | The class name of this object. [...]
The class name of this object. [...]

## Class LuaShortcutPrototype extends LuaPrototypeBase

action | :: R string |
item_to_spawn | :: R LuaItemPrototype? | The item to create when this shortcut is used, if any.
The item to create when this shortcut is used, if any.
technology_to_unlock | :: R LuaTechnologyPrototype? | The technology that needs to be researched once (in any save) for this shortcut to be unlocked (in all saves).
The technology that needs to be researched once (in any save) for this shortcut to be unlocked (in all saves).
toggleable | :: R boolean |
associated_control_input | :: R string? | The control input that is associated with this shortcut, if any.
The control input that is associated with this shortcut, if any.
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. [...]

## Class LuaSimulation

create_test_player{name=…} | → LuaPlayer |
get_slot_position{inventory_index=…, slot_index=…, inventory?=…} | → MapPosition? |
get_widget_position{type=…, data?=…, data2?=…} | → MapPosition? |
activate_rail_planner{position?=…, ghost_mode?=…, build_mode?=…} |  | Activate the rail planner at the given position.
Activate the rail planner at the given position.
deactivate_rail_planner() |  | Deactivate the rail planner.
Deactivate the rail planner.
move_cursor{position=…, speed?=…} | → boolean | Move the cursor towards the given position at the given speed.
Move the cursor towards the given position at the given speed.
mouse_down() |  | Send a left mouse button-down event at its current position.
Send a left mouse button-down event at its current position.
mouse_up() |  | Send a left mouse button-up event at its current position.
Send a left mouse button-up event at its current position.
mouse_click() |  | Send a left mouse button click event at its current position. [...]
Send a left mouse button click event at its current position. [...]
control_down{control=…, notify=…} |  | Send a control press event at the current cursor position.
Send a control press event at the current cursor position.
control_up{control=…} |  | Send a control release event at the current cursor position.
Send a control release event at the current cursor position.
control_press{control=…, notify=…} |  | Send a control down and up event at the current cursor position. [...]
Send a control down and up event at the current cursor position. [...]
write{text?=…} |  | Write text as if it was typed by a player. [...]
Write text as if it was typed by a player. [...]
scroll_clipboard_forwards() |  | Scroll the clipboard forwards by one entry.
Scroll the clipboard forwards by one entry.
scroll_clipboard_backwards() |  | Scroll the clipboard backwards by one entry.
Scroll the clipboard backwards by one entry.
camera_player_cursor_position | :: RW MapPosition? |
camera_position | :: RW MapPosition? |
camera_surface_index | :: RW uint32? |
hide_cursor | :: W boolean |
camera_zoom | :: W double |
camera_player | :: W PlayerIdentification |
camera_player_cursor_direction | :: W defines.direction |
camera_alt_info | :: W boolean |
smart_belt_building | :: W boolean? |
gui_tooltip_interval | :: W double |
active_quickbars | :: W uint8 |
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. [...]

## Class LuaSpaceConnectionPrototype extends LuaPrototypeBase

from | :: R LuaSpaceLocationPrototype |
to | :: R LuaSpaceLocationPrototype |
length | :: R uint32 |
asteroid_spawn_definitions | :: R array[SpaceConnectionAsteroidSpawnDefinition]? |
factoriopedia_alternative | :: R LuaSpaceConnectionPrototype? | 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.
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. [...]

## Class LuaSpaceLocationPrototype extends LuaPrototypeBase

gravity_pull | :: R double |
distance | :: R double |
orientation | :: R RealOrientation |
starmap_icon_orientation | :: R RealOrientation |
position | :: R MapPosition |
magnitude | :: R double |
parked_platforms_orientation | :: R RealOrientation |
parked_platforms_position | :: R MapPosition |
label_orientation | :: R RealOrientation |
draw_orbit | :: R boolean |
fly_condition | :: R boolean |
solar_power_in_space | :: R double |
asteroid_spawn_influence | :: R double |
asteroid_spawn_definitions | :: R array[SpaceLocationAsteroidSpawnDefinition]? |
factoriopedia_alternative | :: R LuaSpaceLocationPrototype? | 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.
map_seed_offset | :: R uint32? |
map_gen_settings | :: R MapGenSettings? |
entities_require_heating | :: R boolean? |
pollutant_type | :: R LuaAirbornePollutantPrototype? |
player_effects | :: R array[TriggerItem]? |
ticks_between_player_effects | :: R uint32? |
surface_properties | :: R dictionary[string → double]? | A mapping of the surface property name to the value.
A mapping of the surface property name to the value.
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. [...]

## Class LuaSpacePlatform

destroy(ticks?) |  | Schedules this space platform for deletion.
Schedules this space platform for deletion.
cancel_deletion() |  | Cancels deletion of this space platform if it was scheduled for deletion.
Cancels deletion of this space platform if it was scheduled for deletion.
apply_starter_pack() | → LuaEntity? | Applies the starter pack for this platform if it hasn't already been applied.
Applies the starter pack for this platform if it hasn't already been applied.
damage_tile{position=…, damage=…, cause?=…} |  | Damages the given tile if it exists, the chunk is generated, and it is a platform foundation tile.
Damages the given tile if it exists, the chunk is generated, and it is a platform foundation tile.
repair_tile(position, amount?) |  | Repairs the given tile if it's damaged.
Repairs the given tile if it's damaged.
destroy_asteroid_chunks{area?=…, position?=…, name?=…, limit?=…, invert?=…} | → uint32 | Destroys all asteroid chunks from the given area. [...]
Destroys all asteroid chunks from the given area. [...]
create_asteroid_chunks(asteroid_chunks) |  | Creates the given asteroid chunks on this platform.
Creates the given asteroid chunks on this platform.
find_asteroid_chunks_filtered{area?=…, position?=…, name?=…, limit?=…, invert?=…} | → array[AsteroidChunk] | Find asteroid chunks of a given name in a given area. [...]
Find asteroid chunks of a given name in a given area. [...]
can_leave_current_location() | → boolean | Returns `true` when the space platform isn't waiting on any delivery from the planet.
Returns `true` when the space platform isn't waiting on any delivery from the planet.
get_schedule() | → LuaSchedule | This allows full access to the space platform schedule, including modifying the schedule records, the group and the interrupts.
This allows full access to the space platform schedule, including modifying the schedule records, the group and the interrupts.
eject_item(item, position, movement) |  | Ejects an item into space on this space platform. [...]
Ejects an item into space on this space platform. [...]
clear_ejected_items() |  | Removes all ejected items from this space platform.
Removes all ejected items from this space platform.
force | :: R LuaForce | The force of this space platform.
The force of this space platform.
name | :: RW string | The name of this space platform.
The name of this space platform.
index | :: R uint32 | The unique index of this space platform.
The unique index of this space platform.
space_location | :: RW LuaSpaceLocationPrototype? | The space location this space platform is stopped at or `nil`. [...]
The space location this space platform is stopped at or `nil`. [...]
last_visited_space_location | :: R LuaSpaceLocationPrototype? | The space location this space platform previously went through or stopped at.
The space location this space platform previously went through or stopped at.
space_connection | :: RW LuaSpaceConnectionPrototype? | The space connection this space platform is traveling through or `nil`. [...]
The space connection this space platform is traveling through or `nil`. [...]
distance | :: RW double? | The point on space connection this platform is at or `nil`. [...]
The point on space connection this platform is at or `nil`. [...]
state | :: R defines.space_platform_state | The current state of this space platform.
The current state of this space platform.
paused | :: RW boolean | When `true`, the platform has paused thrust and does not advance its schedule.
When `true`, the platform has paused thrust and does not advance its schedule.
starter_pack | :: R ItemIDAndQualityIDPair? | The starter pack used to create this space platform.
The starter pack used to create this space platform.
surface | :: R LuaSurface | The surface that belongs to this platform (if it has been created yet).
The surface that belongs to this platform (if it has been created yet).
hub | :: R LuaEntity? | The hub on this platform. [...]
The hub on this platform. [...]
schedule | :: RW PlatformSchedule? | This platform's current schedule, if any. [...]
This platform's current schedule, if any. [...]
speed | :: RW double |
scheduled_for_deletion | :: R uint32 | If this platform is scheduled for deletion. [...]
If this platform is scheduled for deletion. [...]
weight | :: R Weight | The total weight of the platform.
The total weight of the platform.
damaged_tiles | :: R array[table] | The damaged tiles on this platform.
The damaged tiles on this platform.
ejected_items | :: R array[EjectedItem] | All items that have been thrown overboard.
All items that have been thrown overboard.
hidden | :: RW boolean | If this platform is hidden from the remote view surface list.
If this platform is hidden from the remote view surface list.
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. [...]

## Class LuaSpacePlatformHubControlBehavior extends LuaControlBehavior

read_contents | :: RW boolean | `true` if this hub is sending its content to a circuit network
`true` if this hub is sending its content to a circuit network
send_to_platform | :: RW boolean | Whether the signals are used for circuit conditions in the platform's schedule
Whether the signals are used for circuit conditions in the platform's schedule
read_moving_from | :: RW boolean | Whether current connection "from" end is sent to circuit network.
Whether current connection "from" end is sent to circuit network.
read_moving_to | :: RW boolean | Whether current connection "to" end is sent to circuit network.
Whether current connection "to" end is sent to circuit network.
read_speed | :: RW boolean | Whether current speed of space platform is sent to circuit network.
Whether current speed of space platform is sent to circuit network.
speed_signal | :: RW SignalID? | Signal to be transmitted with platform's current speed.
Signal to be transmitted with platform's current speed.
read_damage_taken | :: RW boolean | Whether damage taken by the space platform is sent to circuit network.
Whether damage taken by the space platform is sent to circuit network.
damage_taken_signal | :: RW SignalID? | Signal to be transmitted with platform's damage taken value.
Signal to be transmitted with platform's damage taken value.
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. [...]

## Class LuaSplitterControlBehavior extends LuaControlBehavior

set_input_side | :: RW boolean |
input_left_condition | :: RW CircuitConditionDefinition |
input_right_condition | :: RW CircuitConditionDefinition |
set_output_side | :: RW boolean |
output_left_condition | :: RW CircuitConditionDefinition |
output_right_condition | :: RW CircuitConditionDefinition |
set_filter | :: RW boolean |
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. [...]

## Class LuaStorageTankControlBehavior extends LuaControlBehavior

read_contents | :: RW boolean | If the storage tank content is sent to circuit network
If the storage tank content is sent to circuit network
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. [...]

## Class LuaStyle

gui | :: R LuaGui | Gui of the LuaGuiElement of this style.
Gui of the LuaGuiElement of this style.
name | :: R string | Name of this style.
Name of this style.
minimal_width | :: RW int32 | Minimal width ensures, that the widget will never be smaller than than that size. [...]
Minimal width ensures, that the widget will never be smaller than than that size. [...]
maximal_width | :: RW int32 | Maximal width ensures, that the widget will never be bigger than than that size. [...]
Maximal width ensures, that the widget will never be bigger than than that size. [...]
minimal_height | :: RW int32 | Minimal height ensures, that the widget will never be smaller than than that size. [...]
Minimal height ensures, that the widget will never be smaller than than that size. [...]
maximal_height | :: RW int32 | Maximal height ensures, that the widget will never be bigger than than that size. [...]
Maximal height ensures, that the widget will never be bigger than than that size. [...]
natural_width | :: RW int32 | Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
natural_height | :: RW int32 | Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
top_padding | :: RW int16 |
right_padding | :: RW int16 |
bottom_padding | :: RW int16 |
left_padding | :: RW int16 |
top_margin | :: RW int16 |
right_margin | :: RW int16 |
bottom_margin | :: RW int16 |
left_margin | :: RW int16 |
horizontal_align | :: RW `"left"` or `"center"` or `"right"`? | Horizontal align of the inner content of the widget, if any.
Horizontal align of the inner content of the widget, if any.
vertical_align | :: RW `"top"` or `"center"` or `"bottom"`? | Vertical align of the inner content of the widget, if any.
Vertical align of the inner content of the widget, if any.
font_color | :: RW Color |
font | :: RW string |
top_cell_padding | :: RW int16 | Space between the table cell contents top and border.
Space between the table cell contents top and border.
right_cell_padding | :: RW int16 | Space between the table cell contents right and border.
Space between the table cell contents right and border.
bottom_cell_padding | :: RW int16 | Space between the table cell contents bottom and border.
Space between the table cell contents bottom and border.
left_cell_padding | :: RW int16 | Space between the table cell contents left and border.
Space between the table cell contents left and border.
horizontally_stretchable | :: RW boolean? | Whether the GUI element stretches its size horizontally to other elements. [...]
Whether the GUI element stretches its size horizontally to other elements. [...]
vertically_stretchable | :: RW boolean? | Whether the GUI element stretches its size vertically to other elements. [...]
Whether the GUI element stretches its size vertically to other elements. [...]
horizontally_squashable | :: RW boolean? | Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. [...]
Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. [...]
vertically_squashable | :: RW boolean? | Whether the GUI element can be squashed (by maximal height of some parent element) vertically. [...]
Whether the GUI element can be squashed (by maximal height of some parent element) vertically. [...]
rich_text_setting | :: RW defines.rich_text_setting | How this GUI element handles rich text.
How this GUI element handles rich text.
hovered_font_color | :: RW Color |
clicked_font_color | :: RW Color |
disabled_font_color | :: RW Color |
pie_progress_color | :: RW Color |
clicked_vertical_offset | :: RW uint32 |
selected_font_color | :: RW Color |
selected_hovered_font_color | :: RW Color |
selected_clicked_font_color | :: RW Color |
strikethrough_color | :: RW Color |
draw_grayscale_picture | :: RW boolean |
horizontal_spacing | :: RW int32 | Horizontal space between individual cells.
Horizontal space between individual cells.
vertical_spacing | :: RW int32 | Vertical space between individual cells.
Vertical space between individual cells.
use_header_filler | :: RW boolean |
bar_width | :: RW uint32 | The thickness of the bar, not the horizontal width.
The thickness of the bar, not the horizontal width.
color | :: RW Color |
column_alignments | :: R LuaCustomTable[uint32 → Alignment] | Array containing the alignment for every column of this table element. [...]
Array containing the alignment for every column of this table element. [...]
single_line | :: RW boolean |
extra_top_padding_when_activated | :: RW int32 |
extra_bottom_padding_when_activated | :: RW int32 |
extra_left_padding_when_activated | :: RW int32 |
extra_right_padding_when_activated | :: RW int32 |
extra_top_margin_when_activated | :: RW int32 |
extra_bottom_margin_when_activated | :: RW int32 |
extra_left_margin_when_activated | :: RW int32 |
extra_right_margin_when_activated | :: RW int32 |
extra_padding_when_activated | :: W int32 or array[int32] | Sets `extra_top/right/bottom/left_padding_when_activated` to this value. [...]
Sets `extra_top/right/bottom/left_padding_when_activated` to this value. [...]
extra_margin_when_activated | :: W int32 or array[int32] | Sets `extra_top/right/bottom/left_margin_when_activated` to this value. [...]
Sets `extra_top/right/bottom/left_margin_when_activated` to this value. [...]
stretch_image_to_widget_size | :: RW boolean |
badge_font | :: RW string |
badge_horizontal_spacing | :: RW int32 |
default_badge_font_color | :: RW Color |
selected_badge_font_color | :: RW Color |
disabled_badge_font_color | :: RW Color |
width | :: W int32 | Sets both minimal and maximal width to the given value.
Sets both minimal and maximal width to the given value.
height | :: W int32 | Sets both minimal and maximal height to the given value.
Sets both minimal and maximal height to the given value.
size | :: W int32 or array[int32] | Sets both width and height to the given value. [...]
Sets both width and height to the given value. [...]
padding | :: W int16 or array[int16] | Sets top/right/bottom/left paddings to this value. [...]
Sets top/right/bottom/left paddings to this value. [...]
margin | :: W int16 or array[int16] | Sets top/right/bottom/left margins to this value. [...]
Sets top/right/bottom/left margins to this value. [...]
cell_padding | :: W int16 | Space between the table cell contents and border. [...]
Space between the table cell contents and border. [...]
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. [...]

## Class LuaSurface

get_pollution(position) | → double | Get the pollution for a given position. [...]
Get the pollution for a given position. [...]
set_pollution(position, amount) |  | Set the pollution for a given position. [...]
Set the pollution for a given position. [...]
can_place_entity{name=…, position=…, direction?=…, force?=…, build_check_type?=…, forced?=…, inner_name?=…} | → boolean | Check for collisions with terrain or other entities.
Check for collisions with terrain or other entities.
can_fast_replace{name=…, position=…, direction?=…, force?=…} | → boolean | If there exists an entity at the given location that can be fast-replaced with the given entity parameters.
If there exists an entity at the given location that can be fast-replaced with the given entity parameters.
find_entity(entity, position) | → LuaEntity? | Find an entity of the given name at the given position. [...]
Find an entity of the given name at the given position. [...]
find_entities(area?) | → array[LuaEntity] | Find entities in a given area. [...]
Find entities in a given area. [...]
find_entities_filtered(filter) | → array[LuaEntity] | Find all entities of the given type or name in the given area. [...]
Find all entities of the given type or name in the given area. [...]
find_tiles_filtered(filter) | → array[LuaTile] | Find all tiles of the given name in the given area. [...]
Find all tiles of the given name in the given area. [...]
count_entities_filtered(filter) | → uint32 | Count entities of given type or name in a given area. [...]
Count entities of given type or name in a given area. [...]
count_tiles_filtered(filter) | → uint32 | Count tiles of a given name in a given area. [...]
Count tiles of a given name in a given area. [...]
find_non_colliding_position(name, center, radius, precision, force_to_tile_center?) | → MapPosition? | Find a non-colliding position within a given radius. [...]
Find a non-colliding position within a given radius. [...]
find_non_colliding_position_in_box(name, search_space, precision, force_to_tile_center?) | → MapPosition? | Find a non-colliding position within a given rectangle.
Find a non-colliding position within a given rectangle.
spill_item_stack{position=…, stack=…, enable_looted?=…, force?=…, allow_belts?=…, max_radius?=…, use_start_position_on_failure?=…, drop_full_stack?=…} | → array[LuaEntity] | Spill items on the ground centered at a given location.
Spill items on the ground centered at a given location.
spill_inventory{position=…, inventory=…, enable_looted?=…, force?=…, allow_belts?=…, max_radius?=…, use_start_position_on_failure?=…, drop_full_stack?=…} | → array[LuaEntity] | Spill inventory on the ground centered at a given location.
Spill inventory on the ground centered at a given location.
find_enemy_units(center, radius, force?) | → array[LuaEntity] | Find enemy units (entities with type "unit") of a given force within an area. [...]
Find enemy units (entities with type "unit") of a given force within an area. [...]
find_units{area=…, force=…, condition=…} | → array[LuaEntity] | Find units (entities with type "unit") of a given force and force condition within a given area. [...]
Find units (entities with type "unit") of a given force and force condition within a given area. [...]
find_nearest_enemy{position=…, max_distance=…, force?=…} | → LuaEntity? | Find the enemy military target (military entity) closest to the given position.
Find the enemy military target (military entity) closest to the given position.
find_nearest_enemy_entity_with_owner{position=…, max_distance=…, force?=…} | → LuaEntity | Find the enemy entity-with-owner closest to the given position.
Find the enemy entity-with-owner closest to the given position.
set_multi_command{command=…, unit_count=…, force?=…, unit_search_distance?=…} | → uint32 | Give a command to multiple units. [...]
Give a command to multiple units. [...]
create_entity{name=…, position=…, direction?=…, mirror?=…, quality?=…, force?=…, target?=…, source?=…, cause?=…, snap_to_grid?=…, fast_replace?=…, undo_index?=…, player?=…, character?=…, spill?=…, raise_built?=…, create_build_effect_smoke?=…, spawn_decorations?=…, move_stuck_players?=…, item?=…, preserve_ghosts_and_corpses?=…, register_plant?=…, burner_fuel_inventory?=…} | → LuaEntity? | Create an entity on this surface.
Create an entity on this surface.
create_segmented_unit{name=…, quality?=…, force?=…, territory?=…} | → LuaSegmentedUnit? | Create a segmented unit on the surface. [...]
Create a segmented unit on the surface. [...]
create_territory{chunks=…, patrol_path?=…} | → LuaTerritory? | Create a territory on the surface.
Create a territory on the surface.
create_trivial_smoke{name=…, position=…} |  |
create_particle{name=…, position=…, movement=…, height=…, vertical_speed=…, frame_speed=…} |  | Creates a particle at the given location
Creates a particle at the given location
create_unit_group{position=…, force?=…} | → LuaCommandable | Create a new unit group at a given position.
Create a new unit group at a given position.
build_enemy_base(position, unit_count, force?) |  | Send a group to build a new base. [...]
Send a group to build a new base. [...]
get_tile(x, y) | → LuaTile | Get the tile at a given position. [...]
Get the tile at a given position. [...]
set_tiles(tiles, correct_tiles?, remove_colliding_entities?, remove_colliding_decoratives?, raise_event?, player?, undo_index?) |  | Set tiles at specified locations. [...]
Set tiles at specified locations. [...]
pollute(source, amount, prototype?) |  | Spawn pollution at the given position.
Spawn pollution at the given position.
get_chunks() | → LuaChunkIterator | Get an iterator going over every chunk on this surface. [...]
Get an iterator going over every chunk on this surface. [...]
is_chunk_generated(chunk_position) | → boolean | Is a given chunk generated?
Is a given chunk generated?
request_to_generate_chunks(position, radius?) |  | Request that the game's map generator generate chunks at the given position for the given radius on this surface. [...]
Request that the game's map generator generate chunks at the given position for the given radius on this surface. [...]
force_generate_chunk_requests() |  | Blocks and generates all chunks that have been requested using all available threads.
Blocks and generates all chunks that have been requested using all available threads.
set_chunk_generated_status(chunk_position, status) |  | Set generated status of a chunk. [...]
Set generated status of a chunk. [...]
get_territories() | → array[LuaTerritory] | Get all territories on the surface.
Get all territories on the surface.
get_territory_for_chunk(chunk_position) | → LuaTerritory? | Get the territory that the given chunk is assigned to. [...]
Get the territory that the given chunk is assigned to. [...]
set_territory_for_chunks(chunk_positions, territory?) |  | Removes the given chunks from their current territories and adds them to the given territory if provided. [...]
Removes the given chunks from their current territories and adds them to the given territory if provided. [...]
clear_territory_for_chunks(chunk_positions) |  | Removes the chunk from the territory it is associated with (if any) and allows the map generator to potentially generate a new territory for the chunk in the future. [...]
Removes the chunk from the territory it is associated with (if any) and allows the map generator to potentially generate a new territory for the chunk in the future. [...]
get_segmented_units() | → array[LuaSegmentedUnit] | Get all segmented units that exist on the surface.
Get all segmented units that exist on the surface.
find_logistic_network_by_position(position, force) | → LuaLogisticNetwork? | Find the logistic network that covers a given position.
Find the logistic network that covers a given position.
find_closest_logistic_network_by_position(position, force) | → LuaLogisticNetwork? | Find the logistic network with a cell closest to a given position.
Find the logistic network with a cell closest to a given position.
find_logistic_networks_by_construction_area(position, force) | → array[LuaLogisticNetwork] | Finds all of the logistics networks whose construction area intersects with the given position.
Finds all of the logistics networks whose construction area intersects with the given position.
deconstruct_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…, super_forced?=…} |  | Place a deconstruction request.
Place a deconstruction request.
cancel_deconstruct_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…, undo_index?=…, super_forced?=…} |  | Cancel a deconstruction order.
Cancel a deconstruction order.
upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item=…} |  | Place an upgrade request.
Place an upgrade request.
cancel_upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item=…} |  | Cancel a upgrade order.
Cancel a upgrade order.
get_hidden_tile(position) | → string? | The hidden tile name.
The hidden tile name.
get_double_hidden_tile(position) | → string | The double hidden tile name or `nil` if there isn't one for the given position.
The double hidden tile name or `nil` if there isn't one for the given position.
set_hidden_tile(position, tile?) |  | Set the hidden tile for the specified position. [...]
Set the hidden tile for the specified position. [...]
set_double_hidden_tile(position, tile?) |  | Set double hidden tile for the specified position. [...]
Set double hidden tile for the specified position. [...]
get_connected_tiles(position, tiles, include_diagonal?, area?) | → array[TilePosition] | Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position. [...]
Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position. [...]
delete_chunk(chunk_position) |  |
regenerate_entity(entities?, chunks?) |  | Regenerate autoplacement of some entities on this surface. [...]
Regenerate autoplacement of some entities on this surface. [...]
regenerate_decorative(decoratives?, chunks?) |  | Regenerate autoplacement of some decoratives on this surface. [...]
Regenerate autoplacement of some decoratives on this surface. [...]
print(message, print_settings?) |  | Print text to the chat console of all players on this surface. [...]
Print text to the chat console of all players on this surface. [...]
destroy_decoratives{area?=…, position?=…, name?=…, collision_mask?=…, from_layer?=…, to_layer?=…, exclude_soft?=…, limit?=…, invert?=…} |  | Removes all decoratives from the given area. [...]
Removes all decoratives from the given area. [...]
create_decoratives{check_collision?=…, decoratives=…} |  | Adds the given decoratives to the surface. [...]
Adds the given decoratives to the surface. [...]
find_decoratives_filtered{area?=…, position?=…, name?=…, collision_mask?=…, from_layer?=…, to_layer?=…, exclude_soft?=…, limit?=…, invert?=…} | → array[DecorativeResult] | Find decoratives of a given name in a given area. [...]
Find decoratives of a given name in a given area. [...]
clear_pollution() |  | Clears all pollution on this surface.
Clears all pollution on this surface.
play_sound(sound_specification) |  | Play a sound for every player on this surface. [...]
Play a sound for every player on this surface. [...]
get_resource_counts() | → dictionary[string → uint32] | Gets the resource amount of all resources on this surface
Gets the resource amount of all resources on this surface
get_random_chunk() | → ChunkPosition | Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface.
Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface.
clone_area{source_area=…, destination_area=…, destination_surface?=…, destination_force?=…, clone_tiles?=…, clone_entities?=…, clone_decoratives?=…, clear_destination_entities?=…, clear_destination_decoratives?=…, expand_map?=…, create_build_effect_smoke?=…} |  | Clones the given area. [...]
Clones the given area. [...]
clone_brush{source_offset=…, destination_offset=…, source_positions=…, destination_surface?=…, destination_force?=…, clone_tiles?=…, clone_entities?=…, clone_decoratives?=…, clear_destination_entities?=…, clear_destination_decoratives?=…, expand_map?=…, manual_collision_mode?=…, create_build_effect_smoke?=…} |  | Clones the given area. [...]
Clones the given area. [...]
clone_entities{entities=…, destination_offset=…, destination_surface?=…, destination_force?=…, snap_to_grid?=…, create_build_effect_smoke?=…} |  | Clones the given entities. [...]
Clones the given entities. [...]
clear(ignore_characters?) |  | Clears this surface deleting all entities and chunks on it.
Clears this surface deleting all entities and chunks on it.
request_path{bounding_box=…, collision_mask=…, start=…, goal=…, force=…, radius?=…, pathfind_flags?=…, can_open_gates?=…, path_resolution_modifier?=…, max_gap_size?=…, max_attack_distance?=…, entity_to_ignore?=…} | → uint32 | Generates a path with the specified constraints (as an array of PathfinderWaypoints) using the unit pathfinding algorithm. [...]
Generates a path with the specified constraints (as an array of PathfinderWaypoints) using the unit pathfinding algorithm. [...]
get_script_areas(name?) | → array[ScriptArea] | Gets the script areas that match the given name or if no name is given all areas are returned.
Gets the script areas that match the given name or if no name is given all areas are returned.
get_script_area(key?) | → ScriptArea? | Gets the first script area by name or id.
Gets the first script area by name or id.
edit_script_area(id, area) |  | Sets the given script area to the new values.
Sets the given script area to the new values.
add_script_area(area) | → uint32 | Adds the given script area.
Adds the given script area.
remove_script_area(id) | → boolean | Removes the given script area.
Removes the given script area.
get_script_positions(name?) | → array[ScriptPosition] | Gets the script positions that match the given name or if no name is given all positions are returned.
Gets the script positions that match the given name or if no name is given all positions are returned.
get_script_position(key?) | → ScriptPosition? | Gets the first script position by name or id.
Gets the first script position by name or id.
edit_script_position(id, position) |  | Sets the given script position to the new values.
Sets the given script position to the new values.
add_script_position(position) | → uint32 | Adds the given script position.
Adds the given script position.
remove_script_position(id) | → boolean | Removes the given script position.
Removes the given script position.
get_map_exchange_string() | → string | Gets the map exchange string for the current map generation settings of this surface.
Gets the map exchange string for the current map generation settings of this surface.
get_starting_area_radius() | → double | Gets the starting area radius of this surface.
Gets the starting area radius of this surface.
get_closest(position, entities) | → LuaEntity? | Gets the closest entity in the list to this position.
Gets the closest entity in the list to this position.
get_total_pollution() | → double | Gets the total amount of pollution on the surface by iterating over all the chunks containing pollution.
Gets the total amount of pollution on the surface by iterating over all the chunks containing pollution.
entity_prototype_collides(prototype, position, use_map_generation_bounding_box, direction?) | → boolean | Whether the given entity prototype collides at the given position and direction.
Whether the given entity prototype collides at the given position and direction.
decorative_prototype_collides(prototype, position) | → boolean | Whether the given decorative prototype collides at the given position and direction.
Whether the given decorative prototype collides at the given position and direction.
calculate_tile_properties(property_names, positions) | → dictionary[string → array[double]] | Calculate values for a list of tile properties at a list of positions. [...]
Calculate values for a list of tile properties at a list of positions. [...]
get_entities_with_force(chunk_position, force) | → array[LuaEntity] | Returns all the military targets (entities with force) on this chunk for the given force.
Returns all the military targets (entities with force) on this chunk for the given force.
create_entities_from_blueprint_string{string=…, position=…, force?=…, direction?=…, flip_horizontal?=…, flip_vertical?=…, by_player?=…} | → int32? | This method only works when used in simulations. [...]
This method only works when used in simulations. [...]
build_checkerboard(area) |  | Sets the given area to the checkerboard lab tiles.
Sets the given area to the checkerboard lab tiles.
get_property(property) | → double | Gets the value of surface property on this surface.
Gets the value of surface property on this surface.
set_property(property, value) |  | Sets the value of surface property on this surface.
Sets the value of surface property on this surface.
create_global_electric_network() |  | Creates a global electric network for this surface, if one doesn't exist already.
Creates a global electric network for this surface, if one doesn't exist already.
destroy_global_electric_network() |  | Destroys the global electric network for this surface, if it exists.
Destroys the global electric network for this surface, if it exists.
execute_lightning{name=…, position=…} |  | Creates lightning. [...]
Creates lightning. [...]
clear_hidden_tiles() |  | Completely removes hidden and double hidden tiles data on this surface.
Completely removes hidden and double hidden tiles data on this surface.
get_default_cover_tile(force, tile) | → LuaTilePrototype? | Gets the cover tile for the given force and tile on this surface if one is set.
Gets the cover tile for the given force and tile on this surface if one is set.
set_default_cover_tile(force, from_tile, to_tile) |  | Sets the cover tile for the given force and tile on this surface.
Sets the cover tile for the given force and tile on this surface.
name | :: RW string | The name of this surface. [...]
The name of this surface. [...]
index | :: R uint32 | This surface's index in LuaGameScript::surfaces (unique ID). [...]
This surface's index in LuaGameScript::surfaces (unique ID). [...]
map_gen_settings | :: RW MapGenSettings | The generation settings for this surface. [...]
The generation settings for this surface. [...]
generate_with_lab_tiles | :: RW boolean | When set to true, new chunks will be generated with lab tiles, instead of using the surface's map generation settings.
When set to true, new chunks will be generated with lab tiles, instead of using the surface's map generation settings.
always_day | :: RW boolean | When set to true, the sun will always shine.
When set to true, the sun will always shine.
daytime | :: RW double | Current time of day, as a number in range `[0, 1)`.
Current time of day, as a number in range `[0, 1)`.
darkness | :: R float | Amount of darkness at the current time, as a number in range `[0, 1]`.
Amount of darkness at the current time, as a number in range `[0, 1]`.
wind_speed | :: RW double | Current wind speed in tiles per tick.
Current wind speed in tiles per tick.
wind_orientation | :: RW RealOrientation | Current wind direction.
Current wind direction.
wind_orientation_change | :: RW double | Change in wind orientation per tick.
Change in wind orientation per tick.
peaceful_mode | :: RW boolean | Is peaceful mode enabled on this surface?
Is peaceful mode enabled on this surface?
no_enemies_mode | :: RW boolean | Is no-enemies mode enabled on this surface?
Is no-enemies mode enabled on this surface?
freeze_daytime | :: RW boolean | True if daytime is currently frozen.
True if daytime is currently frozen.
ticks_per_day | :: RW uint32 | The number of ticks per day for this surface.
The number of ticks per day for this surface.
dusk | :: RW double | The daytime when dusk starts.
The daytime when dusk starts.
dawn | :: RW double | The daytime when dawn starts.
The daytime when dawn starts.
evening | :: RW double | The daytime when evening starts.
The daytime when evening starts.
morning | :: RW double | The daytime when morning starts.
The daytime when morning starts.
daytime_parameters | :: RW table | Parameters of daytime. [...]
Parameters of daytime. [...]
solar_power_multiplier | :: RW double | The multiplier of solar power on this surface. [...]
The multiplier of solar power on this surface. [...]
min_brightness | :: RW double | The minimal brightness during the night. [...]
The minimal brightness during the night. [...]
brightness_visual_weights | :: RW ColorModifier | Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT). [...]
Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT). [...]
show_clouds | :: RW boolean | If clouds are shown on this surface. [...]
If clouds are shown on this surface. [...]
has_global_electric_network | :: R boolean | Whether this surface currently has a global electric network.
Whether this surface currently has a global electric network.
platform | :: R LuaSpacePlatform? |
planet | :: R LuaPlanet? | The planet associated with this surface, if there is one. [...]
The planet associated with this surface, if there is one. [...]
deletable | :: R boolean | If this surface can be deleted.
If this surface can be deleted.
global_effect | :: RW ModuleEffects? | Surface-wide effects applied to entities with effect receivers. [...]
Surface-wide effects applied to entities with effect receivers. [...]
pollutant_type | :: R LuaAirbornePollutantPrototype? | The type of pollutant enabled on the surface, or `nil` if no pollutant is enabled.
The type of pollutant enabled on the surface, or `nil` if no pollutant is enabled.
localised_name | :: RW LocalisedString? | Localised name of this surface. [...]
Localised name of this surface. [...]
ignore_surface_conditions | :: RW boolean | If surface condition checks should not be performed on this surface.
If surface condition checks should not be performed on this surface.
pollution_statistics | :: R LuaFlowStatistics | The pollution statistics for this surface.
The pollution statistics for this surface.
global_electric_network_statistics | :: R LuaFlowStatistics? | The global electric network statistics for this surface.
The global electric network statistics for this surface.
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. [...]

## Class LuaSurfacePropertyPrototype extends LuaPrototypeBase

localised_unit_key | :: R string |
default_value | :: R double |
is_time | :: R boolean |
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. [...]

## Class LuaSurfacePrototype extends LuaPrototypeBase

surface_properties | :: R dictionary[SurfacePropertyID → double] |
factoriopedia_alternative | :: R LuaSurfacePrototype? | 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.
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. [...]

## Class LuaTechnology

reload() |  | Reload this technology from its prototype.
Reload this technology from its prototype.
research_recursive() |  | Research this technology and all of its prerequisites recursively.
Research this technology and all of its prerequisites recursively.
force | :: R LuaForce | The force this technology belongs to.
The force this technology belongs to.
name | :: R string | Name of this technology.
Name of this technology.
localised_name | :: R LocalisedString | Localised name of this technology.
Localised name of this technology.
localised_description | :: R LocalisedString |
prototype | :: R LuaTechnologyPrototype | The prototype of this technology.
The prototype of this technology.
enabled | :: RW boolean | Can this technology be researched?
Can this technology be researched?
visible_when_disabled | :: RW boolean | If this technology will be visible in the research GUI even though it is disabled.
If this technology will be visible in the research GUI even though it is disabled.
upgrade | :: R boolean | Is this an upgrade-type research?
Is this an upgrade-type research?
researched | :: RW boolean | Has this technology been researched? [...]
Has this technology been researched? [...]
prerequisites | :: R dictionary[string → LuaTechnology] | Prerequisites of this technology. [...]
Prerequisites of this technology. [...]
successors | :: R dictionary[string → LuaTechnology] | Successors of this technology, i.e. [...]
Successors of this technology, i.e. [...]
research_unit_ingredients | :: R array[ResearchIngredient] | The types of ingredients that labs will require to research this technology.
The types of ingredients that labs will require to research this technology.
research_unit_count | :: R uint32 | The number of research units required for this technology. [...]
The number of research units required for this technology. [...]
research_unit_energy | :: R double | Amount of energy required to finish a unit of research.
Amount of energy required to finish a unit of research.
order | :: R string | The string used to alphabetically sort these prototypes. [...]
The string used to alphabetically sort these prototypes. [...]
level | :: RW uint32 | The current level of this technology. [...]
The current level of this technology. [...]
research_unit_count_formula | :: R MathExpression? | The count formula, if this research has any. [...]
The count formula, if this research has any. [...]
saved_progress | :: RW double | Saved technology progress fraction as a value in range `[0, 1)`. [...]
Saved technology progress fraction as a value in range `[0, 1)`. [...]
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. [...]

## Class LuaTechnologyPrototype extends LuaPrototypeBase

enabled | :: R boolean | If this technology prototype is enabled by default (enabled at the beginning of a game).
If this technology prototype is enabled by default (enabled at the beginning of a game).
essential | :: R boolean | If this technology prototype is essential, meaning it is shown in the condensed technology graph.
If this technology prototype is essential, meaning it is shown in the condensed technology graph.
visible_when_disabled | :: R boolean | If this technology will be visible in the research GUI even though it is disabled.
If this technology will be visible in the research GUI even though it is disabled.
ignore_tech_cost_multiplier | :: R boolean | If this technology ignores the technology cost multiplier setting. [...]
If this technology ignores the technology cost multiplier setting. [...]
upgrade | :: R boolean | If the is technology prototype is an upgrade to some other technology.
If the is technology prototype is an upgrade to some other technology.
prerequisites | :: R dictionary[string → LuaTechnologyPrototype] | Prerequisites of this technology. [...]
Prerequisites of this technology. [...]
successors | :: R dictionary[string → LuaTechnologyPrototype] | Successors of this technology, i.e. [...]
Successors of this technology, i.e. [...]
research_unit_ingredients | :: R array[ResearchIngredient] | The types of ingredients that labs will require to research this technology.
The types of ingredients that labs will require to research this technology.
effects | :: R array[TechnologyModifier] | Effects applied when this technology is researched.
Effects applied when this technology is researched.
research_unit_count | :: R uint32 | The number of research units required for this technology. [...]
The number of research units required for this technology. [...]
research_unit_energy | :: R double | Amount of energy required to finish a unit of research.
Amount of energy required to finish a unit of research.
level | :: R uint32 | The level of this research.
The level of this research.
max_level | :: R uint32 | The max level of this research.
The max level of this research.
research_unit_count_formula | :: R MathExpression? | The count formula, if this research has any. [...]
The count formula, if this research has any. [...]
research_trigger | :: R ResearchTrigger? | The trigger that will research this technology if any.
The trigger that will research this technology if any.
allows_productivity | :: R boolean |
factoriopedia_alternative | :: R LuaTechnologyPrototype? | 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.
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. [...]

## Class LuaTerritory

destroy() |  | Immediately destroys the territory, along with any segmented units guarding it. [...]
Immediately destroys the territory, along with any segmented units guarding it. [...]
get_chunks() | → array[ChunkPositionAndArea] | Gets all chunks that are a part of the territory. [...]
Gets all chunks that are a part of the territory. [...]
get_segmented_units() | → array[LuaSegmentedUnit] | Gets the LuaSegmentedUnits that guard this territory.
Gets the LuaSegmentedUnits that guard this territory.
regenerate_segmented_units() |  | Regenerates any segmented units that were created when the territory was generated by the map generator. [...]
Regenerates any segmented units that were created when the territory was generated by the map generator. [...]
regenerate_patrol_path() |  | Regenerates the patrol path for the territory according to the game's default territory generation algorithm and overwrites the territory's current patrol path.
Regenerates the patrol path for the territory according to the game's default territory generation algorithm and overwrites the territory's current patrol path.
get_patrol_path() | → array[MapPosition] | Get the path that the territory's units follow when patrolling the territory. [...]
Get the path that the territory's units follow when patrolling the territory. [...]
set_patrol_path(patrol_path) |  | Overwrite the territory patrol path for units that guard the territory. [...]
Overwrite the territory patrol path for units that guard the territory. [...]
surface | :: R LuaSurface | The surface on which this territory is located.
The surface on which this territory is located.
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. [...]

## Class LuaTile

collides_with(layer) | → boolean | What type of things can collide with this tile?
What type of things can collide with this tile?
to_be_deconstructed(force?) | → boolean | Is this tile marked for deconstruction?
Is this tile marked for deconstruction?
order_deconstruction(force, player?) | → LuaEntity? | Orders deconstruction of this tile by the given force.
Orders deconstruction of this tile by the given force.
cancel_deconstruction(force, player?) |  | Cancels deconstruction if it is scheduled, does nothing otherwise.
Cancels deconstruction if it is scheduled, does nothing otherwise.
has_tile_ghost(force?) | → boolean | Does this tile have any tile ghosts on it.
Does this tile have any tile ghosts on it.
get_tile_ghosts(force?) | → array[LuaEntity] | Gets all tile ghosts on this tile.
Gets all tile ghosts on this tile.
name | :: R string | Prototype name of this tile. [...]
Prototype name of this tile. [...]
prototype | :: R LuaTilePrototype |
position | :: R TilePosition | The position this tile references.
The position this tile references.
hidden_tile | :: R string? | The name of the LuaTilePrototype hidden under this tile, if any. [...]
The name of the LuaTilePrototype hidden under this tile, if any. [...]
double_hidden_tile | :: R string? | The name of the LuaTilePrototype double hidden under this tile or `nil` if there is no double hidden tile. [...]
The name of the LuaTilePrototype double hidden under this tile or `nil` if there is no double hidden tile. [...]
surface | :: R LuaSurface | The surface this tile is on.
The surface this tile is on.
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. [...]

## Class LuaTilePrototype extends LuaPrototypeBase

collision_mask | :: R CollisionMask | The collision mask this tile uses
The collision mask this tile uses
layer | :: R uint32 |
autoplace_specification | :: R AutoplaceSpecification? | Autoplace specification for this prototype, if any.
Autoplace specification for this prototype, if any.
walking_speed_modifier | :: R float |
vehicle_friction_modifier | :: R float |
map_color | :: R Color |
decorative_removal_probability | :: R float | The probability that decorative entities will be removed from on top of this tile when this tile is generated.
The probability that decorative entities will be removed from on top of this tile when this tile is generated.
automatic_neighbors | :: R boolean |
allowed_neighbors | :: R dictionary[string → LuaTilePrototype] |
needs_correction | :: R boolean | If this tile needs correction logic applied when it's generated in the world.
If this tile needs correction logic applied when it's generated in the world.
mineable_properties | :: R table |
fluid | :: R LuaFluidPrototype? | The fluid offshore pump produces on this tile, if any.
The fluid offshore pump produces on this tile, if any.
next_direction | :: R LuaTilePrototype? | The next direction of this tile, if any. [...]
The next direction of this tile, if any. [...]
items_to_place_this | :: R array[ItemToPlace]? | Items that when placed will produce this tile, if any. [...]
Items that when placed will produce this tile, if any. [...]
can_be_part_of_blueprint | :: R boolean | False if this tile is not allowed in blueprints regardless of the ability to build it.
False if this tile is not allowed in blueprints regardless of the ability to build it.
absorptions_per_second | :: R dictionary[string → double] | A table of pollution emissions per second this tile will absorb, indexed by the name of each absorbed pollution type.
A table of pollution emissions per second this tile will absorb, indexed by the name of each absorbed pollution type.
is_foundation | :: R boolean | True if this tile can be used as a foundation for other tiles, false otherwise. [...]
True if this tile can be used as a foundation for other tiles, false otherwise. [...]
allows_being_covered | :: R boolean | True if this tile can be hidden or replaced by another tile through player actions.
True if this tile can be hidden or replaced by another tile through player actions.
check_collision_with_entities | :: R boolean | True if building this tile should check for colliding entities above and prevent building if such are found. [...]
True if building this tile should check for colliding entities above and prevent building if such are found. [...]
destroys_dropped_items | :: R boolean |
max_health | :: R float |
weight | :: R Weight |
default_cover_tile | :: R LuaTilePrototype? |
frozen_variant | :: R LuaTilePrototype? |
thawed_variant | :: R LuaTilePrototype? |
trigger_effect | :: R array[TriggerEffectItem]? |
default_destroyed_dropped_item_trigger | :: R array[TriggerItem]? |
scorch_mark_color | :: R Color? |
bound_decoratives | :: R array[LuaDecorativePrototype]? |
ambient_sounds_group | :: R LuaTilePrototype? |
factoriopedia_alternative | :: R LuaTilePrototype? | 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.
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. [...]

## Class LuaTrain

get_item_count(item?) | → uint32 | Get the amount of a particular item stored in the train.
Get the amount of a particular item stored in the train.
get_contents() | → array[ItemWithQualityCount] | Get a mapping of the train's inventory.
Get a mapping of the train's inventory.
remove_item(stack) | → uint32 | Remove some items from the train.
Remove some items from the train.
insert(stack) |  | Insert a stack into the train.
Insert a stack into the train.
clear_items_inside() |  | Clear all items in this train.
Clear all items in this train.
recalculate_path(force?) | → boolean | Checks if the path is invalid and tries to re-path if it isn't.
Checks if the path is invalid and tries to re-path if it isn't.
get_fluid_count(fluid?) | → double | Get the amount of a particular fluid stored in the train.
Get the amount of a particular fluid stored in the train.
get_fluid_contents() | → dictionary[string → FluidAmount] | Gets a mapping of the train's fluid inventory.
Gets a mapping of the train's fluid inventory.
remove_fluid(fluid) | → double | Remove some fluid from the train.
Remove some fluid from the train.
insert_fluid(fluid) | → double | Inserts the given fluid into the first available location in this train.
Inserts the given fluid into the first available location in this train.
clear_fluids_inside() |  | Clears all fluids in this train.
Clears all fluids in this train.
go_to_station(index) |  | Go to the station specified by the index in the train's schedule.
Go to the station specified by the index in the train's schedule.
get_rails() | → array[LuaEntity] | Gets all rails under the train.
Gets all rails under the train.
get_rail_end(direction) | → LuaRailEnd | Gets a LuaRailEnd object pointing away from the train at specified end of the train
Gets a LuaRailEnd object pointing away from the train at specified end of the train
get_schedule() | → LuaSchedule | This allows full access to the train schedule, including modifying the schedule records, the train group and the interrupts.
This allows full access to the train schedule, including modifying the schedule records, the train group and the interrupts.
manual_mode | :: RW boolean | When `true`, the train is explicitly controlled by the player or script. [...]
When `true`, the train is explicitly controlled by the player or script. [...]
speed | :: RW double | Current speed. [...]
Current speed. [...]
max_forward_speed | :: R double | Current max speed when moving forward, depends on locomotive prototype and fuel.
Current max speed when moving forward, depends on locomotive prototype and fuel.
max_backward_speed | :: R double | Current max speed when moving backwards, depends on locomotive prototype and fuel.
Current max speed when moving backwards, depends on locomotive prototype and fuel.
weight | :: R double | The weight of this train.
The weight of this train.
carriages | :: R array[LuaEntity] | The rolling stocks this train is composed of, with the numbering starting at the front of the train.
The rolling stocks this train is composed of, with the numbering starting at the front of the train.
locomotives | :: R table | Locomotives of the train.
Locomotives of the train.
cargo_wagons | :: R array[LuaEntity] | The cargo carriages the train contains.
The cargo carriages the train contains.
fluid_wagons | :: R array[LuaEntity] | The fluid carriages the train contains.
The fluid carriages the train contains.
schedule | :: RW TrainSchedule? | This train's current schedule, if any. [...]
This train's current schedule, if any. [...]
state | :: R defines.train_state | This train's current state.
This train's current state.
front_stock | :: R LuaEntity? | The front stock of this train, if any. [...]
The front stock of this train, if any. [...]
back_stock | :: R LuaEntity? | The back stock of this train, if any. [...]
The back stock of this train, if any. [...]
station | :: R LuaEntity? | The train stop this train is stopped at, if any.
The train stop this train is stopped at, if any.
has_path | :: R boolean | If this train has a path.
If this train has a path.
path_end_rail | :: R LuaEntity? | The destination rail this train is currently pathing to, if any.
The destination rail this train is currently pathing to, if any.
path_end_stop | :: R LuaEntity? | The destination train stop this train is currently pathing to, if any.
The destination train stop this train is currently pathing to, if any.
id | :: R uint32 | The unique train ID.
The unique train ID.
passengers | :: R array[LuaPlayer] | The player passengers on the train This does not index using player index. See LuaPlayer::index on each player instance for the player index.
The player passengers on the train This does not index using player index. See LuaPlayer::index on each player instance for the player index.
riding_state | :: R RidingState | The riding state of this train.
The riding state of this train.
killed_players | :: R dictionary[uint32 → uint32] | The players killed by this train. [...]
The players killed by this train. [...]
kill_count | :: R uint32 | The total number of kills by this train.
The total number of kills by this train.
path | :: R LuaRailPath? | The path this train is using, if any.
The path this train is using, if any.
signal | :: R LuaEntity? | The signal this train is arriving or waiting at, if any.
The signal this train is arriving or waiting at, if any.
group | :: RW string | The group this train belongs to. [...]
The group this train belongs to. [...]
front_end | :: R LuaRailEnd | Front end of the train: Rail and direction on that rail where the train will go when moving forward
Front end of the train: Rail and direction on that rail where the train will go when moving forward
back_end | :: R LuaRailEnd | Back end of the train: Rail and direction on that rail where the train will go when moving backward
Back end of the train: Rail and direction on that rail where the train will go when moving backward
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. [...]

## Class LuaTrainManager

get_train_by_id(train_id) | → LuaTrain? | Searches for a train with given ID.
Searches for a train with given ID.
get_trains(filter) | → array[LuaTrain] | Gets all trains that pass given filter
Gets all trains that pass given filter
get_train_stops(filter) | → array[LuaEntity] | Gets all train stops that pass given filter
Gets all train stops that pass given filter
request_train_path{type?=…, train?=…, goals=…, return_path?=…, starts?=…, search_direction?=…, in_chain_signal_section?=…, steps_limit?=…, shortest_path?=…} | → TrainPathFinderOneGoalResult or TrainPathAllGoalsResult | Direct access to train pathfinder. [...]
Direct access to train pathfinder. [...]
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. [...]

## Class LuaTrainStopControlBehavior extends LuaGenericOnOffControlBehavior

send_to_train | :: RW boolean | `true` if the train stop should send the circuit network contents to the train to use.
`true` if the train stop should send the circuit network contents to the train to use.
read_from_train | :: RW boolean | `true` if the train stop should send the train contents to the circuit network.
`true` if the train stop should send the train contents to the circuit network.
read_stopped_train | :: RW boolean | `true` if the train stop should send the stopped train id to the circuit network.
`true` if the train stop should send the stopped train id to the circuit network.
set_trains_limit | :: RW boolean | `true` if the trains_limit_signal is used to set a limit of trains incoming for train stop.
`true` if the trains_limit_signal is used to set a limit of trains incoming for train stop.
read_trains_count | :: RW boolean | `true` if the train stop should send amount of incoming trains to the circuit network.
`true` if the train stop should send amount of incoming trains to the circuit network.
stopped_train_signal | :: RW SignalID? | The signal that will be sent when using the send-train-id option.
The signal that will be sent when using the send-train-id option.
trains_count_signal | :: RW SignalID? | The signal that will be sent when using the read-trains-count option.
The signal that will be sent when using the read-trains-count option.
trains_limit_signal | :: RW SignalID? | The signal to be used by set-trains-limit to limit amount of incoming trains
The signal to be used by set-trains-limit to limit amount of incoming trains
set_priority | :: RW boolean | `true` if the priority_signal is used to set a priority of the train stop.
`true` if the priority_signal is used to set a priority of the train stop.
priority_signal | :: RW SignalID? | The signal to be used by set-priority change priority of the train stop
The signal to be used by set-priority change priority of the train stop
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. [...]

## Class LuaTransportBeltControlBehavior extends LuaGenericOnOffControlBehavior

read_contents | :: RW boolean | If the belt will read the contents and send them to the circuit network.
If the belt will read the contents and send them to the circuit network.
read_contents_mode | :: RW defines.control_behavior.transport_belt.content_read_mode | The read mode for the belt.
The read mode for the belt.
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. [...]

## Class LuaTransportLine

clear() |  | Remove all items from this transport line.
Remove all items from this transport line.
get_item_count(item?) | → uint32 | Count some or all items on this line, similar to how LuaInventory::get_item_count does.
Count some or all items on this line, similar to how LuaInventory::get_item_count does.
remove_item(items) | → uint32 | Remove some items from this line.
Remove some items from this line.
can_insert_at(position) | → boolean | Can an item be inserted at a given position?
Can an item be inserted at a given position?
can_insert_at_back() | → boolean | Can an item be inserted at the back of this line?
Can an item be inserted at the back of this line?
insert_at(position, items, belt_stack_size?) | → boolean | Insert items at a given position.
Insert items at a given position.
insert_at_back(items, belt_stack_size?) | → boolean | Insert items at the back of this line.
Insert items at the back of this line.
force_insert_at(position, items, belt_stack_size?) |  | Force insert item at a given position. [...]
Force insert item at a given position. [...]
get_contents() | → array[ItemWithQualityCount] | Get counts of all items on this line, similar to how LuaInventory::get_contents does.
Get counts of all items on this line, similar to how LuaInventory::get_contents does.
get_detailed_contents() | → array[DetailedItemOnLine] | Get detailed information of items on this line, such as their position.
Get detailed information of items on this line, such as their position.
line_equals(other) | → boolean | Returns whether the associated internal transport line of this line is the same as the others associated internal transport line. [...]
Returns whether the associated internal transport line of this line is the same as the others associated internal transport line. [...]
get_line_item_position(position) | → MapPosition | Get a map position related to a position on a transport line.
Get a map position related to a position on a transport line.
owner | :: R LuaEntity | The entity this transport line belongs to.
The entity this transport line belongs to.
output_lines | :: R array[LuaTransportLine] | The transport lines that this transport line outputs items to or an empty table if none.
The transport lines that this transport line outputs items to or an empty table if none.
input_lines | :: R array[LuaTransportLine] | The transport lines that this transport line is fed by or an empty table if none.
The transport lines that this transport line is fed by or an empty table if none.
line_length | :: R float | Length of the transport line. [...]
Length of the transport line. [...]
total_segment_length | :: R double | Total length of segment which consists of this line, all lines in front and lines in the back directly connected.
Total length of segment which consists of this line, all lines in front and lines in the back directly connected.
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. [...]
[] (index) | :: R LuaItemStack | The indexing operator.
The indexing operator.
# (length) | :: R uint32 | Get the number of items on this transport line.
Get the number of items on this transport line.

## Class LuaTrivialSmokePrototype extends LuaPrototypeBase

color | :: R Color |
start_scale | :: R double |
end_scale | :: R double |
movement_slow_down_factor | :: R double |
duration | :: R uint32 |
spread_duration | :: R uint32 |
fade_away_duration | :: R uint32 |
fade_in_duration | :: R uint32 |
glow_fade_away_duration | :: R uint32 |
cyclic | :: R boolean |
affected_by_wind | :: R boolean |
show_when_smoke_off | :: R boolean |
glow_animation | :: R boolean |
render_layer | :: R RenderLayer |
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. [...]

## Class LuaTurretControlBehavior extends LuaGenericOnOffControlBehavior

set_priority_list | :: RW boolean | `true` if the turret's target priority list will be determined from the signals on the circuit network.
`true` if the turret's target priority list will be determined from the signals on the circuit network.
set_ignore_unlisted_targets | :: RW boolean | `true` if the turret will ignore targets not on its priority list if a circuit condition is met.
`true` if the turret will ignore targets not on its priority list if a circuit condition is met.
ignore_unlisted_targets_condition | :: RW CircuitConditionDefinition | The condition under which the turret will ignore targets not on its priority list.
The condition under which the turret will ignore targets not on its priority list.
read_ammo | :: RW boolean | `true` if the turret will send the ammunition or fluid it contains to the circuit network.
`true` if the turret will send the ammunition or fluid it contains to the circuit network.
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. [...]

## Class LuaUndoRedoStack

get_undo_item(index) | → array[UndoRedoAction] | Gets an undo item from the undo stack.
Gets an undo item from the undo stack.
get_undo_item_count() | → uint32 | The number undo items in the undo stack.
The number undo items in the undo stack.
remove_undo_item(index) |  | Removes an undo item from the undo stack.
Removes an undo item from the undo stack.
remove_undo_action(item_index, action_index) |  | Removes an undo action from the specified undo item on the undo stack.
Removes an undo action from the specified undo item on the undo stack.
get_redo_item(index) | → array[UndoRedoAction] | Gets an undo item from the redo stack.
Gets an undo item from the redo stack.
get_redo_item_count() | → uint32 | The number of undo items in the redo stack.
The number of undo items in the redo stack.
remove_redo_item(index) |  | Removes an undo item from the redo stack.
Removes an undo item from the redo stack.
remove_redo_action(item_index, action_index) |  | Removes an undo action from the specified undo item on the redo stack.
Removes an undo action from the specified undo item on the redo stack.
get_undo_tags(item_index, action_index) | → Tags | Gets all tags for the given undo action.
Gets all tags for the given undo action.
get_undo_tag(item_index, action_index, tag_name) | → AnyBasic | Gets the tag with the given name from a specific undo item action, or `nil` if it doesn't exist.
Gets the tag with the given name from a specific undo item action, or `nil` if it doesn't exist.
set_undo_tag(item_index, action_index, tag_name, tag) |  | Sets a new tag with the given name and value on the specified undo item action.
Sets a new tag with the given name and value on the specified undo item action.
remove_undo_tag(item_index, action_index, tag) | → boolean | Removes a tag with the given name from the specified undo item.
Removes a tag with the given name from the specified undo item.
get_redo_tags(item_index, action_index) | → Tags | Gets all tags for the given redo action.
Gets all tags for the given redo action.
get_redo_tag(item_index, action_index, tag_name) | → AnyBasic | Gets the tag with the given name from a specific redo item action, or `nil` if it doesn't exist.
Gets the tag with the given name from a specific redo item action, or `nil` if it doesn't exist.
set_redo_tag(item_index, action_index, tag_name, tag) |  | Sets a new tag with the given name and value on the specified redo item action.
Sets a new tag with the given name and value on the specified redo item action.
remove_redo_tag(item_index, action_index, tag) | → boolean | Removes a tag with the given name from the specified redo item.
Removes a tag with the given name from the specified redo item.
player_index | :: R uint32 | The index of the player to whom this stack belongs to.
The index of the player to whom this stack belongs to.
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. [...]

## Class LuaVirtualSignalPrototype extends LuaPrototypeBase

special | :: R boolean | Whether this is a special signal. [...]
Whether this is a special signal. [...]
factoriopedia_alternative | :: R LuaVirtualSignalPrototype? | 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.
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. [...]

## Class LuaVoidEnergySourcePrototype

emissions_per_joule | :: R dictionary[string → double] | The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. [...]
render_no_network_icon | :: R boolean |
render_no_power_icon | :: R boolean |
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. [...]

## Class LuaWallControlBehavior extends LuaControlBehavior

circuit_condition | :: RW CircuitConditionDefinition | The circuit condition.
The circuit condition.
open_gate | :: RW boolean |
read_sensor | :: RW boolean |
output_signal | :: RW SignalID? |
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. [...]

## Class LuaWireConnector

is_connected_to(target, origin?) | → boolean | Checks if this connector has any wire going to the other connector.
Checks if this connector has any wire going to the other connector.
connect_to(target, reach_check?, origin?) | → boolean | Connects this connector to other wire connector.
Connects this connector to other wire connector.
disconnect_from(target, origin?) | → boolean | Disconnects this connector from other wire connector.
Disconnects this connector from other wire connector.
disconnect_all(origin?) | → boolean | Removes all wires going out of this wire connector.
Removes all wires going out of this wire connector.
can_wire_reach(other_connector) | → boolean | Checks if a wire can reach from this connector to the other connector.
Checks if a wire can reach from this connector to the other connector.
have_common_neighbour(other_connector, ignore_ghost_neighbours?) | → boolean | Checks if this and other wire connector have a common neighbour.
Checks if this and other wire connector have a common neighbour.
owner | :: R LuaEntity | The entity this wire connector belongs to. [...]
The entity this wire connector belongs to. [...]
wire_type | :: R defines.wire_type | The type of wires that can be connected to this connector.
The type of wires that can be connected to this connector.
wire_connector_id | :: R defines.wire_connector_id | Identifier of this connector in the entity this connector belongs to.
Identifier of this connector in the entity this connector belongs to.
is_ghost | :: R boolean | If this connector is owned by an entity inside of a ghost. [...]
If this connector is owned by an entity inside of a ghost. [...]
connection_count | :: R uint32 | Amount of wires going out of this connector. [...]
Amount of wires going out of this connector. [...]
connections | :: R array[WireConnection] | All wire connectors this connector is connected to. [...]
All wire connectors this connector is connected to. [...]
real_connection_count | :: R uint32 | Amount of real wires going out of this connector. [...]
Amount of real wires going out of this connector. [...]
real_connections | :: R array[WireConnection] | All wire connectors this connector is connected to with real wires. [...]
All wire connectors this connector is connected to with real wires. [...]
network_id | :: R uint32 | Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. [...]
Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. [...]
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. [...]