Factorio Runtime DocsVersion 2.0.14

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.

LuaAccumulatorControlBehaviorchanged

Control behavior for accumulators.

LuaAchievementPrototypechanged

Prototype of a achievement.

LuaActiveTriggerPrototypenew

Prototype of an Active Trigger.

LuaAgriculturalTowerControlBehaviornew

Control behavior for agricultural tower

LuaAirbornePollutantPrototypenew

Airborne pollutant prototype.

LuaAmmoCategoryPrototypechanged

Prototype of a ammo category.

LuaArithmeticCombinatorControlBehavior

Control behavior for arithmetic combinators.

LuaArtilleryTurretControlBehaviornew

Control behavior for artillery turrets.

LuaAssemblingMachineControlBehaviornew

Control behavior for assembling machines.

LuaAsteroidChunkPrototypenew

Prototype of an asteroid chunk.

LuaAsteroidCollectorControlBehaviornew

Control behavior for asteroid collectors.

LuaAutoplaceControlPrototypechanged

Prototype of an autoplace control.

LuaBootstrapchanged

Entry point for registering event handlers. [...]

LuaBurner

A reference to the burner energy source owned by a specific LuaEntity or LuaEquipment.

LuaBurnerPrototypechanged

Prototype of a burner energy source.

LuaBurnerUsagePrototypenew

Description of burner usage.

LuaCargoLandingPadControlBehaviornew

Control behavior for cargo landing pad.

LuaChunkIterator

A chunk iterator can be used for iterating chunks coordinates of a surface. [...]

LuaCircuitNetworkchanged

A circuit network associated with a given entity, connector, and wire type.

LuaCollisionLayerPrototypenew

Prototype of a collision layer.

LuaCombinatorControlBehavior
LuaCommandProcessor

Allows for the registration of custom console commands through the global object named commands. [...]

LuaCommandablenew

AI object which can be ordered commands. [...]

LuaConstantCombinatorControlBehaviorchanged

Control behavior for constant combinators.

LuaContainerControlBehaviorchanged

Control behavior for container entities.

LuaControlchanged

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.

LuaCustomEventPrototypenew

Prototype of a custom event.

LuaCustomInputPrototypechanged

Prototype of a custom input.

LuaCustomTable

Lazily evaluated table. [...]

LuaDamagePrototypechanged

Prototype of a damage.

LuaDeciderCombinatorControlBehaviorchanged

Control behavior for decider combinators.

LuaDecorativePrototypechanged

Prototype of an optimized decorative.

LuaDisplayPanelControlBehaviornew

Control behavior for display panels.

LuaElectricEnergySourcePrototypechanged

Prototype of an electric energy source.

LuaEntitychanged

The primary interface for interacting with entities through the Lua API. [...]

LuaEntityPrototypechanged

Prototype of an entity.

LuaEquipmentchanged

An item in a LuaEquipmentGrid, for example a fusion reactor placed in one's power armor. [...]

LuaEquipmentCategoryPrototypechanged

Prototype of an equipment category.

LuaEquipmentGridchanged

An equipment grid is for example the inside of a power armor.

LuaEquipmentGridPrototypechanged

Prototype of an equipment grid.

LuaEquipmentPrototypechanged

Prototype of a modular equipment.

LuaFlowStatisticschanged

Encapsulates statistic data for different parts of the game. [...]

LuaFluidBoxchanged

An array of fluid boxes of an entity. [...]

LuaFluidBoxPrototypechanged

A prototype of a fluidbox owned by some LuaEntityPrototype.

LuaFluidEnergySourcePrototypechanged

Prototype of a fluid energy source.

LuaFluidPrototypechanged

Prototype of a fluid.

LuaFontPrototype

Prototype of a font.

LuaForcechanged

LuaForce encapsulates data local to each "force" or "faction" of the game. [...]

LuaFuelCategoryPrototypechanged

Prototype of a fuel category.

LuaGameScriptchanged

Main toplevel type, provides access to most of the API though its members. [...]

LuaGenericOnOffControlBehaviorchanged

An abstract base class for behaviors that support switching the entity on or off based on some condition.

LuaGroup

Item group or subgroup.

LuaGuichanged

The root of the GUI. [...]

LuaGuiElementchanged

An element of a custom GUI. [...]

LuaHeatBufferPrototype

Prototype of a heat buffer.

LuaHeatEnergySourcePrototypechanged

Prototype of a heat energy source.

LuaHelpersnew

Provides various helper and utility functions. [...]

LuaInserterControlBehaviorchanged

Control behavior for inserters.

LuaInventory

A storage of item stacks.

LuaItemnew

A reference to an item with data. [...]

LuaItemCommonnew

Common methods related to usage of item with data. [...]

LuaItemPrototypechanged

Prototype of an item. [...]

LuaItemStackchanged

A reference to an item and count owned by some external entity. [...]

LuaLampControlBehaviorchanged

Control behavior for lamps.

LuaLazyLoadedValue

A lazily loaded value. [...]

LuaLoaderControlBehaviornew

Control behavior for loaders.

LuaLogisticCell

Logistic cell of a particular LuaEntity. [...]

LuaLogisticContainerControlBehaviorchanged

Control behavior for logistic chests.

LuaLogisticNetworkchanged

A single logistic network of a given force on a given surface.

LuaLogisticPointchanged

Logistic point of a particular LuaEntity. [...]

LuaLogisticSectionnew

Logistic section of a particular LuaLogisticPoint or LuaConstantCombinatorControlBehavior.

LuaMiningDrillControlBehaviorchanged

Control behavior for mining drills.

LuaModSettingPrototypechanged

Prototype of a mod setting.

LuaModuleCategoryPrototypechanged

Prototype of a module category.

LuaNamedNoiseExpressionchanged

Prototype of a named noise expression.

LuaNamedNoiseFunctionnew

Prototype of a named noise function.

LuaParticlePrototypechanged

Prototype of an optimized particle.

LuaPermissionGroup

A permission group that defines what players in this group are allowed to do.

LuaPermissionGroups

All permission groups.

LuaPlanetnew

The runtime values of a planet

LuaPlayerchanged

A player in the game. [...]

LuaProcessionLayerInheritanceGroupPrototypenew

Prototype of a procession inheritance group which synchronizes offsets between procession steps.

LuaProcessionPrototypenew

Prototype of a procession.

LuaProfiler

An object used to measure script performance. [...]

LuaProgrammableSpeakerControlBehavior

Control behavior for programmable speakers.

LuaPrototypeBasenew

Base for all prototype classes.

LuaPrototypesnew

Provides read-only access to prototypes. [...]

LuaPumpControlBehaviornew

Control behavior for pumps.

LuaQualityPrototypenew

Prototype of a quality.

LuaRCON

An interface to send messages to the calling RCON interface through the global object named rcon.

LuaRadarControlBehaviornew

Control behavior for radars

LuaRailEndnew

Utility object that binds to a rail entity and rail_direction to allow easier traversal over rails

LuaRailPath

A rail path.

LuaRailSignalBaseControlBehaviornew

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

LuaReactorControlBehaviornew

Control behavior for Reactor

LuaRecipechanged

A crafting recipe. [...]

LuaRecipeCategoryPrototypechanged

Prototype of a recipe category.

LuaRecipePrototypechanged

A crafting recipe prototype.

LuaRecordnew

A reference to a record in the blueprint library. [...]

LuaRemote

Registry of interfaces between scripts. [...]

LuaRenderObjectnew

Reference to a single LuaRendering object.

LuaRenderingchanged

Allows rendering of geometric shapes, text and sprites in the game world through the global object named rendering. [...]

LuaResourceCategoryPrototypechanged

Prototype of a resource category.

LuaRoboportControlBehaviorchanged

Control behavior for roboports.

LuaRocketSiloControlBehaviornew

Control behavior for rocket silos.

LuaSelectorCombinatorControlBehaviornew

Control behavior for selector combinators.

LuaSettingschanged

Object containing mod settings of three distinct types: startup, global, and player. [...]

