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.
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.
|
LuaAISettings | Collection of settings for overriding default ai behavior. |
LuaAccumulatorControlBehavior | Control behavior for accumulators. |
LuaAchievementPrototype | Prototype of a achievement. |
LuaAmmoCategoryPrototype | Prototype of a ammo category. |
LuaArithmeticCombinatorControlBehavior | Control behavior for arithmetic combinators. |
LuaAutoplaceControlPrototype | Prototype of an autoplace control. |
LuaBootstrap | Entry point for registering event handlers. [...] |
LuaBurner | A reference to the burner energy source owned by a specific LuaEntity or LuaEquipment. |
LuaBurnerPrototype | Prototype of a burner energy source. |
LuaChunkIterator | A chunk iterator can be used for iterating chunks coordinates of a surface. [...] |
LuaCircuitNetwork | A circuit network associated with a given entity, connector, and wire type. |
LuaCombinatorControlBehavior | |
LuaCommandProcessor | Allows for the registration of custom console commands through the global object named |
LuaConstantCombinatorControlBehavior | Control behavior for constant combinators. |
LuaContainerControlBehavior | Control behavior for container entities. |
LuaControl | |
LuaControlBehavior | The control behavior for an entity. [...] |
LuaCustomChartTag | A custom tag that shows on the map view. |
LuaCustomInputPrototype | Prototype of a custom input. |
LuaCustomTable | Lazily evaluated table. [...] |
LuaDamagePrototype | Prototype of a damage. |
LuaDeciderCombinatorControlBehavior | Control behavior for decider combinators. |
LuaDecorativePrototype | Prototype of an optimized decorative. |
LuaElectricEnergySourcePrototype | Prototype of an electric energy source. |
LuaEntity | The primary interface for interacting with entities through the Lua API. [...] |
LuaEntityPrototype | Prototype of an entity. |
LuaEquipment | An item in a LuaEquipmentGrid, for example a fusion reactor placed in one's power armor. [...] |
LuaEquipmentCategoryPrototype | Prototype of an equipment category. |
LuaEquipmentGrid | An equipment grid is for example the inside of a power armor. |
LuaEquipmentGridPrototype | Prototype of an equipment grid. |
LuaEquipmentPrototype | Prototype of a modular equipment. |
LuaFlowStatistics | Encapsulates statistic data for different parts of the game. [...] |
LuaFluidBox | An array of fluid boxes of an entity. [...] |
LuaFluidBoxPrototype | A prototype of a fluidbox owned by some LuaEntityPrototype. |
LuaFluidEnergySourcePrototype | Prototype of a fluid energy source. |
LuaFluidPrototype | Prototype of a fluid. |
LuaFontPrototype | Prototype of a font. |
LuaForce |
|
LuaFuelCategoryPrototype | Prototype of a fuel category. |
LuaGameScript | Main toplevel type, provides access to most of the API though its members. [...] |
LuaGenericOnOffControlBehavior | An abstract base class for behaviors that support switching the entity on or off based on some condition. |
LuaGroup | Item group or subgroup. |
LuaGui | The root of the GUI. [...] |
LuaGuiElement | An element of a custom GUI. [...] |
LuaHeatBufferPrototype | Prototype of a heat buffer. |
LuaHeatEnergySourcePrototype | Prototype of a heat energy source. |
LuaInserterControlBehavior | Control behavior for inserters. |
LuaInventory | A storage of item stacks. |
LuaItemPrototype | Prototype of an item. [...] |
LuaItemStack | A reference to an item and count owned by some external entity. [...] |
LuaLampControlBehavior | Control behavior for lamps. |
LuaLazyLoadedValue | A lazily loaded value. [...] |
LuaLogisticCell | Logistic cell of a particular LuaEntity. [...] |
LuaLogisticContainerControlBehavior | Control behavior for logistic chests. |
LuaLogisticNetwork | A single logistic network of a given force on a given surface. |
LuaLogisticPoint | Logistic point of a particular LuaEntity. [...] |
LuaMiningDrillControlBehavior | Control behavior for mining drills. |
LuaModSettingPrototype | Prototype of a mod setting. |
LuaModuleCategoryPrototype | Prototype of a module category. |
LuaNamedNoiseExpression | Prototype of a named noise expression. |
LuaNoiseLayerPrototype | Prototype of a noise layer. |
LuaParticlePrototype | Prototype of an optimized particle. |
LuaPermissionGroup | A permission group that defines what players in this group are allowed to do. |
LuaPermissionGroups | All permission groups. |
LuaPlayer | A player in the game. [...] |
LuaProfiler | An object used to measure script performance. [...] |
LuaProgrammableSpeakerControlBehavior | Control behavior for programmable speakers. |
LuaRCON | An interface to send messages to the calling RCON interface through the global object named |
LuaRailChainSignalControlBehavior | Control behavior for rail chain signals. |
LuaRailPath | A rail path. |
LuaRailSignalControlBehavior | Control behavior for rail signals. |
LuaRandomGenerator | A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. [...] |
LuaRecipe | A crafting recipe. [...] |
LuaRecipeCategoryPrototype | Prototype of a recipe category. |
LuaRecipePrototype | A crafting recipe prototype. |
LuaRemote | Registry of interfaces between scripts. [...] |
LuaRendering | Allows rendering of geometric shapes, text and sprites in the game world through the global object named |
LuaResourceCategoryPrototype | Prototype of a resource category. |
LuaRoboportControlBehavior | Control behavior for roboports. |
LuaSettings | Object containing mod settings of three distinct types: |
LuaShortcutPrototype | Prototype of a shortcut. |
LuaStorageTankControlBehavior | Control behavior for storage tanks. |
LuaStyle | Style of a GUI element. [...] |
LuaSurface | A "domain" of the world. [...] |
LuaTechnology | One research item. |
LuaTechnologyPrototype | A Technology prototype. |
LuaTile | A single "square" on the map. |
LuaTilePrototype | Prototype of a tile. |
LuaTrain | A train. [...] |
LuaTrainStopControlBehavior | Control behavior for train stops. |
LuaTransportBeltControlBehavior | Control behavior for transport belts. |
LuaTransportLine | One line on a transport belt. |
LuaTrivialSmokePrototype | Prototype of a trivial smoke. |
LuaUnitGroup | A collection of units moving and attacking together. [...] |
LuaVirtualSignalPrototype | Prototype of a virtual signal. |
LuaVoidEnergySourcePrototype | Prototype of a void energy source. |
LuaWallControlBehavior | Control behavior for walls. |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
allowed_without_fight [R] | :: boolean | |
hidden [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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
richness [R] | :: boolean | |
can_be_disabled [R] | :: boolean | |
control_order [R] | :: string | |
category [R] | :: string | 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. [...] |
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_entity_destroyed(entity) | → uint64 | Registers an entity so that after it's destroyed, on_entity_destroyed is called. [...] |
Registers an entity so that after it's destroyed, on_entity_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. | ||
get_prototype_history(type, name) | → PrototypeHistory | Gets the prototype history for the given type and name. |
Gets the prototype history for the given type and name. | ||
raise_event(event, data) | Raise an event. [...] | |
Raise an event. [...] | ||
raise_console_chat{player_index=…, message=…} | ||
raise_player_crafted_item{item_stack=…, player_index=…, recipe=…} | ||
raise_player_fast_transferred{player_index=…, entity=…, from_player=…, is_split=…} | ||
raise_biter_base_built{entity=…} | ||
raise_market_item_purchased{player_index=…, market=…, offer_index=…, count=…} | ||
raise_script_built{entity=…} | ||
raise_script_destroy{entity=…} | ||
raise_script_revive{entity=…, tags?=…} | ||
raise_script_teleported{entity=…, old_surface_index=…, old_position=…} | ||
raise_script_set_tiles{surface_index=…, tiles=…} | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
object_name [R] | :: string | The class name of this object. [...] |
The class name of this object. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 [RW] | :: LuaItemPrototype? | 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
emissions [R] | :: double | The emissions of this energy source in |
The emissions of this energy source in | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 iterator. |
Gets the next chunk position if the iterator is not yet done and increments the iterator. |
get_signal(signal) | → int | |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
circuit_connector_id [R] | :: defines.circuit_connector_id | The circuit connector ID on the associated entity this network was gotten from. |
The circuit connector ID on the 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. [...] |
get_signal_last_tick(signal) | → int? | Gets the value of a specific signal sent by this combinator behavior last tick or |
Gets the value of a specific signal sent by this combinator behavior last tick or | ||
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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
commands [R] | :: dictionary[string → LocalisedString] | Lists the custom commands registered by scripts through |
Lists the custom commands registered by scripts through | ||
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. [...] |
set_signal(index, signal?) | Sets the signal at the given index. | |
Sets the signal at the given index. | ||
get_signal(index) | → Signal | Gets the signal at the given index. [...] |
Gets the signal at the given index. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
parameters [RW] | :: array[ConstantCombinatorParameters]? | This constant combinator's parameters. [...] |
This constant combinator's parameters. [...] | ||
enabled [RW] | :: boolean | Turns this constant combinator on and off. |
Turns this constant combinator on and off. | ||
signals_count [R] | :: uint | The number of signals this constant combinator supports. |
The number of signals this constant combinator supports. | ||
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_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 | |
Removes the arrow created by | ||
get_item_count(item?) | → uint | 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?) | → boolean | Teleport the entity to a given position, possibly on another surface. [...] |
Teleport the entity to a given position, possibly on another surface. [...] | ||
update_selected_entity(position) | Select an entity, as if by hovering the mouse above it. | |
Select an entity, as if by hovering the mouse above it. | ||
clear_selected_entity() | Unselect any selected entity. | |
Unselect any selected entity. | ||
disable_flashlight() | Disable the flashlight. | |
Disable the flashlight. | ||
enable_flashlight() | Enable the flashlight. | |
Enable the flashlight. | ||
is_flashlight_enabled() | → boolean | Is the flashlight enabled. |
Is the flashlight enabled. | ||
get_craftable_count(recipe) | → uint | 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?=…} | → uint | 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 |
When | ||
open_technology_gui(technology?) | Open the technology GUI and select a given technology. | |
Open the technology GUI and select a given technology. | ||
set_personal_logistic_slot(slot_index, value) | → boolean | Sets a personal logistic request and auto-trash slot to the given value. [...] |
Sets a personal logistic request and auto-trash slot to the given value. [...] | ||
set_vehicle_logistic_slot(slot_index, value) | → boolean | Sets a vehicle logistic request and auto-trash slot to the given value. [...] |
Sets a vehicle logistic request and auto-trash slot to the given value. [...] | ||
get_personal_logistic_slot(slot_index) | → LogisticParameters | Gets the parameters of a personal logistic request and auto-trash slot. |
Gets the parameters of a personal logistic request and auto-trash slot. | ||
get_vehicle_logistic_slot(slot_index) | → LogisticParameters | Gets the parameters of a vehicle logistic request and auto-trash slot. [...] |
Gets the parameters of a vehicle logistic request and auto-trash slot. [...] | ||
clear_personal_logistic_slot(slot_index) | This will silently fail if personal logistics are not researched yet. | |
This will silently fail if personal logistics are not researched yet. | ||
clear_vehicle_logistic_slot(slot_index) | This will silently fail if the vehicle does not use logistics. | |
This will silently fail if the vehicle does not use logistics. | ||
is_cursor_blueprint() | → boolean | Returns whether the player is holding a blueprint. [...] |
Returns whether the player is holding a blueprint. [...] | ||
get_blueprint_entities() | → array[BlueprintEntity]? | Gets the entities that are part of the currently selected blueprint, regardless of it being in a blueprint book or picked from the blueprint library. |
Gets the entities that are part of the currently selected blueprint, regardless of it being in a blueprint book or picked from the blueprint library. | ||
is_cursor_empty() | → boolean | Returns whether the player is holding something in the cursor. [...] |
Returns whether the player is holding something in the cursor. [...] | ||
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 [RW] | :: ForceIdentification | 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 [RW] | :: LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or LuaInventory or LuaTechnology 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 |
The crafting queue progress in the range | ||
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 [RW] | :: ItemPrototypeIdentification? | The ghost prototype in the player's cursor. [...] |
The ghost prototype in the player's cursor. [...] | ||
driving [RW] | :: boolean |
|
| ||
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 |
When | ||
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). | ||
character_personal_logistic_requests_enabled [RW] | :: boolean | If personal logistic requests are enabled for this character or players character. |
If personal logistic requests are enabled for this character or players character. | ||
vehicle_logistic_requests_enabled [RW] | :: boolean | If personal logistic requests are enabled for this vehicle (spidertron). |
If personal logistic requests are enabled for this vehicle (spidertron). | ||
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. |
get_circuit_network(wire, circuit_connector?) | → LuaCircuitNetwork | |
type [R] | :: defines.control_behavior.type | The concrete type of this control behavior. |
The concrete type of this control behavior. | ||
entity [R] | :: LuaEntity | The entity this control behavior belongs to. |
The entity this control behavior belongs to. |
destroy() | Destroys this tag. | |
Destroys this tag. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
key_sequence [R] | :: string | The default key sequence for this custom input. |
The default key sequence for this custom input. | ||
alternative_key_sequence [R] | :: string? | The default alternative key sequence for this custom input, if any |
The default alternative key sequence for this custom input, if any | ||
controller_key_sequence [R] | :: string? | The default controller key sequence for this custom input, if any |
The default controller key sequence for this custom input, if any | ||
controller_alternative_key_sequence [R] | :: string? | The default controller alternative key sequence for this custom input, if any |
The default controller alternative key sequence for this custom input, if any | ||
linked_game_control [R] | :: string? | 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
hidden [R] | :: boolean | Whether this damage type is hidden from entity tooltips. |
Whether this damage type is hidden from entity tooltips. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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 | ||
collision_mask_with_flags [R] | :: CollisionMaskWithFlags | |
autoplace_specification [R] | :: AutoplaceSpecification? | Autoplace specification for this decorative prototype, if any. |
Autoplace specification for this decorative prototype, 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
buffer_capacity [R] | :: double | |
usage_priority [R] | :: string | |
input_flow_limit [R] | :: double | |
output_flow_limit [R] | :: double | |
drain [R] | :: double | |
emissions [R] | :: double | The emissions of this energy source in |
The emissions of this energy source in | ||
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. [...] |
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; |
Inventory for storing modules of this entity; | ||
get_fuel_inventory() | → LuaInventory? | The fuel inventory for this entity or |
The fuel inventory for this entity or | ||
get_burnt_result_inventory() | → LuaInventory? | The burnt result inventory for this entity or |
The burnt result inventory for this entity or | ||
damage(damage, force, type?, dealer?) | → float | Damages the entity. |
Damages the entity. | ||
can_be_destroyed() | → boolean | Whether the entity can be destroyed |
Whether the entity can be destroyed | ||
destroy{do_cliff_correction?=…, raise_destroy?=…} | → boolean | Destroys the entity. [...] |
Destroys the entity. [...] | ||
set_command(command) | Give the entity a command. | |
Give the entity a command. | ||
set_distraction_command(command) | Give the entity a distraction command. | |
Give the entity a distraction command. | ||
has_command() | → boolean | Has this unit been assigned a command? |
Has this unit been assigned a command? | ||
die(force?, cause?) | → boolean | Immediately kills the entity. [...] |
Immediately kills the entity. [...] | ||
has_flag(flag) | → boolean | Test whether this entity's prototype has a certain flag set. [...] |
Test whether this entity's prototype has a certain flag set. [...] | ||
ghost_has_flag(flag) | → boolean | Same as LuaEntity::has_flag, but targets the inner entity on a entity ghost. |
Same as LuaEntity::has_flag, but targets the inner entity on a entity ghost. | ||
add_market_item(offer) | Offer a thing on the market. | |
Offer a thing on the market. | ||
remove_market_item(offer) | → boolean | Remove an offer from a market. [...] |
Remove an offer from a market. [...] | ||
get_market_items() | → array[Offer] | Get all offers in a market as an array. |
Get all offers in a market as an array. | ||
clear_market_items() | Removes all offers from a market. | |
Removes all offers from a market. | ||
connect_neighbour(target) | → boolean | Connect two devices with a circuit wire or copper cable. [...] |
Connect two devices with a circuit wire or copper cable. [...] | ||
disconnect_neighbour(target?) | Disconnect circuit wires or copper cables between devices. [...] | |
Disconnect circuit wires or copper cables between devices. [...] | ||
order_deconstruction(force, player?) | → boolean | Sets the entity to be deconstructed by construction robots. |
Sets the entity to be deconstructed by construction robots. | ||
cancel_deconstruction(force, player?) | Cancels deconstruction if it is scheduled, does nothing otherwise. | |
Cancels deconstruction if it is scheduled, does nothing otherwise. | ||
to_be_deconstructed() | → boolean | Is this entity marked for deconstruction? |
Is this entity marked for deconstruction? | ||
order_upgrade{force=…, target=…, player?=…, direction?=…} | → boolean | Sets the entity to be upgraded by construction robots. |
Sets the entity to be upgraded by construction robots. | ||
cancel_upgrade(force, player?) | → boolean | Cancels upgrade if it is scheduled, does nothing otherwise. |
Cancels upgrade if it is scheduled, does nothing otherwise. | ||
to_be_upgraded() | → boolean | Is this entity marked for upgrade? |
Is this entity marked for upgrade? | ||
get_request_slot(slot) | → SimpleItemStack? | Get a logistic requester slot. [...] |
Get a logistic requester slot. [...] | ||
set_request_slot(request, slot) | → boolean | Set a logistic requester slot. [...] |
Set a logistic requester slot. [...] | ||
clear_request_slot(slot) | Clear a logistic requester slot. [...] | |
Clear a logistic requester slot. [...] | ||
is_crafting() | → boolean | Returns whether a craft is currently in process. [...] |
Returns whether a craft is currently in process. [...] | ||
is_opened() | → boolean | |
is_opening() | → boolean | |
is_closed() | → boolean | |
is_closing() | → boolean | |
request_to_open(force, extra_time?) | ||
request_to_close(force) | ||
get_transport_line(index) | → LuaTransportLine | Get a transport line of a belt or belt connectable entity. |
Get a transport line of a belt or belt connectable entity. | ||
get_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{return_item_request_proxy?=…, raise_revive?=…} | → dictionary[string → uint]?, 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_entity(direction, in_else_out) | → LuaEntity? | Get the rail signal or train stop at the start/end of the rail segment this rail is in. [...] |
Get the rail signal or 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. [...] |
Get all rails of a rail segment this rail is in. [...] | ||
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) | → string? | 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(slot_index, item) | Set the filter for a slot in an inserter, loader, or logistic storage container. [...] | |
Set the filter for a slot in an inserter, loader, or logistic storage container. [...] | ||
get_infinity_container_filter(index) | → InfinityInventoryFilter? | Gets the filter for this infinity container at the given index, or |
Gets the filter for this infinity container at the given index, or | ||
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 |
Gets the filter for this infinity pipe, or | ||
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, circuit_connector?) | → LuaCircuitNetwork? | |
get_merged_signal(signal, circuit_connector?) | → int | Read a single signal from the combined circuit networks. |
Read a single signal from the combined circuit networks. | ||
get_merged_signals(circuit_connector?) | → array[Signal]? | The merged circuit network signals or |
The merged circuit network signals or | ||
supports_backer_name() | → boolean | Whether this entity supports a backer name. |
Whether this entity supports a backer name. | ||
copy_settings(entity, by_player?) | → dictionary[string → uint] | 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 |
Gets all the | ||
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() | → LuaRecipe? | Current recipe being assembled by this machine, if any. |
Current recipe being assembled by this machine, if any. | ||
set_recipe(recipe) | → dictionary[string → uint] | Sets the given recipe in this assembly machine. |
Sets the given recipe in this assembly machine. | ||
rotate{reverse?=…, by_player?=…, spill_items?=…, enable_looted?=…, force?=…} | → boolean, dictionary[string → uint]? | 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 |
Returns | ||
get_train_stop_trains() | → array[LuaTrain] | The trains scheduled to stop at this train stop. |
The trains scheduled to stop at this train stop. | ||
get_stopped_train() | → LuaTrain? | The train currently stopped at this train stop, if any. |
The train currently stopped at this train stop, if any. | ||
clone{position=…, surface?=…, force?=…, create_build_effect_smoke?=…} | → LuaEntity? | Clones this entity. |
Clones this entity. | ||
get_fluid_count(fluid?) | → double | Get the amount of all or some fluid in this entity. [...] |
Get the amount of all or some fluid in this entity. [...] | ||
get_fluid_contents() | → dictionary[string → 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() | → LuaEntityPrototype? | Returns the new entity prototype. |
Returns the new entity prototype. | ||
get_upgrade_direction() | → defines.direction? | Returns the new entity direction after upgrading. |
Returns the new entity direction after upgrading. | ||
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". | ||
can_wires_reach(entity) | → boolean | Can wires reach between these entities. |
Can wires reach between these entities. | ||
get_connected_rolling_stock(direction) | → LuaEntity?, defines.rail_direction? | Gets rolling stock connected to the given end of this stock. |
Gets rolling stock connected to the given end of this stock. | ||
is_registered_for_construction() | → boolean | Is this entity or tile ghost or item request proxy registered for construction? [...] |
Is this entity or tile ghost or item request proxy registered for construction? [...] | ||
is_registered_for_deconstruction(force) | → boolean | Is this entity registered for deconstruction with this force? [...] |
Is this entity registered for deconstruction with this force? [...] | ||
is_registered_for_upgrade() | → boolean | Is this entity registered for upgrade? [...] |
Is this entity registered for upgrade? [...] | ||
is_registered_for_repair() | → boolean | Is this entity registered for repair? [...] |
Is this entity registered for repair? [...] | ||
add_autopilot_destination(position) | Adds the given position to this spidertron's autopilot's queue of destinations. | |
Adds the given position to this spidertron's autopilot's queue of destinations. | ||
connect_linked_belts(neighbour) | Connects current linked belt with another one. [...] | |
Connects current linked belt with another one. [...] | ||
disconnect_linked_belts() | Disconnects linked belt from its neighbour. [...] | |
Disconnects linked belt from its neighbour. [...] | ||
get_spider_legs() | → array[LuaEntity] | Gets legs of given SpiderVehicle. |
Gets legs of given SpiderVehicle. | ||
stop_spider() | Sets the speed of the given SpiderVehicle to zero. [...] | |
Sets the speed of the given SpiderVehicle to zero. [...] | ||
get_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 | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
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 |
If set to | ||
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. [...] | ||
direction [RW] | :: defines.direction | The current direction this entity is facing. |
The current direction this entity is facing. | ||
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 (heat in furnace, energy stored in electrical devices etc.). [...] |
Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.). [...] | ||
temperature [RW] | :: double? | The temperature of this entity's heat energy source. [...] |
The temperature of this entity's heat energy source. [...] | ||
previous_recipe [R] | :: LuaRecipe? | 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 [W] | :: LuaFluidBox | Fluidboxes of this entity. |
Fluidboxes of this entity. | ||
backer_name [RW] | :: string? | The backer name assigned to this entity. [...] |
The backer name assigned to this entity. [...] | ||
entity_label [RW] | :: string? | The label on this spider-vehicle entity, if any. [...] |
The label on this spider-vehicle entity, if any. [...] | ||
time_to_live [RW] | :: uint | The ticks left before a ghost, combat robot, highlight box, smoke with trigger or sticker is destroyed. [...] |
The ticks left before a ghost, combat robot, highlight box, smoke with trigger or sticker 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. [...] | ||
text [RW] | :: LocalisedString | The text of this flying-text entity. |
The text of this flying-text entity. | ||
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 entity be picked up automatically when the player walks over it? |
Will this 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]. | ||
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 |
The logistic network this entity is a part of, or | ||
logistic_cell [R] | :: LuaLogisticCell | The logistic cell this entity is a part of. [...] |
The logistic cell this entity is a part of. [...] | ||
item_requests [RW] | :: dictionary[string → uint] | 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. [...] | ||
player [R] | :: LuaPlayer? | The player connected to this character, if any. |
The player connected to this character, if any. | ||
unit_group [R] | :: LuaUnitGroup? | The unit group this unit is a member of, if any. |
The unit group this unit is a member of, 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. | ||
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_input_flow_limit [R] | :: double? | The input flow limit for the electric energy source. [...] |
The input flow limit for the electric energy source. [...] | ||
electric_output_flow_limit [R] | :: double? | The output flow limit for the electric energy source. [...] |
The output flow limit 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 [R] | :: double? | The emissions for the electric energy source. [...] |
The emissions for the electric energy source. [...] | ||
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 |
The secondary bounding box of this entity or | ||
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 |
The secondary selection box of this entity or | ||
mining_target [R] | :: LuaEntity? | The mining target, if any. |
The mining target, if any. | ||
circuit_connected_entities [R] | :: table? | Entities that are directly connected to this entity via the circuit network. [...] |
Entities that are directly connected to this entity via the circuit network. [...] | ||
circuit_connection_definitions [R] | :: array[CircuitConnectionDefinition]? | The connection definition for entities that are directly connected to this entity via the circuit network. [...] |
The connection definition for entities that are directly connected to this entity via the circuit network. [...] | ||
copper_connection_definitions [R] | :: array[CopperConnectionDefinition] | The connection definition for entities that are directly connected to this entity via copper cables. [...] |
The connection definition for entities that are directly connected to this entity via copper cables. [...] | ||
request_slot_count [R] | :: uint | The index of the configured request with the highest index for this entity. [...] |
The index of the configured request with the highest index for this entity. [...] | ||
filter_slot_count [R] | :: uint | The number of filter slots this inserter, loader, or logistic storage container has. [...] |
The number of filter slots this inserter, loader, or logistic storage container has. [...] | ||
loader_container [R] | :: LuaEntity? | The container entity this loader is pointing at/pulling from depending on the LuaEntity::loader_type, if any. |
The container entity this loader is pointing at/pulling from depending on the LuaEntity::loader_type, if any. | ||
grid [R] | :: LuaEquipmentGrid? | This entity's equipment grid, if any. |
This entity's equipment grid, if any. | ||
graphics_variation [RW] | :: uint8? | The graphics variation for this entity. [...] |
The graphics variation for this entity. [...] | ||
tree_color_index [RW] | :: uint8 | Index of the tree color. |
Index of the tree color. | ||
tree_color_index_max [R] | :: uint8 | Maximum index of the tree colors. |
Maximum index of the tree colors. | ||
tree_stage_index [RW] | :: uint8 | Index of the tree stage. |
Index of the tree stage. | ||
tree_stage_index_max [R] | :: uint8 | Maximum index of the tree stages. |
Maximum index of the tree stages. | ||
tree_gray_stage_index [RW] | :: uint8 | Index of the tree gray stage |
Index of the tree gray stage | ||
tree_gray_stage_index_max [R] | :: uint8 | Maximum index of the tree gray stages. |
Maximum index of the tree gray stages. | ||
burner [R] | :: LuaBurner? | The burner energy source for this entity, if any. |
The burner energy source for this entity, if any. | ||
shooting_target [RW] | :: LuaEntity? | The shooting target for this turret, if any. [...] |
The shooting target for this turret, if any. [...] | ||
proxy_target [R] | :: LuaEntity? | The target entity for this item-request-proxy, if any. |
The target entity for this item-request-proxy, if any. | ||
stickers [R] | :: array[LuaEntity]? | The sticker entities attached to this entity, if any. |
The sticker entities attached to this entity, if any. | ||
sticked_to [R] | :: LuaEntity | The entity this sticker is sticked to. |
The entity this sticker is sticked to. | ||
sticker_vehicle_modifiers [R] | :: table? | The vehicle modifiers applied to this entity through the attached stickers. |
The vehicle modifiers applied to this entity through the attached stickers. | ||
parameters [RW] | :: ProgrammableSpeakerParameters | |
alert_parameters [RW] | :: ProgrammableSpeakerAlertParameters | |
electric_network_statistics [R] | :: LuaFlowStatistics | The electric network statistics for this electric pole. |
The electric network statistics for this electric pole. | ||
inserter_target_pickup_count [R] | :: 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. | ||
spawner [R] | :: LuaEntity? | The spawner associated with this unit entity, if any. |
The spawner associated with this unit entity, if any. | ||
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. | ||
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 [RW] | :: LuaItemPrototype? | 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. [...] | ||
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. | ||
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 |
The player that this | ||
render_to_forces [RW] | :: array[ForceIdentification]? | The forces that this |
The forces that this | ||
pump_rail_target [R] | :: LuaEntity? | The rail target of this pump, if any. |
The rail target of this pump, if any. | ||
moving [R] | :: boolean | Returns true if this unit is moving. |
Returns true if this unit is moving. | ||
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. | ||
auto_launch [RW] | :: boolean | Whether this rocket silo automatically launches the rocket when cargo is inserted. |
Whether this rocket silo automatically launches the rocket when cargo is inserted. | ||
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. [...] | ||
command [R] | :: Command? | The command given to this unit, if any. |
The command given to this unit, if any. | ||
distraction_command [R] | :: Command? | The distraction command given to this unit, if any. |
The distraction command given to this unit, if any. | ||
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_entity_with_force [R] | :: boolean | (deprecated by 1.1.51) If this entity is a MilitaryTarget. [...] |
(deprecated by 1.1.51) If this entity is a MilitaryTarget. [...] | ||
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. [...] | ||
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]. | ||
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). [...] | ||
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. | ||
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. [...] | ||
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 |
Gets the base size of the given inventory on this entity or | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
type [R] | :: string | Type of this prototype. |
Type of this prototype. | ||
name [R] | :: string | Name of this prototype. |
Name of this prototype. | ||
localised_name [R] | :: LocalisedString | |
localised_description [R] | :: LocalisedString | |
max_health [R] | :: float | 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 [R] | :: table | 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 [R] | :: BoundingBox | The bounding box used for drawing the entity icon. |
The bounding box used for drawing the entity icon. | ||
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 | ||
collision_mask_with_flags [R] | :: CollisionMaskWithFlags | |
default_collision_mask_with_flags [R] | :: CollisionMaskWithFlags | The hardcoded default collision mask (with flags) for this entity prototype type. |
The hardcoded default collision mask (with flags) for this entity prototype type. | ||
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 entity. |
Group of this entity. | ||
subgroup [R] | :: LuaGroup | Subgroup of this entity. |
Subgroup of this entity. | ||
healing_per_tick [R] | :: float? | Amount this entity can heal per tick, if any. |
Amount this entity can heal per tick, if any. | ||
emissions_per_second [R] | :: double | Amount of pollution emissions per second this entity will create. |
Amount of pollution emissions per second this entity will create. | ||
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 [R] | :: uint? | 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. | ||
logistic_mode [R] | :: "requester" or "active-provider" or "passive-provider" or "buffer" or "storage" or "none" ? | The logistic mode of this logistic container. |
The logistic mode of this logistic container. | ||
max_underground_distance [R] | :: uint8? | The max underground distance for underground belts and underground pipes. |
The max underground distance for underground belts and underground pipes. | ||
flags [R] | :: EntityPrototypeFlags | The flags for this entity prototype. |
The flags for this entity prototype. | ||
remains_when_mined [R] | :: array[LuaEntityPrototype] | The remains left behind when this entity is mined. |
The remains left behind when this entity is mined. | ||
additional_pastable_entities [R] | :: array[LuaEntityPrototype] | Entities this entity can be pasted onto in addition to the normal allowed ones. |
Entities this entity can be pasted onto in addition to the normal allowed ones. | ||
allow_copy_paste [R] | :: boolean | When false copy-paste is not allowed for this entity. |
When false copy-paste is not allowed for this entity. | ||
shooting_cursor_size [R] | :: float | The cursor size used when shooting at this entity. |
The cursor size used when shooting at this entity. | ||
created_smoke [R] | :: table? | The smoke trigger run when this entity is built, if any. |
The smoke trigger run when this entity is built, if any. | ||
created_effect [R] | :: array[TriggerItem]? | The trigger to run when this entity is created, if any. |
The trigger to run when this entity is created, if any. | ||
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. [...] | ||
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_speed [R] | :: double? | The crafting speed. |
The crafting speed. | ||
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. [...] | ||
supply_area_distance [R] | :: double? | The supply area of this electric pole or beacon prototype. |
The supply area of this electric pole or beacon prototype. | ||
max_wire_distance [R] | :: double | The maximum wire distance for this entity. [...] |
The maximum wire distance for this entity. [...] | ||
max_circuit_wire_distance [R] | :: double | The maximum circuit wire distance for this entity. [...] |
The maximum circuit wire distance for this entity. [...] | ||
energy_usage [R] | :: double? | The direct energy usage of this entity, if any. |
The direct energy usage of this entity, if any. | ||
max_energy_usage [R] | :: double | The theoretical maximum energy usage for this entity. |
The theoretical maximum energy usage for this entity. | ||
max_energy_production [R] | :: double | The theoretical maximum energy production for this this entity. |
The theoretical maximum energy production for this this entity. | ||
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. | ||
max_energy [R] | :: double? | The max energy for this flying robot. |
The max energy 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 [R] | :: "heat-water-inside" or "output-to-separate-pipe" ? | The boiler operation mode of this boiler prototype. |
The boiler operation mode of this boiler prototype. | ||
fluid [R] | :: LuaFluidPrototype? | The fluid this offshore pump produces. |
The fluid this offshore pump produces. | ||
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. | ||
stack [R] | :: boolean? | Whether this inserter is a stack-type. |
Whether this inserter is a stack-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_extension_speed [R] | :: double? | The extension speed of this inserter. |
The extension speed of this inserter. | ||
inserter_rotation_speed [R] | :: double? | The rotation speed of this inserter. |
The rotation speed of this inserter. | ||
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, or logistic chest. [...] |
The filter count of this inserter, loader, or logistic chest. [...] | ||
time_to_live [R] | :: uint | The time to live for this prototype or |
The time to live for this prototype or | ||
distribution_effectivity [R] | :: double? | The distribution effectivity for this beacon prototype. |
The distribution effectivity for this beacon prototype. | ||
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. | ||
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 hitpoint taken for this vehicle during collisions. |
The energy used per hitpoint 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 [R] | :: CollisionMaskWithFlags? | 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? | |
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. | ||
pollution_to_join_attack [R] | :: float? | The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution. |
The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution. | ||
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. | ||
researching_speed [R] | :: double? | The base researching speed of this lab prototype. |
The base researching speed of this lab prototype. | ||
item_slot_count [R] | :: uint? | The item slot count of this constant combinator prototype. |
The item slot count of this constant combinator prototype. | ||
base_productivity [R] | :: double? | The base productivity of this crafting machine, lab, or mining drill. |
The base productivity 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. | ||
max_distance_of_sector_revealed [R] | :: uint? | The radius of the area this radar can chart, in chunks. |
The radius of the area this radar can chart, in chunks. | ||
max_distance_of_nearby_sector_revealed [R] | :: uint? | The radius of the area constantly revealed by this radar, in chunks. |
The radius of the area constantly revealed by this radar, in chunks. | ||
adjacent_tile_collision_box [R] | :: BoundingBox? | The bounding box that specifies which tiles adjacent to the offshore pump should be checked. |
The bounding box that specifies which tiles adjacent to the offshore pump should be checked. | ||
adjacent_tile_collision_mask [R] | :: CollisionMask? | Tiles adjacent to the offshore pump must not collide with this collision mask. |
Tiles adjacent to the offshore pump must not collide with this collision mask. | ||
adjacent_tile_collision_test [R] | :: CollisionMask? | If this mask is not empty, tiles adjacent to the offshore pump must not collide with this collision mask. |
If this mask is not empty, tiles adjacent to the offshore pump must not collide with this collision mask. | ||
center_collision_mask [R] | :: CollisionMask? | The collision mask used only for collision test with tile directly at offshore pump position. |
The collision mask used only for collision test with tile directly at offshore pump position. | ||
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 [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? | |
vector_to_place_result [R] | :: Vector? | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
name [R] | :: string | Name of this equipment. |
Name of this equipment. | ||
type [R] | :: string | Type of this equipment. |
Type 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 | |
burner [R] | :: LuaBurner? | The burner energy source for this equipment, if any. |
The burner energy source for this equipment, 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
take{position?=…, equipment?=…, by_player?=…} | → SimpleItemStack? | Remove an equipment from the grid. |
Remove an equipment from the grid. | ||
take_all(by_player?) | → dictionary[string → uint] | 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=…, position?=…, by_player?=…} | → LuaEquipment? | Insert an equipment into the grid. |
Insert an equipment into the grid. | ||
can_move{equipment=…, position=…} | → boolean | Check whether moving an equipment would succeed. |
Check whether moving an equipment would succeed. | ||
move{equipment=…, position=…} | → boolean | Move an equipment within this grid. |
Move an equipment within this grid. | ||
get(position) | → LuaEquipment? | Find equipment in the Equipment Grid 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. | ||
find(equipment) | → LuaEquipment? | 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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
generator_energy [R] | :: double | Total energy per tick generated by the equipment inside this grid. |
Total energy per tick generated by the equipment inside 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. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
name [R] | :: string | Name of this prototype. |
Name of this prototype. | ||
type [R] | :: string | Type of this equipment prototype. |
Type of this equipment 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 | |
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. | ||
shield [R] | :: float | The shield value of this equipment. [...] |
The shield value of this equipment. [...] | ||
energy_per_shield [R] | :: double | The energy per shield point restored. [...] |
The energy per shield point restored. [...] | ||
logistic_parameters [R] | :: table? | The logistic parameters for this roboport equipment. [...] |
The logistic parameters for this roboport equipment. [...] | ||
energy_consumption [R] | :: double | |
movement_bonus [R] | :: float? | |
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. [...] |
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_flow_count{name=…, input=…, precision_index=…, sample_index?=…, count?=…} | → double | Gets the flow count value for the given time frame. [...] |
Gets the flow count value for the given time frame. [...] | ||
on_flow(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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] | ||
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. [...] |
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_flow(index) | → double | Flow through the fluidbox in the last tick. [...] |
Flow through the fluidbox in the last tick. [...] | ||
get_locked_fluid(index) | → string? | Returns the fluid the fluidbox is locked onto. |
Returns the fluid the fluidbox is locked onto. | ||
get_fluid_system_id(index) | → uint? | Gets unique fluid system identifier of selected fluid box. [...] |
Gets unique fluid system identifier of selected fluid box. [...] | ||
get_fluid_system_contents(index) | → dictionary[string → uint]? | Gets counts of all fluids in the fluid system. [...] |
Gets counts of all fluids in the fluid system. [...] | ||
flush(index, fluid?) | → dictionary[string → float] | Flushes all fluid from this fluidbox and its fluid system. |
Flushes all fluid from this fluidbox and its fluid system. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 [R] | :: array[FluidBoxConnection] | 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. | ||
base_area [R] | :: double | |
base_level [R] | :: float | |
height [R] | :: double | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
emissions [R] | :: double | The emissions of this energy source in |
The emissions of this energy source in | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
name [R] | :: string | Name of this prototype. |
Name of this prototype. | ||
localised_name [R] | :: LocalisedString | |
localised_description [R] | :: LocalisedString | |
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. | ||
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 prototype. |
Group of this prototype. | ||
subgroup [R] | :: LuaGroup | Subgroup of this prototype. |
Subgroup of this prototype. | ||
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. [...] | ||
hidden [R] | :: boolean | Whether this fluid is hidden from the fluid and signal selectors. |
Whether this fluid is hidden from the fluid and signal selectors. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
get_entity_count(name) | → uint | 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. | ||
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) | → double | |
set_turret_attack_modifier(turret, modifier) | ||
set_cease_fire(other, cease_fire) | Add | |
Add | ||
get_cease_fire(other) | → boolean | Is |
Is | ||
set_friend(other, friend) | Add | |
Add | ||
get_friend(other) | → boolean | Is |
Is | ||
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 | |
unchart_chunk(position, surface) | ||
get_item_launched(item) | → uint | Gets the count of a given item launched in rockets. |
Gets the count of a given item launched in rockets. | ||
set_item_launched(item, count) | Sets the count of a given item launched in rockets. | |
Sets the count of a given item launched in rockets. | ||
print(message, print_settings?) | Print text to the chat console of all players on this force. [...] | |
Print text to the chat console of all players on this force. [...] | ||
get_trains(surface?) | → array[LuaTrain] | |
add_chart_tag(surface, tag) | → LuaCustomChartTag? | Adds a custom chart tag to the given surface and returns the new tag or |
Adds a custom chart tag to the given surface and returns the new tag or | ||
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. | ||
get_saved_technology_progress(technology) | → double? | Gets the saved progress for the given technology or |
Gets the saved progress for the given technology or | ||
set_saved_technology_progress(technology, progress) | Sets the saved progress for the given technology. [...] | |
Sets the saved progress for the given technology. [...] | ||
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_train_stops{name?=…, surface?=…} | → array[LuaEntity] | Gets train stops matching the given filters. |
Gets train stops matching the given filters. | ||
get_hand_crafting_disabled_for_recipe(recipe) | → boolean | Gets if the given recipe is explicitly disabled from being hand crafted. |
Gets if the given recipe is explicitly disabled from being hand crafted. | ||
set_hand_crafting_disabled_for_recipe(recipe, hand_crafting_disabled) | Sets if the given recipe can be hand-crafted. [...] | |
Sets if the given recipe can be hand-crafted. [...] | ||
add_research(technology) | → boolean | Add this technology to the back of the research queue if the queue is enabled. [...] |
Add this technology to the back of the research queue if the queue is enabled. [...] | ||
cancel_current_research() | Stop the research currently in progress. [...] | |
Stop the research currently in progress. [...] | ||
get_linked_inventory(prototype, link_id) | → LuaInventory? | Gets the linked inventory for the given prototype and link ID if it exists or |
Gets the linked inventory for the given prototype and link ID if it exists or | ||
is_friend(other) | → boolean | Is this force a friend? [...] |
Is this force a friend? [...] | ||
is_enemy(other) | → boolean | Is this force an enemy? [...] |
Is this force an enemy? [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
name [R] | :: string | Name of the force. |
Name of the force. | ||
technologies [R] | :: LuaCustomTable[string → LuaTechnology] | Technologies owned by this force, indexed by |
Technologies owned by this force, indexed by | ||
recipes [R] | :: LuaCustomTable[string → LuaRecipe] | Recipes available to this force, indexed by |
Recipes available to this force, indexed by | ||
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 |
Progress of current research, as a number in range | ||
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 | ||
stack_inserter_capacity_bonus [RW] | :: uint | Number of items that can be transferred by stack inserters. [...] |
Number of items that can be transferred by stack inserters. [...] | ||
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. | ||
ghost_time_to_live [RW] | :: uint | The time, in ticks, before a placed ghost disappears. |
The time, in ticks, before a placed ghost disappears. | ||
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. | ||
item_production_statistics [R] | :: LuaFlowStatistics | The item production statistics for this force. |
The item production statistics for this force. | ||
fluid_production_statistics [R] | :: LuaFlowStatistics | The fluid production statistics for this force. |
The fluid production statistics for this force. | ||
kill_count_statistics [R] | :: LuaFlowStatistics | The kill counter statistics for this force. |
The kill counter statistics for this force. | ||
entity_build_count_statistics [R] | :: LuaFlowStatistics | The entity build statistics for this force (built and mined) |
The entity build statistics for this force (built and mined) | ||
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 | |
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 | |
zoom_to_world_enabled [RW] | :: boolean | Ability to use zoom-to-world on map. |
Ability to use zoom-to-world on map. | ||
zoom_to_world_ghost_building_enabled [RW] | :: boolean | Ability to build ghosts through blueprint or direct ghost placement, or "mine" ghosts when using zoom-to-world. |
Ability to build ghosts through blueprint or direct ghost placement, or "mine" ghosts when using zoom-to-world. | ||
zoom_to_world_blueprint_enabled [RW] | :: boolean | Ability to create new blueprints using empty blueprint item when using zoom-to-world. |
Ability to create new blueprints using empty blueprint item when using zoom-to-world. | ||
zoom_to_world_deconstruction_planner_enabled [RW] | :: boolean | Ability to use deconstruction planner when using zoom-to-world. |
Ability to use deconstruction planner when using zoom-to-world. | ||
zoom_to_world_selection_tool_enabled [RW] | :: boolean | Ability to use custom selection tools when using zoom-to-world. |
Ability to use custom selection tools when using zoom-to-world. | ||
character_logistic_requests [RW] | :: boolean |
|
| ||
rockets_launched [RW] | :: uint | The number of rockets launched. |
The number of rockets launched. | ||
items_launched [R] | :: dictionary[string → uint] | 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 | |
evolution_factor [RW] | :: double | Evolution factor of this force. |
Evolution factor of this force. | ||
evolution_factor_by_pollution [RW] | :: double | |
evolution_factor_by_time [RW] | :: double | |
evolution_factor_by_killing_spawners [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. | ||
research_queue_enabled [RW] | :: boolean | Whether the research queue is available for this force. |
Whether the research queue is available 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 [RW] | :: array[TechnologyIdentification] | 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 | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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_game_state{game_finished?=…, player_won?=…, next_level?=…, can_continue?=…, victorious_force?=…} | 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.). | ||
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 | |
Take a screenshot of the game and save it to the | ||
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{force?=…, path?=…, by_player?=…, selected_technology?=…, skip_disabled?=…, quality?=…} | Take a screenshot of the technology screen and save it to the | |
Take a screenshot of the technology screen and save it to the | ||
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 | |
Write a file to the | ||
remove_path(path) | Remove a file or directory in the | |
Remove a file or directory in the | ||
remove_offline_players(players?) | Remove players who are currently not connected from the map. | |
Remove players who are currently not connected from the map. | ||
force_crc() | Force a CRC check. [...] | |
Force a CRC check. [...] | ||
create_force(force) | → LuaForce | Create a new force. [...] |
Create a new force. [...] | ||
merge_forces(source, destination) | Marks two forces to be merged together. [...] | |
Marks two forces to be merged together. [...] | ||
create_surface(name, settings?) | → LuaSurface | Create a new surface. [...] |
Create a new surface. [...] | ||
server_save(name?) | Instruct the server to save the map. [...] | |
Instruct the server to save the map. [...] | ||
auto_save(name?) | Instruct the game to perform an auto-save. [...] | |
Instruct the game to perform an auto-save. [...] | ||
delete_surface(surface) | Deletes the given surface and all entities on it. | |
Deletes the given surface and all entities on it. | ||
disable_replay() | Disables replay saving for the current save file. [...] | |
Disables replay saving for the current save file. [...] | ||
disable_tutorial_triggers() | Disables tutorial triggers, that unlock new tutorials and show notices about unlocked tutorials. | |
Disables tutorial triggers, that unlock new tutorials and show notices about unlocked tutorials. | ||
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. | ||
print(message, print_settings?) | Print text to the chat console all players. [...] | |
Print text to the chat console all players. [...] | ||
create_random_generator(seed?) | → LuaRandomGenerator | Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used. [...] |
Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used. [...] | ||
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. [...] | ||
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. [...] | ||
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. [...] | ||
kick_player(player, reason?) | Kicks the given player from this multiplayer game. [...] | |
Kicks the given player from this multiplayer game. [...] | ||
ban_player(player, reason?) | Bans the given player from this multiplayer game. [...] | |
Bans the given player from this multiplayer game. [...] | ||
unban_player(player) | Unbans the given player from this multiplayer game. [...] | |
Unbans the given player from this multiplayer game. [...] | ||
purge_player(player) | Purges the given players messages from the game. [...] | |
Purges the given players messages from the game. [...] | ||
mute_player(player) | Mutes the given player. [...] | |
Mutes the given player. [...] | ||
unmute_player(player) | Unmutes the given player. [...] | |
Unmutes the given player. [...] | ||
count_pipe_groups() | Counts how many distinct groups of pipes exist in the world. | |
Counts how many distinct groups of pipes exist in the world. | ||
is_multiplayer() | → boolean | Whether the save is loaded as a multiplayer map. |
Whether the save is loaded as a multiplayer map. | ||
get_active_entities_count(surface?) | → uint | Gets the number of entities that are active (updated each tick). [...] |
Gets the number of entities that are active (updated each tick). [...] | ||
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. | ||
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. | ||
get_train_stops{name?=…, surface?=…, force?=…} | → array[LuaEntity] | Gets train stops matching the given filters. |
Gets train stops matching the given filters. | ||
get_player(player) | → LuaPlayer? | Gets the given player or returns |
Gets the given player or returns | ||
get_surface(surface) | → LuaSurface? | Gets the given surface or returns |
Gets the given surface or returns | ||
create_profiler(stopped?) | → LuaProfiler | Creates a LuaProfiler, which is used for measuring script performance. [...] |
Creates a LuaProfiler, which is used for measuring script performance. [...] | ||
evaluate_expression(expression, variables?) | → double | Evaluate an expression, substituting variables as provided. [...] |
Evaluate an expression, substituting variables as provided. [...] | ||
get_filtered_entity_prototypes(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_filtered_item_prototypes(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_filtered_equipment_prototypes(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_filtered_mod_setting_prototypes(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_filtered_achievement_prototypes(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_filtered_tile_prototypes(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_filtered_decorative_prototypes(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_filtered_fluid_prototypes(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_filtered_recipe_prototypes(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_filtered_technology_prototypes(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. [...] | ||
create_inventory(size) | → LuaInventory | Creates an inventory that is not owned by any game object. [...] |
Creates an inventory that is not owned by any game object. [...] | ||
get_script_inventories(mod?) | → dictionary[string → array[LuaInventory]] | Gets the inventories created through LuaGameScript::create_inventory. [...] |
Gets the inventories created through LuaGameScript::create_inventory. [...] | ||
reset_time_played() | Resets the amount of time played for this map. | |
Resets the amount of time played for this map. | ||
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. | ||
get_train_by_id(train_id) | → LuaTrain? | Searches for a train with given ID. |
Searches for a train with given ID. | ||
request_train_path{goals=…, in_chain_signal_section?=…, train?=…, type?=…, return_path?=…, from_front?=…, allow_path_within_segment_front?=…, from_back?=…, allow_path_within_segment_back?=…, search_direction?=…, steps_limit?=…} | → TrainPathFinderPathResult or TrainPathAnyGoalResult or TrainPathAllGoalsResult | Direct access to Trains Pathfinder. [...] |
Direct access to Trains Pathfinder. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] | ||
entity_prototypes [R] | :: LuaCustomTable[string → LuaEntityPrototype] | A dictionary containing every LuaEntityPrototype indexed by |
A dictionary containing every LuaEntityPrototype indexed by | ||
item_prototypes [R] | :: LuaCustomTable[string → LuaItemPrototype] | A dictionary containing every LuaItemPrototype indexed by |
A dictionary containing every LuaItemPrototype indexed by | ||
fluid_prototypes [R] | :: LuaCustomTable[string → LuaFluidPrototype] | A dictionary containing every LuaFluidPrototype indexed by |
A dictionary containing every LuaFluidPrototype indexed by | ||
tile_prototypes [R] | :: LuaCustomTable[string → LuaTilePrototype] | A dictionary containing every LuaTilePrototype indexed by |
A dictionary containing every LuaTilePrototype indexed by | ||
equipment_prototypes [R] | :: LuaCustomTable[string → LuaEquipmentPrototype] | A dictionary containing every LuaEquipmentPrototype indexed by |
A dictionary containing every LuaEquipmentPrototype indexed by | ||
damage_prototypes [R] | :: LuaCustomTable[string → LuaDamagePrototype] | A dictionary containing every LuaDamagePrototype indexed by |
A dictionary containing every LuaDamagePrototype indexed by | ||
virtual_signal_prototypes [R] | :: LuaCustomTable[string → LuaVirtualSignalPrototype] | A dictionary containing every LuaVirtualSignalPrototype indexed by |
A dictionary containing every LuaVirtualSignalPrototype indexed by | ||
equipment_grid_prototypes [R] | :: LuaCustomTable[string → LuaEquipmentGridPrototype] | A dictionary containing every LuaEquipmentGridPrototype indexed by |
A dictionary containing every LuaEquipmentGridPrototype indexed by | ||
recipe_prototypes [R] | :: LuaCustomTable[string → LuaRecipePrototype] | A dictionary containing every LuaRecipePrototype indexed by |
A dictionary containing every LuaRecipePrototype indexed by | ||
technology_prototypes [R] | :: LuaCustomTable[string → LuaTechnologyPrototype] | A dictionary containing every LuaTechnologyPrototype indexed by |
A dictionary containing every LuaTechnologyPrototype indexed by | ||
decorative_prototypes [R] | :: LuaCustomTable[string → LuaDecorativePrototype] | A dictionary containing every LuaDecorativePrototype indexed by |
A dictionary containing every LuaDecorativePrototype indexed by | ||
particle_prototypes [R] | :: LuaCustomTable[string → LuaParticlePrototype] | A dictionary containing every LuaParticlePrototype indexed by |
A dictionary containing every LuaParticlePrototype indexed by | ||
autoplace_control_prototypes [R] | :: LuaCustomTable[string → LuaAutoplaceControlPrototype] | A dictionary containing every LuaAutoplaceControlPrototype indexed by |
A dictionary containing every LuaAutoplaceControlPrototype indexed by | ||
noise_layer_prototypes [R] | :: LuaCustomTable[string → LuaNoiseLayerPrototype] | A dictionary containing every LuaNoiseLayerPrototype indexed by |
A dictionary containing every LuaNoiseLayerPrototype indexed by | ||
mod_setting_prototypes [R] | :: LuaCustomTable[string → LuaModSettingPrototype] | A dictionary containing every LuaModSettingPrototype indexed by |
A dictionary containing every LuaModSettingPrototype indexed by | ||
custom_input_prototypes [R] | :: LuaCustomTable[string → LuaCustomInputPrototype] | A dictionary containing every LuaCustomInputPrototype indexed by |
A dictionary containing every LuaCustomInputPrototype indexed by | ||
ammo_category_prototypes [R] | :: LuaCustomTable[string → LuaAmmoCategoryPrototype] | A dictionary containing every LuaAmmoCategoryPrototype indexed by |
A dictionary containing every LuaAmmoCategoryPrototype indexed by | ||
named_noise_expressions [R] | :: LuaCustomTable[string → LuaNamedNoiseExpression] | A dictionary containing every LuaNamedNoiseExpression indexed by |
A dictionary containing every LuaNamedNoiseExpression indexed by | ||
item_subgroup_prototypes [R] | :: LuaCustomTable[string → LuaGroup] | A dictionary containing every ItemSubgroup indexed by |
A dictionary containing every ItemSubgroup indexed by | ||
item_group_prototypes [R] | :: LuaCustomTable[string → LuaGroup] | A dictionary containing every ItemGroup indexed by |
A dictionary containing every ItemGroup indexed by | ||
fuel_category_prototypes [R] | :: LuaCustomTable[string → LuaFuelCategoryPrototype] | A dictionary containing every LuaFuelCategoryPrototype indexed by |
A dictionary containing every LuaFuelCategoryPrototype indexed by | ||
resource_category_prototypes [R] | :: LuaCustomTable[string → LuaResourceCategoryPrototype] | A dictionary containing every LuaResourceCategoryPrototype indexed by |
A dictionary containing every LuaResourceCategoryPrototype indexed by | ||
achievement_prototypes [R] | :: LuaCustomTable[string → LuaAchievementPrototype] | A dictionary containing every LuaAchievementPrototype indexed by |
A dictionary containing every LuaAchievementPrototype indexed by | ||
module_category_prototypes [R] | :: LuaCustomTable[string → LuaModuleCategoryPrototype] | A dictionary containing every LuaModuleCategoryPrototype indexed by |
A dictionary containing every LuaModuleCategoryPrototype indexed by | ||
equipment_category_prototypes [R] | :: LuaCustomTable[string → LuaEquipmentCategoryPrototype] | A dictionary containing every LuaEquipmentCategoryPrototype indexed by |
A dictionary containing every LuaEquipmentCategoryPrototype indexed by | ||
trivial_smoke_prototypes [R] | :: LuaCustomTable[string → LuaTrivialSmokePrototype] | A dictionary containing every LuaTrivialSmokePrototype indexed by |
A dictionary containing every LuaTrivialSmokePrototype indexed by | ||
shortcut_prototypes [R] | :: LuaCustomTable[string → LuaShortcutPrototype] | A dictionary containing every LuaShortcutPrototype indexed by |
A dictionary containing every LuaShortcutPrototype indexed by | ||
recipe_category_prototypes [R] | :: LuaCustomTable[string → LuaRecipeCategoryPrototype] | A dictionary containing every LuaRecipeCategoryPrototype indexed by |
A dictionary containing every LuaRecipeCategoryPrototype indexed by | ||
font_prototypes [R] | :: LuaCustomTable[string → LuaFontPrototype] | A dictionary containing every LuaFontPrototype indexed by |
A dictionary containing every LuaFontPrototype indexed by | ||
map_gen_presets [R] | :: LuaCustomTable[string → MapGenPreset] | A dictionary containing every MapGenPreset indexed by |
A dictionary containing every MapGenPreset indexed by | ||
console_command_used [R] | :: boolean | Whether a console command has been used. |
Whether a console command has been used. | ||
styles [R] | :: LuaCustomTable[string → string] | The styles that LuaGuiElement can use, indexed by |
The styles that LuaGuiElement can use, indexed by | ||
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. [...] | ||
active_mods [R] | :: dictionary[string → string] | The active mods versions. [...] |
The active mods versions. [...] | ||
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. [...] | ||
pollution_statistics [R] | :: LuaFlowStatistics | The pollution statistics for this map. |
The pollution statistics for this map. | ||
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] | :: double | |
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 |
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_condition [RW] | :: CircuitConditionDefinition | The circuit condition. [...] |
The circuit condition. [...] | ||
logistic_condition [RW] | :: CircuitConditionDefinition | The logistic condition. [...] |
The logistic condition. [...] | ||
connect_to_logistic_network [RW] | :: boolean |
|
|
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
is_valid_sprite_path(sprite_path) | → boolean | Returns |
Returns | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
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 |
The mod that owns this Gui element or | ||
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_slider() | → boolean | Returns whether this slider only allows being moved to discrete positions. |
Returns whether this slider only allows being moved to discrete positions. | ||
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_slider(value) | Sets whether this slider only allows being moved to discrete positions. | |
Sets whether this slider only allows being moved to discrete positions. | ||
set_slider_discrete_values(value) | Sets whether this slider only allows discrete values. | |
Sets whether this slider only allows discrete values. | ||
focus() | Focuses this GUI element if possible. | |
Focuses this GUI element if possible. | ||
scroll_to_top() | Scrolls this scroll bar to the top. | |
Scrolls this scroll bar to the top. | ||
scroll_to_bottom() | Scrolls this scroll bar to the bottom. | |
Scrolls this scroll bar to the bottom. | ||
scroll_to_left() | Scrolls this scroll bar to the left. | |
Scrolls this scroll bar to the left. | ||
scroll_to_right() | Scrolls this scroll bar to the right. | |
Scrolls this scroll bar to the right. | ||
scroll_to_element(element, scroll_mode?) | Scrolls this scroll bar such that the specified GUI element is visible to the player. | |
Scrolls this scroll bar such that the specified GUI element is visible to the player. | ||
select_all() | Selects all the text in this textbox. | |
Selects all the text in this textbox. | ||
select(start_index, end_index) | Selects a range of text in this textbox. | |
Selects a range of text in this textbox. | ||
add_tab(tab, content) | Adds the given tab and content widgets to this tabbed pane as a new tab. | |
Adds the given tab and content widgets to this tabbed pane as a new tab. | ||
remove_tab(tab) | Removes the given tab and its associated content from this tabbed pane. [...] | |
Removes the given tab and its associated content from this tabbed pane. [...] | ||
force_auto_center() | Forces this frame to re-auto-center. [...] | |
Forces this frame to re-auto-center. [...] | ||
scroll_to_item(index, scroll_mode?) | Scrolls the scroll bar such that the specified listbox item is visible to the player. | |
Scrolls the scroll bar such that the specified listbox item is visible to the player. | ||
bring_to_front() | Moves this GUI element to the "front" so it will draw over other elements. [...] | |
Moves this GUI element to the "front" so it will draw over other elements. [...] | ||
close_dropdown() | Closes the dropdown list if this is a dropdown and it is open. | |
Closes the dropdown list if this is a dropdown and it is open. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 |
The element tooltip to display when hovering over this element, or | ||
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. [...] |
The number to be shown in the bottom right corner of this sprite-button. [...] | ||
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 [RW] | :: string or SignalID? | 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. | ||
clear_and_focus_on_right_click [RW] | :: boolean | Makes it so right-clicking on this textfield clears and focuses it. |
Makes it so right-clicking on this textfield clears and focuses it. | ||
drag_target [RW] | :: LuaGuiElement? | The |
The | ||
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 |
Whether the | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
emissions [R] | :: double | The emissions of this energy source in |
The emissions of this energy source in | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
circuit_read_hand_contents [RW] | :: boolean |
|
| ||
circuit_mode_of_operation [RW] | :: defines.control_behavior.inserter.circuit_mode_of_operation | The circuit mode of operations for the inserter. |
The circuit mode of operations for the inserter. | ||
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?) | → uint | 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() | → dictionary[string → uint] | 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) | → boolean | If the given inventory slot filter can be set to the given filter. |
If the given inventory slot filter can be set to the given filter. | ||
get_filter(index) | → string? | Gets the filter for the given item stack index. |
Gets the filter for the given item stack index. | ||
set_filter(index, filter) | → boolean | Sets the filter for the given item stack index. [...] |
Sets the filter for the given item stack index. [...] | ||
find_item_stack(item) | → LuaItemStack?, 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?) | → LuaItemStack?, 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) | → uint | 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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. |
has_flag(flag) | → boolean | Does this prototype have a flag enabled? |
Does this prototype have a flag enabled? | ||
get_ammo_type(ammo_source_type?) | → AmmoType? | The type of this ammo prototype. |
The type of this ammo prototype. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
type [R] | :: string | Type of this prototype. [...] |
Type of this prototype. [...] | ||
name [R] | :: string | Name of this prototype. |
Name of this prototype. | ||
localised_name [R] | :: LocalisedString | |
localised_description [R] | :: LocalisedString | |
order [R] | :: string | The string used to alphabetically sort these prototypes. [...] |
The string used to alphabetically sort these prototypes. [...] | ||
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? | ||
default_request_amount [R] | :: uint | The default request value. |
The default request value. | ||
stack_size [R] | :: uint | Maximum stack size of the item specified by this prototype. |
Maximum stack size of the item specified by this prototype. | ||
wire_count [R] | :: uint | The number of items needed to connect two entities with this as wire. |
The number of items needed to connect two entities with this as wire. | ||
fuel_category [R] | :: string? | The fuel category of this item prototype, if any. |
The fuel category of this item prototype, 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. | ||
subgroup [R] | :: LuaGroup | The subgroup this prototype belongs to. |
The subgroup this prototype belongs to. | ||
group [R] | :: LuaGroup | The group this prototype belongs to. |
The group this prototype belongs to. | ||
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. | ||
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. | ||
inventory_size_bonus [R] | :: uint? | The inventory size bonus for this armor prototype. |
The inventory size bonus for this armor prototype. | ||
capsule_action [R] | :: CapsuleAction? | The capsule action for this capsule item prototype. |
The capsule action for this capsule item prototype. | ||
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 [R] | :: dictionary[string → LuaItemPrototype]? | |
item_group_filters [R] | :: dictionary[string → LuaGroup]? | |
item_subgroup_filters [R] | :: dictionary[string → 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. | ||
insertion_priority_mode [R] | :: "default" or "never" or "always" or "when-manually-filtered" ? | The insertion priority mode used by this item with inventory. |
The insertion priority 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. | ||
extend_inventory_by_default [R] | :: boolean? | If this item with inventory extends the inventory it resides in by default. |
If this item with inventory extends the inventory it resides in by default. | ||
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. [...] | ||
limitations [R] | :: array[string]? | An array of recipe names this module is allowed to work with. [...] |
An array of recipe names this module is allowed to work with. [...] | ||
limitation_message_key [R] | :: string? | The limitation message key used when the player attempts to use this modules in some place it's not allowed. |
The limitation message key used when the player attempts to use this modules in some place it's not allowed. | ||
straight_rail [R] | :: LuaEntityPrototype? | The straight rail prototype used for this rail planner prototype. |
The straight rail prototype used for this rail planner prototype. | ||
curved_rail [R] | :: LuaEntityPrototype? | The curved rail prototype used for this rail planner prototype. |
The curved rail prototype used for this rail planner prototype. | ||
repair_result [R] | :: array[TriggerItem]? | The repair result of this repair tool prototype. |
The repair result of this repair tool prototype. | ||
selection_border_color [R] | :: Color? | The color used when doing normal selection with this selection tool prototype. |
The color used when doing normal selection with this selection tool prototype. | ||
alt_selection_border_color [R] | :: Color? | The color used when doing alt selection with this selection tool prototype. |
The color used when doing alt selection with this selection tool prototype. | ||
reverse_selection_border_color [R] | :: Color? | The color used when doing reverse selection with this selection tool prototype. |
The color used when doing reverse selection with this selection tool prototype. | ||
alt_reverse_selection_border_color [R] | :: Color? | The color used when doing alt reverse selection with this selection tool prototype. |
The color used when doing alt reverse selection with this selection tool prototype. | ||
selection_mode_flags [R] | :: SelectionModeFlags? | Flags that affect which entities will be selected. |
Flags that affect which entities will be selected. | ||
alt_selection_mode_flags [R] | :: SelectionModeFlags? | Flags that affect which entities will be selected during alternate selection. |
Flags that affect which entities will be selected during alternate selection. | ||
reverse_selection_mode_flags [R] | :: SelectionModeFlags? | Flags that affect which entities will be selected during reverse selection. |
Flags that affect which entities will be selected during reverse selection. | ||
alt_reverse_selection_mode_flags [R] | :: SelectionModeFlags? | Flags that affect which entities will be selected during alt reverse selection. |
Flags that affect which entities will be selected during alt reverse selection. | ||
selection_cursor_box_type [R] | :: CursorBoxRenderType? | |
alt_selection_cursor_box_type [R] | :: CursorBoxRenderType? | |
reverse_selection_cursor_box_type [R] | :: CursorBoxRenderType? | |
alt_reverse_selection_cursor_box_type [R] | :: CursorBoxRenderType? | |
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. | ||
entity_filter_mode [R] | :: PrototypeFilterMode? | The entity filter mode used by this selection tool. |
The entity filter mode used by this selection tool. | ||
alt_entity_filter_mode [R] | :: PrototypeFilterMode? | The alt entity filter mode used by this selection tool. |
The alt entity filter mode used by this selection tool. | ||
reverse_alt_entity_filter_mode [R] | :: PrototypeFilterMode? | The reverse entity filter mode used by this selection tool. |
The reverse entity filter mode used by this selection tool. | ||
alt_reverse_alt_entity_filter_mode [R] | :: PrototypeFilterMode? | The alt reverse entity filter mode used by this selection tool. |
The alt reverse entity filter mode used by this selection tool. | ||
tile_filter_mode [R] | :: PrototypeFilterMode? | The tile filter mode used by this selection tool. |
The tile filter mode used by this selection tool. | ||
alt_tile_filter_mode [R] | :: PrototypeFilterMode? | The alt tile filter mode used by this selection tool. |
The alt tile filter mode used by this selection tool. | ||
reverse_tile_filter_mode [R] | :: PrototypeFilterMode? | The reverse tile filter mode used by this selection tool. |
The reverse tile filter mode used by this selection tool. | ||
alt_reverse_tile_filter_mode [R] | :: PrototypeFilterMode? | The alt reverse tile filter mode used by this selection tool. |
The alt reverse tile filter mode used by this selection tool. | ||
entity_filters [R] | :: dictionary[string → LuaEntityPrototype]? | The entity filters used by this selection tool indexed by entity name. |
The entity filters used by this selection tool indexed by entity name. | ||
alt_entity_filters [R] | :: dictionary[string → LuaEntityPrototype]? | The alt entity filters used by this selection tool indexed by entity name. |
The alt entity filters used by this selection tool indexed by entity name. | ||
reverse_entity_filters [R] | :: dictionary[string → LuaEntityPrototype]? | The reverse entity filters used by this selection tool indexed by entity name. |
The reverse entity filters used by this selection tool indexed by entity name. | ||
alt_reverse_entity_filters [R] | :: dictionary[string → LuaEntityPrototype]? | The alt reverse entity filters used by this selection tool indexed by entity name. |
The alt reverse entity filters used by this selection tool indexed by entity name. | ||
entity_type_filters [R] | :: 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. [...] | ||
alt_entity_type_filters [R] | :: dictionary[string → true ]? | The alt entity type filters used by this selection tool indexed by entity type. [...] |
The alt entity type filters used by this selection tool indexed by entity type. [...] | ||
reverse_entity_type_filters [R] | :: dictionary[string → true ]? | The reverse entity type filters used by this selection tool indexed by entity type. [...] |
The reverse entity type filters used by this selection tool indexed by entity type. [...] | ||
alt_reverse_entity_type_filters [R] | :: dictionary[string → true ]? | The alt reverse entity type filters used by this selection tool indexed by entity type. [...] |
The alt reverse entity type filters used by this selection tool indexed by entity type. [...] | ||
tile_filters [R] | :: dictionary[string → LuaTilePrototype]? | The tile filters used by this selection tool indexed by tile name. |
The tile filters used by this selection tool indexed by tile name. | ||
alt_tile_filters [R] | :: dictionary[string → LuaTilePrototype]? | The alt tile filters used by this selection tool indexed by tile name. |
The alt tile filters used by this selection tool indexed by tile name. | ||
reverse_tile_filters [R] | :: dictionary[string → LuaTilePrototype]? | The reverse tile filters used by this selection tool indexed by tile name. |
The reverse tile filters used by this selection tool indexed by tile name. | ||
alt_reverse_tile_filters [R] | :: dictionary[string → LuaTilePrototype]? | The alt reverse tile filters used by this selection tool indexed by tile name. |
The alt reverse tile filters used by this selection tool indexed by tile name. | ||
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 [R] | :: double? | The durability of this tool item. |
The durability of this tool item. | ||
infinite [R] | :: boolean? | If this tool item has infinite durability. |
If this tool item has infinite durability. | ||
mapper_count [R] | :: uint? | How many filters an upgrade item has. |
How many filters an upgrade item 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. [...] |
is_blueprint_setup() | → boolean | Is this blueprint item setup? [...] |
Is this blueprint item setup? [...] | ||
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. | ||
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. | ||
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_inventory(inventory) | → LuaInventory? | Access the inner inventory of an item. |
Access the inner inventory of an item. | ||
build_blueprint{surface=…, force=…, position=…, force_build?=…, direction?=…, skip_fog_of_war?=…, by_player?=…, raise_built?=…} | → array[LuaEntity] | Build this blueprint or blueprint book at the given location. [...] |
Build this blueprint or blueprint book at the given location. [...] | ||
deconstruct_area{surface=…, force=…, area=…, skip_fog_of_war?=…, by_player?=…} | 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?=…} | Cancel deconstruct the given area with this deconstruction item. | |
Cancel deconstruct the given area with this deconstruction item. | ||
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_tag(tag_name) | → AnyBasic? | Gets the tag with the given name or returns |
Gets the tag with the given name or returns | ||
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. | ||
clear_blueprint() | Clears this blueprint item. | |
Clears this blueprint item. | ||
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. | ||
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) | → UpgradeFilter | 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, filter) | Sets the module filter at the given index for this upgrade item. | |
Sets the module filter at the given index for this upgrade item. | ||
get_blueprint_entity_count() | → uint | Gets the number of entities in this blueprint item. |
Gets the number of entities in this blueprint item. | ||
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. | ||
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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
grid [R] | :: LuaEquipmentGrid? | The equipment grid of this item, if any. |
The equipment grid of this item, if any. | ||
health [RW] | :: float | How much health the item has, as a number in range |
How much health the item has, as a number in range | ||
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. | ||
blueprint_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. [...] | ||
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. | ||
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. [...] | ||
cost_to_build [R] | :: dictionary[string → uint] | Raw materials required to build this blueprint. [...] |
Raw materials required to build this blueprint. [...] | ||
extends_inventory [RW] | :: boolean | If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). [...] |
If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). [...] | ||
prioritize_insertion_mode [RW] | :: "default" or "never" or "always" or "when-manually-filtered" | The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. [...] |
The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. [...] | ||
default_icons [R] | :: array[BlueprintSignalIcon] | The default icons for a blueprint item. |
The default icons for a blueprint item. | ||
tags [RW] | :: Tags | |
custom_description [RW] | :: LocalisedString | The custom description this item-with-tags. [...] |
The custom description this item-with-tags. [...] | ||
entity_filters [RW] | :: array[string] | The entity filters for this deconstruction item. [...] |
The entity filters for this deconstruction item. [...] | ||
tile_filters [RW] | :: array[string] | 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. | ||
entity_filter_count [R] | :: uint | The number of entity filters this deconstruction item supports. |
The number of entity filters this deconstruction item supports. | ||
tile_filter_count [R] | :: uint | The number of tile filters this deconstruction item supports. |
The number of tile filters this deconstruction item supports. | ||
active_index [RW] | :: uint? | The active blueprint index for this blueprint book. [...] |
The active blueprint index for this blueprint book. [...] | ||
item_number [R] | :: uint? | The unique identifier for this item , if any. [...] |
The unique identifier for this item , if any. [...] | ||
connected_entity [RW] | :: LuaEntity? | If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity. |
If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity. | ||
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. | ||
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_module [R] | :: boolean | If this is a module item. |
If this is a module item. | ||
is_ammo [R] | :: boolean | If this is an ammo item. |
If this is an ammo item. | ||
is_tool [R] | :: boolean | If this is a tool item. |
If this is a tool item. | ||
is_mining_tool [R] | :: boolean | If this is a mining tool item. |
If this is a mining tool 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. | ||
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. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
use_colors [RW] | :: boolean |
|
| ||
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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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? | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 |
|
| ||
transmitting [R] | :: boolean |
|
| ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
circuit_mode_of_operation [RW] | :: defines.control_behavior.logistic_container.circuit_mode_of_operation | The circuit mode of operations for the logistic container. [...] |
The circuit mode of operations 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. [...] |
get_item_count(item?, member?) | → int | Count given or all items in the network or given members. |
Count given or all items in the network or given members. | ||
get_contents() | → dictionary[string → uint] | 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?=…} | → LuaLogisticPoint? | Find the 'best' logistic point with this item ID and from the given position or from given chest type. |
Find the 'best' logistic point with this item ID and from the given position or from given chest type. | ||
select_drop_point{stack=…, members?=…} | → LuaLogisticPoint? | Find a logistic point to drop the specific item stack. |
Find a logistic point to drop the specific item stack. | ||
can_satisfy_request(item, count?, include_buffers?) | → boolean | Can the network satisfy a request for a given item and count. |
Can the network satisfy a request for a given item and count. | ||
get_supply_counts(item) | → LogisticsNetworkSupplyCounts | Get the amount of items of the given type indexed by the storage member. |
Get the amount of items of the given type indexed by the storage member. | ||
get_supply_points(item) | → LogisticsNetworkSupplyPoints | Gets the logistic points with of the given type indexed by the storage member. |
Gets the logistic points with of the given type indexed by the storage member. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 [R] | :: array[LogisticFilter]? | 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. [...] | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
circuit_enable_disable [RW] | :: boolean |
|
| ||
circuit_read_resources [RW] | :: boolean |
|
| ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
mod [R] | :: string | The mod that owns this setting. |
The mod that owns this setting. | ||
setting_type [R] | :: string | |
default_value [R] | :: boolean or double or int or string | 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. [...] | ||
hidden [R] | :: boolean | Whether this setting is hidden from the GUI. |
Whether this setting is hidden from the GUI. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
intended_property [R] | :: string | Name of the property that this expression is intended to provide a value for, if any. |
Name of the property that this expression is intended to provide a value for, if any. | ||
expression [R] | :: NoiseExpression | 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
regular_trigger_effect [R] | :: TriggerEffectItem | |
ended_in_water_trigger_effect [R] | :: TriggerEffectItem | |
render_layer [R] | :: RenderLayer | |
render_layer_when_on_ground [R] | :: RenderLayer | |
life_time [R] | :: uint | |
regular_trigger_effect_frequency [R] | :: uint | |
movement_modifier_when_on_ground [R] | :: float | |
movement_modifier [R] | :: float | |
mining_particle_frame_speed [R] | :: float | |
valid [R] | :: boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
object_name [R] | :: string | The class name of this object. [...] |
The class name of this object. [...] |
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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
set_ending_screen_data(message, file?) | Setup the screen to be shown when the game is finished. | |
Setup the screen to be shown when the game is finished. | ||
print(message, print_settings?) | Print text to the chat console. [...] | |
Print text to the chat console. [...] | ||
clear_console() | Clear the chat console. | |
Clear the chat console. | ||
get_goal_description() | → LocalisedString | Get the current goal description, as a localised string. |
Get the current goal description, as a localised string. | ||
set_goal_description(text?, only_update?) | Set the text in the goal window (top left). | |
Set the text in the goal window (top left). | ||
set_controller{type=…, character?=…, waypoints?=…, start_position?=…, start_zoom?=…, final_transition_time?=…, chart_mode_cutoff?=…} | Set the controller type of the player. [...] | |
Set the controller type of the player. [...] | ||
drag_wire{position=…} | → boolean | Start/end wire dragging at the specified location, wire type is based on the cursor contents |
Start/end wire dragging at the specified location, wire type is based on the cursor contents | ||
disable_recipe_groups() | Disable recipe groups. | |
Disable recipe groups. | ||
enable_recipe_groups() | Enable recipe groups. | |
Enable recipe groups. | ||
disable_recipe_subgroups() | Disable recipe subgroups. | |
Disable recipe subgroups. | ||
enable_recipe_subgroups() | Enable recipe subgroups. | |
Enable recipe subgroups. | ||
print_entity_statistics(entities?) | Print entity statistics to the player's console. | |
Print entity statistics to the player's console. | ||
print_robot_jobs() | Print construction robot job counts to the 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. | ||
log_active_entity_chunk_counts() | Logs a dictionary of chunks -> active entities for the surface this player is on. | |
Logs a dictionary of chunks -> active entities for the surface this player is on. | ||
log_active_entity_counts() | Logs a dictionary of active entities -> count for the surface this player is on. | |
Logs a dictionary of active entities -> count for the surface this player is on. | ||
unlock_achievement(name) | Unlock the achievements of the given player. [...] | |
Unlock the achievements of the given player. [...] | ||
clear_cursor() | → boolean | Invokes the "clear cursor" action on the player as if the user pressed it. |
Invokes the "clear cursor" action on the player as if the user pressed it. | ||
create_character(character?) | → boolean | Creates and attaches a character entity to this player. [...] |
Creates and attaches a character entity to this player. [...] | ||
add_alert(entity, type) | Adds an alert to this player for the given entity of the given alert type. | |
Adds an alert to this player for the given entity of the given alert type. | ||
add_custom_alert(entity, icon, message, show_on_map) | Adds a custom alert to this player. | |
Adds a custom alert to this player. | ||
remove_alert{entity?=…, prototype?=…, position?=…, type?=…, surface?=…, icon?=…, message?=…} | Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed. | |
Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed. | ||
get_alerts{entity?=…, prototype?=…, position?=…, type?=…, surface?=…} | → dictionary[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) | → boolean | Invokes the "smart pipette" action on the player as if the user pressed it. |
Invokes the "smart pipette" action on the player as if the user pressed it. | ||
can_place_entity{name=…, position=…, direction?=…} | → boolean | 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?=…, alt?=…, terrain_building_size?=…, skip_fog_of_war?=…} | → boolean | Checks if this player can build what ever is in the cursor on the surface the player is on. |
Checks if this player can build what ever is in the cursor on the surface the player is on. | ||
build_from_cursor{position=…, direction?=…, alt?=…, terrain_building_size?=…, skip_fog_of_war?=…} | Builds whatever is in the cursor on the surface the player is on. [...] | |
Builds whatever is in the cursor on the surface the player is on. [...] | ||
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. [...] | ||
get_quick_bar_slot(index) | → LuaItemPrototype? | Gets the quick bar filter for the given slot or |
Gets the quick bar filter for the given slot or | ||
set_quick_bar_slot(index, filter) | Sets the quick bar filter for the given slot. [...] | |
Sets the quick bar filter for the given slot. [...] | ||
get_active_quick_bar_page(index) | → uint8? | Gets which quick bar page is being used for the given screen page or |
Gets which quick bar page is being used for the given screen page or | ||
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. [...] | ||
open_map(position, scale?, entity?) | Queues a request to open the map at the specified position. [...] | |
Queues a request to open the map at the specified position. [...] | ||
zoom_to_world(position, scale?, entity?) | Queues a request to zoom to world at the specified position. [...] | |
Queues a request to zoom to world at the specified position. [...] | ||
close_map() | Queues request to switch to the normal game view from the map or zoom to world view. [...] | |
Queues request to switch to the normal game view from the map or zoom to world view. [...] | ||
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 |
Gets the filter for this map editor infinity filters at the given index or | ||
set_infinity_inventory_filter(index, filter) | Sets the filter for this map editor infinity filters at the given index. | |
Sets the filter for this map editor infinity filters at the given index. | ||
clear_recipe_notifications() | Clears all recipe notifications for this player. | |
Clears all recipe notifications for this player. | ||
add_recipe_notification(recipe) | Adds the given recipe to the list of recipe notifications for this player. | |
Adds the given recipe to the list of recipe notifications for this player. | ||
add_to_clipboard(blueprint) | Adds the given blueprint to this player's clipboard queue. | |
Adds the given blueprint to this player's clipboard queue. | ||
activate_paste() | Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste. | |
Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste. | ||
start_selection(position, selection_mode) | Starts selection with selection tool from the specified position. [...] | |
Starts selection with selection tool from the specified position. [...] | ||
clear_selection() | Clears the players selection tool selection position. | |
Clears the players selection tool selection position. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 |
|
| ||
controller_type [R] | :: defines.controllers | |
stashed_controller_type [R] | :: defines.controllers? | The stashed controller type, if any. [...] |
The stashed controller type, if any. [...] | ||
game_view_settings [RW] | :: GameViewSettings | The player's game view settings. |
The player's game view settings. | ||
minimap_enabled [RW] | :: boolean |
|
| ||
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 and on the map. |
The tag that is shown after the player in chat and on the map. | ||
connected [R] | :: boolean |
|
| ||
admin [RW] | :: boolean |
|
| ||
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. [...] | ||
blueprint_to_setup [R] | :: LuaItemStack | The item stack containing a blueprint to be setup. |
The item stack containing a blueprint to be setup. | ||
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 |
If | ||
show_on_map [RW] | :: boolean | If |
If | ||
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. [...] | ||
drag_target [R] | :: DragTarget? | The wire drag target for this player, if any. |
The wire drag target for this player, if any. | ||
zoom [W] | :: double | The player's zoom-level. |
The player's zoom-level. | ||
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. [...] |
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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
print(message) | Print text to the calling RCON interface if any. | |
Print text to the calling RCON interface if any. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
object_name [R] | :: string | The class name of this object. [...] |
The class name of this object. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
red_signal [RW] | :: SignalID | |
orange_signal [RW] | :: SignalID | |
green_signal [RW] | :: SignalID | |
blue_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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
red_signal [RW] | :: SignalID | |
orange_signal [RW] | :: SignalID | |
green_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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
reload() | Reload the recipe from the prototype. | |
Reload the recipe from the prototype. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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). | ||
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 | |
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 [R] | :: boolean | Is the recipe hidden? [...] |
Is the recipe hidden? [...] | ||
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. [...] | ||
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. | ||
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". | ||
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. | ||
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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |
draw_line{color=…, width=…, gap_length?=…, dash_length?=…, dash_offset?=…, from=…, from_offset?=…, to=…, to_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} | → uint64 | Create a line. |
Create a line. | ||
draw_text{text=…, surface=…, target=…, target_offset?=…, 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?=…} | → uint64 | Create a text. [...] |
Create a text. [...] | ||
draw_circle{color=…, radius=…, width?=…, filled?=…, target=…, target_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} | → uint64 | Create a circle. |
Create a circle. | ||
draw_rectangle{color=…, width?=…, filled?=…, left_top=…, left_top_offset?=…, right_bottom=…, right_bottom_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} | → uint64 | Create a rectangle. |
Create a rectangle. | ||
draw_arc{color=…, max_radius=…, min_radius=…, start_angle=…, angle=…, target=…, target_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} | → uint64 | Create an arc. |
Create an arc. | ||
draw_polygon{color=…, vertices=…, target?=…, target_offset?=…, orientation?=…, orientation_target?=…, orientation_target_offset?=…, use_target_orientation?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, draw_on_ground?=…, only_in_alt_mode?=…} | → uint64 | 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?=…, orientation_target_offset?=…, use_target_orientation?=…, oriented_offset?=…, target=…, target_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} | → uint64 | Create a sprite. |
Create a sprite. | ||
draw_light{sprite=…, orientation?=…, scale?=…, intensity?=…, minimum_darkness?=…, oriented?=…, color?=…, target=…, target_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} | → uint64 | Create a light. [...] |
Create a light. [...] | ||
draw_animation{animation=…, orientation?=…, x_scale?=…, y_scale?=…, tint?=…, render_layer?=…, animation_speed?=…, animation_offset?=…, orientation_target?=…, orientation_target_offset?=…, use_target_orientation?=…, oriented_offset?=…, target=…, target_offset?=…, surface=…, time_to_live?=…, forces?=…, players?=…, visible?=…, only_in_alt_mode?=…} | → uint64 | Create an animation. |
Create an animation. | ||
destroy(id) | Destroy the object with the given id. [...] | |
Destroy the object with the given id. [...] | ||
is_font_valid(font_name) | → boolean | Does a font with this name exist? |
Does a font with this name exist? | ||
is_valid(id) | → boolean | Does a valid object with this id exist? |
Does a valid object with this id exist? | ||
get_all_ids(mod_name?) | → array[uint64] | Gets an array of all valid object ids. |
Gets an array of all valid object ids. | ||
clear(mod_name?) | Destroys all render objects. | |
Destroys all render objects. | ||
get_type(id) | → "text" or "line" or "circle" or "rectangle" or "arc" or "polygon" or "sprite" or "light" or "animation" | Gets the type of the given object. |
Gets the type of the given object. | ||
bring_to_front(id) | 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(id) | 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. | ||
get_surface(id) | → LuaSurface | The surface the object with this id is rendered on. |
The surface the object with this id is rendered on. | ||
get_time_to_live(id) | → uint | Get the time to live of the object with this id. [...] |
Get the time to live of the object with this id. [...] | ||
set_time_to_live(id, time_to_live) | Set the time to live of the object with this id. [...] | |
Set the time to live of the object with this id. [...] | ||
get_forces(id) | → array[LuaForce]? | Get the forces that the object with this id is rendered to or |
Get the forces that the object with this id is rendered to or | ||
set_forces(id, forces) | Set the forces that the object with this id is rendered to. | |
Set the forces that the object with this id is rendered to. | ||
get_players(id) | → array[LuaPlayer]? | Get the players that the object with this id is rendered to or |
Get the players that the object with this id is rendered to or | ||
set_players(id, players) | Set the players that the object with this id is rendered to. | |
Set the players that the object with this id is rendered to. | ||
get_visible(id) | → boolean | Get whether this is rendered to anyone at all. |
Get whether this is rendered to anyone at all. | ||
set_visible(id, visible) | Set whether this is rendered to anyone at all. | |
Set whether this is rendered to anyone at all. | ||
get_draw_on_ground(id) | → boolean | Get whether this is being drawn on the ground, under most entities and sprites. |
Get whether this is being drawn on the ground, under most entities and sprites. | ||
set_draw_on_ground(id, draw_on_ground) | Set whether this is being drawn on the ground, under most entities and sprites. | |
Set whether this is being drawn on the ground, under most entities and sprites. | ||
get_only_in_alt_mode(id) | → boolean | Get whether this is only rendered in alt-mode. |
Get whether this is only rendered in alt-mode. | ||
set_only_in_alt_mode(id, only_in_alt_mode) | Set whether this is only rendered in alt-mode. | |
Set whether this is only rendered in alt-mode. | ||
get_use_target_orientation(id) | → boolean | Get whether this uses the target orientation. |
Get whether this uses the target orientation. | ||
set_use_target_orientation(id, use_target_orientation) | Set whether this uses the target orientation. | |
Set whether this uses the target orientation. | ||
get_color(id) | → Color? | Get the color or tint of the object with this id. |
Get the color or tint of the object with this id. | ||
set_color(id, color) | Set the color or tint of the object with this id. [...] | |
Set the color or tint of the object with this id. [...] | ||
get_width(id) | → float? | Get the width of the object with this id. [...] |
Get the width of the object with this id. [...] | ||
set_width(id, width) | Set the width of the object with this id. [...] | |
Set the width of the object with this id. [...] | ||
get_from(id) | → ScriptRenderTarget? | Get from where the line with this id is drawn. |
Get from where the line with this id is drawn. | ||
set_from(id, from, from_offset?) | Set from where the line with this id is drawn. [...] | |
Set from where the line with this id is drawn. [...] | ||
get_to(id) | → ScriptRenderTarget? | Get where the line with this id is drawn to. |
Get where the line with this id is drawn to. | ||
set_to(id, to, to_offset?) | Set where the line with this id is drawn to. [...] | |
Set where the line with this id is drawn to. [...] | ||
get_dash_length(id) | → double? | Get the dash length of the line with this id. |
Get the dash length of the line with this id. | ||
set_dash_length(id, dash_length) | Set the dash length of the line with this id. [...] | |
Set the dash length of the line with this id. [...] | ||
get_gap_length(id) | → double? | Get the length of the gaps in the line with this id. |
Get the length of the gaps in the line with this id. | ||
set_gap_length(id, gap_length) | Set the length of the gaps in the line with this id. [...] | |
Set the length of the gaps in the line with this id. [...] | ||
set_dashes(id, dash_length, gap_length) | Set the length of the dashes and the length of the gaps in the line with this id. [...] | |
Set the length of the dashes and the length of the gaps in the line with this id. [...] | ||
get_target(id) | → ScriptRenderTarget? | Get where the object with this id is drawn. [...] |
Get where the object with this id is drawn. [...] | ||
set_target(id, target, target_offset?) | Set where the object with this id is drawn. [...] | |
Set where the object with this id is drawn. [...] | ||
get_orientation(id) | → RealOrientation? | Get the orientation of the object with this id. [...] |
Get the orientation of the object with this id. [...] | ||
set_orientation(id, orientation) | Set the orientation of the object with this id. [...] | |
Set the orientation of the object with this id. [...] | ||
get_scale(id) | → double? | Get the scale of the text or light with this id. |
Get the scale of the text or light with this id. | ||
set_scale(id, scale) | Set the scale of the text or light with this id. [...] | |
Set the scale of the text or light with this id. [...] | ||
get_text(id) | → LocalisedString? | Get the text that is displayed by the text with this id. |
Get the text that is displayed by the text with this id. | ||
set_text(id, text) | Set the text that is displayed by the text with this id. [...] | |
Set the text that is displayed by the text with this id. [...] | ||
get_font(id) | → string? | Get the font of the text with this id. |
Get the font of the text with this id. | ||
set_font(id, font) | Set the font of the text with this id. [...] | |
Set the font of the text with this id. [...] | ||
get_alignment(id) | → TextAlign? | Get the alignment of the text with this id. |
Get the alignment of the text with this id. | ||
set_alignment(id, alignment) | Set the alignment of the text with this id. [...] | |
Set the alignment of the text with this id. [...] | ||
get_vertical_alignment(id) | → VerticalTextAlign? | Get the vertical alignment of the text with this id. |
Get the vertical alignment of the text with this id. | ||
set_vertical_alignment(id, alignment) | Set the vertical alignment of the text with this id. [...] | |
Set the vertical alignment of the text with this id. [...] | ||
get_scale_with_zoom(id) | → boolean? | Get if the text with this id scales with player zoom. |
Get if the text with this id scales with player zoom. | ||
set_scale_with_zoom(id, scale_with_zoom) | Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes. [...] | |
Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes. [...] | ||
get_use_rich_text(id) | → boolean? | Get if the text with this id parses rich text tags. |
Get if the text with this id parses rich text tags. | ||
set_use_rich_text(id, use_rich_text) | Set if the text with this id parses rich text tags. | |
Set if the text with this id parses rich text tags. | ||
get_filled(id) | → boolean? | Get if the circle or rectangle with this id is filled. |
Get if the circle or rectangle with this id is filled. | ||
set_filled(id, filled) | Set if the circle or rectangle with this id is filled. [...] | |
Set if the circle or rectangle with this id is filled. [...] | ||
get_radius(id) | → double? | Get the radius of the circle with this id. |
Get the radius of the circle with this id. | ||
set_radius(id, radius) | Set the radius of the circle with this id. [...] | |
Set the radius of the circle with this id. [...] | ||
get_left_top(id) | → ScriptRenderTarget? | Get where top left corner of the rectangle with this id is drawn. |
Get where top left corner of the rectangle with this id is drawn. | ||
set_left_top(id, left_top, left_top_offset?) | Set where top left corner of the rectangle with this id is drawn. [...] | |
Set where top left corner of the rectangle with this id is drawn. [...] | ||
get_right_bottom(id) | → ScriptRenderTarget? | Get where bottom right corner of the rectangle with this id is drawn. |
Get where bottom right corner of the rectangle with this id is drawn. | ||
set_right_bottom(id, right_bottom, right_bottom_offset?) | Set where top bottom right of the rectangle with this id is drawn. [...] | |
Set where top bottom right of the rectangle with this id is drawn. [...] | ||
set_corners(id, left_top, left_top_offset, right_bottom, right_bottom_offset) | Set the corners of the rectangle with this id. [...] | |
Set the corners of the rectangle with this id. [...] | ||
get_max_radius(id) | → double? | Get the radius of the outer edge of the arc with this id. |
Get the radius of the outer edge of the arc with this id. | ||
set_max_radius(id, max_radius) | Set the radius of the outer edge of the arc with this id. [...] | |
Set the radius of the outer edge of the arc with this id. [...] | ||
get_min_radius(id) | → double? | Get the radius of the inner edge of the arc with this id. |
Get the radius of the inner edge of the arc with this id. | ||
set_min_radius(id, min_radius) | Set the radius of the inner edge of the arc with this id. [...] | |
Set the radius of the inner edge of the arc with this id. [...] | ||
get_start_angle(id) | → float? | Get where the arc with this id starts. |
Get where the arc with this id starts. | ||
set_start_angle(id, start_angle) | Set where the arc with this id starts. [...] | |
Set where the arc with this id starts. [...] | ||
get_angle(id) | → float? | Get the angle of the arc with this id. |
Get the angle of the arc with this id. | ||
set_angle(id, angle) | Set the angle of the arc with this id. [...] | |
Set the angle of the arc with this id. [...] | ||
get_vertices(id) | → array[ScriptRenderTarget]? | Get the vertices of the polygon with this id. |
Get the vertices of the polygon with this id. | ||
set_vertices(id, vertices) | Set the vertices of the polygon with this id. [...] | |
Set the vertices of the polygon with this id. [...] | ||
get_sprite(id) | → SpritePath? | Get the sprite of the sprite or light with this id. |
Get the sprite of the sprite or light with this id. | ||
set_sprite(id, sprite) | Set the sprite of the sprite or light with this id. [...] | |
Set the sprite of the sprite or light with this id. [...] | ||
get_x_scale(id) | → double? | Get the horizontal scale of the sprite or animation with this id. |
Get the horizontal scale of the sprite or animation with this id. | ||
set_x_scale(id, x_scale) | Set the horizontal scale of the sprite or animation with this id. [...] | |
Set the horizontal scale of the sprite or animation with this id. [...] | ||
get_y_scale(id) | → double? | Get the vertical scale of the sprite or animation with this id. |
Get the vertical scale of the sprite or animation with this id. | ||
set_y_scale(id, y_scale) | Set the vertical scale of the sprite or animation with this id. [...] | |
Set the vertical scale of the sprite or animation with this id. [...] | ||
get_render_layer(id) | → RenderLayer? | Get the render layer of the sprite or animation with this id. |
Get the render layer of the sprite or animation with this id. | ||
set_render_layer(id, render_layer) | Set the render layer of the sprite or animation with this id. [...] | |
Set the render layer of the sprite or animation with this id. [...] | ||
get_orientation_target(id) | → ScriptRenderTarget? | Get the orientation_target of the object with this id. [...] |
Get the orientation_target of the object with this id. [...] | ||
set_orientation_target(id, orientation_target, orientation_target_offset?) | Set the orientation_target of the object with this id. [...] | |
Set the orientation_target of the object with this id. [...] | ||
get_oriented_offset(id) | → Vector? | Get the oriented_offset of the sprite or animation with this id. [...] |
Get the oriented_offset of the sprite or animation with this id. [...] | ||
set_oriented_offset(id, oriented_offset) | Set the oriented_offset of the sprite or animation with this id. [...] | |
Set the oriented_offset of the sprite or animation with this id. [...] | ||
get_intensity(id) | → float? | Get the intensity of the light with this id. |
Get the intensity of the light with this id. | ||
set_intensity(id, intensity) | Set the intensity of the light with this id. [...] | |
Set the intensity of the light with this id. [...] | ||
get_minimum_darkness(id) | → float? | Get the minimum darkness at which the light with this id is rendered. |
Get the minimum darkness at which the light with this id is rendered. | ||
set_minimum_darkness(id, minimum_darkness) | Set the minimum darkness at which the light with this id is rendered. [...] | |
Set the minimum darkness at which the light with this id is rendered. [...] | ||
get_oriented(id) | → boolean? | Get if the light with this id is rendered has the same orientation as the target entity. [...] |
Get if the light with this id is rendered has the same orientation as the target entity. [...] | ||
set_oriented(id, oriented) | Set if the light with this id is rendered has the same orientation as the target entity. [...] | |
Set if the light with this id is rendered has the same orientation as the target entity. [...] | ||
get_animation(id) | → string? | Get the animation prototype name of the animation with this id. |
Get the animation prototype name of the animation with this id. | ||
set_animation(id, animation) | Set the animation prototype name of the animation with this id. [...] | |
Set the animation prototype name of the animation with this id. [...] | ||
get_animation_speed(id) | → double? | Get the animation speed of the animation with this id. |
Get the animation speed of the animation with this id. | ||
set_animation_speed(id, animation_speed) | Set the animation speed of the animation with this id. [...] | |
Set the animation speed of the animation with this id. [...] | ||
get_animation_offset(id) | → double? | Get the animation offset of the animation with this id. |
Get the animation offset of the animation with this id. | ||
set_animation_offset(id, animation_offset) | Set the animation offset of the animation with this id. [...] | |
Set the animation offset of the animation with this id. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
object_name [R] | :: string | The class name of this object. [...] |
The class name of this object. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
read_logistics [RW] | :: boolean |
|
| ||
read_robot_stats [RW] | :: boolean |
|
| ||
available_logistic_output_signal [RW] | :: SignalID | |
total_logistic_output_signal [RW] | :: SignalID | |
available_construction_output_signal [RW] | :: SignalID | |
total_construction_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. [...] |
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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 [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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] | ||
extra_padding_when_activated [W] | :: int or array[int] | Sets |
Sets | ||
extra_margin_when_activated [W] | :: int or array[int] | Sets |
Sets | ||
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_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?=…} | → boolean | Check for collisions with terrain or other entities. |
Check for collisions with terrain or other entities. | ||
can_fast_replace{name=…, position=…, direction?=…, force?=…} | → boolean | If there exists an entity at the given location that can be fast-replaced with the given entity parameters. |
If there exists an entity at the given location that can be fast-replaced with the given entity parameters. | ||
find_entity(entity, position) | → LuaEntity? | Find an entity of the given name at the given position. [...] |
Find an entity of the given name at the given position. [...] | ||
find_entities(area?) | → array[LuaEntity] | Find entities in a given area. [...] |
Find entities in a given area. [...] | ||
find_entities_filtered{area?=…, position?=…, radius?=…, name?=…, type?=…, ghost_name?=…, ghost_type?=…, direction?=…, collision_mask?=…, force?=…, to_be_deconstructed?=…, to_be_upgraded?=…, limit?=…, is_military_target?=…, has_item_inside?=…, invert?=…} | → 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{area?=…, position?=…, radius?=…, name?=…, force?=…, limit?=…, has_hidden_tile?=…, has_tile_ghost?=…, to_be_deconstructed?=…, collision_mask?=…, invert?=…} | → 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{area?=…, position?=…, radius?=…, name?=…, type?=…, ghost_name?=…, ghost_type?=…, direction?=…, collision_mask?=…, force?=…, to_be_deconstructed?=…, to_be_upgraded?=…, limit?=…, is_military_target?=…, invert?=…} | → uint | 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{area?=…, position?=…, radius?=…, name?=…, force?=…, limit?=…, has_hidden_tile?=…, has_tile_ghost?=…, to_be_deconstructed?=…, collision_mask?=…, invert?=…} | → uint | Count tiles of a given name in a given area. [...] |
Count tiles of a given name in a given area. [...] | ||
find_non_colliding_position(name, center, radius, precision, force_to_tile_center?) | → MapPosition? | Find a non-colliding position within a given radius. [...] |
Find a non-colliding position within a given radius. [...] | ||
find_non_colliding_position_in_box(name, search_space, precision, force_to_tile_center?) | → MapPosition? | Find a non-colliding position within a given rectangle. |
Find a non-colliding position within a given rectangle. | ||
spill_item_stack(position, items, enable_looted?, force?, allow_belts?) | → 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?) | → array[LuaEntity] | Find enemy units (entities with type "unit") of a given force within an area. [...] |
Find enemy units (entities with type "unit") of a given force within an area. [...] | ||
find_units{area=…, force=…, condition=…} | → array[LuaEntity] | Find units (entities with type "unit") of a given force and force condition within a given area. [...] |
Find units (entities with type "unit") of a given force and force condition within a given area. [...] | ||
find_nearest_enemy{position=…, max_distance=…, force?=…} | → LuaEntity? | Find the enemy military target (military entity) closest to the given position. |
Find the enemy military target (military entity) closest to the given position. | ||
find_nearest_enemy_entity_with_owner{position=…, max_distance=…, force?=…} | → LuaEntity | Find the enemy entity-with-owner closest to the given position. |
Find the enemy entity-with-owner closest to the given position. | ||
set_multi_command{command=…, unit_count=…, force?=…, unit_search_distance?=…} | → uint | Give a command to multiple units. [...] |
Give a command to multiple units. [...] | ||
create_entity{name=…, position=…, direction?=…, force?=…, target?=…, source?=…, fast_replace?=…, player?=…, character?=…, spill?=…, raise_built?=…, create_build_effect_smoke?=…, spawn_decorations?=…, move_stuck_players?=…, item?=…} | → LuaEntity? | Create an entity on this surface. |
Create an entity on this surface. | ||
create_trivial_smoke{name=…, position=…} | ||
create_particle{name=…, position=…, movement=…, height=…, vertical_speed=…, frame_speed=…} | Creates a particle at the given location | |
Creates a particle at the given location | ||
create_unit_group{position=…, force?=…} | → LuaUnitGroup | Create a new unit group at a given position. |
Create a new unit group at a given position. | ||
build_enemy_base(position, unit_count, force?) | Send a group to build a new base. [...] | |
Send a group to build a new base. [...] | ||
get_tile(x, y) | → LuaTile | Get the tile at a given position. [...] |
Get the tile at a given position. [...] | ||
set_tiles(tiles, correct_tiles?, remove_colliding_entities?, remove_colliding_decoratives?, raise_event?) | 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) | → LuaLogisticNetwork? | Find the logistic network that covers a given position. |
Find the logistic network that covers a given position. | ||
find_closest_logistic_network_by_position(position, force) | → LuaLogisticNetwork? | Find the logistic network with a cell closest to a given position. |
Find the logistic network with a cell closest to a given position. | ||
find_logistic_networks_by_construction_area(position, force) | → array[LuaLogisticNetwork] | Finds all of the logistics networks whose construction area intersects with the given position. |
Finds all of the logistics networks whose construction area intersects with the given position. | ||
deconstruct_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…} | Place a deconstruction request. | |
Place a deconstruction request. | ||
cancel_deconstruct_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…} | Cancel a deconstruction order. | |
Cancel a deconstruction order. | ||
upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item=…} | Place an upgrade request. | |
Place an upgrade request. | ||
cancel_upgrade_area{area=…, force=…, player?=…, skip_fog_of_war?=…, item?=…} | Cancel a upgrade order. | |
Cancel a upgrade order. | ||
get_hidden_tile(position) | → string? | The hidden tile name. |
The hidden tile name. | ||
set_hidden_tile(position, tile) | Set the hidden tile for the specified position. [...] | |
Set the hidden tile for the specified position. [...] | ||
get_connected_tiles(position, tiles, include_diagonal?, area?) | → array[TilePosition] | Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position. [...] |
Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position. [...] | ||
delete_chunk(position) | ||
regenerate_entity(entities?, chunks?) | Regenerate autoplacement of some entities on this surface. [...] | |
Regenerate autoplacement of some entities on this surface. [...] | ||
regenerate_decorative(decoratives?, chunks?) | Regenerate autoplacement of some decoratives on this surface. [...] | |
Regenerate autoplacement of some decoratives on this surface. [...] | ||
print(message, print_settings?) | Print text to the chat console of all players on this surface. [...] | |
Print text to the chat console of all players on this surface. [...] | ||
destroy_decoratives{area?=…, position?=…, name?=…, collision_mask?=…, from_layer?=…, to_layer?=…, exclude_soft?=…, limit?=…, invert?=…} | Removes all decoratives from the given area. [...] | |
Removes all decoratives from the given area. [...] | ||
create_decoratives{check_collision?=…, decoratives=…} | Adds the given decoratives to the surface. [...] | |
Adds the given decoratives to the surface. [...] | ||
find_decoratives_filtered{area?=…, position?=…, name?=…, collision_mask?=…, from_layer?=…, to_layer?=…, exclude_soft?=…, limit?=…, invert?=…} | → array[DecorativeResult] | Find decoratives of a given name in a given area. [...] |
Find decoratives of a given name in a given area. [...] | ||
get_trains(force?) | → array[LuaTrain] | |
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?=…} | Clones the given area. [...] | |
Clones the given area. [...] | ||
clone_brush{source_offset=…, destination_offset=…, source_positions=…, destination_surface?=…, destination_force?=…, clone_tiles?=…, clone_entities?=…, clone_decoratives?=…, clear_destination_entities?=…, clear_destination_decoratives?=…, expand_map?=…, manual_collision_mode?=…, create_build_effect_smoke?=…} | Clones the given area. [...] | |
Clones the given area. [...] | ||
clone_entities{entities=…, destination_offset=…, destination_surface?=…, destination_force?=…, snap_to_grid?=…, create_build_effect_smoke?=…} | Clones the given entities. [...] | |
Clones the given entities. [...] | ||
clear(ignore_characters?) | Clears this surface deleting all entities and chunks on it. | |
Clears this surface deleting all entities and chunks on it. | ||
request_path{bounding_box=…, collision_mask=…, start=…, goal=…, force=…, radius?=…, pathfind_flags?=…, can_open_gates?=…, path_resolution_modifier?=…, entity_to_ignore?=…} | → uint | 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, area) | Sets the given script position to the new values. | |
Sets the given script position to the new values. | ||
add_script_position(area) | → uint | 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_train_stops{name?=…, force?=…} | → array[LuaEntity] | Gets train stops matching the given filters. |
Gets train stops matching the given filters. | ||
get_total_pollution() | → double | Gets the total amount of pollution on the surface by iterating over all of the chunks containing pollution. |
Gets the total amount of pollution on the surface by iterating over all of the chunks containing pollution. | ||
entity_prototype_collides(prototype, position, use_map_generation_bounding_box, direction?) | → boolean | Whether the given entity prototype collides at the given position and direction. |
Whether the given entity prototype collides at the given position and direction. | ||
decorative_prototype_collides(prototype, position) | → boolean | Whether the given decorative prototype collides at the given position and direction. |
Whether the given decorative prototype collides at the given position and direction. | ||
calculate_tile_properties(property_names, positions) | → dictionary[string → array[double]] | Calculate values for a list of tile properties at a list of positions. [...] |
Calculate values for a list of tile properties at a list of positions. [...] | ||
get_entities_with_force(position, force) | → array[LuaEntity] | Returns all the military targets (entities with force) on this chunk for the given force. |
Returns all the military targets (entities with force) on this chunk for the given force. | ||
build_checkerboard(area) | Sets the given area to the checkerboard lab tiles. | |
Sets the given area to the checkerboard lab tiles. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 |
Current time of day, as a number in range | ||
darkness [R] | :: float | Amount of darkness at the current time, as a number in range |
Amount of darkness at the current time, as a number in range | ||
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? | ||
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. [...] | ||
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. [...] |
reload() | Reload this technology from its prototype. | |
Reload this technology from its prototype. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] | ||
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. | ||
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. | ||
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 [R] | :: string? | The count formula, if this research has any. [...] |
The count formula, if this research has 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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). | ||
hidden [R] | :: boolean | If this technology prototype is hidden. |
If this technology prototype is hidden. | ||
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. [...] | ||
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. | ||
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. | ||
order [R] | :: string | The string used to alphabetically sort these prototypes. [...] |
The string used to alphabetically sort these prototypes. [...] | ||
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 [R] | :: string? | The count formula, if this research has any. [...] |
The count formula, if this research has 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. [...] |
collides_with(layer) | → boolean | What type of things can collide with this tile? |
What type of things can collide with this tile? | ||
to_be_deconstructed(force?) | → boolean | Is this tile marked for deconstruction? |
Is this tile marked for deconstruction? | ||
order_deconstruction(force, player?) | → LuaEntity? | Orders deconstruction of this tile by the given force. |
Orders deconstruction of this tile by the given force. | ||
cancel_deconstruction(force, player?) | Cancels deconstruction if it is scheduled, does nothing otherwise. | |
Cancels deconstruction if it is scheduled, does nothing otherwise. | ||
has_tile_ghost(force?) | → boolean | Does this tile have any tile ghosts on it. |
Does this tile have any tile ghosts on it. | ||
get_tile_ghosts(force?) | → array[LuaEntity] | Gets all tile ghosts on this tile. |
Gets all tile ghosts on this tile. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
collision_mask [R] | :: CollisionMask | The collision mask this tile uses |
The collision mask this tile uses | ||
collision_mask_with_flags [R] | :: CollisionMaskWithFlags | |
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 | |
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. | ||
emissions_per_second [R] | :: double | Amount of pollution emissions per second this tile will absorb. |
Amount of pollution emissions per second this tile will absorb. | ||
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. [...] | ||
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_item_count(item?) | → uint | Get the amount of a particular item stored in the train. |
Get the amount of a particular item stored in the train. | ||
get_contents() | → dictionary[string → uint] | 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. | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
manual_mode [RW] | :: boolean | When |
When | ||
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_rail [R] | :: LuaEntity? | The rail at the front end of the train, if any. |
The rail at the front end of the train, if any. | ||
back_rail [R] | :: LuaEntity? | The rail at the back end of the train, if any. |
The rail at the back end of the train, if any. | ||
rail_direction_from_front_rail [R] | :: defines.rail_direction | |
rail_direction_from_back_rail [R] | :: defines.rail_direction | |
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. [...] |
The player passengers on the train. [...] | ||
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. | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
send_to_train [RW] | :: boolean |
|
| ||
read_from_train [RW] | :: boolean |
|
| ||
read_stopped_train [RW] | :: boolean |
|
| ||
set_trains_limit [RW] | :: boolean |
|
| ||
read_trains_count [RW] | :: boolean |
|
| ||
enable_disable [RW] | :: boolean |
|
| ||
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 | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
enable_disable [RW] | :: boolean | If the belt will be enabled/disabled based off the circuit network. |
If the belt will be enabled/disabled based off the circuit network. | ||
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. [...] |
clear() | Remove all items from this transport line. | |
Remove all items from this transport line. | ||
get_item_count(item?) | → uint | 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) | → boolean | Insert items at a given position. |
Insert items at a given position. | ||
insert_at_back(items) | → boolean | Insert items at the back of this line. |
Insert items at the back of this line. | ||
get_contents() | → dictionary[string → uint] | 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. | ||
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. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. | ||
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. |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
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. [...] |
add_member(unit) | Make a unit a member of this group. [...] | |
Make a unit a member of this group. [...] | ||
set_command(command) | Give this group a command. | |
Give this group a command. | ||
set_distraction_command(command) | Give this group a distraction command. | |
Give this group a distraction command. | ||
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. | ||
destroy() | Dissolve this group. [...] | |
Dissolve this group. [...] | ||
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
members [R] | :: array[LuaEntity] | Members of this group. |
Members of this group. | ||
position [R] | :: MapPosition | Group position. [...] |
Group position. [...] | ||
state [R] | :: defines.group_state | Whether this group is gathering, moving or attacking. |
Whether this group is gathering, moving or attacking. | ||
force [R] | :: LuaForce | The force of this unit group. |
The force of this unit group. | ||
surface [R] | :: LuaSurface | The surface of this unit group. |
The surface of this unit group. | ||
group_number [R] | :: uint | The group number for this unit group. |
The group number for 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. [...] | ||
command [R] | :: Command? | The command given to this group, if any. |
The command given to this group, if any. | ||
distraction_command [R] | :: Command? | The distraction command given to this group, if any. |
The distraction command given to this group, 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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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 | |
special [R] | :: boolean | Whether this is a special signal. [...] |
Whether this is a special signal. [...] | ||
subgroup [R] | :: LuaGroup | |
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
emissions [R] | :: double | The emissions of this energy source in |
The emissions of this energy source in | ||
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. [...] |
help() | → string | All methods and properties that this object supports. |
All methods and properties that this object supports. | ||
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. [...] |