This is a list of all Lua classes defined by Factorio.
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
bonus_gui_order :: string [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
richness :: boolean [R] | |
control_order :: string [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
on_init(f) | Register a callback to be run on mod init. |
on_load(f) | Register a function to be run on module load. |
on_configuration_changed(f) | Register a function to be run when mod configuration changes. |
on_event(event, f) | Register a handler to run on event or events. |
on_nth_tick(tick, f) | Register a handler to run on nth tick(s). |
generate_event_name() → uint | Generate a new, unique event ID. |
get_event_handler(event) | Find the event handler for an event. |
raise_event(event, table) | Raise an event. |
get_event_order() | Gets the mod event order. |
mod_name :: string [R] | The name of the mod from the environment this is used in. |
owner :: LuaEntity or LuaEquipment [R] | The owner of this burner energy source |
inventory :: LuaInventory [R] | The fuel inventory. |
burnt_result_inventory :: LuaInventory [R] | The burnt result inventory. |
heat :: double [RW] | |
heat_capacity :: double [R] | |
remaining_burning_fuel :: double [RW] | |
currently_burning :: LuaItemPrototype [RW] | |
fuel_categories :: dictionary string → boolean [R] | The fuel categories this burner uses. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
emissions :: double [R] | |
render_no_network_icon :: boolean [R] | |
render_no_power_icon :: boolean [R] | |
effectivity :: double [R] | |
fuel_inventory_size :: uint [R] | |
burnt_inventory_size :: uint [R] | |
smoke [R] | The smoke sources for this burner prototype if any. |
light_flicker [R] | The light flicker definition for this burner prototype if any. |
fuel_categories :: dictionary string → boolean [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_signal(signal) → int | |
entity :: LuaEntity [R] | The entity this circuit network reference is associated with |
wire_type :: defines.wire_type [R] | The wire type this network is associated with. |
circuit_connector_id :: defines.circuit_connector_id [R] | The circuit connector ID on the associated entity this network was gotten from. |
signals :: array of Signal [R] | The circuit network signals last tick. |
network_id :: uint [R] | The circuit networks ID. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
add_command(name, help, function) | Add a command. |
remove_command(string) → boolean | Removes a registered command |
commands :: dictionary string → LocalisedString [R] | Commands registered by scripts through LuaCommandProcessor . |
game_commands :: dictionary string → LocalisedString [R] | Builtin commands of the core game. |
get_inventory(inventory) → LuaInventory | Get an inventory belonging to this entity. |
get_quickbar() → LuaInventory | Get the quickbar belonging to this entity if any. |
get_main_inventory() | 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? |
insert(items) → uint | Insert items into this entity. |
set_gui_arrow{type=…} | Create an arrow which points at this entity. |
clear_gui_arrow() | Removes the arrow created by set_gui_arrow . |
get_item_count(item) → uint | Get the number of all or some items in this entity. |
has_items_inside() → boolean | Does this entity have any item inside it? |
can_reach_entity(entity) → boolean | Can a given entity be opened or accessed? |
clear_items_inside() | Remove all items from this entity. |
remove_item(items) → uint | Remove items from this entity. |
teleport(position, surface) → boolean | 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. |
clear_selected_entity() | Unselect any selected entity. |
disable_flashlight() | Disable the flashlight. |
enable_flashlight() | Enable the flashlight. |
get_craftable_count(recipe) → uint | 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 |
cancel_crafting(options) | 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. |
mine_tile(tile) → boolean | Mines the given tile as if this player (or character) mined it. |
is_player() | When true control adapter is a LuaPlayer object, false for entities including characters with players
|
surface :: LuaSurface [R] | The surface this entity is currently on. |
position :: Position [R] | Current position of the entity. |
vehicle :: LuaEntity [R] | The vehicle the player is currently sitting in; nil if none. |
force :: string or LuaForce [RW] | The force of this entity. |
selected :: LuaEntity [RW] | The currently selected entity; nil if none. |
opened :: LuaEntity or LuaItemStack or LuaEquipment or LuaGuiElement or defines.gui_type [RW] | The GUI target the player currently has open; nil if none. |
crafting_queue_size :: uint [R] | Size of the crafting queue. |
walking_state [RW] | Current walking state. |
riding_state :: RidingState [RW] | Current riding state of this car or the vehicle this player is riding in. |
mining_state [RW] | Current mining state. |
shooting_state [RW] | Current shooting state. |
picking_state :: boolean [RW] | Current item-picking state. |
repair_state [RW] | Current repair state. |
cursor_stack :: LuaItemStack [R] | The player's cursor stack. |
driving :: boolean [RW] | true if the player is in a vehicle. |
crafting_queue :: array of CraftingQueueItem [R] | Gets the current crafting queue items. |
following_robots :: array of LuaEntity [R] | The current combat robots following the character |
cheat_mode :: boolean [RW] | When true hand crafting is free and instant
|
character_crafting_speed_modifier :: double [RW] | |
character_mining_speed_modifier :: double [RW] | |
character_running_speed_modifier :: double [RW] | |
character_build_distance_bonus :: uint [RW] | |
character_item_drop_distance_bonus :: uint [RW] | |
character_reach_distance_bonus :: uint [RW] | |
character_resource_reach_distance_bonus :: uint [RW] | |
character_item_pickup_distance_bonus :: uint [RW] | |
character_loot_pickup_distance_bonus :: uint [RW] | |
quickbar_count_bonus :: uint [RW] | |
character_inventory_slots_bonus :: uint [RW] | |
character_logistic_slot_count_bonus :: uint [RW] | |
character_trash_slot_count_bonus :: uint [RW] | |
character_maximum_following_robot_count_bonus :: uint [RW] | |
character_health_bonus :: float [RW] | |
auto_trash_filters :: dictionary string → uint [RW] | The auto-trash filters. |
opened_gui_type [R] | Returns the defines.gui_type or nil . |
build_distance :: uint [R] | The build distance of this character or max uint when not a character or player connected to a character. |
drop_item_distance :: uint [R] | The item drop distance of this character or max uint when not a character or player connected to a character. |
reach_distance :: uint [R] | The reach distance of this character or max uint when not a character or player connected to a character. |
item_pickup_distance :: double [R] | The item pickup distance of this character or max double when not a character or player connected to a character. |
loot_pickup_distance :: double [R] | The loot pickup distance of this character or max double when not a character or player connected to a character. |
resource_reach_distance :: double [R] | The resource reach distance of this character or max double when not a character or player connected to a character. |
in_combat :: boolean [R] | If this character entity is in combat. |
get_circuit_network(wire, circuit_connector) → LuaCircuitNetwork | |
type :: defines.control_behavior.type [R] | The concrete type of this control behavior. |
entity :: LuaEntity [R] | The entity this control behavior belongs to. |
output_signal :: SignalID [RW] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_signal_last_tick(signal) → int | Gets the value of a specific signal sent by this combinator behavior last tick or nil if the signal didn't exist. |
signals_last_tick :: array of Signal [R] | The circuit network signals sent by this combinator last tick. |
set_signal(index, Signal) | Sets the signal at the given index |
get_signal(index) | Gets the signal at the given index. |
parameters [RW] | The constant combinator parameters |
enabled :: boolean [RW] | Turns this constant combinator on and off. |
signals_count :: uint [R] | The number of signals this constant combinator supports |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
disabled :: boolean [R] | If the entity is currently disabled because of the control behavior. |
circuit_condition :: CircuitConditionSpecification [RW] | The circuit condition. |
logistic_condition :: CircuitConditionSpecification [RW] | The logistic condition. |
connect_to_logistic_network :: boolean [RW] | true if this should connect to the logistic network. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
circuit_mode_of_operation :: defines.control_behavior.logistic_container.circuit_mode_of_operation [RW] | The circuit mode of operations for the logistic container. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
circuit_parameters :: ProgrammableSpeakerCircuitParameters [RW] | |
circuit_condition :: CircuitConditionSpecification [RW] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
red_signal :: SignalID [RW] | |
orange_signal :: SignalID [RW] | |
green_signal :: SignalID [RW] | |
blue_signal :: SignalID [RW] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
red_signal :: SignalID [RW] | |
orange_signal :: SignalID [RW] | |
green_signal :: SignalID [RW] | |
close_signal :: boolean [RW] | If this will close the rail signal based off the circuit condition. |
read_signal :: boolean [RW] | If this will read the rail signal state. |
circuit_condition :: CircuitConditionSpecification [RW] | The circuit condition when controlling the signal through the circuit network. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
mode_of_operations :: defines.control_behavior.roboport.circuit_mode_of_operation [RW] | |
available_logistic_output_signal :: SignalID [RW] | |
total_logistic_output_signal :: SignalID [RW] | |
available_construction_output_signal :: SignalID [RW] | |
total_construction_output_signal :: SignalID [RW] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
circuit_condition :: CircuitConditionSpecification [RW] | The circuit condition. |
open_gate :: boolean [RW] | |
read_sensor :: boolean [RW] | |
output_signal :: SignalID [RW] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
parameters :: ArithmeticCombinatorParameters [RW] | The arithmetic combinator parameters. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
parameters :: DeciderCombinatorParameters [RW] | The decider combinator parameters |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
circuit_read_hand_contents :: boolean [RW] | true if the contents of the inserter hand should be sent to the circuit network
|
circuit_mode_of_operation :: defines.control_behavior.inserter.circuit_mode_of_operation [RW] | The circuit mode of operations for the inserter. |
circuit_hand_read_mode :: defines.control_behavior.inserter.hand_read_mode [RW] | The hand read mode for the inserter. |
circuit_set_stack_size :: boolean [RW] | If the stack size of the inserter is set through the circuit network or not. |
circuit_stack_control_signal :: SignalID [RW] | The signal used to set the stack size of the inserter. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
use_colors :: boolean [RW] | true if the lamp should set the color from the circuit network signals. |
color :: Color [R] | The color the lamp is showing or nil if not using any color. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
circuit_enable_disable :: boolean [RW] | true if this drill is enabled or disabled using the logistics or circuit condition. |
circuit_read_resources :: boolean [RW] | true if this drill should send the resources in the field to the circuit network. |
resource_read_mode :: defines.control_behavior.mining_drill.resource_read_mode [RW] | 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 :: array of LuaEntity [R] | The resource entities that the mining drill will send information about to the circuit network or an empty array. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
send_to_train :: boolean [RW] | true if the train stop should send the circuit network contents to the train to use. |
read_from_train :: boolean [RW] | true if the train stop should send the train contents to the circuit network. |
read_stopped_train :: boolean [RW] | true if the train stop should send the stopped train id to the circuit network. |
enable_disable :: boolean [RW] | true if the train stop is enabled/disabled through the circuit network. |
stopped_train_signal :: SignalID [RW] | The signal that will be sent when using the send-train-id option. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
enable_disable :: boolean [RW] | If the belt will be enabled/disabled based off the circuit network. |
read_contents :: boolean [RW] | If the belt will read the contents and send them to the circuit network. |
read_contents_mode :: defines.control_behavior.transport_belt.content_read_mode [RW] | The read mode for the belt. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
destroy() | Destroys this tag. |
icon :: SignalID [RW] | |
last_user :: LuaPlayer [RW] | The player who last edited this tag. |
position :: Position [R] | The position of this tag. |
orientation :: float [RW] | The orientation of this tag. |
text :: string [RW] | |
target :: LuaEntity [RW] | The entity target if any or nil . |
tag_number :: uint [R] | The unique ID for this tag on this force. |
force :: LuaForce [R] | The force this tag belongs to. |
surface :: LuaSurface [R] | The surface this tag belongs to. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
key_sequence :: string [R] | The default key sequence for this custom input. |
linked_game_control :: string [R] | The linked game control name or nil . |
consuming :: string [R] | The consuming type: "none" or "game-only" . |
enabled [R] | If this custom input is enabled. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
operator [] [RW] | Access an element of this custom table. |
operator # :: uint [R] | Number of elements in this table. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
collision_box :: BoundingBox [R] | The bounding box used for collision checking. |
autoplace_specification :: AutoplaceSpecification [R] | Autoplace specification for this decorative prototype. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
buffer_capacity :: double [R] | |
usage_priority :: string [R] | |
input_flow_limit :: double [R] | |
output_flow_limit :: double [R] | |
drain :: double [R] | |
emissions :: double [R] | |
render_no_network_icon :: boolean [R] | |
render_no_power_icon :: boolean [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_output_inventory() → LuaInventory | Gets the entities output inventory if it has one. |
get_module_inventory() → LuaInventory | |
get_fuel_inventory() → LuaInventory | The fuel inventory for this entity or nil if this entity doesn't have a fuel inventory. |
get_burnt_result_inventory() → LuaInventory | The burnt result inventory for this entity or nil if this entity doesn't have a burnt result inventory. |
damage(damage, force, type) → float | Damages the entity. |
can_be_destroyed() → boolean | Checks if the entity can be destroyed |
destroy(do_cliff_correction) → boolean | Destroys the entity. |
set_command(command) | Give the entity a command. |
has_command() → boolean | Has this unit been assigned a command? |
die(force, cause) → boolean | Immediately kills the entity. |
has_flag(flag) → boolean | Test whether this entity's prototype has a flag set. |
add_market_item{price=…, offer=…} | Offer a thing on the market. |
remove_market_item(offer) → boolean | Remove an offer from a market. |
get_market_items() → array of Offer | Get all offers in a market as an array. |
connect_neighbour(target) | Connect two devices with wire or cable. |
disconnect_neighbour(target) | Disconnect wires or cables. |
order_deconstruction(force, player) → boolean | Sets the entity to be deconstructed by construction robots. |
cancel_deconstruction(force, player) | Cancels deconstruction if it is scheduled, does nothing otherwise. |
to_be_deconstructed(force) → boolean | Is this entity marked for deconstruction? |
get_request_slot(slot) → SimpleItemStack | Get a logistic requester slot. |
set_request_slot(request, slot) | Set a logistic requester slot. |
clear_request_slot(slot) | Clear a logistic requester slot. |
is_crafting() → boolean | |
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. |
launch_rocket() → boolean | |
revive(return_item_request_proxy) → dictionary string → uint | Revive a ghost. |
get_connected_rail{rail_direction=…, rail_connection_direction=…} → LuaEntity | |
get_filter(uint) → string | Get the filter for a slot in an inserter or a loader. |
set_filter(uint, string) | Set the filter for a slot in an inserter or a loader |
get_infinity_filter(index) → InfinityFilter | Gets the filter for this infinity container at the given index or nil if the filter index doesn't exist or is empty. |
set_infinity_filter(index, filter) | Sets the filter for this infinity container at the given index. |
get_control_behavior() → LuaControlBehavior | 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. |
get_circuit_network(wire, circuit_connector) → LuaCircuitNetwork | |
get_merged_signals(circuit_connector) | The merged circuit network signals or nil if there are no signals. |
supports_backer_name() → boolean | |
copy_settings(entity) → dictionary string → uint | Copies settings from the given entity onto this entity. |
get_logistic_point(defines.logistic_member_index) → LuaLogisticPoint or array of LuaLogisticPoint | Gets the LuaLogisticPoint specified by the given index or if not given returns all of the points this entity owns. |
play_note(instrument, note) → boolean | Plays a note with the given instrument and note. |
connect_rolling_stock(direction) → boolean | Connects the rolling stock in the given direction. |
disconnect_rolling_stock(direction) → boolean | Tries to disconnect this rolling stock in the given direction. |
update_connections() | Reconnect loader and beacon connections to entities that might have been teleported out or in by the script. |
get_recipe() | Current recipe being assembled by this machine. |
set_recipe(recipe) → dictionary string → uint | Sets the current recipe in this assembly machine. |
rotate(options) → boolean | Rotates this entity as if the player rotated it |
get_driver() → LuaEntity or LuaPlayer | Gets the driver of this vehicle if any. |
set_driver(driver) | Sets the driver of this vehicle. |
get_passenger() → LuaEntity or LuaPlayer | Gets the passenger of this car if any. |
set_passenger(passenger) | Sets the passenger of this car. |
is_connected_to_electric_network() | Returns true if this entity is connected to an electric network. |
get_train_stop_trains() | The trains scheduled to stop at this train stop. |
name :: string [R] | Name of the entity prototype. |
ghost_name :: string [R] | Name of the entity or tile contained in this ghost |
localised_name :: LocalisedString [R] | Localised name of the entity. |
localised_description :: LocalisedString [R] | |
ghost_localised_name :: LocalisedString [R] | Localised name of the entity or tile contained in this ghost. |
ghost_localised_description :: LocalisedString [R] | |
type :: string [R] | The entity prototype type of this entity. |
ghost_type :: string [R] | The prototype type of the entity or tile contained in this ghost. |
active :: boolean [RW] | Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc). |
destructible :: boolean [RW] | When the entity is not destructible it can't be damaged. |
minable :: boolean [RW] | |
rotatable :: boolean [RW] | When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key. |
operable :: boolean [RW] | 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 :: float [RW] | Health of the entity. |
direction :: defines.direction [RW] | The current direction this entity is facing. |
supports_direction :: boolean [R] | Whether the entity has direction. |
orientation :: float [RW] | The smooth orientation. |
cliff_orientation :: string [R] | The orientation of this cliff. |
amount :: uint [RW] | Count of resource units contained. |
initial_amount :: uint [RW] | Count of initial resource units contained. |
effectivity_modifier :: float [RW] | Multiplies the acceleration the vehicle can create for one unit of energy. |
consumption_modifier :: float [RW] | Multiplies the energy consumption. |
friction_modifier :: float [RW] | Multiplies the car friction rate. |
speed :: float [RW] | The current speed of the car or rolling stock. |
stack :: LuaItemStack [R] | |
prototype :: LuaEntityPrototype [R] | The entity prototype of this entity. |
ghost_prototype :: LuaEntityPrototype or LuaTilePrototype [R] | The prototype of the entity or tile contained in this ghost. |
drop_position :: Position [RW] | Position where the entity puts its stuff. |
pickup_position :: Position [RW] | Where the inserter will pick up items from. |
drop_target :: LuaEntity [R] | The entity this entity is putting its stuff to or nil if there is no such entity. |
pickup_target :: LuaEntity [R] | The entity the inserter will attempt to pick up from. |
selected_gun_index :: uint [RW] | Index of the currently selected weapon slot of this character. |
energy :: double [RW] | Energy stored in the entity (heat in furnace, energy stored in electrical devices etc. |
temperature :: double [RW] | The temperature of this entities heat energy source if this entity uses a heat energy source or nil . |
previous_recipe :: LuaRecipe [R] | The previous recipe this furnace was using or nil if the furnace had no previous recipe. |
held_stack :: LuaItemStack [R] | The item stack currently held in an inserter's hand. |
held_stack_position :: Position [R] | Current position of the inserter's "hand". |
train :: LuaTrain [R] | The train this rolling stock belongs to or nil if not rolling stock. |
neighbours :: dictionary string → array of LuaEntity or array of array of LuaEntity or LuaEntity [R] | |
fluidbox :: LuaFluidBox [RW] | |
backer_name :: string [RW] | The name of a backer (of Factorio) assigned to a lab or train station / stop. |
time_to_live :: uint [RW] | The ticks left before a ghost or combat robot is destroyed. |
color :: Color [RW] | The character or rolling stock color. |
text :: LocalisedString [RW] | The text of this flying-text entity. |
signal_state :: defines.signal_state [R] | The state of this rail signal. |
chain_signal_state :: uint [R] | The state of this chain signal. |
to_be_looted :: boolean [RW] | Will this entity be picked up automatically when the player walks over it? |
crafting_progress :: float [RW] | The current crafting progress, as a number in range [0, 1]. |
bonus_progress :: float [RW] | The current productivity bonus progress, as a number in range [0, 1]. |
belt_to_ground_type :: string [R] | "input" or "output" , depending on whether this underground belt goes down or up. |
loader_type :: string [RW] | "input" or "output" , depending on whether this loader puts to or gets from a container. |
rocket_parts :: uint [RW] | Number of rocket parts in the silo. |
logistic_network :: LuaLogisticNetwork [R] | The logistic network this entity is a part of. |
logistic_cell :: LuaLogisticCell [R] | The logistic cell this entity is a part of. |
item_requests :: dictionary string → uint [RW] | Items this ghost will request when revived or items this item request proxy is requesting. |
player :: LuaPlayer [R] | The player connected to this character or nil if none. |
unit_group :: LuaUnitGroup [R] | The unit group this unit is a member of, or nil if none. |
damage_dealt :: double [RW] | The damage dealt by this turret, artillery turret, or artillery wagon. |
kills :: uint [RW] | The number of units killed by this turret, artillery turret, or artillery wagon. |
last_user :: LuaPlayer [RW] | The player who built the entity |
electric_buffer_size :: double [RW] | The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source. |
electric_input_flow_limit :: double [R] | The input flow limit for the electric energy source or nil if the entity doesn't have an electric energy source. |
electric_output_flow_limit :: double [R] | The output flow limit for the electric energy source or nil if the entity doesn't have an electric energy source. |
electric_drain :: double [R] | The electric drain for the electric energy source or nil if the entity doesn't have an electric energy source. |
electric_emissions :: double [R] | The emissions size for the electric energy source or nil if the entity doesn't have an electric energy source. |
unit_number :: uint [R] | The unit number or nil if the entity doesn't have one. |
mining_progress :: double [RW] | The mining progress for this mining drill or nil if this isn't a mining drill. |
bonus_mining_progress :: double [RW] | The bonus mining progress for this mining drill or nil if this isn't a mining drill. |
power_production :: double [RW] | The power production specific to the ElectricEnergyInterface entity type. |
power_usage :: double [RW] | The power usage specific to the ElectricEnergyInterface entity type. |
bounding_box :: BoundingBox [R] | |
secondary_bounding_box :: BoundingBox [R] | The secondary bounding box of this entity or nil if it doesn't have one. |
selection_box :: BoundingBox [R] | |
secondary_selection_box :: BoundingBox [R] | The secondary selection box of this entity or nil if it doesn't have one. |
mining_target :: LuaEntity [R] | The mining target or nil if none
|
circuit_connected_entities [R] | Entities connected to this entity via the circuit network. |
circuit_connection_definitions :: array of CircuitConnectionDefinition [R] | The connection definition for entities connected to this entity via the circuit network. |
request_slot_count :: uint [R] | The number of request slots this entity has. |
filter_slot_count :: uint [R] | The number of filter slots this inserter or loader has. |
grid :: LuaEquipmentGrid [R] | The equipment grid or nil if this entity doesn't have an equipment grid. |
graphics_variation :: uint8 [RW] | The graphics variation for this entity or nil if this entity doesn't use graphics variations. |
tree_color_index :: uint8 [RW] | Index of the tree color |
burner :: LuaBurner [R] | The burner energy source for this entity or nil if there isn't one. |
shooting_target :: LuaEntity [RW] | The shooting target for this turret or nil . |
proxy_target :: LuaEntity [R] | The target entity for this item-request-proxy or nil
|
stickers :: array of LuaEntity [R] | The sticker entities attached to this entity. |
parameters :: ProgrammableSpeakerParameters [RW] | |
alert_parameters :: ProgrammableSpeakerAlertParameters [RW] | |
electric_network_statistics :: LuaFlowStatistics [R] | The electric network statistics for this electric pole. |
inserter_stack_size_override :: uint [RW] | Sets the stack size limit on this inserter. |
products_finished :: uint [RW] | |
spawner :: LuaEntity [R] | The spawner associated with this unit entity or nil if the unit has no associated spawner. |
units :: array of LuaEntity [R] | The units associated with this spawner entity. |
power_switch_state :: boolean [RW] | The state of this power switch. |
relative_turret_orientation :: float [RW] | The relative orientation of the vehicle turret or nil if this entity isn't a vehicle or have a vehicle turret. |
effects :: Effects [R] | The effects being applied to this entity or nil . |
infinity_filters :: array of InfinityFilter [RW] | The filters for this infinity container. |
remove_unfiltered_items :: boolean [RW] | If items not included in this infinity container filters should be removed from the container. |
character_corpse_player_index :: uint [RW] | The player index associated with this character corpse. |
character_corpse_tick_of_death :: uint [RW] | The tick this character corpse died at. |
character_corpse_death_cause :: LocalisedString [RW] | The reason this character corpse character died (if any). |
associated_player :: LuaPlayer [RW] | The player this character is associated with or nil if none. |
tick_of_last_attack :: uint [R] | The last tick this character entity was attacked. |
tick_of_last_damage :: uint [R] | The last tick this character entity was damaged. |
splitter_filter :: LuaItemPrototype [RW] | The filter for this splitter or nil if no filter is set. |
splitter_input_priority :: string [RW] | The input priority for this splitter: "left", "none", or "right". |
splitter_output_priority :: string [RW] | The input priority for this splitter: "left", "none", or "right". |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
has_flag(flag) → boolean | Does this prototype have a flag enabled? |
get_inventory_size(index) → uint | Gets the base size of the given inventory on this entity or nil if the given inventory doesn't exist. |
type :: string [R] | Type of this prototype. |
name :: string [R] | Name of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
max_health :: float [R] | Max health of this entity. |
infinite_resource :: boolean [R] | Is this resource infinite? |
minimum_resource_amount :: uint [R] | Minimum amount of this resource. |
normal_resource_amount :: uint [R] | The normal amount for this resource. |
infinite_depletion_resource_amount :: uint [R] | Every time this infinite resource 'ticks' down it is reduced by this amount. |
resource_category :: string [R] | Category of this resource. |
mineable_properties [R] | |
items_to_place_this :: dictionary string → LuaItemPrototype [R] | Items that when placed will produce this entity. |
collision_box :: BoundingBox [R] | The bounding box used for collision checking. |
selection_box :: BoundingBox [R] | The bounding box used for drawing selection. |
drawing_box :: BoundingBox [R] | The bounding box used for drawing the entity icon. |
sticker_box :: BoundingBox [R] | The bounding box used to attach sticker type entities. |
collision_mask :: array of string [R] | The collision masks this entity uses |
order :: string [R] | Order string of this prototype. |
group :: LuaGroup [R] | Group of this entity. |
subgroup :: LuaGroup [R] | Subgroup of this entity. |
healing_per_tick :: float [R] | Amount this entity can heal per tick. |
emissions_per_tick :: double [R] | Amount of pollution emissions per tick this entity will create. |
corpses :: dictionary string → LuaEntityPrototype [R] | Corpses used when this entity is destroyed. |
selectable_in_game :: boolean [R] | Is this entity selectable? |
selection_priority :: uint [R] | The selection priority of this entity - a value between 0 and 255 |
weight :: double [R] | The weight of this vehicle prototype or nil if not a vehicle prototype. |
resistances :: Resistances [R] | |
fast_replaceable_group :: string [R] | The group of mutually fast-replaceable entities. |
loot :: Loot [R] | Loot that will be dropped when this entity is killed. |
repair_speed_modifier :: uint [R] | Repair-speed modifier for this entity. |
turret_range :: uint [R] | The range of this turret or nil if this isn't a turret related prototype. |
autoplace_specification :: AutoplaceSpecification [R] | Autoplace specification for this entity prototype. |
belt_speed :: double [R] | The speed of this transport belt or nil if this isn't a transport belt related prototype. |
result_units :: array of UnitSpawnDefinition [R] | The result units and spawn points with weight and evolution factor for a biter spawner entity. |
attack_result [R] | The attack result of this entity if the entity has one else nil . |
final_attack_result [R] | The final attack result for projectiles nil if not a projectile
|
attack_parameters [R] | The attack parameters for this entity or nil if the entity doesn't use attack parameters. |
spawn_cooldown [R] | The spawning cooldown for this enemy spawner prototype or nil . |
mining_drill_radius :: double [R] | The mining radius of this mining drill prototype or nil if this isn't a mining drill prototype. |
mining_speed :: double [R] | The mining speed of this mining drill/character prototype or nil . |
mining_power :: double [R] | The mining power of this mining drill prototype or nil if this isn't a mining drill prototype. |
logistic_mode :: string [R] | The logistic mode of this logistic container or nil if this isn't a logistic container prototype. |
max_underground_distance :: uint [R] | The max underground distance for underground belts and underground pipes or nil if this isn't one of those prototypes. |
flags :: array of string [R] | The entity prototype flags for this entity. |
remains_when_mined :: array of LuaEntityPrototype [R] | The remains left behind when this entity is mined. |
additional_pastable_entities :: array of LuaEntityPrototype [R] | Entities this entity can be pasted onto in addition to the normal allowed ones. |
allow_copy_paste :: boolean [R] | When false copy-paste is not allowed for this entity. |
shooting_cursor_size :: double [R] | The cursor size used when shooting at this entity. |
created_smoke [R] | The smoke trigger run when this entity is built or nil . |
created_effect [R] | The trigger run when this entity is created or nil . |
map_color :: Color [R] | The map color used when charting this entity if a friendly or enemy color isn't defined or nil . |
friendly_map_color :: Color [R] | The friendly map color used when charting this entity. |
enemy_map_color :: Color [R] | The enemy map color used when charting this entity. |
build_base_evolution_requirement :: double [R] | The evolution requirement to build this entity as a base when expanding enemy bases. |
instruments :: array of ProgrammableSpeakerInstrument [R] | The instruments for this programmable speaker or nil . |
max_polyphony :: uint [R] | The maximum polyphony for this programmable speaker or nil . |
module_inventory_size :: uint [R] | The module inventory size or nil if this entity doesn't support modules. |
ingredient_count :: uint [R] | The max number of ingredients this crafting-machine prototype supports or nil if this isn't a crafting-machine prototype. |
crafting_speed :: double [R] | The crafting speed of this crafting-machine or nil . |
crafting_categories :: dictionary string → boolean [R] | The crafting categories this entity supports. |
resource_categories :: dictionary string → boolean [R] | The resource categories this mining drill supports or nil if not a mining dill. |
supply_area_distance :: double [R] | The supply area of this electric pole, beacon, or nil if this is neither. |
max_wire_distance :: double [R] | The maximum wire distance for this electric pole/power switch or nil if this isn't an electric pole/power switch. |
max_circuit_wire_distance :: double [R] | The maximum circuit wire distance for this entity. |
energy_usage :: double [R] | The direct energy usage of this entity or nil if this entity doesn't have a direct energy usage. |
max_energy_usage :: double [R] | The theoretical maximum energy usage for this entity. |
effectivity :: double [R] | The effectivity of this car prototype, generator prototype or nil . |
consumption :: double [R] | The energy consumption of this car prototype or nil if not a car prototype. |
friction_force :: double [R] | The friction of this vehicle prototype or nil if not a vehicle prototype. |
braking_force :: double [R] | The braking force of this vehicle prototype or nil if not a vehicle prototype. |
tank_driving :: boolean [R] | If this car prototype uses tank controls to drive or nil if this is not a car prototype. |
rotation_speed :: double [R] | The rotation speed of this car prototype or nil if not a car prototype. |
turret_rotation_speed :: double [R] | The turret rotation speed of this car prototype or nil if not a car prototype. |
guns :: dictionary string → LuaItemPrototype [R] | The guns this car prototype uses or nil if not a car prototype. |
speed :: double [R] | The default speed of this flying robot, rolling stock, unit or nil . |
speed_multiplier_when_out_of_energy :: float [R] | The speed multiplier when this flying robot is out of energy or nil . |
max_payload_size :: uint [R] | The max payload size of this logistics or construction robot or nil . |
energy_per_move :: double [R] | The energy consumed per tile moved for this flying robot or nil . |
energy_per_tick :: double [R] | The energy consumed per tick for this flying robot or nil . |
max_energy :: double [R] | The max energy for this flying robot or nil . |
min_to_charge :: float [R] | The minimum energy for this flying robot before it tries to recharge or nil . |
max_to_charge :: float [R] | The maximum energy for this flying robot above which it won't try to recharge when stationing or nil . |
burner_prototype :: LuaBurnerPrototype [R] | The burner energy source prototype this entity uses or nil . |
electric_energy_source_prototype :: LuaElectricEnergySourcePrototype [R] | The electric energy source prototype this entity uses or nil . |
building_grid_bit_shift :: uint [R] | The log2 of grid size of the building |
fluid_usage_per_tick :: double [R] | The fluid usage of this generator prototype or nil . |
maximum_temperature :: double [R] | The maximum fluid temperature of this generator prototype or nil . |
target_temperature :: double [R] | The target temperature of this boiler prototype or nil . |
fluid :: LuaFluidPrototype [R] | The fluid this offshore pump produces or nil . |
fluid_capacity :: double [R] | The fluid capacity of this entity or 0 if this entity doesn't support fluids. |
pumping_speed :: double [R] | The pumping speed of this offshore pump, normal pump, or nil . |
stack :: boolean [R] | If this inserter is a stack-type. |
allow_custom_vectors :: boolean [R] | If this inserter allows custom pickup and drop vectors. |
count_as_rock_for_filtered_deconstruction :: boolean [R] | If this simple-entity is counted as a rock for the deconstruction planner "trees and rocks only" filter. |
filter_count :: uint [R] | The filter count of this inserter, loader, or requester chest or nil . |
production :: double [R] | The max production this solar panel prototype produces or nil . |
time_to_live :: uint [R] | The time to live for this prototype or 0 if prototype doesn't have time_to_live or time_before_removed. |
distribution_effectivity :: double [R] | The distribution effectivity for this beacon prototype or nil if not a beacon prototype. |
explosion_beam :: double [R] | Does this explosion have a beam or nil if not an explosion prototype. |
explosion_rotate :: double [R] | Does this explosion rotate or nil if not an explosion prototype. |
tree_color_count :: uint8 [R] | If it is a tree, return the number of colors it supports. |
alert_when_damaged :: boolean [R] | Does this entity with health prototype alert when damaged? |
alert_when_attacking :: boolean [R] | Does this turret prototype alert when attacking? |
color :: Color [R] | The color of the prototype, or nil if the prototype doesn't have color. |
collision_mask_collides_with_self :: boolean [R] | Does this prototype collision mask collide with itself? |
allowed_effects :: dictionary string → boolean [R] | The allowed module effects for this entity or nil . |
rocket_parts_required :: uint [R] | The rocket parts required for this rocket silo prototype or nil . |
fixed_recipe :: string [R] | The fixed recipe name for this assembling machine prototype or nil . |
construction_radius :: double [R] | The constrution radius for this roboport prototype or nil . |
logistic_radius :: double [R] | The logistic radius for this roboport prototype or nil . |
energy_per_hit_point :: double [R] | The energy used per hitpoint taken for this vehicle during collisions or nil . |
create_ghost_on_death :: boolean [R] | If this prototype will attempt to create a ghost of itself on death. |
running_speed :: double [R] | |
maximum_corner_sliding_distance :: double [R] | |
build_distance :: uint [R] | |
drop_item_distance :: uint [R] | |
reach_distance :: uint [R] | |
reach_resource_distance :: double [R] | |
item_pickup_distance :: double [R] | |
loot_pickup_distance :: double [R] | |
enter_vehicle_distance :: double [R] | |
ticks_to_keep_gun :: uint [R] | |
ticks_to_keep_aiming_direction :: uint [R] | |
ticks_to_stay_in_combat :: uint [R] | |
respawn_time :: uint [R] | |
damage_hit_tint :: Color [R] | |
character_corpse :: LuaEntityPrototype [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this equipment. |
type :: string [R] | Type of this equipment. |
position :: Position [R] | Position of this equipment in the equipment grid. |
shape :: table [R] | Shape of this equipment. |
shield :: double [RW] | Current shield value of the equipment. |
max_shield :: double [R] | Maximum shield value. |
max_solar_power :: double [R] | Maximum solar power generated. |
movement_bonus :: double [R] | Movement speed bonus. |
generator_power :: double [R] | Energy generated per tick. |
energy :: double [RW] | Current available energy. |
max_energy :: double [R] | Maximum amount of energy that can be stored in this equipment. |
prototype :: LuaEquipmentPrototype [R] | |
burner :: LuaBurner [R] | The burner energy source for this equipment or nil if there isn't one. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
take{position=…, equipment=…} → SimpleItemStack | Remove an equipment from the grid. |
take_all() → dictionary string → uint | Remove all equipment from the grid. |
clear() | Clear all equipment from the grid. |
put{name=…, position=…} → LuaEquipment | Insert an equipment into the grid. |
can_move{equipment=…, position=…} → boolean | Check whether moving an equipment would succeed. |
move{equipment=…, position=…} → boolean | Move an equipment within this grid. |
get(position) → LuaEquipment | Find equipment in the Equipment Grid based off a position. |
get_contents() → dictionary string → uint | Get counts of all equipment in this grid. |
prototype :: LuaEquipmentGridPrototype [R] | |
width :: uint [R] | Width of the equipment grid. |
height :: uint [R] | Height of the equipment grid. |
equipment :: array of LuaEquipment [R] | All the equipment in this grid. |
generator_energy :: double [R] | Total energy per tick generated by the equipment inside this grid. |
max_solar_energy :: double [R] | Maximum energy per tick that can be created by any solar panels in the equipment grid. |
available_in_batteries :: double [R] | The total energy stored in all batteries in the equipment grid. |
battery_capacity :: double [R] | Total energy storage capacity of all batteries in the equipment grid. |
shield :: float [R] | The amount of shields this equipment grid has. |
max_shield :: float [R] | The maximum amount of shields this equipment grid has. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
equipment_categories :: array of string [R] | Equipment category names for the categories that may be inserted into this equipment grid. |
width :: uint [R] | |
height :: uint [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
type :: string [R] | Type of this equipment prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
shape :: table [R] | Shape of this equipment prototype. |
take_result :: LuaItemPrototype [R] | The result item when taking this equipment out of an equipment grid. |
energy_production :: double [R] | The max power generated by this equipment. |
shield :: float [R] | The shield value of this equipment. |
energy_per_shield :: double [R] | The energy per shield point restored. |
logistic_parameters [R] | The logistic parameters for roboport equipment |
energy_consumption :: double [R] | |
movement_bonus :: float [R] | |
night_vision_tint :: Color [R] | |
energy_source [R] | The energy source prototype for the equipment. |
equipment_categories :: array of string [R] | Category names for this equipment. |
burner_prototype :: LuaBurnerPrototype [R] | The burner energy source prototype this equipment uses or nil . |
electric_energy_source_prototype :: LuaElectricEnergySourcePrototype [R] | The electric energy source prototype this equipment uses or nil . |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_input_count(string) | Gets the total input count for a given prototype. |
set_input_count(string, count) | Sets the total input count for a given prototype. |
get_output_count(string) | Gets the total output count for a given prototype. |
set_output_count(string, count) | Sets the total output count for a given prototype. |
on_flow(string, count) | Adds a value to this flow statistics. |
input_counts :: dictionary string → array of uint64 or double [R] | List of input counts indexed by name <> value. |
output_counts :: dictionary string → array of uint64 or double [R] | List of output counts indexed by name <> value. |
force :: LuaForce [R] | The force these statistics belong to. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_capacity(index) → double | The capacity of the given fluidbox index. |
get_connections() → array of LuaFluidBox | The fluidbox connections for the given fluidbox index. |
get_filter(index) → table | The filter of the given fluidbox index, 'nil' if none. |
set_filter(index, table) → boolean | Set the filter of the given fluidbox index, 'nil' to clear. |
operator # :: uint [R] | Number of fluid boxes. |
owner :: LuaEntity [R] | The entity that owns this fluidbox. |
operator [] [R] | Access, set or clear a fluid box. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
default_temperature :: double [R] | Default temperature of the fluid. |
max_temperature :: double [R] | Maximum temperature the fluid can reach. |
heat_capacity :: double [R] | How much energy the fluid will generate at max temperature assuming 100% efficiency steam engine. |
pressure_to_speed_ratio :: double [R] | How much pressure -- difference in fluid levels -- will be converted to speed. |
flow_to_energy_ratio :: double [R] | How much will a volume of fluid transferred be converted to energy. |
max_push_amount :: double [R] | |
ratio_to_push :: double [R] | |
order :: string [R] | Order string for this prototype. |
group :: LuaGroup [R] | Group of this prototype. |
subgroup :: LuaGroup [R] | Subgroup of this prototype. |
base_color :: Color [R] | |
flow_color :: Color [R] | |
gas_temperature :: double [R] | |
emissions_multiplier :: double [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_entity_count(name) → uint | Count entities of given type. |
disable_research() | Disable research for this force. |
enable_research() | Enable research for this force. |
disable_all_prototypes() | Disable all recipes and technologies. |
enable_all_prototypes() | Enables all recipes and technologies. |
reset_recipes() | Load the original version of all recipes from the prototypes. |
enable_all_recipes() | Unlock all recipes. |
enable_all_technologies() | Unlock all technologies. |
research_all_technologies(include_disabled_prototypes) | Research all technologies. |
reset_technologies() | Load the original versions of technologies from prototypes. |
reset() | Reset everything. |
reset_technology_effects() | Reapplies all possible research effects, including unlocked recipes. |
chart(surface, area) | Chart a portion of the map. |
clear_chart(surface) | Erases chart data for this force. |
rechart() | Force a rechart of the whole chart. |
chart_all(surface) | Chart all generated chunks. |
is_chunk_charted(surface, position) → boolean | 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. |
cancel_charting(surface) | 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) | Stop attacking members of a given force. |
get_cease_fire(other) → boolean | Will this force attack members of another force? |
set_friend(other, cease_fire) | Friends have unrestricted access to buildings and turrets won't fire at them. |
get_friend(other) → boolean | Is this force a friend? |
is_pathfinder_busy() → boolean | Is pathfinder busy? |
kill_all_units() | Kill all units and flush the pathfinder. |
find_logistic_network_by_position(position, surface) → LuaLogisticNetwork | |
set_spawn_position(position, surface) | |
get_spawn_position(surface) → Position | |
unchart_chunk(position, surface) | |
get_item_launched(item) → uint | 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. |
print(message, color) | Print text to the chat console of all players on this force. |
get_trains(surface) → array of LuaTrain | |
add_chart_tag(surface, tag) → LuaCustomChartTag | Adds a custom chart tag to the given surface and returns the new tag or nil if the given position isn't valid for a chart tag. |
find_chart_tags(surface, area) → array of LuaCustomChartTag | 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 nil if there is no saved progress. |
set_saved_technology_progress(technology, double) | Sets the saved progress for the given technology. |
reset_evolution() | Resets evolution for this force to zero. |
play_sound{path=…, position=…, volume_modifier=…} → boolean | Plays a sound for every player on this force |
name :: string [R] | Name of the force. |
technologies :: custom dictionary string → LuaTechnology [R] | Technologies owned by this force, indexed by their name. |
recipes :: custom dictionary string → LuaRecipe [R] | Recipes available to this force, indexed by their name. |
manual_mining_speed_modifier :: double [RW] | Multiplier of the manual mining speed. |
manual_crafting_speed_modifier :: double [RW] | Multiplier of the manual crafting speed. |
laboratory_speed_modifier :: double [RW] | |
laboratory_productivity_bonus :: double [RW] | |
worker_robots_speed_modifier :: double [RW] | |
worker_robots_battery_modifier :: double [RW] | |
worker_robots_storage_bonus :: double [RW] | |
current_research :: LuaTechnology or string [RW] | The current research in progress. |
research_progress :: double [RW] | Progress of current research, as a number in range [0, 1]. |
inserter_stack_size_bonus :: double [RW] | The inserter stack size bonus for non stack inserters |
stack_inserter_capacity_bonus :: uint [RW] | Number of items that can be transferred by stack inserters |
character_logistic_slot_count :: double [RW] | Number of character logistic slots. |
character_trash_slot_count :: double [RW] | Number of character trash slots. |
quickbar_count :: uint [RW] | Number of character quick bars. |
maximum_following_robot_count :: uint [RW] | Maximum number of follower robots. |
following_robots_lifetime_modifier :: double [RW] | Additional lifetime for following robots. |
ghost_time_to_live :: uint [RW] | The time, in ticks, before a placed ghost disappears. |
players :: array of LuaPlayer [R] | Players belonging to this force. |
ai_controllable :: boolean [RW] | Enables some higher-level AI behaviour for this force. |
logistic_networks :: dictionary string → array of LuaLogisticNetwork [R] | List of logistic networks, grouped by surface. |
item_production_statistics :: LuaFlowStatistics [R] | The item production statistics for this force. |
fluid_production_statistics :: LuaFlowStatistics [R] | The fluid production statistics for this force. |
kill_count_statistics :: LuaFlowStatistics [R] | The kill counter statistics for this force. |
entity_build_count_statistics :: LuaFlowStatistics [R] | The entity build statistics for this force (built and mined) |
character_running_speed_modifier :: double [RW] | |
artillery_range_modifier :: double [RW] | |
character_build_distance_bonus :: uint [RW] | |
character_item_drop_distance_bonus :: uint [RW] | |
character_reach_distance_bonus :: uint [RW] | |
character_resource_reach_distance_bonus :: double [RW] | |
character_item_pickup_distance_bonus :: double [RW] | |
character_loot_pickup_distance_bonus :: double [RW] | |
character_inventory_slots_bonus :: uint [RW] | the number of additional inventory slots the character main inventory has. |
deconstruction_time_to_live :: uint [RW] | The time, in ticks, before a deconstruction order is removed. |
character_health_bonus :: double [RW] | |
max_successful_attemps_per_tick_per_construction_queue :: uint [RW] | |
max_failed_attempts_per_tick_per_construction_queue :: uint [RW] | |
auto_character_trash_slots :: boolean [RW] | true if auto character trash slots are enabled. |
zoom_to_world_enabled :: boolean [RW] | Ability to use zoom-to-world on map. |
zoom_to_world_ghost_building_enabled :: boolean [RW] | Ability to build ghosts through blueprint or direct ghost placement, or "mine" ghosts when using zoom-to-world. |
zoom_to_world_blueprint_enabled :: boolean [RW] | Ability to create new blueprints using empty blueprint item when using zoom-to-world. |
zoom_to_world_deconstruction_planner_enabled :: boolean [RW] | Ability to use deconstruction planner when using zoom-to-world. |
zoom_to_world_selection_tool_enabled :: boolean [RW] | Ability to use custom selection tools when using zoom-to-world. |
rockets_launched :: uint [RW] | The number of rockets launched. |
items_launched :: dictionary string → uint [R] | All of the items that have been launched in rockets. |
connected_players :: array of LuaPlayer [R] | The connected players belonging to this force. |
mining_drill_productivity_bonus :: double [RW] | |
train_braking_force_bonus :: double [RW] | |
evolution_factor :: float [RW] | Evolution factor of this force. |
friendly_fire :: boolean [RW] | If friendly fire is enabled for this force. |
share_chart :: boolean [RW] | If sharing chart data is enabled for this force. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
help() | Internal |
set_game_state{game_finished=…, player_won=…, next_level=…, can_continue=…} | Set scenario state. |
get_entity_by_tag(tag) → LuaEntity | |
show_message_dialog{text=…, image=…, point_to=…} | Show an in-game message dialog. |
disable_tips_and_tricks() | Disable showing tips and tricks. |
is_demo() → boolean | Is this the demo version of Factorio? |
reload_script() | Forces a reload of the scenario script when the save game without the migration is loaded. |
save_atlas() | Saves the current configuration of Atlas to a file. |
check_consistency() | Run internal consistency checks. |
regenerate_entity(entities) | Regenerate autoplacement of some entities on all surfaces. |
take_screenshot{player=…, by_player=…, surface=…, position=…, resolution=…, zoom=…, path=…, show_gui=…, show_entity_info=…, anti_alias=…} | Take a screenshot and save it to a file. |
write_file(filename, data, append, for_player) | Write a string to a file. |
remove_path(path) | Remove file or directory. |
remove_offline_players(players) | Remove players who are currently not connected from the map. |
force_crc() | Force a CRC check. |
create_force(force) → LuaForce | Create a new force. |
merge_forces(source, destination) | Merge two forces together. |
create_surface(name, settings) → LuaSurface | Create a new surface |
server_save(name) | Instruct the server to save the map. |
delete_surface(surface) | Deletes the given surface and all entities on it. |
disable_replay() | Disables replay saving for the current save file. |
direction_to_string(direction) | Converts the given direction into the string version of the direction. |
print(message, color) | 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. |
check_prototype_translations() | Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect. |
play_sound{path=…, position=…, volume_modifier=…} → boolean | Plays a sound for every player in the game on every surface. |
is_valid_sound_path(SoundPath) → boolean | Checks if the given sound path is valid. |
kick_player(PlayerSpecification, reason) | Kicks the given player from this multiplayer game. |
ban_player(PlayerSpecification, reason) | Bans the given player from this multiplayer game. |
unban_player(PlayerSpecification) | Unbans the given player from this multiplayer game. |
purge_player(PlayerSpecification) | Purges the given players messages from the game. |
mute_player(PlayerSpecification) | Mutes the given player. |
unmute_player(PlayerSpecification) | Unmutes the given player. |
count_pipe_groups() | Counts how many distinct groups of pipes exist in the world. |
is_multiplayer() → boolean | Is the map loaded is multiplayer? |
player :: LuaPlayer [R] | The player typing at the console - nil in all other instances. |
players :: custom dictionary uint or string → LuaPlayer [R] | |
map_settings :: MapSettings [R] | |
difficulty_settings :: DifficultySettings [R] | Although it can be done; because different difficulties can have different technology or recipe trees it's not recommended to change difficulty settings mid-game. |
difficulty :: defines.difficulty [R] | Current scenario difficulty. |
forces :: custom dictionary string → LuaForce [R] | |
entity_prototypes :: custom dictionary string → LuaEntityPrototype [R] | |
item_prototypes :: custom dictionary string → LuaItemPrototype [R] | |
fluid_prototypes :: custom dictionary string → LuaFluidPrototype [R] | |
tile_prototypes :: custom dictionary string → LuaTilePrototype [R] | |
equipment_prototypes :: custom dictionary string → LuaEquipmentPrototype [R] | |
damage_prototypes :: custom dictionary string → LuaDamagePrototype [R] | |
virtual_signal_prototypes :: custom dictionary string → LuaVirtualSignalPrototype [R] | |
equipment_grid_prototypes :: custom dictionary string → LuaEquipmentGridPrototype [R] | |
recipe_prototypes :: custom dictionary string → LuaRecipePrototype [R] | |
technology_prototypes :: custom dictionary string → LuaTechnologyPrototype [R] | |
decorative_prototypes :: custom dictionary string → LuaDecorativePrototype [R] | |
autoplace_control_prototypes :: custom dictionary string → LuaAutoplaceControlPrototype [R] | |
noise_layer_prototypes :: custom dictionary string → LuaNoiseLayerPrototype [R] | |
mod_setting_prototypes :: custom dictionary string → LuaModSettingPrototype [R] | |
custom_input_prototypes :: custom dictionary string → LuaCustomInputPrototype [R] | |
ammo_category_prototypes :: custom dictionary string → LuaAmmoCategoryPrototype [R] | |
tick :: uint [R] | Current map tick. |
finished :: boolean [R] | Is the scenario finished? |
speed :: float [RW] | Speed to update the map at. |
surfaces :: custom dictionary uint or string → LuaSurface [R] | |
active_mods :: dictionary string → string [R] | The active mods versions. |
connected_players :: array of LuaPlayer [R] | The online players This is primarily useful when you want to do some action against all online players. |
permissions :: LuaPermissionGroups [R] | |
backer_names :: custom dictionary uint → string [R] | |
default_map_gen_settings :: MapGenSettings [R] | The default map gen settings for this save. |
name :: string [R] | |
type :: string [R] | |
group :: LuaGroup [R] | The parent group if any; nil if none. |
subgroups :: array of LuaGroup [R] | Subgroups of this group. |
order_in_recipe :: string [R] | The additional order value used in recipe ordering. |
order :: string [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
is_valid_sprite_path(sprite_path) → boolean | Returns true if sprite_path is valid and contains loaded sprite, otherwise false . |
player :: LuaPlayer [R] | The player who owns this gui. |
children :: dictionary string → LuaGuiElement [R] | The children GUI elements mapped by name <> element. |
top :: LuaGuiElement [R] | The top part of the GUI. |
left :: LuaGuiElement [R] | The left part of the GUI. |
center :: LuaGuiElement [R] | The center part of the GUI. |
goal :: LuaGuiElement [R] | The flow used in the objectives window. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
add{type=…, name=…, style=…} → LuaGuiElement | Add a child element. |
clear() | Remove children of this element. |
destroy() | Remove this element, along with its children. |
clear_items() | Clears the items in this dropdown. |
get_item(index) → LocalisedString | Gets an item at the given index from this dropdown. |
set_item(index, LocalisedString) | Sets an item at the given index in this dropdown. |
add_item(LocalisedString, index) | Adds an item at the end or at the given index in this dropdown. |
remove_item(index) | Removes an item at the given index in this dropdown. |
get_slider_minimum() → double | Gets this sliders minimum value. |
get_slider_maximum() → double | Gets this sliders minimum value. |
set_slider_minimum_maximum(minimum, maximum) | Sets this sliders minimum and maximum values. |
focus() | Focuses this GUI element if possible. |
index :: uint [R] | The unique index of this GUI element. |
gui :: LuaGui [R] | The GUI this element is a part of. |
parent :: LuaGuiElement [R] | The direct parent of this element; nil if this is a top-level element. |
name :: string [R] | The name of this element. |
caption :: LocalisedString [RW] | The text displayed on the element. |
value :: double [RW] | How much this progress bar is filled. |
direction :: string [R] | Direction of the layout. |
style :: LuaStyle or string [RW] | The style of this element. |
text :: string [RW] | The text contained in a textfield or text-box. |
children_names :: array of string [R] | Names of all the children of this element. |
state :: boolean [RW] | Is this checkbox checked? |
player_index :: uint [R] | Index into LuaGameScript::players specifying the player who owns this element. |
sprite :: SpritePath [RW] | The image to display on this sprite-button in the default state. |
hovered_sprite :: SpritePath [RW] | The image to display on this sprite-button when it is hovered. |
clicked_sprite :: SpritePath [RW] | The image to display on this sprite-button when it is clicked. |
tooltip :: LocalisedString [RW] | |
horizontal_scroll_policy :: string [RW] | Policy of the horizontal scroll bar, possible values are "auto" (default), "never", "always", "auto-and-reserve-space". |
vertical_scroll_policy :: string [RW] | Policy of the vertical scroll bar, possible values are "auto" (default), "never", "always", "auto-and-reserve-space". |
type :: string [R] | The type of this GUI element. |
children :: array of LuaGuiElement [R] | The children elements |
items :: array of LocalisedString [RW] | The items in this dropdown. |
selected_index :: uint [RW] | The selected index for this dropdown. |
number :: double [RW] | The number to be shown in the right-bottom corner of the sprite-button. |
show_percent_for_small_numbers :: boolean [RW] | Related to the number to be shown in the right-bottom corner of the sprite-button. |
position :: Position [RW] | The position this camera or minimap is focused on if any. |
surface_index :: uint [RW] | The surface index this camera or minimap is using. |
zoom :: double [RW] | The zoom this camera or minimap is using. |
minimap_player_index :: uint [RW] | The player index this minimap is using. |
force :: string [RW] | The force this minimap is using or nil if no force is set. |
elem_type :: string [R] | The elem type of this choose-elem-button. |
elem_value :: string or SignalID [RW] | The elem value of this choose-elem-button or nil if there is no value. |
selectable :: boolean [RW] | If the contents of this text-box are selectable. |
word_wrap :: boolean [RW] | If this text-box will word-wrap automatically. |
read_only :: boolean [RW] | If this text-box is read-only. |
enabled :: boolean [RW] | If this GUI element is enabled. |
ignored_by_interaction :: boolean [RW] | If this GUI element is ignored by interaction. |
locked :: boolean [RW] | If this choose-elem-button can be changed by the player. |
draw_vertical_lines :: boolean [RW] | If this table should draw vertical grid lines. |
draw_horizontal_lines :: boolean [RW] | If this table should draw horizontal grid lines. |
draw_horizontal_line_after_headers :: boolean [RW] | If this table should draw a horizontal grid line after the headers. |
column_count :: uint [R] | The number of columns in this table. |
slider_value :: double [RW] | The value of this slider element. |
mouse_button_filter :: dictionary string → boolean [RW] | The mouse button filters for this button or sprite-button. |
entity :: LuaEntity [RW] | The entity associated with this entity-preview or nil if no entity is associated. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
clear() | Make this inventory empty. |
can_insert(items) → boolean | Can at least some items be inserted? |
insert(items) → uint | Insert items into this inventory. |
remove(items) → uint | Remove items from this inventory. |
get_item_count(item) → uint | Get the number of all or some items in this inventory. |
is_empty() → boolean | Does this inventory contain nothing? |
get_contents() → dictionary string → uint | Get counts of all items in this inventory. |
hasbar() → boolean | Does this inventory have a bar? |
getbar() → uint | Get the current bar. |
setbar(bar) | Set the current bar. |
supports_filters() → boolean | If this inventory supports filters. |
is_filtered() → boolean | 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. |
get_filter(index) → string | Gets the filter for the given item stack index. |
set_filter(index, filter) → boolean | Sets the filter for the given item stack index. |
find_item_stack(item) → LuaItemStack | Gets the first LuaItemStack in the inventory that matches the given item name. |
sort_and_merge() | Sorts and merges the items in this inventory. |
operator # :: uint [R] | Get the number of slots in this inventory. |
index :: uint [R] | The inventory index this inventory uses. |
entity_owner :: LuaEntity [R] | The entity that owns this inventory or nil if this isn't owned by an entity. |
player_owner :: LuaPlayer [R] | The player that owns this inventory or nil if this isn't owned by a player. |
equipment_owner :: LuaEntity [R] | The equipment that owns this inventory or nil if this isn't owned by an equipment. |
operator [] :: LuaItemStack [R] | The indexing operator. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
has_flag(flag) → boolean | Does this prototype have a flag enabled? |
get_ammo_type(ammo_source_type) → AmmoType | Type of this ammo prototype or nil if this is not an ammo prototype. |
type :: string [R] | Type of this prototype. |
name :: string [R] | Name of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
order :: string [R] | Order string. |
place_result :: LuaEntityPrototype [R] | Prototype of the entity that will be created by placing this item, or nil if there is no such
entity. |
place_as_equipment_result :: LuaEquipmentPrototype [R] | Prototype of the equipment that will be created by placing this item in an equipment grid or nil if there is no equipment defined. |
place_as_tile_result :: PlaceAsTileResult [R] | The place as tile result if one is defined else nil . |
stackable :: boolean [R] | Is this item allowed to stack at all? |
default_request_amount :: uint [R] | The default request value. |
stack_size :: uint [R] | Maximum stack size of the item specified by this prototype. |
fuel_category :: string [R] | The fuel category or nil . |
burnt_result :: LuaItemPrototype [R] | The result of burning this item as fuel or nil . |
fuel_value :: float [R] | Fuel value when burned. |
fuel_acceleration_multiplier :: double [R] | The acceleration multiplier when this item is used as fuel in a vehicle. |
fuel_top_speed_multiplier :: double [R] | The fuel top speed multiplier when this item is used as fuel in a vehicle. |
fuel_emissions_multiplier :: double [R] | The emissions multiplier if this is used as fuel. |
subgroup :: LuaGroup [R] | The subgroup this prototype belongs to. |
group :: LuaGroup [R] | The group this prototype belongs to. |
flags :: dictionary string → boolean [R] | The item prototype flags for this item prototype. |
rocket_launch_products :: array of Product [R] | The results from launching this item in a rocket. |
can_be_mod_opened :: boolean [R] | If this item can be mod-opened. |
magazine_size :: float [R] | Size of full magazine; nil if this is not an ammo item. |
equipment_grid :: LuaEquipmentGridPrototype [R] | The prototype of this armor equipment grid or nil if none or this is not an armor item. |
resistances :: Resistances [R] | Resistances of this armour item; nil if not an armor or or the armor has no resistances. |
inventory_size_bonus :: uint [R] | The inventory size bonus for this armor prototype. |
capsule_action :: CapsuleAction [R] | The capsule action for this capsule item prototype or nil if this isn't a capsule item prototype. |
attack_parameters :: AttackParameters [R] | The gun attack parameters or nil if not a gun item prototype. |
inventory_size :: uint [R] | The main inventory size for item-with-inventory-prototype. |
item_filters :: dictionary string → LuaItemPrototype [R] | |
item_group_filters :: dictionary string → LuaGroup [R] | |
item_subgroup_filters :: dictionary string → LuaGroup [R] | |
filter_mode :: string [R] | The filter mode used by this item with inventory. |
insertion_priority_mode :: string [R] | The insertion priority mode used by this item with inventory. |
localised_filter_message :: LocalisedString [R] | The localised string used when the player attempts to put items into this item with inventory that aren't allowed. |
extend_inventory_by_default :: boolean [R] | If this item with inventory extends the inventory it resides in by default. |
default_label_color :: Color [R] | The default label color used for this item with label. |
draw_label_for_cursor_render :: boolean [R] | 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 :: float [R] | Mining or repairing speed if this is a mining or repairing tool; otherwise nil . |
attack_result :: array of TriggerItem [R] | The attack result of this mining tool prototype. |
attack_range :: float [R] | The attack range of this mining tool or nil if not a mining tool. |
build_distance_bonus :: double [R] | The bonus or nil . |
item_drop_distance_bonus :: double [R] | The bonus or nil . |
reach_distance_bonus :: double [R] | The bonus or nil . |
item_pickup_distance_bonus :: double [R] | The bonus or nil . |
loot_pickup_distance_bonus :: double [R] | The bonus or nil . |
resource_reach_distance_bonus :: double [R] | The bonus or nil . |
module_effects :: Effects [R] | Effects of this module; nil if this is not a module. |
category :: string [R] | The module category name |
tier :: float [R] | The module tier |
limitations :: array of string [R] | An array of recipe names this module is allowed to work with. |
limitation_message_key :: string [R] | The limitation message key used when the player attempts to use this modules in some place it's not allowed. |
straight_rail :: LuaEntityPrototype [R] | The straight rail prototype used for this rail planner prototype. |
curved_rail :: LuaEntityPrototype [R] | The curved rail prototype used for this rail planner prototype. |
repair_result :: array of TriggerItem [R] | The repair result of this repair tool prototype or nil if this isn't a repair tool prototype. |
selection_border_color :: Color [R] | The color used when doing normal selection with this selection tool prototype. |
alt_selection_border_color :: Color [R] | The color used when doing alt selection with this selection tool prototype. |
selection_mode_flags :: SelectionModeFlags [R] | Flags that affect which entities will be selected. |
alt_selection_mode_flags :: SelectionModeFlags [R] | Flags that affect which entities will be selected during alternate selection. |
selection_cursor_box_type :: string [R] | |
alt_selection_cursor_box_type :: string [R] | |
always_include_tiles :: boolean [R] | If tiles area always included when doing selection with this selection tool prototype. |
show_in_library :: boolean [R] | Is this selection tool prototype available in the blueprint library. |
entity_filter_slots :: uint [R] | The number of entity filters this deconstruction item has or nil if this isn't a deconstruction item prototype. |
tile_filter_slots :: uint [R] | The number of tile filters this deconstruction item has or nil if this isn't a deconstruction item prototype. |
durability_description_key :: string [R] | The durability message key used when displaying the durability of this tool. |
durability :: double [R] | The durability of this tool item or nil if not a tool item. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
is_blueprint_setup() → boolean | Is this blueprint item setup? |
get_blueprint_entities() → array of blueprint entity | Entities in this blueprint. |
set_blueprint_entities(entities) | Set new entities to be a part of this blueprint. |
add_ammo(amount) | Add ammo to this ammo item. |
drain_ammo(amount) | Remove ammo from this ammo item. |
add_durability(amount) | Add durability to this tool item. |
drain_durability(amount) | Remove durability from this tool item. |
can_set_stack(stack) → boolean | Would a call to LuaItemStack::set_stack succeed? |
set_stack(stack) → boolean | Set this item stack to another item stack. |
transfer_stack(stack) → boolean | Transfers the given item stack into this item stack. |
export_stack() → string | Export a supported item (blueprint, blueprint-book, deconstruction-planner, item-with-tags) to a string |
import_stack(data) → int | Import a supported item (blueprint, blueprint-book, deconstruction-planner, item-with-tags) from a string |
swap_stack(stack) → boolean | Swaps this item stack with the given item stack if allowed. |
clear() | Clear this item stack. |
get_blueprint_tiles() → array of blueprint tile | Tiles in this blueprint |
set_blueprint_tiles(tiles) | Set tiles in this blueprint |
get_inventory(inventory) → LuaInventory | Access the inner inventory of an item. |
build_blueprint{surface=…, force=…, position=…, force_build=…, direction=…, skip_fog_of_war=…} → array of LuaEntity | Build this blueprint |
create_blueprint{surface=…, force=…, area=…, always_include_tiles=…} | Sets up this blueprint using the found blueprintable entities/tiles on the surface. |
get_tag(tag_name) → Any | Gets the tag with the given name or returns nil if it doesn't exist. |
set_tag(tag_name, tag) → Any | Sets the tag with the given name and value. |
remove_tag(tag) → boolean | Removes a tag with the given name. |
clear_blueprint() | Clears this blueprint item. |
get_entity_filter(index) → string | 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. |
get_tile_filter(index) → string | 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. |
clear_deconstruction_item() | Clears all settings/filters on this deconstruction item resetting it to default values. |
valid_for_read :: boolean [R] | Is this valid for reading? |
prototype :: LuaItemPrototype [R] | Prototype of the item held in this stack. |
name :: string [R] | Prototype name of the item held in this stack. |
type :: string [R] | Type of the item prototype. |
count :: uint [RW] | Number of items in this stack. |
grid :: LuaEquipmentGrid [R] | The equipment grid of this item or nil if this item doesn't have a grid. |
health :: float [RW] | How much health the item has, as a number in range [0, 1]. |
durability :: double [RW] | Durability of the contained item. |
ammo :: uint [RW] | Number of bullets left in the magazine. |
blueprint_icons :: array of Icon [RW] | Icons of a blueprint item. |
label :: string [RW] | The current label for this item. |
label_color :: Color [RW] | The current label color for this item. |
allow_manual_label_change :: boolean [RW] | If the label for this item can be manually changed. |
cost_to_build :: dictionary string → uint [R] | Raw materials required to build this blueprint. |
extends_inventory :: boolean [RW] | If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). |
prioritize_insertion_mode :: string [RW] | The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. |
default_icons :: array of Icon [R] | The default icons for a blueprint item. |
tags :: dictionary string → Any [RW] | |
custom_description :: LocalisedString [RW] | The custom description this item-with-tags. |
entity_filters :: array of string [RW] | The entity filters for this deconstruction item. |
tile_filters :: array of string [RW] | The tile filters for this deconstruction item. |
entity_filter_mode :: defines.deconstruction_item.entity_filter_mode [RW] | The blacklist/whitelist entity filter mode for this deconstruction item. |
tile_filter_mode :: defines.deconstruction_item.tile_filter_mode [RW] | The blacklist/whitelist tile filter mode for this deconstruction item. |
tile_selection_mode :: defines.deconstruction_item.tile_selection_mode [RW] | The tile selection mode for this deconstruction item. |
trees_and_rocks_only :: boolean [RW] | If this deconstruction item is set to allow trees and rocks only. |
entity_filter_count :: uint [R] | The number of entity filters this deconstruction item supports. |
tile_filter_count :: uint [R] | The number of tile filters this deconstruction item supports. |
active_index :: uint [RW] | The active blueprint index for this blueprint book. |
item_number :: uint [R] | The unique ID for this item if it has a unique ID or nil . |
is_blueprint :: boolean [R] | If this is a blueprint item. |
is_blueprint_book :: boolean [R] | If this is a blueprint book item. |
is_module :: boolean [R] | If this is a module item. |
is_tool :: boolean [R] | If this is a tool item. |
is_mining_tool :: boolean [R] | If this is a mining tool item. |
is_armor :: boolean [R] | If this is an armor item. |
is_repair_tool :: boolean [R] | If this is a repair tool item. |
is_item_with_label :: boolean [R] | If this is an item with label item. |
is_item_with_inventory :: boolean [R] | If this is an item with inventory item. |
is_item_with_entity_data :: boolean [R] | If this is an item with entity data item. |
is_selection_tool :: boolean [R] | If this is a selection tool item. |
is_item_with_tags :: boolean [R] | If this is an item with tags item. |
is_deconstruction_item :: boolean [R] | If this is a deconstruction tool item. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
is_in_logistic_range(position) → boolean | 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_neighbour_with(other) → boolean | Are two cells neighbours? |
logistic_radius :: float [R] | Logistic radius of this cell. |
construction_radius :: float [R] | Construction radius of this cell. |
stationed_logistic_robot_count :: uint [R] | Number of stationed logistic robots in this cell. |
stationed_construction_robot_count :: uint [R] | Number of stationed construction robots in this cell. |
mobile :: boolean [R] | true if this is a mobile cell. |
transmitting :: boolean [R] | true if this cell is active. |
charge_approach_distance :: float [R] | Radius at which the robots hover when waiting to be charged. |
charging_robot_count :: uint [R] | Number of robots currently charging. |
to_charge_robot_count :: uint [R] | Number of robots waiting to charge. |
owner :: LuaEntity [R] | This cell's owner. |
logistic_network :: LuaLogisticNetwork [R] | The network that owns this cell or nil . |
neighbours :: array of LuaLogisticCell [R] | Neighbouring cells. |
charging_robots :: array of LuaEntity [R] | Robots currently being charged. |
to_charge_robots :: array of LuaEntity [R] | Robots waiting to charge. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_item_count(item, member) → int | Count given or all items in the network or given members. |
get_contents() → dictionary string → uint | Get item counts for the entire network. |
remove_item(item, members) → uint | Remove items from the logistic network. |
insert(item, members) → uint | Insert items into the logistic network. |
find_cell_closest_to(position) → LuaLogisticCell | Find logistic cell closest to a given position. |
force :: LuaForce [R] | The force this logistic network belongs to. |
available_logistic_robots :: uint [R] | Number of logistic robots available for a job. |
all_logistic_robots :: uint [R] | The total number of logistic robots in the network (idle and active + in roboports). |
available_construction_robots :: uint [R] | Number of construction robots available for a job. |
all_construction_robots :: uint [R] | The total number of construction robots in the network (idle and active + in roboports). |
robot_limit :: uint [R] | Maximum number of robots the network can work with. |
cells :: array of LuaLogisticCell [R] | All cells in this network. |
providers :: array of LuaEntity [R] | All entities that have logistic provider points in this network. |
empty_providers :: array of LuaEntity [R] | All entities that have empty logistic provider points in this network. |
requesters :: array of LuaEntity [R] | All entities that have logistic requester points in this network. |
storages :: array of LuaEntity [R] | All entities that have logistic storage points in this network. |
logistic_members :: array of LuaEntity [R] | All other entities that have logistic points in this network (inserters mostly). |
provider_points :: array of LuaLogisticPoint [R] | All things that have provider points in this network. |
passive_provider_points :: array of LuaLogisticPoint [R] | All passive provider points in this network. |
active_provider_points :: array of LuaLogisticPoint [R] | All active provider points in this network. |
empty_provider_points :: array of LuaLogisticPoint [R] | All things that have empty provider points in this network. |
requester_points :: array of LuaLogisticPoint [R] | All things that have requester points in this network. |
storage_points :: array of LuaLogisticPoint [R] | All things that have storage points in this network. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
owner :: LuaEntity [R] | The LuaEntity owner of this LuaLogisticPoint. |
logistic_network :: LuaLogisticNetwork [R] | |
logistic_member_index :: uint [R] | The Logistic member index of this logistic point. |
filters :: array of LogisticFilter [R] | The logistic filters for this logistic point or nil if this doesn't use logistic filters. |
mode :: defines.logistic_mode [R] | The logistic mode. |
force :: LuaForce [R] | The force of this logistic point. |
targeted_items_pickup :: dictionary string → uint [R] | Items targeted to be picked up from this logistic point by robots. |
targeted_items_deliver :: dictionary string → uint [R] | Items targeted to be dropped off into this logistic point by robots. |
exact :: boolean [R] | If this logistic point is using the exact mode. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
mod :: string [R] | The mod that owns this setting. |
setting_type :: string [R] | |
default_value :: boolean or double or int or string [R] | The default value of this setting. |
minimum_value :: double or int [R] | The minimum value for this setting or nil if this setting type doesn't support a minimum. |
maximum_value :: double or int [R] | The maximum value for this setting or nil if this setting type doesn't support a maximum. |
allowed_values :: array of string or array of int or array of double [R] | The allowed values for this setting or nil if this setting doesn't use the a fixed set of values. |
allow_blank :: boolean [R] | If this string setting allows blank values or nil if not a string setting. |
auto_trim :: boolean [R] | If this string setting auto-trims values or nil if not a string setting. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
add_player(player) → boolean | Adds the given player to this group. |
remove_player(player) → boolean | Removes the given player from this group. |
allows_action(action) → boolean | If this group allows the given action. |
set_allows_action(action, boolean) → boolean | Sets if the player is allowed to perform the given action. |
destroy() → boolean | Destroys this group. |
name :: string [RW] | The name of this group. |
players :: array of LuaPlayer [R] | The players in this group. |
group_id :: uint [R] | The group ID |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
create_group(name) → LuaPermissionGroup | Creates a new permission group. |
get_group(group) → LuaPermissionGroup | Gets the permission group with the given name or group ID or nil if there is no matching group. |
groups :: array of LuaPermissionGroup [R] | All of the permission groups. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
set_ending_screen_data(message, file) | Setup the screen to be shown when the game is finished. |
print(message, color) | Print text to the chat console. |
clear_console() | Clear the chat console. |
get_goal_description() → LocalisedString | 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_controller{type=…, character=…} | Set the controller type of the player. |
disable_recipe_groups() | Disable recipe groups. |
enable_recipe_groups() | Enable recipe groups. |
disable_recipe_subgroups() | Disable recipe subgroups. |
enable_recipe_subgroups() | Enable recipe subgroups. |
print_entity_statistics(entities) | Print entity statistics to the player's console. |
unlock_achievement(name) | Unlock the achievements of the given player. |
clean_cursor() → boolean | Invokes the "clean cursor" action on the player as if the user pressed it. |
create_character(character) | 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. |
add_custom_alert(entity, icon, message, show_on_map) | 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. |
get_alerts{entity=…, prototype=…, position=…, type=…, surface=…} → dictionary uint → dictionary defines.alert_type → array of alert | Gets all alerts matching the given filters or if no filters are given all alerts are returned. |
mute_alert(alert_type) → boolean | Mutes alerts for the given alert category. |
unmute_alert(alert_type) → boolean | Unmutes alerts for the given alert category. |
is_alert_muted(alert_type) → boolean | If the given alert type is currently muted. |
enable_alert(alert_type) → boolean | Enables alerts for the given alert category. |
disable_alert(alert_type) → boolean | Disables alerts for the given alert category. |
is_alert_enabled(alert_type) → boolean | 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. |
can_place_entity{name=…, position=…, direction=…} → boolean | Checks if this player can build the give 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. |
build_from_cursor{position=…, direction=…, alt=…, terrain_building_size=…, skip_fog_of_war=…} | Builds what ever is in the cursor on the surface the player is on. |
play_sound{path=…, position=…, volume_modifier=…} → boolean | Plays a sound for this player |
get_associated_characters() | The characters associated with this player. |
associate_character(character) | Associates a character with this player. |
disassociate_character(character) | Disassociates a character from this player. |
character :: LuaEntity [RW] | The character attached to this player, or nil if no character. |
index :: uint [R] | This player's index in LuaGameScript::players. |
gui :: LuaGui [R] | |
opened_self :: boolean [R] | true if the player opened itself. |
controller_type :: defines.controllers [R] | |
game_view_settings :: GameViewSettings [RW] | The player's game view settings. |
minimap_enabled :: boolean [RW] | true if the minimap is visible. |
color :: Color [RW] | The colour associated with the player. |
chat_color :: Color [RW] | The color used when this player talks in game. |
name :: string [RW] | The player's username. |
tag :: string [RW] | The tag that is shown after the player in chat and on the map. |
connected :: boolean [R] | true if the player is currently connected to the game. |
admin :: boolean [RW] | true if the player is an admin. |
entity_copy_source :: LuaEntity [R] | The source entity used during entity settings copy-paste if any. |
afk_time :: uint [R] | How many ticks since the last action of this player |
online_time :: uint [R] | How many ticks did this player spend playing this save (all sessions combined) |
permission_group :: LuaPermissionGroup [RW] | The permission group this player is part of or nil if not part of any group. |
mod_settings [R] | |
ticks_to_respawn :: uint [RW] | The number of ticks until this player will respawn or nil if not waiting to respawn. |
display_resolution :: DisplayResolution [R] | The display resolution for this player. |
display_scale :: double [R] | The display scale for this player. |
blueprint_to_setup :: LuaItemStack [R] | The item stack containing a blueprint to be setup. |
zoom :: double [W] | The player's zoom-level. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
operator ()(lower, upper) → double | Generates a random number. |
re_seed(seed) | Re-seeds the random generator with the given value. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
reload() | Reload the recipe from the prototype. |
name :: string [R] | Name of the recipe. |
localised_name :: LocalisedString [R] | Localised name of the recipe. |
localised_description :: LocalisedString [R] | |
prototype :: LuaRecipePrototype [R] | The prototype for this recipe. |
enabled :: boolean [RW] | Can the recipe be used? |
category :: string [R] | Category of the recipe. |
ingredients :: array of Ingredient [R] | Ingredients for this recipe. |
products :: array of Product [R] | The results of this recipe. |
hidden :: boolean [R] | Is the recipe hidden? |
hidden_from_flow_stats :: boolean [RW] | Is the recipe hidden from flow statistics? |
energy :: double [R] | Energy required to execute this recipe. |
order :: string [R] | Order string. |
group :: LuaGroup [R] | Group of this recipe. |
subgroup :: LuaGroup [R] | Subgroup of this recipe. |
force :: LuaForce [R] | The force that owns this recipe. |
catalysts [R] | Things that are both in the ingredient and products, these are not counted towards production/consumption statistics. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
enabled :: boolean [R] | If this recipe prototype is enabled by default (enabled at the beginning of a game). |
name :: string [R] | Name of the recipe. |
localised_name :: LocalisedString [R] | Localised name of the recipe. |
localised_description :: LocalisedString [R] | |
category :: string [R] | Category of the recipe. |
ingredients :: array of Ingredient [R] | Ingredients for this recipe. |
products :: array of Product [R] | The results of this recipe. |
hidden :: boolean [R] | Is the recipe hidden? |
hidden_from_flow_stats :: boolean [R] | Is the recipe hidden from flow statistics? |
always_show_made_in :: boolean [R] | Should this recipe always show "made-in" in the tooltip? |
energy :: double [R] | Energy required to execute this recipe. |
order :: string [R] | Order string. |
group :: LuaGroup [R] | Group of this recipe. |
subgroup :: LuaGroup [R] | Subgroup of this recipe. |
request_paste_multiplier :: uint [R] | The multiplier used when this recipe is copied from an assembling machine to a requester chest. |
overload_multiplier :: uint [R] | Used to determine how many extra items are put into an assembling machine before it's considered "full enough". |
allow_as_intermediate :: boolean [R] | If this recipe is enabled for the purpose of intermediate hand-crafting. |
emissions_multiplier :: double [R] | The emissions multiplier for this recipe. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
add_interface(name, functions) | Add a remote interface. |
remove_interface(name) → boolean | Removes an interface with the given name. |
call(interface, function, ...) | Call a function of an interface. |
interfaces :: dictionary string → dictionary string → boolean [R] | List of all registered interfaces. |
get_player_settings(player) | |
startup :: custom dictionary string → ModSetting [R] | |
global :: custom dictionary string → ModSetting [R] | |
player :: custom dictionary string → ModSetting [R] |
gui :: LuaGui [R] | Gui of the LuaGuiElement of this style. |
name :: string [R] | Name of this style. |
minimal_width :: int [RW] | |
maximal_width :: int [RW] | |
minimal_height :: int [RW] | |
maximal_height :: int [RW] | |
top_padding :: int [RW] | |
right_padding :: int [RW] | |
bottom_padding :: int [RW] | |
left_padding :: int [RW] | |
align :: string [RW] | Horizontal align of the inner content of the widget, possible values are "left", "center" or "right" |
vertical_align :: string [RW] | Vertical align of the inner content of the widget, possible values are "top", "center" or "bottom" |
font_color :: Color [RW] | |
font :: string [RW] | |
cell_spacing :: int [RW] | Space between the table cell contents and border. |
visible :: boolean [RW] | When not visible the GUI element is hidden completely and takes no space in the layout. |
scaleable :: boolean [RW] | If the GUI element uses additional scaling depending on the screen resolution. |
horizontally_stretchable :: boolean [RW] | If the GUI element stretches its size horizontally to other elements |
vertically_stretchable :: boolean [RW] | If the GUI element stretches its size vertically to other elements |
horizontally_squashable :: boolean [RW] | If the GUI element can be squashed (by maximal with of some parent element) horizontally This is mainly meant to be used for scroll-pane The default value is false |
vertically_squashable :: boolean [RW] | If the GUI element can be squashed (by maximal height of some parent element) vertically This is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwise |
hovered_font_color :: Color [RW] | |
clicked_font_color :: Color [RW] | |
disabled_font_color :: Color [RW] | |
pie_progress_color :: Color [RW] | |
horizontal_spacing :: int [RW] | Horizontal space between individual cells. |
vertical_spacing :: int [RW] | Vertical space between individual cells. |
title_top_padding :: uint [RW] | |
title_right_padding :: uint [RW] | |
title_bottom_padding :: uint [RW] | |
title_left_padding :: uint [RW] | |
selection_background_color :: Color [RW] | The background color when selecting text. |
color :: Color [RW] | |
column_alignments :: custom array of Alignment [R] | Alignments of columns of the table |
horizontal_scrollbar_spacing :: int [RW] | |
vertical_scrollbar_spacing :: int [RW] | |
single_line :: boolean [RW] | |
want_ellipsis :: boolean [RW] | |
width :: int [W] | Sets both minimal and maximal width to the given value |
height :: int [W] | Sets both minimal and maximal height to the given value |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_pollution(position) → double | Get the pollution for a given position. |
can_place_entity{name=…, position=…, direction=…, force=…, build_check_type=…, forced=…} → boolean | 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 the given entity parameters. |
find_entity(entity, position) → LuaEntity | Find a specific entity at a specific position. |
find_entities(area) → array of LuaEntity | Find entities in a given area. |
find_entities_filtered{area=…, position=…, name=…, type=…, ghost_name=…, ghost_type=…, force=…, limit=…, invert=…} → array of LuaEntity | Find entities of given type or name in a given area. |
find_tiles_filtered{area=…, name=…, limit=…, has_hidden_tile=…, collision_mask=…} → array of LuaTile | Find tiles of a given name in a given area. |
count_entities_filtered{area=…, position=…, name=…, type=…, ghost_name=…, ghost_type=…, force=…, limit=…, invert=…} → uint | Count entities of given type or name in a given area. |
count_tiles_filtered{area=…, name=…, limit=…, has_hidden_tile=…, collision_mask=…} → uint | Count tiles of a given name in a given area. |
find_non_colliding_position(name, center, radius, precision) → Position | Find a non-colliding position within a given rectangle. |
spill_item_stack(position, items, enable_looted, force) | Spill items on the ground centered at a given location. |
find_enemy_units(center, radius, force) → array of LuaEntity | Find units enemy of a given force within an area. |
find_nearest_enemy{position=…, max_distance=…, force=…} → LuaEntity | Find the enemy closest to the given position. |
set_multi_command{command=…, unit_count=…, force=…, unit_search_distance=…} → uint | Give a command to multiple units. |
create_entity{name=…, position=…, direction=…, force=…, target=…, source=…, fast_replace=…, player=…, spill=…} → LuaEntity | Create an entity on this surface. |
create_trivial_smoke{name=…, position=…} | |
create_unit_group{position=…, force=…} → LuaUnitGroup | Create a new unit group at a given position. |
build_enemy_base(position, unit_count, force) | Send a group to build a new base. |
get_tile(x, y) → LuaTile | Get the tile at a given position. |
set_tiles(tiles, correct_tiles) | Set tiles at specified locations. |
pollute(source, amount) | Spawn pollution at the given position. |
get_chunks() → LuaChunkIterator | Get an iterator going over every chunk on this surface. |
is_chunk_generated(position) → boolean | 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. |
force_generate_chunk_requests() | 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. |
find_logistic_network_by_position(position, force) → LuaLogisticNetwork | Find the logistic network that covers a given position. |
find_logistic_networks_by_construction_area(position, force) → array of LuaLogisticNetwork | Finds all of the logistics networks whose construction area intersects with the given position. |
deconstruct_area{area=…, force=…, player=…} | Place a deconstruction request. |
cancel_deconstruct_area{area=…, force=…, player=…} | Cancel a deconstruction order. |
get_hidden_tile(position) | The hidden tile name or nil if there isn't one for the given position. |
set_hidden_tile(position, tile) | |
get_connected_tiles(position, tiles) → array of 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_decorative(decoratives, chunks) | Regenerate autoplacement of some decoratives on this surface. |
print(message, color) | Print text to the chat console of all players on this surface. |
destroy_decoratives(area) | Removes all decoratives from the given area. |
create_decoratives{check_collision=…, decoratives=…} | Adds the given decoratives to the surface. |
get_trains(force) → array of LuaTrain | |
clear_pollution() | Clears all pollution on this surface. |
play_sound{path=…, position=…, volume_modifier=…} → boolean | Plays a sound on this surface. |
get_tile_properties(position) | Gets the tile properties for a given tile. |
get_resource_counts() | Gets the resource amount of all resources on this surface |
get_random_chunk() | Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface. |
name :: string [R] | The name of this surface. |
index :: uint [R] | Unique ID associated with this surface. |
map_gen_settings :: MapGenSettings [RW] | The generation settings for the surface. |
always_day :: boolean [RW] | When set to true, the sun will always shine. |
daytime :: float [RW] | Current time of day, as a number in range [0, 1). |
darkness :: float [R] | Amount of darkness at the current time. |
wind_speed :: float [RW] | Current wind speed. |
wind_orientation :: float [RW] | Current wind direction. |
wind_orientation_change :: float [RW] | Change in wind orientation per tick. |
peaceful_mode :: boolean [RW] | Is peaceful mode enabled on this surface? |
freeze_daytime :: boolean [RW] | True if daytime is currently frozen. |
ticks_per_day :: uint [RW] | The number of ticks per day for this surface. |
dusk :: double [RW] | The daytime when dusk starts. |
dawn :: double [RW] | The daytime when dawn starts. |
evening :: double [RW] | The daytime when evening starts. |
morning :: double [RW] | The daytime when morning starts. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
reload() | Reload this technology from its prototype. |
force :: LuaForce [R] | The force this technology belongs to. |
name :: string [R] | Name of this technology. |
localised_name :: LocalisedString [R] | Localised name of this technology. |
localised_description :: LocalisedString [R] | |
prototype :: LuaTechnologyPrototype [R] | The prototype of this technology. |
enabled :: boolean [RW] | Can this technology be researched? |
upgrade :: boolean [R] | Is this an upgrade-type research? |
researched :: boolean [RW] | Has this technology been researched? |
prerequisites :: dictionary string → LuaTechnology [R] | Prerequisites of this technology. |
research_unit_ingredients :: array of Ingredient [R] | Ingredients labs will require to research this technology. |
effects :: array of Modifier [R] | Effects applied when this technology is researched. |
research_unit_count :: uint [R] | Number of research units required for this technology. |
research_unit_energy :: double [R] | Amount of energy required to finish a unit of research. |
order :: string [R] | Order string for this prototype. |
level :: uint [RW] | The current level of this technology. |
research_unit_count_formula :: string [R] | The count formula used for this infinite research or nil if this isn't an infinite research. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this technology. |
localised_name :: LocalisedString [R] | Localised name of this technology. |
localised_description :: LocalisedString [R] | |
enabled :: boolean [R] | If this technology prototype is enabled by default (enabled at the beginning of a game). |
upgrade :: boolean [R] | If the is technology prototype is an upgrade to some other technology. |
prerequisites :: dictionary string → LuaTechnologyPrototype [R] | Prerequisites of this technology. |
research_unit_ingredients :: array of Ingredient [R] | Ingredients labs will require to research this technology. |
effects :: array of Modifier [R] | Effects applied when this technology is researched. |
research_unit_count :: uint [R] | Number of research units required for this technology. |
research_unit_energy :: double [R] | Amount of energy required to finish a unit of research. |
order :: string [R] | Order string for this prototype. |
level :: uint [R] | The level of this research. |
max_level :: uint [R] | The max level of this research. |
research_unit_count_formula :: string [R] | The count formula used for this infinite research or nil if this isn't an infinite research. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
collides_with(layer) | What type of things can collide with this tile? |
order_deconstruction(force, player) → LuaEntity | Orders deconstruction of this tile by the given force. |
cancel_deconstruction(force, player) | Cancels deconstruction if it is scheduled, does nothing otherwise. |
name :: string [R] | Prototype name of this tile. |
prototype :: LuaTilePrototype [R] | |
position :: Position [R] | The position this tile references. |
hidden_tile :: string (optional) [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
collision_mask :: dictionary string → boolean [R] | The collision mask this tile uses
The boolean values for each item are meaningless and will always be true . |
layer :: uint [R] | |
autoplace_specification :: AutoplaceSpecification [R] | Autoplace specification for this prototype. |
walking_speed_modifier :: float [R] | |
vehicle_friction_modifier :: float [R] | |
map_color :: Color [R] | |
decorative_removal_probability :: float [R] | The probability that decorative entities will be removed from on top of this tile when this tile is generated. |
automatic_neighbors :: boolean [R] | |
allowed_neighbors :: dictionary string → LuaTilePrototype [R] | |
needs_correction :: boolean [R] | If this tile needs correction logic applied when it's generated in the world. |
mineable_properties [R] | |
next_direction :: LuaTilePrototype [R] | The next direction of this tile or nil - used when a tile has multiple directions (such as hazard concrete)
|
items_to_place_this :: dictionary string → LuaItemPrototype [R] | Items that when placed will produce this tile. |
can_be_part_of_blueprint :: boolean [R] | False if this tile is not allowed in blueprints regardless of the ability to build it. |
emissions_per_tick :: double [R] | Amount of pollution emissions per tick this tile will absorb. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
get_item_count(item) → uint | Get the amount of a particular item stored in the train. |
get_contents() → dictionary string → uint | Get a mapping of the train's inventory. |
remove_item(stack) → uint | Remove some items from the train. |
insert(stack) | Insert a stack into the train. |
clear_items_inside() | 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. |
get_fluid_count(fluid) → double | 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. |
remove_fluid(fluid) → double | Remove some fluid from the train. |
insert_fluid(fluid) → double | Inserts the given fluid into the first available location in this train. |
clear_fluids_inside() | Clears all fluids in this train. |
manual_mode :: boolean [RW] | When true , the train is explicitly controlled by the player or script. |
speed :: double [RW] | Current speed. |
weight :: double [R] | The weight of this train. |
carriages :: array of LuaEntity [R] | Rolling stocks the train is composed of. |
locomotives :: dictionary string → array of LuaEntity [R] | Arrays of locomotives. |
cargo_wagons :: array of LuaEntity [R] | The cargo carriages the train contains. |
fluid_wagons :: array of LuaEntity [R] | The fluid carriages the train contains. |
schedule :: TrainSchedule [RW] | The trains current schedule. |
state :: defines.train_state [R] | This train's current state. |
front_rail :: LuaEntity [R] | The rail at the front end of the train, possibly nil . |
back_rail :: LuaEntity [R] | The rail at the back end of the train, possibly nil . |
rail_direction_from_front_rail :: defines.rail_direction [R] | |
rail_direction_from_back_rail :: defines.rail_direction [R] | |
front_stock :: LuaEntity [R] | The front stock of this train or nil . |
back_stock :: LuaEntity [R] | The back stock of this train or nil . |
station :: LuaEntity [R] | The train stop this train is stopped at or nil . |
has_path :: boolean [R] | If this train has a path. |
path_end_rail :: LuaEntity [R] | The destination rail this train is currently pathing to or nil . |
path_end_stop :: LuaEntity [R] | The destination train stop this train is currently pathing to or nil . |
id :: uint [R] | The unique train ID. |
passengers :: array of LuaPlayer [R] | The player passengers on the train |
riding_state :: RidingState [R] | The riding state of this train. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
clear() | Remove all items from this transport line. |
get_item_count(item) → uint | Count some or all items on this line. |
remove_item(items) → uint | Remove some items from this line. |
can_insert_at(position) → boolean | 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? |
insert_at(position, items) → boolean | Insert items at a given position. |
insert_at_back(items) → boolean | Insert items at the back of this line. |
get_contents() → dictionary string → uint | Get counts of all items on this line. |
operator # :: uint [R] | Get the number of items on this transport line. |
owner :: LuaEntity [R] | The entity this transport line belongs to. |
operator [] :: LuaItemStack [R] | The indexing operator. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
add_member(unit) | Make a unit a member of this group. |
set_command(command) | Give this group a command. |
set_autonomous() | Make this group autonomous. |
start_moving() | Make the group start moving even if some of its members haven't yet arrived. |
destroy() | Dissolve this group. |
members :: array of LuaEntity [R] | Members of this group. |
position :: Position [R] | Group position. |
state :: defines.group_state [R] | Whether this group is gathering, moving or attacking. |
force :: LuaForce [R] | The force of this unit group. |
surface :: LuaSurface [R] | The surface of this unit group. |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |
name :: string [R] | Name of this prototype. |
order :: string [R] | Order string of this prototype. |
localised_name :: LocalisedString [R] | |
localised_description :: LocalisedString [R] | |
special :: boolean [R] | If this is a special signal |
subgroup :: LuaGroup [R] | |
valid :: boolean [R] | Is this object valid? |
help() → string | All methods, and properties that this object supports. |