LuaShortcutPrototypechanged

Prototype of a shortcut.

LuaSimulationnew

Functions for use during simulations. [...]

LuaSpaceConnectionPrototypenew

Prototype of a space connection.

LuaSpaceLocationPrototypenew

Prototype of a space location, such as a planet.

LuaSpacePlatformnew

A space platform.

LuaSpacePlatformHubControlBehaviornew

Control behavior for space platform hubs

LuaStorageTankControlBehaviorchanged

Control behavior for storage tanks.

LuaStyle

Style of a GUI element. [...]

LuaSurfacechanged

A "domain" of the world. [...]

LuaSurfacePropertyPrototypenew

Prototype of a surface property.

LuaSurfacePrototypenew

Prototype of a surface.

LuaTechnologychanged

One research item.

LuaTechnologyPrototypechanged

A Technology prototype.

LuaTilechanged

A single "square" on the map.

LuaTilePrototypechanged

Prototype of a tile.

LuaTrainchanged

A train. [...]

LuaTrainManagernew

The train manager manages all the train in the game. [...]

LuaTrainStopControlBehaviorchanged

Control behavior for train stops.

LuaTransportBeltControlBehaviorchanged

Control behavior for transport belts.

LuaTransportLinechanged

One line on a transport belt.

LuaTrivialSmokePrototypechanged

Prototype of a trivial smoke.

LuaTurretControlBehaviornew

Control behavior for turrets.

LuaUndoRedoStacknew

The undo queue for a player. [...]

LuaVirtualSignalPrototypechanged

Prototype of a virtual signal.

LuaVoidEnergySourcePrototypechanged

Prototype of a void energy source.

LuaWallControlBehavior

Control behavior for walls.

LuaWireConnectornew

A wire connector of a given entity. [...]

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

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

read_charge new :: 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. [...]

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

max_jumps :: R uint

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 uint

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 uint

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 uint

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

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

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

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

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

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

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.

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

mineable_properties :: R MineableProperties
hide_from_signal_gui :: R boolean
item_signal_alias :: 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. [...]

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

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

richness :: R boolean
can_be_disabled :: R boolean
category changed :: 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. [...]

ClassLuaBootstrapchanged

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) newuint64, 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() uint

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_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) changed

Raise an event. [...]

Raise an event. [...]

raise_console_chat{player_index=…, message=…}
raise_player_crafted_item{item_stack=…, player_index=…, recipe=…} changed
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=…}
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 new :: 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. [...]

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

ClassLuaBurnerPrototypechanged

emissions_per_joule new :: 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 uint
burnt_inventory_size :: R uint
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.

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

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

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

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.

ClassLuaCircuitNetworkchanged

get_signal(signal) int
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 new :: 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 uint

The circuit networks ID.

The circuit networks ID.

connected_circuit_count :: R uint

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

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

get_signal_last_tick(signal) int?

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.

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

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 uint

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

add_section(group?) newLuaLogisticSection?

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) newboolean

Removes the given logistic section if possible. [...]

Removes the given logistic section if possible. [...]

get_section(section_index) newLuaLogisticSection?

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 new :: R array[LuaLogisticSection]

All logistic sections of this constant combinator.

All logistic sections of this constant combinator.

sections_count new :: R uint

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

read_contents new :: 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. [...]

ClassLuaControlabstractchanged

get_inventory(inventory) LuaInventory?

Get an inventory belonging to this entity. [...]

Get an inventory belonging to this entity. [...]

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) uint

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?) changeduint

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) uint

Remove items from this entity.

Remove items from this entity.

teleport(position, surface?, raise_teleported?, snap_to_grid?) changedboolean

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.

Is the flashlight enabled.

get_craftable_count(recipe) changeduint

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?=…} changeduint

Begins crafting the given count of the given recipe.

Begins crafting the given count of the given recipe.

cancel_crafting{index=…, count=…}

Cancels crafting the given count of the given crafting queue index.

Cancels crafting the given count of the given crafting queue index.

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?) changed

Open the technology GUI and select a given technology.

Open the technology GUI and select a given technology.

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() newLuaLogisticPoint?

Gets the requester logistic point for this entity if it has one.

Gets the requester logistic point for this entity if it has one.

surface :: R LuaSurface

The surface this entity is currently on.

The surface this entity is currently on.

surface_index :: R uint

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.

vehicle :: R LuaEntity?

The vehicle the player is currently sitting in.

The vehicle the player is currently sitting in.

force changed :: R LuaForce | W ForceID

The force of this entity. [...]

The force of this entity. [...]

force_index :: R uint

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 changed :: RW LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or LuaInventory or LuaLogisticNetwork or defines.gui_type?

The GUI the player currently has open. [...]

The GUI the player currently has open. [...]

crafting_queue_size :: R uint

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.

Current walking state.

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 changed :: R ItemIDAndQualityIDPair | W ItemWithQualityID?

The ghost prototype in the player's cursor. [...]

The ghost prototype in the player's cursor. [...]

cursor_record new :: 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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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 uint

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.

ClassLuaControlBehaviorabstract

get_circuit_network(wire_connector_id) changedLuaCircuitNetwork?
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.

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 :: RW LuaPlayer?

The player who last edited this tag.

The player who last edited this tag.

position :: R MapPosition

The position of this tag.

The position of this tag.

text :: RW string
tag_number :: R uint

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

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

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

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 uint

Number of elements in this table.

Number of elements in this table.

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

get_condition(index) newDeciderCombinatorCondition

Gets the condition at index.

Gets the condition at index.

set_condition(index, condition) new

Sets the condition at index.

Sets the condition at index.

add_condition(condition, index?) new

Adds a new condition.

Adds a new condition.

remove_condition(index) new

Removes the condition at index.

Removes the condition at index.

get_output(index) newDeciderCombinatorOutput

Gets the output at index.

Gets the output at index.

set_output(index, output) new

Sets the output at index.

Sets the output at index.

add_output(output, index?) new

Adds a new output.

Adds a new output.

remove_output(index) new

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

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 new :: R string
decal new :: R boolean
grows_through_rail_path new :: R boolean
trigger_effect new :: R array[TriggerEffectItem] ?
placed_effect new :: R array[TriggerEffectItem] ?
minimal_separation new :: R double
target_count new :: R uint
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. [...]

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

get_input_flow_limit(quality?) newdouble
get_output_flow_limit(quality?) newdouble
buffer_capacity :: R double
usage_priority :: R string
drain :: R double
emissions_per_joule new :: 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. [...]

ClassLuaEntityextendsLuaControlchanged

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?) changedfloat

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?=…, item_index?=…} changedboolean

Destroys the entity. [...]

Destroys the entity. [...]

die(force?, cause?) changedboolean

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?, item_index?) changedboolean

Sets the entity to be deconstructed by construction robots.

Sets the entity to be deconstructed by construction robots.

cancel_deconstruction(force, player?) changed

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?=…, item_index?=…} changedboolean

Sets the entity to be upgraded by construction robots.

Sets the entity to be upgraded by construction robots.

cancel_upgrade(force, player?) changedboolean

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?

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?) changed
request_to_close(force) changed
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) newuint, 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) newMapPosition

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() uint

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() boolean
revive{return_item_request_proxy?=…, raise_revive?=…} → dictionary[string → uint]?, 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?=…} changed → array[ItemCountWithQuality], 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) newLuaEntity?

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) newLuaEntity?

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) changedItemFilter?

Get the filter for a slot in an inserter, loader, or logistic storage container. [...]

Get the filter for a slot in an inserter, loader, or logistic storage container. [...]

set_filter(index, filter?) changed

Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID) or logistic storage container (ItemWithQualityID). [...]

Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID) 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) changedLuaCircuitNetwork?
get_signal(signal, wire_connector_id, extra_wire_connector_id?) newint

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?) new → 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?) changed → array[ItemCountWithQuality]

Copies settings from the given entity onto this entity.

Copies settings from the given entity onto this entity.

get_logistic_point(index?) LuaLogisticPoint or dictionary[defines.logistic_member_index → LuaLogisticPoint]?

Gets all the LuaLogisticPoints that this entity owns. [...]

Gets all the LuaLogisticPoints that this entity owns. [...]

play_note(instrument, note) 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() changedLuaRecipe?, LuaQualityPrototype?

Current recipe being assembled by this machine, if any.

Current recipe being assembled by this machine, if any.

set_recipe(recipe?, quality?) changed → array[ItemCountWithQuality]

Sets the given recipe in this assembly machine.

Sets the given recipe in this assembly machine.

rotate{reverse?=…, by_player?=…} changedboolean

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 or spidertron if any. [...]

Gets the passenger of this car or spidertron if any. [...]

set_passenger(passenger?)

Sets the passenger of this car or spidertron. [...]

Sets the passenger of this car or spidertron. [...]

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?=…} changedLuaEntity?

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 → double]

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() changedLuaEntityPrototype?, 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) newstring

Get the entity ID name at the specified position in the turret's priority list.

Get the entity ID name at the specified position in the turret's priority list.

set_priority_target(index, entity_id?) new

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) changedboolean

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) newLuaWireConnector

Gets a single wire connector of this entity

Gets a single wire connector of this entity

get_wire_connectors(or_create) new → dictionary[defines.wire_connector_id → LuaWireConnector]

Gets all wire connectors of this entity

Gets all wire connectors of this entity

get_rail_end(direction) newLuaRailEnd

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?) newdouble?

The input flow limit for the electric energy source. [...]

The input flow limit for the electric energy source. [...]

get_electric_output_flow_limit(quality?) newdouble?

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() new

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() new

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.

get_fluid(index) newFluid?

Gets fluid of the i-th fluid storage.

Gets fluid of the i-th fluid storage.

set_fluid(index, fluid?) newFluid?

Sets fluid to the i-th fluid storage. [...]

Sets fluid to the i-th fluid storage. [...]

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

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 new :: 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 new :: RW boolean

If the entity is currently mirrored.

If 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 uint

Count of resource units contained.

Count of resource units contained.

initial_amount :: RW uint?

Count of initial resource units contained. [...]

Count of initial resource units contained. [...]

effectivity_modifier :: RW float

Multiplies the acceleration the vehicle can create for one unit of energy. [...]

Multiplies the acceleration the vehicle 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 uint?

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 changed :: 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 → array[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. [...]

fluidbox changed :: 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 changed :: 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, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. [...]

The color of this character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. [...]

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 new :: 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 "input" or "output"

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 "input" or "output"

Whether this loader gets items from or puts item into a container.

Whether this loader gets items from or puts item into a container.

rocket_parts :: RW uint

Number of rocket parts in the silo.

Number of rocket parts in the silo.

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 changed :: R array[ItemCountWithQuality]

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 new :: 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 new :: 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 uint

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 new :: 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 :: RW LuaPlayer or 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 new :: 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 uint?

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 uint?

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

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 uint

The number of filter slots this inserter, loader, mining drill or logistic storage container has. [...]

The number of filter slots this inserter, loader, mining drill 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 changed :: 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 uint

Returns the current target pickup count of the inserter. [...]

Returns the current target pickup count of the inserter. [...]

inserter_stack_size_override :: RW uint

Sets the stack size limit on this inserter. [...]

Sets the stack size limit on this inserter. [...]

products_finished :: RW uint

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 new :: 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 uint?

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 uint

The player index associated with this character corpse. [...]

The player index associated with this character corpse. [...]

character_corpse_tick_of_death :: RW uint

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 :: RW LuaPlayer or PlayerIdentification?

The player this character is associated with, if any. [...]

The player this character is associated with, if any. [...]

tick_of_last_attack :: RW uint

The last tick this character entity was attacked.

The last tick this character entity was attacked.

tick_of_last_damage :: RW uint

The last tick this character entity was damaged.

The last tick this character entity was damaged.

splitter_filter changed :: 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 new :: RW "none" or "whitelist" or "blacklist"?

The filter mode for this loader. [...]

The filter mode for this loader. [...]

mining_drill_filter_mode new :: 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.

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 uint

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 uint

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 uint

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 new :: 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 :: RW LuaPlayer or 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 changed :: RW 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.

electric_network_id :: R uint?

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 :: RW LuaItemPrototype?

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 uint

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 uint

Amount of trains related to this particular train stop. [...]

Amount of trains related to this particular train stop. [...]

trains_limit :: RW uint

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 uint

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 "input" or "output"

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 new :: R LuaQualityPrototype

The quality of this entity. [...]

The quality of this entity. [...]

rail_layer new :: 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 new :: 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 uint

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 uint

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_destination new :: RW MapPosition

Destination of the crane of this entity. [...]

Destination of the crane of this entity. [...]

crane_destination_3d new :: RW Vector3D

Destination of the crane of this entity in 3D. [...]

Destination of the crane of this entity in 3D. [...]

crane_grappler_destination new :: 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 new :: 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. [...]

copy_color_from_train_stop new :: RW boolean

If this RollingStock has 'copy color from train stop' enabled.

If this RollingStock 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 new :: 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 new :: 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 new :: R uint

Returns count of fluid storages. [...]

Returns count of fluid storages. [...]

tick_grown new :: RW MapTick

The tick when this plant is fully grown.

The tick when this plant is fully grown.

always_on new :: 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 new :: RW boolean

If this artillery auto-targets enemies.

If this artillery auto-targets enemies.

robot_order_queue new :: R array[WorkerRobotOrder]

Get the current queue of robot orders.

Get the current queue of robot orders.

cargo_pod new :: R LuaEntity?

Gets the cargo pod attached to this rocket silo rocket if one exists.

Gets the cargo pod attached to this rocket silo rocket if one exists.

procession_tick new :: RW MapTick

how far into the current procession the cargo pod is.

how far into the current procession the cargo pod is.

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

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) uint?

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?) newdouble

The crafting speed of this crafting-machine.

The crafting speed of this crafting-machine.

get_supply_area_distance(quality?) newdouble

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?) newdouble

The maximum wire distance for this entity. [...]

The maximum wire distance for this entity. [...]

get_max_circuit_wire_distance(quality?) newdouble

The maximum circuit wire distance for this entity. [...]

The maximum circuit wire distance for this entity. [...]

get_max_energy_usage(quality?) newdouble

The theoretical maximum energy usage for this entity.

The theoretical maximum energy usage for this entity.

get_max_energy_production(quality?) newdouble

The theoretical maximum energy production for this entity.

The theoretical maximum energy production for this entity.

get_max_energy(quality?) newdouble?

The max energy for this flying robot prototype.

The max energy for this flying robot prototype.

get_inserter_extension_speed(quality?) newdouble?

The extension speed of this inserter.

The extension speed of this inserter.

get_inserter_rotation_speed(quality?) newdouble?

The rotation speed of this inserter.

The rotation speed of this inserter.

get_researching_speed(quality?) newdouble?

The base researching speed of this lab prototype.

The base researching speed of this lab prototype.

get_max_distance_of_sector_revealed(quality?) newuint?

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?) newuint?

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?) newfloat

Max health of this entity. [...]

Max health of this entity. [...]

infinite_resource :: R boolean?

Whether this resource is infinite.

Whether this resource is infinite.

minimum_resource_amount :: R uint?

Minimum amount of this resource.

Minimum amount of this resource.

normal_resource_amount :: R uint?

The normal amount for this resource.

The normal amount for this resource.

infinite_depletion_resource_amount :: R uint?

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 changed :: 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[ItemStackDefinition] ?

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 new :: 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 new :: 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 changed :: 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 uint

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.

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 changed :: R float?

Repair-speed modifier for this entity, if any. [...]

Repair-speed modifier for this entity, if any. [...]

turret_range :: R uint?

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.

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.

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 new :: R uint8?

The resource drain rate percent of this mining drill prototype.

The resource drain rate percent of this mining drill prototype.

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 changed :: 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.

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 uint?

The maximum polyphony for this programmable speaker.

The maximum polyphony for this programmable speaker.

module_inventory_size :: R uint?

The module inventory size. [...]

The module inventory size. [...]

inventory_type new :: R "normal" or "with_bar" or "with_filters_and_bar"?

The inventory type this container or linked container uses.

The inventory type this container or linked container uses.

ingredient_count :: R uint?

The max number of ingredients this crafting machine prototype supports.

The max number of ingredients this crafting machine prototype supports.

crafting_categories :: R dictionary[string → true] ?

The crafting categories this entity prototype supports. [...]

The crafting categories this entity prototype supports. [...]

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.

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 uint?

The max payload size of this logistics or construction robot.

The max payload size 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 uint

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 double?

The target temperature of this boiler prototype.

The target temperature of this boiler prototype.

boiler_mode changed :: 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 or normal pump.

The pumping speed of this offshore or normal pump.

bulk new :: R boolean?

Whether this inserter is a bulk-type.

Whether this inserter is a bulk-type.

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.

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 uint?

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 uint

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 new :: 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 new :: 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 new :: 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.

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 new :: 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 uint?

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.

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 uint?

The time it takes this land mine to arm.

The time it takes this land mine to arm.

trigger_collision_mask changed :: 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 new :: R bool ?
is_building :: R boolean
automated_ammo_count :: R uint?

The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.

The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.

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_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.

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 new :: 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 uint?

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 uint?

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 uint?

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.

effect_receiver new :: 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 uint?

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 changed :: 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.

chunk_exploration_radius :: R double?

The chunk exploration radius of this spider vehicle prototype.

The chunk exploration radius of this spider 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.

use_exact_mode :: R boolean?

Whether this logistic container prototype uses exact mode

Whether this logistic container prototype uses exact mode

tile_width :: R uint

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 uint

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 new :: R uint?
harvest_emissions new :: 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.

growth_grid_tile_size new :: R uint?
vector_to_place_result :: R Vector?
surface_conditions new :: R array[SurfaceCondition] ?

The surface conditions required to build this entity.

The surface conditions required to build this entity.

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 uint?
drop_item_distance :: R uint?
reach_distance :: R uint?
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 uint?
ticks_to_keep_aiming_direction :: R uint?
ticks_to_stay_in_combat :: R uint?
respawn_time :: R uint?
damage_hit_tint :: R Color?
character_corpse :: R LuaEntityPrototype?
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. [...]

ClassLuaEquipmentchanged

name :: R string

Name of this equipment.

Name of this equipment.

ghost_name new :: 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 new :: R string

Type of the equipment contained in this ghost.

Type of the equipment contained in this ghost.

quality new :: 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 solar power generated.

Maximum solar power generated.

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

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

ClassLuaEquipmentGridchanged

take{position?=…, equipment?=…, by_player?=…} SimpleItemStack?

Remove an equipment from the grid.

Remove an equipment from the grid.

take_all(by_player?) changed → array[ItemCountWithQuality]

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?=…} changedLuaEquipment?

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 based off a position.

Find equipment in the Equipment Grid based off a position.

get_contents() → dictionary[string → uint]

Get counts of all equipment in this grid.

Get counts of all equipment in this grid.

get_generator_energy(quality?) newdouble

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?) changedLuaEquipment?

Find equipment by name.

Find equipment by name.

count(equipment?) uint

Get the number of all or some equipment in this grid.

Get the number of all or some equipment in this grid.

revive(equipment) newLuaEquipment

Revives the given equipment ghost if possible.

Revives the given equipment ghost if possible.

order_removal(equipment) newboolean

Marks the given equipment for removal. [...]

Marks the given equipment for removal. [...]

cancel_removal(equipment) newboolean

Cancels removal for the given equipment.

Cancels removal for the given equipment.

prototype :: R LuaEquipmentGridPrototype
width :: R uint

Width of the equipment grid.

Width of the equipment grid.

height :: R uint

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 any solar panels in the equipment grid. [...]

Maximum energy per tick that can be created by any solar panels in the equipment grid. [...]

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 shields this equipment grid has.

The amount of shields this equipment grid has.

max_shield :: R float

The maximum amount of shields this equipment grid has.

The maximum amount of shields this equipment grid has.

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 uint

Unique identifier of this equipment grid.

Unique identifier of this equipment grid.

entity_owner new :: 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 new :: 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.)

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

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 uint
height :: R uint
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. [...]

get_shield(quality?) newfloat

The shield value of this equipment. [...]

The shield value of this equipment. [...]

get_energy_consumption(quality?) newdouble
get_movement_bonus(quality?) newfloat?
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 changed :: 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. [...]

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

ClassLuaFlowStatisticschanged

get_input_count(name) uint64 or double

Gets the total input count for a given prototype.

Gets the total input count for a given prototype.

set_input_count(name, count)

Sets the total input count for a given prototype.

Sets the total input count for a given prototype.

get_output_count(name) uint64 or double

Gets the total output count for a given prototype.

Gets the total output count for a given prototype.

set_output_count(name, count)

Sets the total output count for a given prototype.

Sets the total output count for a given prototype.

get_storage_count(name) newuint64 or double

Gets the total storage count for a given prototype.

Gets the total storage count for a given prototype.

set_storage_count(name, count) new

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?=…} changeddouble

Gets the flow count value for the given time frame. [...]

Gets the flow count value for the given time frame. [...]

on_flow(name, 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 new :: 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. [...]

ClassLuaFluidBoxchanged

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 index.

The capacity of the given fluidbox index.

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) newuint?

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) new → dictionary[string → uint]?

Gets counts of all fluids in the fluid segment. [...]

Gets counts of all fluids in the fluid segment. [...]

flush(index, fluid?) changed → dictionary[string → float]

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) new

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) new

Removes linked connection record. [...]

Removes linked connection record. [...]

get_linked_connection(this_linked_connection_id) newLuaEntity?, uint?

Returns other end of a linked connection.

Returns other end of a linked connection.

get_linked_connections() new → 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 uint

Number of fluid boxes.

Number of fluid boxes.

entity :: R LuaEntityPrototype

The entity that this belongs to.

The entity that this belongs to.

index :: R uint

The index of this fluidbox prototype in the owning entity.

The index of this fluidbox prototype in the owning entity.

pipe_connections changed :: R array[PipeConnectionDefinition]

The pipe connection points.

The pipe connection points.

production_type :: R "input" or "input-output" or "output" or "none"

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

The secondary draw orders for the 4 possible connection directions.

The secondary draw orders for the 4 possible connection directions.

render_layer :: R string

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

emissions_per_joule new :: 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. [...]

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

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

name :: R string

Name of this prototype.

Name of this prototype.

from :: R string
size :: R int
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. [...]

ClassLuaForcechanged

get_entity_count(name) changeduint

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) new

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) new

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, position) boolean

Has a chunk been charted?

Has a chunk been charted?

is_chunk_visible(surface, 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, 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) changeddouble
set_turret_attack_modifier(turret, modifier) changed
set_cease_fire(other, cease_fire) changed

Add other force to this force's cease fire list. [...]

Add other force to this force's cease fire list. [...]

get_cease_fire(other) changedboolean

Is other force in this force's cease fire list?

Is other force in this force's cease fire list?

set_friend(other, friend) changed

Add other force to this force's friends list. [...]

Add other force to this force's friends list. [...]

get_friend(other) changedboolean

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) new
get_surface_hidden(surface) newboolean
unchart_chunk(position, surface)
get_item_launched(item) changeduint

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) changed

Sets the count of a given item launched in rockets.

Sets the count of a given item launched in rockets.

print(message, print_settings?) changed

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 the given bounding box on the given surface.

Finds all custom chart tags within the given bounding box on the given surface.

reset_evolution()

Resets evolution for this force to zero.

Resets evolution for this force to zero.

play_sound{path=…, position?=…, volume_modifier?=…, override_sound_type?=…}

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) changedboolean

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) changed

Sets if the given recipe can be hand-crafted. [...]

Sets if the given recipe can be hand-crafted. [...]

add_research(technology) changedboolean

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) changedLuaInventory?

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) changedboolean

Is this force a friend? [...]

Is this force a friend? [...]

is_enemy(other) changedboolean

Is this force an enemy? [...]

Is this force an enemy? [...]

lock_space_location(name) new

Locks the planet to not be accessible to this force.

Locks the planet to not be accessible to this force.

unlock_space_location(name) new

Unlocks the planet to be accessible to this force.

Unlocks the planet to be accessible to this force.

is_space_location_unlocked(name) new

Is the specified planet unlocked for this force?

Is the specified planet unlocked for this force?

lock_quality(quality) new

Locks the quality to not be accessible to this force.

Locks the quality to not be accessible to this force.

unlock_quality(quality) new

Unlocks the quality to be accessible to this force.

Unlocks the quality to be accessible to this force.

is_quality_unlocked(quality) new

Is the specified quality unlocked for this force?

Is the specified quality unlocked for this force?

lock_space_platforms() new

Locks the space platforms, which disables the space platforms button

Locks the space platforms, which disables the space platforms button

unlock_space_platforms() new

Unlocks the space platforms, which enables the space platforms button

Unlocks the space platforms, which enables the space platforms button

is_space_platforms_unlocked() newboolean

Are the space platforms unlocked? [...]

Are the space platforms unlocked? [...]

create_space_platform{name?=…, planet=…, starter_pack=…} newLuaSpacePlatform?

Creates a new space platform on this force.

Creates a new space platform on this force.

get_evolution_factor(surface?) newdouble

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?) newdouble

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?) newdouble

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?) newdouble

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?) new

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?) new

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?) new

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?) new

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) newLuaFlowStatistics

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) newLuaFlowStatistics

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) newLuaFlowStatistics

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) newLuaFlowStatistics

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.

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 new :: RW uint

Number of items that can be transferred by bulk inserters. [...]

Number of items that can be transferred by bulk inserters. [...]

belt_stack_size_bonus new :: RW uint

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 uint

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 new :: 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.

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 new :: RW double
character_build_distance_bonus :: RW uint
character_item_drop_distance_bonus :: RW uint
character_reach_distance_bonus :: RW uint
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 uint

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 uint

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 uint
max_failed_attempts_per_tick_per_construction_queue :: RW uint
character_logistic_requests :: RW boolean

true if character requester logistics is enabled.

true if character requester logistics is enabled.

rockets_launched :: RW uint

The number of rockets launched.

The number of rockets launched.

items_launched changed :: R array[ItemCountWithQuality]

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 uint

This force's index in LuaGameScript::forces (unique ID). [...]

This force's index in LuaGameScript::forces (unique ID). [...]

research_queue changed :: 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 new :: R dictionary[uint → 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. [...]

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

ClassLuaGameScriptchanged

set_game_state{game_finished?=…, player_won?=…, next_level?=…, can_continue?=…} changed

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?=…} new

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?=…} new

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?=…, 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?=…} changed

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) changed

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) changedboolean

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

enable_tip_triggers_in_custom_scenarios() new

Enables tip triggers in custom scenarios, that unlock new tips and show notices about unlocked tips.

Enables tip triggers in custom scenarios, that unlock new tips and show notices about unlocked tips.

print(message, print_settings?) changed

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{path=…, position?=…, volume_modifier?=…, override_sound_type?=…}

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?) changed

Bans the given player from this multiplayer game. [...]

Bans the given player from this multiplayer game. [...]

unban_player(player) changed

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?) changedLuaInventory

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) newLuaFlowStatistics

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?=…} new → array[LuaEntity]

Returns vehicles in game

Returns vehicles in game

get_entity_by_unit_number(unit_number) newLuaEntity?

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.

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[uint 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[uint 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 new :: 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 uint

Current map tick.

Current map tick.

ticks_played :: R uint

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 uint

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[uint or string → LuaSurface]

Get a table of all the surfaces that currently exist. [...]

Get a table of all the surfaces that currently exist. [...]

planets new :: 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[uint → 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 new :: R LuaTrainManager
blueprints new :: 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 new :: RW boolean

True by default. [...]

True by default. [...]

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 new :: 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 changed :: R boolean

true if this should connect to the logistic network.

true if this should connect to the logistic network.

logistic_condition changed :: R CircuitConditionDefinition

The logistic condition. [...]

The logistic condition. [...]

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

ClassLuaGuichanged

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

ClassLuaGuiElementchanged

add{type=…, name?=…, caption?=…, tooltip?=…, elem_tooltip?=…, enabled?=…, visible?=…, 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() uint

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?) changed

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 uint

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 uint

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 uint

The selected index for this dropdown or listbox. [...]

The selected index for this dropdown or listbox. [...]

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 uint

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 uint

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 changed :: RW string or SignalID or table?

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 uint

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.

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 uint?

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

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

emissions_per_joule new :: 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. [...]

ClassLuaHelpersnew

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

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

object_name :: R string

The class name of this object. [...]

The class name of this object. [...]

circuit_set_filters new :: 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. [...]

clear()

Make this inventory empty.

Make this inventory empty.

can_insert(items) boolean

Can at least some items be inserted?

Can at least some items be inserted?

insert(items) uint

Insert items into this inventory.

Insert items into this inventory.

remove(items) uint

Remove items from this inventory.

Remove items from this inventory.

get_item_count(item?) changeduint

Get the number of all or some items in this inventory.

Get the number of all or some items in this inventory.

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() changed → array[ItemCountWithQuality]

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() uint

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) changedboolean

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) changedItemFilter?

Gets the filter for the given item stack index.

Gets the filter for the given item stack index.

set_filter(index, filter) changedboolean

Sets the filter for the given item stack index. [...]

Sets the filter for the given item stack index. [...]

find_item_stack(item) changedLuaItemStack?, uint?

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?) changedLuaItemStack?, uint?

Finds the first empty stack. [...]

Finds the first empty stack. [...]

count_empty_stacks(include_filtered?, include_bar?) uint

Counts the number of empty stacks.

Counts the number of empty stacks.

get_insertable_count(item) changeduint

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.

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.

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 uint

Get the number of slots in this inventory.

Get the number of slots in this inventory.

ClassLuaItemextendsLuaItemCommonnew

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

ClassLuaItemCommonabstractnew

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[uint → 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() uint

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) string?

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 uint?

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.

cost_to_build :: R array[ItemCountWithQuality]

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 uint?

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.

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 uint

The number of entity filters this deconstruction item supports.

The number of entity filters this deconstruction item supports.

entity_filters :: RW array[string]

The entity filters for this deconstruction item. [...]

The entity filters for this deconstruction item. [...]

tile_filter_count :: R uint

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 uint

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 uint

Number of bullets left in the magazine.

Number of bullets left in the magazine.

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?) newuint

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?) newuint?

The inventory size bonus for this armor prototype.

The inventory size bonus for this armor prototype.

get_selection_border_color(selection_mode) newColor?

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) newSelectionModeFlags?

Flags that affect which entities will be selected.

Flags that affect which entities will be selected.

get_cursor_box_type(selection_mode) newCursorBoxRenderType?
get_entity_filter_mode(selection_mode) newPrototypeFilterMode?

The entity filter mode used by this selection tool.

The entity filter mode used by this selection tool.

get_tile_filter_mode(selection_mode) newPrototypeFilterMode?

The tile filter mode used by this selection tool.

The tile filter mode used by this selection tool.

get_entity_filters(selection_mode) new → array[LuaEntityPrototype]?

The entity filters used by this selection tool.

The entity filters used by this selection tool.

get_entity_type_filters(selection_mode) new → 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) new → array[LuaTilePrototype]?

The tile filters used by this selection tool.

The tile filters used by this selection tool.

get_durability(quality?) newdouble?

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 uint

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 new :: R double

Additional fuel acceleration multiplier per quality level.

Additional fuel acceleration multiplier per quality level.

fuel_top_speed_multiplier_quality_bonus new :: 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.

can_be_mod_opened :: R boolean

If this item can be mod-opened.

If this item can be mod-opened.

spoil_result new :: R LuaItemPrototype?

The spoil result of this item, if any

The spoil result of this item, if any

plant_result new :: 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 new :: R SpoilToTriggerResult?
destroyed_by_dropping_trigger new :: R array[TriggerItem] ?
weight new :: R double

Weight of this item

Weight of this item

ingredient_to_weight_coefficient new :: R double
fuel_glow_color new :: R Color?
default_import_location new :: R LuaSpaceLocationPrototype
ammo_category new :: 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 new :: 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 new :: 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 new :: 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 new :: R Color?
attack_parameters :: R AttackParameters?

The gun attack parameters.

The gun attack parameters.

inventory_size :: R uint?

The main inventory size for item-with-inventory-prototype.

The main inventory size for item-with-inventory-prototype.

item_filters changed :: R array[LuaItemPrototype] ?
item_group_filters changed :: R array[LuaGroup] ?
item_subgroup_filters changed :: R array[LuaGroup] ?
filter_mode :: R "none" or "whitelist" or "blacklist"?

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 uint?

Tier of the module inside its category. [...]

Tier of the module inside its category. [...]

requires_beacon_alt_mode new :: R boolean?
beacon_tint new :: R array[Color] ?
rails new :: 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 new :: R LuaEntityPrototype?

The rail support used by this rail planner.

The rail support used by this rail planner.

manual_length_limit new :: 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 new :: 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 uint?

The number of entity filters this deconstruction item has.

The number of entity filters this deconstruction item has.

tile_filter_slots :: R uint?

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.

durability_description_value new :: 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.

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

ClassLuaItemStackextendsLuaItemCommonchanged

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) 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) int

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() new

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 uint

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 new :: R LuaQualityPrototype

The quality of this item.

The quality of this item.

spoil_tick new :: RW uint

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 new :: RW double

The percent spoiled this item is if it spoils. [...]

The percent spoiled this item is if it spoils. [...]

item new :: 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. [...]

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 new :: RW defines.control_behavior.lamp.color_mode
red_signal new :: RW SignalID?
green_signal new :: RW SignalID?
blue_signal new :: RW SignalID?
rgb_signal new :: 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. [...]

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

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

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 uint

Number of stationed logistic robots in this cell.

Number of stationed logistic robots in this cell.

stationed_construction_robot_count :: R uint

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 uint

Number of robots currently charging.

Number of robots currently charging.

to_charge_robot_count :: R uint

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

circuit_exclusive_mode_of_operation new :: 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 new :: RW boolean

Whether the circuit condition is in effect

Whether the circuit condition is in effect

circuit_condition new :: 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. [...]

ClassLuaLogisticNetworkchanged

get_item_count(item?, member?) changedint

Count given or all items in the network or given members.

Count given or all items in the network or given members.

get_contents() changed → array[ItemCountWithQuality]

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?) uint

Remove items from the logistic network. [...]

Remove items from the logistic network. [...]

insert(item, members?) uint

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?=…} changedLuaLogisticPoint?

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?) changedboolean

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) changedLogisticsNetworkSupplyCounts

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) changedLogisticsNetworkSupplyPoints

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 new :: R uint

The unique logistic network ID.

The unique logistic network ID.

force :: R LuaForce

The force this logistic network belongs to.

The force this logistic network belongs to.

available_logistic_robots :: R uint

Number of logistic robots available for a job.

Number of logistic robots available for a job.

all_logistic_robots :: R uint

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 uint

Number of construction robots available for a job.

Number of construction robots available for a job.

all_construction_robots :: R uint

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 uint

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 robots in this logistic network.

All robots in this logistic network.

construction_robots :: R array[LuaEntity]

All construction robots in this logistic network.

All construction robots in this logistic network.

logistic_robots :: R array[LuaEntity]

All logistic robots in this logistic network.

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

ClassLuaLogisticPointchanged

add_section(group?) newLuaLogisticSection?

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) newboolean

Removes the given logistic section if possible. [...]

Removes the given logistic section if possible. [...]

get_section(section_index) newLuaLogisticSection

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 uint

The Logistic member index of this logistic point.

The Logistic member index of this logistic point.

filters changed :: 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 dictionary[string → uint]

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 dictionary[string → uint]

Items targeted to be dropped off into this logistic point by robots. [...]

Items targeted to be dropped off into this logistic point by robots. [...]

exact :: R boolean

If this logistic point is using the exact mode. [...]

If this logistic point is using the exact mode. [...]

trash_not_requested new :: RW boolean

Whether this logistic point is set to trash unrequested items.

Whether this logistic point is set to trash unrequested items.

enabled new :: 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 new :: R array[LuaLogisticSection]

All logistic sections of this logistic point.

All logistic sections of this logistic point.

sections_count new :: R uint

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

set_slot(slot_index, filter)

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 uint

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 uint

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

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

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 int or string or Color

The default value of this setting.

The default value of this setting.

minimum_value :: R double or int?

The minimum value for this setting. [...]

The minimum value for this setting. [...]

maximum_value :: R double or int?

The maximum value for this setting. [...]

The maximum value for this setting. [...]

allowed_values :: R array[string] or array[int] 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. [...]

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

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

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

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 uint

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

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

ClassLuaPlanetnew

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.

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

ClassLuaPlayerextendsLuaControlchanged

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?) changed

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?=…} changed

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?) changed

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 players console.

Print construction robot job counts to the players 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?) changedboolean

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?=…} changed

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[uint → 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.

pipette_entity(entity, allow_ghost?) changedboolean

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_place_entity{name=…, position=…, direction?=…} changedboolean

Checks if this player can build the given entity at the given location on the surface the player is on.

Checks if this player can build the given entity at the given location on the surface the player is on.

can_build_from_cursor{position=…, direction?=…, build_mode?=…, terrain_building_size?=…, skip_fog_of_war?=…} changedboolean

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?=…, build_mode?=…, terrain_building_size?=…, skip_fog_of_war?=…} changed

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() new

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{path=…, position?=…, volume_modifier?=…, override_sound_type?=…}

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

create_local_flying_text{text=…, position?=…, 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() new

Clear any active flying texts for this player.

Clear any active flying texts for this player.

get_quick_bar_slot(index) LuaItemPrototype?

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) changed

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

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) uint?

Requests a translation for the given localised string. [...]

Requests a translation for the given localised string. [...]

request_translations(localised_strings) → array[uint]?

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) changed

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.

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) changed

Starts selection with selection tool from the specified position. [...]

Starts selection with selection tool from the specified position. [...]

clear_selection()

Clears the players selection tool selection position.

Clears the players selection tool selection position.

enter_space_platform(space_platform) newboolean

Enters the given space platform if possible.

Enters the given space platform if possible.

leave_space_platform() new

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() newboolean

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.

physical_surface new :: R LuaSurface

The surface this players physical controller is on.

The surface this players physical controller is on.

physical_surface_index new :: R uint

Unique ID associated with the surface this players physical controller is currently on.

Unique ID associated with the surface this players physical controller is currently on.

physical_position new :: R MapPosition

The current position of this players physical controller.

The current position of this players physical controller.

physical_vehicle new :: R MapPosition

The current vehicle of this players physical controller.

The current vehicle of this players 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 uint

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 new :: 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 new :: 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 :: W double

The player's zoom-level.

The player's zoom-level.

centered_on new :: 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 uint

How many ticks since the last action of this player.

How many ticks since the last action of this player.

online_time :: R uint

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 uint

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 uint?

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 new :: R double

The display density scale for this player. [...]

The display density scale for this player. [...]

locale new :: 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 new :: 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 new :: 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. [...]

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

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

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

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

ClassLuaPrototypeBaseabstractnew

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
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

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

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.

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 uint
max_electric_pole_supply_area_distance :: R float
max_electric_pole_connection_distance :: R double
max_beacon_supply_area_distance :: R uint
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

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

color :: R Color

The color of the prototype

The color of the prototype

level :: R uint

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

ClassLuaRCON

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

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

ClassLuaRailEndnew

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

size :: R uint

The total number of rails in this path.

The total number of rails in this path.

current :: R uint

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

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

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

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

ClassLuaRecipechanged

reload()

Reload the recipe from the prototype.

Reload the recipe from the prototype.

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.

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

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

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.

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 uint

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 uint

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 new :: 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 new :: 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 new :: R boolean
hide_from_player_crafting new :: R boolean
trash new :: 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 new :: R boolean
is_parameter new :: R boolean
allowed_effects new :: 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 new :: 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 new :: R array[LocalisedString] ?
surface_conditions new :: R array[SurfaceCondition] ?

The surface conditions required to craft this recipe.

The surface conditions required to craft this recipe.

alternative_unlock_methods new :: R array[LuaTechnologyPrototype] ?

Alternative technologies that can unlocked this recipe.

Alternative technologies that can unlocked this recipe.

crafting_machine_tints new :: R array[Color]
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. [...]

ClassLuaRecordnew

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[uint → 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 blueprint.

Gets the given tag on the given blueprint entity index in this blueprint blueprint.

set_blueprint_entity_tag(index, tag, value)

Sets the given tag on the given blueprint entity index in this blueprint blueprint.

Sets the given tag on the given blueprint entity index in this blueprint 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() uint

Gets the number of entities in this blueprint blueprint.

Gets the number of entities in this blueprint blueprint.

get_entity_filter(index) string?

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.

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.

cost_to_build :: R array[ItemCountWithQuality]

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 array[LuaRecord]

The contents of this BlueprintBookRecord.

The contents of this BlueprintBookRecord.

entity_filters :: RW array[string]

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 uint

The number of entity filters this deconstruction planner supports.

The number of entity filters this deconstruction planner supports.

tile_filter_count :: R uint

The number of tile filters this deconstruction planner supports.

The number of tile filters this deconstruction planner supports.

mapper_count :: R uint

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

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

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 uint

Time to live of this object. [...]

Time to live of this object. [...]

forces :: RW array[LuaForce] or 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.

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.

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

ClassLuaRenderingchanged

draw_line{color=…, width=…, gap_length?=…, dash_length?=…, dash_offset?=…, from=…, to=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create a line.

Create a line.

draw_text{text=…, surface=…, target=…, color=…, scale?=…, font?=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, orientation?=…, alignment?=…, vertical_alignment?=…, scale_with_zoom?=…, only_in_alt_mode?=…, use_rich_text?=…} changedLuaRenderObject

Create a text. [...]

Create a text. [...]

draw_circle{color=…, radius=…, width?=…, filled?=…, target=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create a circle.

Create a circle.

draw_rectangle{color=…, width?=…, filled?=…, left_top=…, right_bottom=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create a rectangle.

Create a rectangle.

draw_arc{color=…, max_radius=…, min_radius=…, start_angle=…, angle=…, target=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create an arc.

Create an arc.

draw_polygon{color=…, vertices=…, target?=…, orientation?=…, orientation_target?=…, use_target_orientation?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} changedLuaRenderObject

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?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create a sprite.

Create a sprite.

draw_light{sprite=…, orientation?=…, scale?=…, intensity?=…, minimum_darkness?=…, oriented?=…, color?=…, target=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} changedLuaRenderObject

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?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} changedLuaRenderObject

Create an animation.

Create an animation.

get_all_objects(mod_name?) new → 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) newLuaRenderObject?

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

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

read_items_mode new :: 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 new :: 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. [...]

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

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

ClassLuaSettingschanged

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

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

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 uint?
hide_cursor :: W boolean
camera_zoom :: W double
camera_player :: W PlayerIdentification
camera_player_cursor_direction :: W defines.direction
camera_alt_info :: 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. [...]

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

position :: R MapPosition
solar_power_in_space :: R double
asteroid_spawn_influence :: R double
asteroid_spawn_definitions :: R array[SpaceLocationAsteroidSpawnDefinition] ?
map_seed_offset :: R uint?
map_gen_settings :: R MapGenSettings?
entities_require_heating :: R boolean?
pollutant_type :: R LuaAirbornePollutantPrototype?
player_effects :: R array[TriggerItem] ?
ticks_between_player_effects :: R uint?
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. [...]

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?=…}

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

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 uint

The unique index of this space platform.

The unique index of this space platform.

space_location :: R LuaSpaceLocationPrototype

The space location this space platform is stopped at or nil.

The space location this space platform is stopped at or nil.

state :: R defines.space_platform_state

The current state of this space platform.

The current state of this space platform.

starter_pack :: R LuaItemPrototype

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 uint

If this platform is scheduled for deletion. [...]

If this platform is scheduled for deletion. [...]

weight :: R uint

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.

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

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

read_contents new :: 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. [...]

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 int

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 int

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 int

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 int

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 int

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 int

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 int
right_padding :: RW int
bottom_padding :: RW int
left_padding :: RW int
top_margin :: RW int
right_margin :: RW int
bottom_margin :: RW int
left_margin :: RW int
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 int

Space between the table cell contents top and border.

Space between the table cell contents top and border.

right_cell_padding :: RW int

Space between the table cell contents right and border.

Space between the table cell contents right and border.

bottom_cell_padding :: RW int

Space between the table cell contents bottom and border.

Space between the table cell contents bottom and border.

left_cell_padding :: RW int

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 int
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 int

Horizontal space between individual cells.

Horizontal space between individual cells.

vertical_spacing :: RW int

Vertical space between individual cells.

Vertical space between individual cells.

use_header_filler :: RW boolean
bar_width :: RW uint
color :: RW Color
column_alignments :: R LuaCustomTable[uint → 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 int
extra_bottom_padding_when_activated :: RW int
extra_left_padding_when_activated :: RW int
extra_right_padding_when_activated :: RW int
extra_top_margin_when_activated :: RW int
extra_bottom_margin_when_activated :: RW int
extra_left_margin_when_activated :: RW int
extra_right_margin_when_activated :: RW int
extra_padding_when_activated :: W int or array[int]

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 int or array[int]

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 int
default_badge_font_color :: RW Color
selected_badge_font_color :: RW Color
disabled_badge_font_color :: RW Color
width :: W int

Sets both minimal and maximal width to the given value.

Sets both minimal and maximal width to the given value.

height :: W int

Sets both minimal and maximal height to the given value.

Sets both minimal and maximal height to the given value.

size :: W int or array[int]

Sets both width and height to the given value. [...]

Sets both width and height to the given value. [...]

padding :: W int or array[int]

Sets top/right/bottom/left paddings to this value. [...]

Sets top/right/bottom/left paddings to this value. [...]

margin :: W int or array[int]

Sets top/right/bottom/left margins to this value. [...]

Sets top/right/bottom/left margins to this value. [...]

cell_padding :: W int

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

ClassLuaSurfacechanged

get_pollution(position) double

Get the pollution for a given position. [...]

Get the pollution for a given position. [...]

can_place_entity{name=…, position=…, direction?=…, force?=…, build_check_type?=…, forced?=…, inner_name?=…} changedboolean

Check for collisions with terrain or other entities.

Check for collisions with terrain or other entities.

can_fast_replace{name=…, position=…, direction?=…, force?=…} changedboolean

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) changedLuaEntity?

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) changed → 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) changed → 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) changeduint

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) changeduint

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?) changedMapPosition?

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?) changedMapPosition?

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?=…} changed → array[LuaEntity]

Spill items on the ground centered at a given location.

Spill items on the ground centered at a given location.

find_enemy_units(center, radius, force?) changed → 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=…} changed → 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?=…} changedLuaEntity?

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?=…} changedLuaEntity

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?=…} changeduint

Give a command to multiple units. [...]

Give a command to multiple units. [...]

create_entity{name=…, position=…, direction?=…, quality?=…, force?=…, target?=…, source?=…, cause?=…, snap_to_grid?=…, fast_replace?=…, item_index?=…, player?=…, character?=…, spill?=…, raise_built?=…, create_build_effect_smoke?=…, spawn_decorations?=…, move_stuck_players?=…, item?=…, preserve_ghosts_and_corpses?=…} changedLuaEntity?

Create an entity on this surface.

Create an entity on this surface.

create_trivial_smoke{name=…, position=…} changed
create_particle{name=…, position=…, movement=…, height=…, vertical_speed=…, frame_speed=…} changed

Creates a particle at the given location

Creates a particle at the given location

create_unit_group{position=…, force?=…} changedLuaCommandable

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?) changed

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?) changed

Set tiles at specified locations. [...]

Set tiles at specified locations. [...]

pollute(source, amount)

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(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(position, status)

Set generated status of a chunk. [...]

Set generated status of a chunk. [...]

find_logistic_network_by_position(position, force) changedLuaLogisticNetwork?

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) changedLuaLogisticNetwork?

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) changed → 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?=…} changed

Place a deconstruction request.

Place a deconstruction request.

cancel_deconstruct_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…, item_index?=…, super_forced?=…} changed

Cancel a deconstruction order.

Cancel a deconstruction order.

upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item=…} changed

Place an upgrade request.

Place an upgrade request.

cancel_upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item=…} changed

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) newstring

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?) changed

Set the hidden tile for the specified position. [...]

Set the hidden tile for the specified position. [...]

set_double_hidden_tile(position, tile?) new

Set double hidden tile for the specified position. [...]

Set double hidden tile for the specified position. [...]

get_connected_tiles(position, tiles, include_diagonal?, area?) changed → 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(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?) changed

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?=…} changed

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?=…} changed → 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{path=…, position?=…, volume_modifier?=…, override_sound_type?=…}

Play a sound for every player on this surface. [...]

Play a sound for every player on this surface. [...]

get_resource_counts() → dictionary[string → uint]

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?=…} changed

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?=…} changed

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?=…} changeduint

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) uint

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) changed

Sets the given script position to the new values.

Sets the given script position to the new values.

add_script_position(position) changeduint

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?) changedboolean

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) changedboolean

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(position, force) changed → 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.

build_checkerboard(area)

Sets the given area to the checkerboard lab tiles.

Sets the given area to the checkerboard lab tiles.

get_property(property) newdouble

Gets the value of surface property on this surface.

Gets the value of surface property on this surface.

set_property(property, value) new

Sets the value of surface property on this surface.

Sets the value of surface property on this surface.

create_global_electric_network() new

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() new

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=…} new

Creates lightning. [...]

Creates lightning. [...]

clear_hidden_tiles() new

Completely removes hidden and double hidden tiles data on this surface.

Completely removes hidden and double hidden tiles data on this surface.

name :: RW string

The name of this surface. [...]

The name of this surface. [...]

index :: R uint

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 new :: 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 uint

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.

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 new :: R boolean

Whether this surface currently has a global electric network.

Whether this surface currently has a global electric network.

platform new :: R LuaSpacePlatform?
planet new :: R LuaPlanet?

The planet associated with this surface, if there is one. [...]

The planet associated with this surface, if there is one. [...]

deletable new :: R boolean

If this surface can be deleted.

If this surface can be deleted.

global_effect new :: RW ModuleEffects?

Surface-wide effects applied to entities with effect receivers. [...]

Surface-wide effects applied to entities with effect receivers. [...]

pollutant_type new :: 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 new :: RW LocalisedString?

Localised name of this surface. [...]

Localised name of 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. [...]

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

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

ClassLuaTechnologychanged

reload()

Reload this technology from its prototype.

Reload this technology from its prototype.

research_recursive() new

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 new :: R dictionary[string → LuaTechnology]

Successors of this technology, i.e. [...]

Successors of this technology, i.e. [...]

research_unit_ingredients :: R array[Ingredient]

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 uint

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 uint

The current level of this technology. [...]

The current level of this technology. [...]

research_unit_count_formula changed :: R MathExpression?

The count formula, if this research has any. [...]

The count formula, if this research has any. [...]

saved_progress new :: 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. [...]

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 new :: 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 new :: R dictionary[string → LuaTechnologyPrototype]

Successors of this technology, i.e. [...]

Successors of this technology, i.e. [...]

research_unit_ingredients changed :: 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 uint

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 uint

The level of this research.

The level of this research.

max_level :: R uint

The max level of this research.

The max level of this research.

research_unit_count_formula changed :: R MathExpression?

The count formula, if this research has any. [...]

The count formula, if this research has any. [...]

research_trigger new :: R ResearchTrigger?

The trigger that will research this technology if any.

The trigger that will research this technology if any.

allows_productivity new :: 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. [...]

ClassLuaTilechanged

collides_with(layer) changedboolean

What type of things can collide with this tile?

What type of things can collide with this tile?

to_be_deconstructed(force?) changedboolean

Is this tile marked for deconstruction?

Is this tile marked for deconstruction?

order_deconstruction(force, player?) changedLuaEntity?

Orders deconstruction of this tile by the given force.

Orders deconstruction of this tile by the given force.

cancel_deconstruction(force, player?) changed

Cancels deconstruction if it is scheduled, does nothing otherwise.

Cancels deconstruction if it is scheduled, does nothing otherwise.

has_tile_ghost(force?) changedboolean

Does this tile have any tile ghosts on it.

Does this tile have any tile ghosts on it.

get_tile_ghosts(force?) changed → 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 new :: 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. [...]

collision_mask :: R CollisionMask

The collision mask this tile uses

The collision mask this tile uses

layer :: R uint
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 new :: 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[ItemStackDefinition] ?

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 new :: 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 new :: 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 new :: 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 new :: R boolean?
max_health new :: R float?
weight new :: R double?
default_cover_tile new :: R LuaTilePrototype?
frozen_variant new :: R LuaTilePrototype?
thawed_variant new :: R LuaTilePrototype?
trigger_effect new :: R array[TriggerEffectItem] ?
default_destroyed_dropped_item_trigger new :: R array[TriggerItem] ?
scorch_mark_color new :: R Color?
placeable_by new :: R array[SimpleItemStack] ?
bound_decoratives new :: R array[LuaDecorativePrototype] ?
ambient_sounds_group new :: R LuaTilePrototype?
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. [...]

ClassLuaTrainchanged

get_item_count(item?) changeduint

Get the amount of a particular item stored in the train.

Get the amount of a particular item stored in the train.

get_contents() changed → array[ItemCountWithQuality]

Get a mapping of the train's inventory.

Get a mapping of the train's inventory.

remove_item(stack) uint

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 → double]

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) newLuaRailEnd

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

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 uint

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[uint → uint]

The players killed by this train. [...]

The players killed by this train. [...]

kill_count :: R uint

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 new :: RW string

The group this train belongs to. [...]

The group this train belongs to. [...]

front_end new :: 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 new :: 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. [...]

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

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

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

ClassLuaTransportLinechanged

clear()

Remove all items from this transport line.

Remove all items from this transport line.

get_item_count(item?) changeduint

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) uint

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?) changedboolean

Insert items at a given position.

Insert items at a given position.

insert_at_back(items, belt_stack_size?) changedboolean

Insert items at the back of this line.

Insert items at the back of this line.

get_contents() changed → array[ItemCountWithQuality]

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() new → 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) newMapPosition

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 new :: R float

Length of the transport line. [...]

Length of the transport line. [...]

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 uint

Get the number of items on this transport line.

Get the number of items on this transport line.

color :: R Color
start_scale :: R double
end_scale :: R double
movement_slow_down_factor :: R double
duration :: R uint
spread_duration :: R uint
fade_away_duration :: R uint
fade_in_duration :: R uint
glow_fade_away_duration :: R uint
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. [...]

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

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() uint

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() uint

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 uint

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

special :: R boolean

Whether this is a special signal. [...]

Whether this is a special signal. [...]

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

emissions_per_joule new :: 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. [...]

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

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 uint

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 uint

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 uint

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

Classes

Concepts

Events

Defines