{"application":"factorio","application_version":"2.0.7","api_version":6,"stage":"runtime","classes":[{"name":"LuaAISettings","order":0,"description":"Collection of settings for overriding default ai behavior.","abstract":false,"methods":[],"attributes":[{"name":"allow_destroy_when_commands_fail","order":0,"description":"If enabled, units that repeatedly fail to succeed at commands will be destroyed.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"allow_try_return_to_spawner","order":1,"description":"If enabled, units that have nothing else to do will attempt to return to a spawner.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"do_separation","order":2,"description":"If enabled, units will try to separate themselves from nearby friendly units.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"path_resolution_modifier","order":3,"description":"Defines how coarse the pathfinder's grid is, where smaller values mean a coarser grid. Defaults to `0`, which equals a resolution of `1x1` tiles, centered on tile centers. Values range from `-8` to `8` inclusive, where each integer increment doubles/halves the resolution. So, a resolution of `-8` equals a grid of `256x256` tiles, and a resolution of `8` equals `1/256` of a tile.","read_type":"int8","write_type":"int8","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAccumulatorControlBehavior","order":1,"description":"Control behavior for accumulators.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"output_signal","order":1,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"read_charge","order":0,"description":"`true` if this accumulator sends its charge percent to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAchievementPrototype","order":2,"description":"Prototype of a achievement.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"allowed_without_fight","order":0,"description":"","read_type":"boolean","optional":false},{"name":"alternative_armor","order":17,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"ammo_type","order":38,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"amount","order":2,"description":"","read_type":"uint","optional":true},{"name":"armor","order":16,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"count","order":7,"description":"","read_type":"uint","optional":true},{"name":"damage_dealer","order":20,"description":"","read_type":"LuaEntityPrototype","optional":true},{"name":"damage_type","order":19,"description":"","read_type":"LuaDamagePrototype","optional":true},{"name":"dont_build","order":9,"description":"","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true},{"name":"dont_research","order":12,"description":"","read_type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true},{"name":"excluded","order":10,"description":"","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true},{"name":"fluid_product","order":34,"description":"","read_type":"LuaFluidPrototype","optional":true},{"name":"in_vehicle","order":23,"description":"","read_type":"boolean","optional":true},{"name":"included","order":11,"description":"","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true},{"name":"item_product","order":32,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"last_hour_only","order":14,"description":"","read_type":"boolean","optional":true},{"name":"limit_equip_quality","order":28,"description":"","read_type":"LuaQualityPrototype","optional":true},{"name":"limit_quality","order":18,"description":"","read_type":"LuaQualityPrototype","optional":true},{"name":"limited_to_one_game","order":3,"description":"","read_type":"boolean","optional":true},{"name":"minimum_damage","order":29,"description":"","read_type":"float","optional":true},{"name":"minimum_distance","order":39,"description":"","read_type":"double","optional":true},{"name":"minimum_energy_produced","order":15,"description":"","read_type":"double","optional":true},{"name":"module","order":27,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"more_than_manually","order":8,"description":"","read_type":"boolean","optional":true},{"name":"not_to_kill","order":25,"description":"","read_type":"LuaEntityPrototype","optional":true},{"name":"object_name","order":42,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"objective_condition","order":1,"description":"","read_type":"string","optional":true},{"name":"personally","order":22,"description":"","read_type":"boolean","optional":true},{"name":"quality","order":33,"description":"","read_type":"LuaQualityPrototype","optional":true},{"name":"research_all","order":36,"description":"","read_type":"boolean","optional":true},{"name":"research_with","order":13,"description":"","read_type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true},{"name":"science_pack","order":37,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"should_survive","order":30,"description":"","read_type":"boolean","optional":true},{"name":"surface","order":6,"description":"","read_type":"string","optional":true},{"name":"technology","order":35,"description":"","read_type":"LuaTechnologyPrototype","optional":true},{"name":"to_build","order":5,"description":"","read_type":"LuaEntityPrototype","optional":true},{"name":"to_kill","order":21,"description":"","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true},{"name":"to_use","order":40,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"type_not_to_kill","order":26,"description":"","read_type":"string","optional":true},{"name":"type_of_dealer","order":31,"description":"","read_type":"string","optional":true},{"name":"type_to_kill","order":24,"description":"","read_type":"string","optional":true},{"name":"valid","order":41,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"within","order":4,"description":"","read_type":"uint","optional":true}],"operators":[]},{"name":"LuaActiveTriggerPrototype","order":3,"description":"Prototype of an Active Trigger.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"fork_chance","order":4,"description":"The chance that a new fork will spawn after each jump [0,1]. default = 0.","read_type":"double","optional":false},{"name":"jump_delay_ticks","order":3,"description":"The tick delay between each jump. 0 = all jumps instantaneous. default = 0.","read_type":"uint","optional":false},{"name":"max_forks","order":6,"description":"maximum number of forks allowed to spawn for the entire chain. default = infinity.","read_type":"uint","optional":false},{"name":"max_forks_per_jump","order":5,"description":"The maximum number of forks that can spawn from a single jump. default = 1.","read_type":"uint","optional":false},{"name":"max_jumps","order":0,"description":"The max number of jumps per trigger. default = 5.","read_type":"uint","optional":false},{"name":"max_range","order":2,"description":"The max distance jumps are allowed to travel away from the original target. default = infinity.","read_type":"double","optional":false},{"name":"max_range_per_jump","order":1,"description":"The max length of jumps. default = 5.","read_type":"double","optional":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAgriculturalTowerControlBehavior","order":4,"description":"Control behavior for agricultural tower","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_contents","order":0,"description":"`true` if the agricultural tower reads seeds and harvested plants.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAirbornePollutantPrototype","order":5,"description":"Airborne pollutant prototype.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"affects_evolution","order":1,"description":"","read_type":"boolean","optional":false},{"name":"chart_color","order":0,"description":"","read_type":"Color","optional":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAmmoCategoryPrototype","order":6,"description":"Prototype of a ammo category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"bonus_gui_order","order":0,"description":"","read_type":"string","optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaArithmeticCombinatorControlBehavior","order":7,"description":"Control behavior for arithmetic combinators.","parent":"LuaCombinatorControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"parameters","order":0,"description":"This arithmetic combinator's parameters. Writing `nil` clears the combinator's parameters.","read_type":"ArithmeticCombinatorParameters","write_type":"ArithmeticCombinatorParameters","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaArtilleryTurretControlBehavior","order":8,"description":"Control behavior for artillery turrets.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_ammo","order":0,"description":"`true` if the turret will send the ammunition or fluid it contains to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAssemblingMachineControlBehavior","order":9,"description":"Control behavior for assembling machines.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_read_contents","order":1,"description":"`true` if the assembling machine reads its ingredients contents, product contents, materials in crafting and trash inventories.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_read_ingredients","order":2,"description":"`true` if the assembling machine outputs ingredients of current recipe as a signals to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_read_recipe_finished","order":3,"description":"`true` if the the assembling machine sends a signal when the recipe finishes.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_read_working","order":5,"description":"`true` if the the assembling machine sends a signal when it is working.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_recipe_finished_signal","order":4,"description":"The signal sent when the assembling machine finishes a recipe.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"circuit_set_recipe","order":0,"description":"`true` if the assembling machine sets its recipe from the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_working_signal","order":6,"description":"The signal sent when the assembling machine is working.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAsteroidChunkPrototype","order":10,"description":"Prototype of an asteroid chunk.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"collision_box","order":0,"description":"","read_type":"BoundingBox","optional":false},{"name":"hide_from_signal_gui","order":2,"description":"","read_type":"boolean","optional":false},{"name":"item_signal_alias","order":3,"description":"","read_type":"LuaItemPrototype","optional":true},{"name":"mineable_properties","order":1,"description":"","read_type":"MineableProperties","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAsteroidCollectorControlBehavior","order":11,"description":"Control behavior for asteroid collectors.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_content","order":1,"description":"`true` if this asteroid collector reads its content and sends it to a circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"set_filter","order":0,"description":"`true` if this asteroid collector has filters set from circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaAutoplaceControlPrototype","order":12,"description":"Prototype of an autoplace control.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"can_be_disabled","order":1,"description":"","read_type":"boolean","optional":false},{"name":"category","order":2,"description":"Category name of this prototype.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"resource"},{"complex_type":"literal","value":"terrain"},{"complex_type":"literal","value":"cliff"},{"complex_type":"literal","value":"enemy"}],"full_format":false},"optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"richness","order":0,"description":"","read_type":"boolean","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaBootstrap","order":13,"description":"Entry point for registering event handlers. It is accessible through the global object named `script`.","abstract":false,"methods":[{"name":"generate_event_name","order":7,"description":"Generate a new, unique event ID that can be used to raise custom events with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event).","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The newly generated event ID.","type":"uint","optional":false}]},{"name":"get_event_filter","order":11,"description":"Gets the filters for the given event.","parameters":[{"name":"event","order":0,"description":"ID of the event to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The filters or `nil` if none are defined.","type":"EventFilter","optional":true}]},{"name":"get_event_handler","order":8,"description":"Find the event handler for an event.","parameters":[{"name":"event","order":0,"description":"The event identifier to get a handler for.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Reference to the function currently registered as the handler, if it was found.","type":{"complex_type":"function","parameters":["EventData"]},"optional":true}]},{"name":"get_event_order","order":9,"description":"Gets the mod event order as a string.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"on_configuration_changed","order":2,"description":"Register a function to be run when mod configuration changes.\n\nThis is called when the game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, when any prototypes have been added or removed, or when a migration was applied. It allows the mod to make any changes it deems appropriate to both the data structures in its [storage](runtime:storage) table or to the game state through [LuaGameScript](runtime:LuaGameScript).\n\nFor more context, refer to the [Data Lifecycle](runtime:data-lifecycle) page.","parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["ConfigurationChangedData"]},"nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"on_event","order":3,"description":"Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.","examples":["```\n-- Register for the on_tick event to print the current tick to console each tick\nscript.on_event(defines.events.on_tick,\nfunction(event) game.print(event.tick) end)\n```","```\n-- Register for the on_built_entity event, limiting it to only be received when a `\"fast-inserter\"` is built\nscript.on_event(defines.events.on_built_entity,\nfunction(event) game.print(\"Gotta go fast!\") end,\n{{filter = \"name\", name = \"fast-inserter\"}})\n```"],"parameters":[{"name":"event","order":0,"description":"The event(s) or custom-input to invoke the handler on.","type":{"complex_type":"union","options":["defines.events","string",{"complex_type":"array","value":{"complex_type":"union","options":["defines.events","string"],"full_format":false}}],"full_format":false},"optional":false},{"name":"filters","order":2,"description":"The filters for this event. Can only be used when registering for individual events.","type":"EventFilter","optional":true},{"name":"handler","order":1,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["EventData"]},"nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"on_init","order":0,"description":"Register a function to be run on mod initialization.\n\nThis is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to [LuaGameScript](runtime:LuaGameScript) and the [storage](runtime:storage) table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.\n\nFor more context, refer to the [Data Lifecycle](runtime:data-lifecycle) page.","examples":["```\n-- Initialize a `players` table in `storage` for later use\nscript.on_init(function()\n  storage.players = {}\nend)\n```"],"parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":[]},"nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"on_load","order":1,"description":"Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session.\n\nIt gives the mod the opportunity to rectify potential differences in local state introduced by the save/load cycle. Doing anything other than the following three will lead to desyncs, breaking multiplayer and replay functionality. Access to [LuaGameScript](runtime:LuaGameScript) is not available. The [storage](runtime:storage) table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.\n\nThe only legitimate uses of this event are these:\n\n- Re-setup [metatables](https://www.lua.org/pil/13.html) as they are not persisted through the save/load cycle.\n\n- Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.\n\n- Create local references to data stored in the [storage](runtime:storage) table.\n\nFor all other purposes, [LuaBootstrap::on_init](runtime:LuaBootstrap::on_init), [LuaBootstrap::on_configuration_changed](runtime:LuaBootstrap::on_configuration_changed) or [migrations](runtime:migrations) should be used instead.\n\nFor more context, refer to the [Data Lifecycle](runtime:data-lifecycle) page.","parameters":[{"name":"handler","order":0,"description":"The handler for this event. Passing `nil` will unregister it.","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":[]},"nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"on_nth_tick","order":4,"description":"Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.","parameters":[{"name":"handler","order":1,"description":"The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).","type":{"complex_type":"union","options":[{"complex_type":"function","parameters":["NthTickEventData"]},"nil"],"full_format":false},"optional":false},{"name":"tick","order":0,"description":"The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.","type":{"complex_type":"union","options":["uint",{"complex_type":"array","value":"uint"},"nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"raise_biter_base_built","order":16,"description":"","raises":[{"name":"on_biter_base_built","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was built.","type":"LuaEntity","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_console_chat","order":13,"description":"","raises":[{"name":"on_console_chat","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"message","order":1,"description":"The chat message to send.","type":"string","optional":false},{"name":"player_index","order":0,"description":"The player doing the chatting.","type":"uint","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_event","order":12,"description":"Raise an event. Only events generated with [LuaBootstrap::generate_event_name](runtime:LuaBootstrap::generate_event_name) and the following can be raised:","lists":["Events that can be raised manually:\n\n- [on_console_chat](runtime:on_console_chat)\n- [on_player_crafted_item](runtime:on_player_crafted_item)\n- [on_player_fast_transferred](runtime:on_player_fast_transferred)\n- [on_biter_base_built](runtime:on_biter_base_built)\n- [on_market_item_purchased](runtime:on_market_item_purchased)\n- [script_raised_built](runtime:script_raised_built)\n- [script_raised_destroy](runtime:script_raised_destroy)\n- [script_raised_revive](runtime:script_raised_revive)\n- [script_raised_teleported](runtime:script_raised_teleported)\n- [script_raised_set_tiles](runtime:script_raised_set_tiles)"],"examples":["```\n-- Raise the on_console_chat event with the desired message 'from' the first player\nlocal data = {player_index = 1, message = \"Hello friends!\"}\nscript.raise_event(defines.events.on_console_chat, data)\n```"],"parameters":[{"name":"data","order":1,"description":"Table with extra data that will be passed to the event handler. Any invalid LuaObjects will silently stop the event from being raised.","type":"table","optional":false},{"name":"event","order":0,"description":"ID or name of the event to raise.","type":{"complex_type":"union","options":["uint","string"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"raise_market_item_purchased","order":17,"description":"","raises":[{"name":"on_market_item_purchased","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"count","order":3,"description":"The amount of offers purchased.","type":"uint","optional":false},{"name":"market","order":1,"description":"The market entity.","type":"LuaEntity","optional":false},{"name":"offer_index","order":2,"description":"The index of the offer purchased.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player who did the purchasing.","type":"uint","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_player_crafted_item","order":14,"description":"","raises":[{"name":"on_player_crafted_item","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"item_stack","order":0,"description":"The item that has been crafted.","type":"LuaItemStack","optional":false},{"name":"player_index","order":1,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe used to craft this item.","type":"RecipeID","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_player_fast_transferred","order":15,"description":"","raises":[{"name":"on_player_fast_transferred","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":1,"description":"The entity transferred from or to.","type":"LuaEntity","optional":false},{"name":"from_player","order":2,"description":"Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.","type":"boolean","optional":false},{"name":"is_split","order":3,"description":"Whether the transfer was a split action (half stack).","type":"boolean","optional":false},{"name":"player_index","order":0,"description":"The player transferred from or to.","type":"uint","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_script_built","order":18,"description":"","raises":[{"name":"script_raised_built","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that has been built.","type":"LuaEntity","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_script_destroy","order":19,"description":"","raises":[{"name":"script_raised_destroy","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was destroyed.","type":"LuaEntity","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_script_revive","order":20,"description":"","raises":[{"name":"script_raised_revive","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was revived.","type":"LuaEntity","optional":false},{"name":"tags","order":1,"description":"The tags associated with this entity, if any.","type":"Tags","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_script_set_tiles","order":22,"description":"","raises":[{"name":"script_raised_set_tiles","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"surface_index","order":0,"description":"The surface whose tiles have been changed.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The tiles that have been changed.","type":{"complex_type":"array","value":"Tile"},"optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"raise_script_teleported","order":21,"description":"","raises":[{"name":"script_raised_teleported","order":0,"description":"Raised with the provided arguments.","timeframe":"instantly","optional":false}],"parameters":[{"name":"entity","order":0,"description":"The entity that was teleported.","type":"LuaEntity","optional":false},{"name":"old_position","order":2,"description":"The entity's position before the teleportation.","type":"MapPosition","optional":false},{"name":"old_surface_index","order":1,"description":"The entity's surface before the teleportation.","type":"uint8","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"register_metatable","order":6,"description":"Register a metatable to have linkage recorded and restored when saving/loading.\n\nThe metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.\n\n`register_metatable()` can not be used in the console, in event listeners or during a `remote.call()`.\n\nThe metatable first needs to be defined in the mod's root scope, then registered using this method. From then on, it will be properly restored for tables in [storage](runtime:storage).\n\n```\nlocal metatable = {\n  __index = function(key)\n    return \"no value for key \" .. key\n  end\n}\nscript.register_metatable(\"my_metatable\", metatable)\n```\n\nThis previously defined `metatable` can then be set on any table as usual:\n\n```\nlocal table = {key=\"value\"}\nsetmetatable(table, metatable)\n```","parameters":[{"name":"metatable","order":1,"description":"The metatable to register.","type":"table","optional":false},{"name":"name","order":0,"description":"The name of this metatable. Names must be unique per mod.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"register_on_object_destroyed","order":5,"description":"Registers an object so that after it's destroyed, [on_object_destroyed](runtime:on_object_destroyed) is called.\n\nOnce an object is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an object, all mods listening to [on_object_destroyed](runtime:on_object_destroyed) will receive the event when it is destroyed. Registering the same object multiple times will still only fire the destruction event once, and will return the same registration number.\n\nDepending on when a given object is destroyed, [on_object_destroyed](runtime:on_object_destroyed) will either be fired at the end of the current tick or at the end of the next tick.\n\nTODOC \n```\nType of provided object; defines.target_type; value of useful_id\nLuaCustomChartTag; defines.target_type.custom_chart_tag; $ref($runtime, LuaCustomChartTag::tag_number)\nLuaEntity; defines.target_type.entity; $ref($runtime, LuaEntity::unit_number)\nLuaEquipment; defines.target_type.equipment; 0\nLuaEquipmentGrid; defines.target_type.equipment_grid; $ref($runtime, LuaEquipmentGrid::unique_id)\nLuaItem; defines.target_type.item; $ref($runtime, LuaItem::item_number)\nLuaLogisticCell; defines.target_type.logistic_cell; 0\nLuaLogisticNetwork; defines.target_type.logistic_network; $ref($runtime, LuaLogisticNetwork::network_id)\nLuaLogisticSection; defines.target_type.logistic_section; 0\nLuaPermissionGroup; defines.target_type.permission_group; $ref($runtime, LuaPermissionGroup::group_id)\nLuaPlanet; defines.target_type.planet; 0\nLuaPlayer; defines.target_type.player; $ref($runtime, LuaPlayer::index)\nLuaRailPath; defines.target_type.rail_path; 0\nLuaRenderObject; defines.target_type.render_object; $ref($runtime, LuaRenderObject::id)\nLuaSpacePlatform; defines.target_type.space_platform; $ref($runtime, LuaSpacePlatform::index)\nLuaSurface; defines.target_type.surface; $ref($runtime, LuaSurface::index)\nLuaTrain; defines.target_type.train; $ref($runtime, LuaTrain::id)\nLuaCommandable; defines.target_type.commandable; $ref($runtime, LuaCommandable::id)\nLuaGuiElement, defines.target_type.gui_element; $ref($runtime, LuaGuiElement::index)\n```","parameters":[{"name":"object","order":0,"description":"The object to register.","type":{"complex_type":"union","options":["LuaCustomChartTag","LuaEntity","LuaEquipment","LuaEquipmentGrid","LuaGuiElement","LuaItem","LuaLogisticCell","LuaLogisticNetwork","LuaLogisticSection","LuaPermissionGroup","LuaPlanet","LuaPlayer","LuaRailPath","LuaRenderObject","LuaSpacePlatform","LuaSurface","LuaTrain","LuaCommandable"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The registration number. It is used to identify the object in the [on_object_destroyed](runtime:on_object_destroyed) event.","type":"uint64","optional":false},{"order":1,"description":"Useful identifier of the object if it has one. This identifier is specific to the object type, for example for trains it is the value [LuaTrain::id](runtime:LuaTrain::id).","type":"uint64","optional":false},{"order":2,"description":"Type of the target object.","type":"defines.target_type","optional":false}]},{"name":"set_event_filter","order":10,"description":"Sets the filters for the given event. The filters are only retained when set after the actual event registration, because registering for an event with different or no filters will overwrite previously set ones.\n\nLimit the [on_marked_for_deconstruction](runtime:on_marked_for_deconstruction) event to only be received when a non-ghost entity is marked for deconstruction.\n\n```\nscript.set_event_filter(defines.events.on_marked_for_deconstruction, {{filter = \"ghost\", invert = true}})\n```\n\nLimit the [on_built_entity](runtime:on_built_entity) event to only be received when either a `unit` or a `unit-spawner` is built.\n\n```\nscript.set_event_filter(defines.events.on_built_entity, {{filter = \"type\", type = \"unit\"}, {filter = \"type\", type = \"unit-spawner\"}})\n```\n\nLimit the [on_entity_damaged](runtime:on_entity_damaged) event to only be received when a `rail` is damaged by an `acid` attack.\n\n```\nscript.set_event_filter(defines.events.on_entity_damaged, {{filter = \"rail\"}, {filter = \"damage-type\", type = \"acid\", mode = \"and\"}})\n```","parameters":[{"name":"event","order":0,"description":"ID of the event to filter.","type":"uint","optional":false},{"name":"filters","order":1,"description":"The filters or `nil` to clear them.","type":"EventFilter","optional":true}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"active_mods","order":2,"description":"A dictionary listing the names of all currently active mods and mapping them to their version.","examples":["```\n-- This will print the names and versions of all active mods to the console.\nfor name, version in pairs(script.active_mods) do\n  game.print(name .. \" version \" .. version)\nend\n```"],"read_type":{"complex_type":"dictionary","key":"string","value":"string"},"optional":false},{"name":"feature_flags","order":3,"description":"A dictionary of feature flags mapping to whether they are enabled.","read_type":{"complex_type":"table","parameters":[{"name":"expansion_shaders","order":6,"description":"","type":"boolean","optional":false},{"name":"freezing","order":4,"description":"","type":"boolean","optional":false},{"name":"quality","order":0,"description":"","type":"boolean","optional":false},{"name":"rail_bridges","order":1,"description":"","type":"boolean","optional":false},{"name":"segmented_units","order":5,"description":"","type":"boolean","optional":false},{"name":"space_travel","order":2,"description":"","type":"boolean","optional":false},{"name":"spoiling","order":3,"description":"","type":"boolean","optional":false}]},"optional":false},{"name":"level","order":1,"description":"Information about the currently running scenario/campaign/tutorial.","read_type":{"complex_type":"table","parameters":[{"name":"campaign_name","order":2,"description":"The campaign name if any.","type":"string","optional":true},{"name":"is_simulation","order":0,"description":"Is this level a simulation? (The main menu and 'Tips and tricks' use simulations)","type":"boolean","optional":true},{"name":"is_tutorial","order":1,"description":"Is this level a tutorial?","type":"boolean","optional":true},{"name":"level_name","order":3,"description":"The level name.","type":"string","optional":false},{"name":"mod_name","order":4,"description":"The mod name if any.","type":"string","optional":true}]},"optional":false},{"name":"mod_name","order":0,"description":"The name of the mod from the environment this is used in.","read_type":"string","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaBurner","order":14,"description":"A reference to the burner energy source owned by a specific [LuaEntity](runtime:LuaEntity) or [LuaEquipment](runtime:LuaEquipment).","abstract":false,"methods":[],"attributes":[{"name":"burnt_result_inventory","order":2,"description":"The burnt result inventory.","read_type":"LuaInventory","optional":false},{"name":"currently_burning","order":6,"description":"The currently burning item. Writing `nil` will void the currently burning item without producing a [LuaBurner::burnt_result](runtime:LuaBurner::burnt_result).\n\nWriting to this automatically handles correcting [LuaBurner::remaining_burning_fuel](runtime:LuaBurner::remaining_burning_fuel).","read_type":"ItemIDAndQualityIDPair","write_type":"ItemWithQualityID","optional":true},{"name":"fuel_categories","order":7,"description":"The fuel categories this burner uses.\n\nThe value in the dictionary is meaningless and exists just to allow for easy lookup.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":false},{"name":"heat","order":3,"description":"The current heat (energy) stored in this burner.","read_type":"double","write_type":"double","optional":false},{"name":"heat_capacity","order":4,"description":"The maximum heat (maximum energy) that this burner can store.","read_type":"double","optional":false},{"name":"inventory","order":1,"description":"The fuel inventory.","read_type":"LuaInventory","optional":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":0,"description":"The owner of this burner energy source","read_type":{"complex_type":"union","options":["LuaEntity","LuaEquipment"],"full_format":false},"optional":false},{"name":"remaining_burning_fuel","order":5,"description":"The amount of energy left in the currently-burning fuel item.\n\nWriting to this will silently do nothing if there's no [LuaBurner::currently_burning](runtime:LuaBurner::currently_burning) set.","read_type":"double","write_type":"double","optional":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaBurnerPrototype","order":15,"description":"Prototype of a burner energy source.","abstract":false,"methods":[],"attributes":[{"name":"burnt_inventory_size","order":5,"description":"","read_type":"uint","optional":false},{"name":"effectivity","order":3,"description":"","read_type":"double","optional":false},{"name":"emissions_per_joule","order":0,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"fuel_categories","order":8,"description":"The value in the dictionary is meaningless and exists just to allow for easy lookup.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":false},{"name":"fuel_inventory_size","order":4,"description":"","read_type":"uint","optional":false},{"name":"light_flicker","order":7,"description":"The light flicker definition for this burner prototype.","read_type":{"complex_type":"table","parameters":[{"name":"border_fix_speed","order":4,"description":"","type":"float","optional":false},{"name":"color","order":7,"description":"","type":"Color","optional":false},{"name":"derivation_change_deviation","order":3,"description":"","type":"float","optional":false},{"name":"derivation_change_frequency","order":2,"description":"","type":"float","optional":false},{"name":"light_intensity_to_size_coefficient","order":6,"description":"","type":"float","optional":false},{"name":"maximum_intensity","order":1,"description":"","type":"float","optional":false},{"name":"minimum_intensity","order":0,"description":"","type":"float","optional":false},{"name":"minimum_light_size","order":5,"description":"","type":"float","optional":false}]},"optional":true},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_no_network_icon","order":1,"description":"","read_type":"boolean","optional":false},{"name":"render_no_power_icon","order":2,"description":"","read_type":"boolean","optional":false},{"name":"smoke","order":6,"description":"The smoke sources for this burner prototype.","read_type":{"complex_type":"array","value":"SmokeSource"},"optional":true},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaBurnerUsagePrototype","order":16,"description":"Description of burner usage.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaCargoLandingPadControlBehavior","order":17,"description":"Control behavior for cargo landing pad.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_exclusive_mode_of_operation","order":0,"description":"The circuit mode of operations for the cargo landing pad.","read_type":"defines.control_behavior.cargo_landing_pad.exclusive_mode","write_type":"defines.control_behavior.cargo_landing_pad.exclusive_mode","optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaChunkIterator","order":18,"description":"A chunk iterator can be used for iterating chunks coordinates of a surface.\n\nThe returned type is a [ChunkPositionAndArea](runtime:ChunkPositionAndArea) containing the chunk coordinates and its area.","examples":["```\nfor chunk in some_surface.get_chunks() do\n  game.player.print(\"x: \" .. chunk.x .. \", y: \" .. chunk.y)\n  game.player.print(\"area: \" .. serpent.line(chunk.area))\nend\n```"],"abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"call","order":0,"description":"Gets the next chunk position if the iterator is not yet done and increments the it.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"ChunkPositionAndArea","optional":true}]}]},{"name":"LuaCircuitNetwork","order":19,"description":"A circuit network associated with a given entity, connector, and wire type.","abstract":false,"methods":[{"name":"get_signal","order":0,"description":"","parameters":[{"name":"signal","order":0,"description":"The signal to read.","type":"SignalID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The current value of the signal.","type":"int","optional":false}]}],"attributes":[{"name":"connected_circuit_count","order":5,"description":"The number of circuits connected to this network.","read_type":"uint","optional":false},{"name":"entity","order":0,"description":"The entity this circuit network reference is associated with.","read_type":"LuaEntity","optional":false},{"name":"network_id","order":4,"description":"The circuit networks ID.","read_type":"uint","optional":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"signals","order":3,"description":"The circuit network signals last tick. `nil` if there were no signals last tick.","read_type":{"complex_type":"array","value":"Signal"},"optional":true},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"wire_connector_id","order":2,"description":"Wire connector ID on associated entity this network was gotten from.","read_type":"defines.wire_connector_id","optional":false},{"name":"wire_type","order":1,"description":"The wire type this network is associated with.","read_type":"defines.wire_type","optional":false}],"operators":[]},{"name":"LuaCollisionLayerPrototype","order":20,"description":"Prototype of a collision layer.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaCombinatorControlBehavior","order":21,"description":"","parent":"LuaControlBehavior","abstract":true,"methods":[{"name":"get_signal_last_tick","order":0,"description":"Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.","parameters":[{"name":"signal","order":0,"description":"The signal to get","type":"SignalID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"int","optional":true}]}],"attributes":[{"name":"signals_last_tick","order":0,"description":"The circuit network signals sent by this combinator last tick.","read_type":{"complex_type":"array","value":"Signal"},"optional":false}],"operators":[]},{"name":"LuaCommandProcessor","order":22,"description":"Allows for the registration of custom console commands through the global object named `commands`. Similarly to [event subscriptions](runtime:LuaBootstrap::on_event), these don't persist through a save-and-load cycle.","abstract":false,"methods":[{"name":"add_command","order":0,"description":"Add a custom console command.\n\nTrying to add a command with the `name` of a game command or the name of a custom command that is already in use will result in an error.\n\nThis example command will register a custom event called `print_tick` that prints the current tick to either the player issuing the command or to everyone on the server, depending on the command parameter:\n\n```\ncommands.add_command(\"print_tick\", nil, function(command)\n  if command.player_index ~= nil and command.parameter == \"me\" then\n    game.get_player(command.player_index).print(command.tick)\n  else\n    game.print(command.tick)\n  end\nend)\n```\n\nThis shows the usage of the table that gets passed to any function handling a custom command. This specific example makes use of the `tick` and the optional `player_index` and `parameter` fields. The user is supposed to either call it without any parameter (`\"/print_tick\"`) or with the `\"me\"` parameter (`\"/print_tick me\"`).","parameters":[{"name":"function","order":2,"description":"The function that will be called when this command is invoked.","type":{"complex_type":"function","parameters":["CustomCommandData"]},"optional":false},{"name":"help","order":1,"description":"The localised help message. It will be shown to players using the `/help` command.","type":"LocalisedString","optional":false},{"name":"name","order":0,"description":"The desired name of the command (case sensitive).","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_command","order":1,"description":"Remove a custom console command.","parameters":[{"name":"name","order":0,"description":"The name of the command to remove (case sensitive).","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the command was successfully removed. Returns `false` if the command didn't exist.","type":"boolean","optional":false}]}],"attributes":[{"name":"commands","order":0,"description":"Lists the custom commands registered by scripts through `LuaCommandProcessor`.","read_type":{"complex_type":"dictionary","key":"string","value":"LocalisedString"},"optional":false},{"name":"game_commands","order":1,"description":"Lists the built-in commands of the core game. The [wiki](https://wiki.factorio.com/Console) has an overview of these.","read_type":{"complex_type":"dictionary","key":"string","value":"LocalisedString"},"optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaCommandable","order":23,"description":"AI object which can be ordered commands. This can represent a UnitGroup (a set of multiple commandables) or can be a single Unit, SpiderUnit or other commandable entity.","abstract":false,"methods":[{"name":"add_member","order":4,"description":"Adds a member to this UnitGroup. Has the same effect as setting defines.command.group command on the member to join the group.\n\nThe member must have the same force be on the same surface as the group.","subclasses":["UnitGroup"],"parameters":[{"name":"member","order":0,"description":"","type":{"complex_type":"union","options":["LuaCommandable","LuaEntity"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"destroy","order":0,"description":"Destroys this commandable. If it is a unit group, members will not be destroyed, they will be merely unlinked from the group.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"release_from_spawner","order":3,"description":"Release the commandable from the spawner. This allows the spawner to continue spawning additional units.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_autonomous","order":5,"description":"Make this group autonomous. Autonomous groups will automatically attack polluted areas. Autonomous groups aren't considered to be [script-driven](runtime:LuaCommandable::is_script_driven).","subclasses":["UnitGroup"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_command","order":1,"description":"Give this commandable a command.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_distraction_command","order":2,"description":"Give this commandable a distraction command.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"start_moving","order":6,"description":"Make the group start moving even if some of its members haven't yet arrived.","subclasses":["UnitGroup"],"parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"command","order":7,"description":"The command of this commandable, if any.","read_type":"Command","optional":true},{"name":"commandable_members","order":14,"description":"Non recursively returns all members of this unit group.","subclasses":["UnitGroup"],"read_type":{"complex_type":"array","value":"LuaCommandable"},"optional":false},{"name":"distraction_command","order":8,"description":"The distraction command of this commandable, if any.","read_type":"Command","optional":true},{"name":"entity","order":16,"description":"Returns entity object for this commandable.","subclasses":["Entity"],"read_type":"LuaEntity","optional":false},{"name":"force","order":4,"description":"The force of this commandable.","read_type":"LuaForce","optional":false},{"name":"has_command","order":6,"description":"If this commandable has a command assigned.","read_type":"boolean","optional":false},{"name":"is_entity","order":1,"description":"If this commandable is Entity.","read_type":"boolean","optional":false},{"name":"is_script_driven","order":15,"description":"Whether this unit group is controlled by a script or by the game engine. This can be changed using [LuaCommandable::set_autonomous](runtime:LuaCommandable::set_autonomous).","subclasses":["UnitGroup"],"read_type":"boolean","optional":false},{"name":"is_unit_group","order":0,"description":"If this commandable is UnitGroup.","read_type":"boolean","optional":false},{"name":"members","order":13,"description":"All entity members of this unit group, recursive (if unit group is member of this unit group, its members will be returned here).","subclasses":["UnitGroup"],"read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"moving_state","order":11,"description":"Current moving state of the commandable's behavior","read_type":"defines.moving_state","optional":false},{"name":"object_name","order":18,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"parent_group","order":9,"description":"The unit group this commandable is a member of, if any.","read_type":"LuaCommandable","optional":true},{"name":"position","order":3,"description":"Current position of this commandable.\n\nIf commandable is a UnitGroup, this can have different meanings depending on the group state. When the group is gathering, the position is the place of gathering. When the group is moving, the position is the expected position of its members along the path. When the group is attacking, it is the average position of its members.","read_type":"MapPosition","optional":false},{"name":"spawner","order":10,"description":"The spawner associated with this commandable, if any.","read_type":"LuaEntity","optional":true},{"name":"state","order":12,"description":"Whether this group is gathering, moving or attacking.","subclasses":["UnitGroup"],"read_type":"defines.group_state","optional":false},{"name":"surface","order":2,"description":"Surface this commandable is on.","read_type":"LuaSurface","optional":false},{"name":"unique_id","order":5,"description":"Unique identifier of this commandable.","read_type":"uint","optional":false},{"name":"valid","order":17,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaConstantCombinatorControlBehavior","order":24,"description":"Control behavior for constant combinators.","parent":"LuaControlBehavior","abstract":false,"methods":[{"name":"add_section","order":0,"description":"Adds a new logistic section to this constant combinator if possible.","parameters":[{"name":"group","order":0,"description":"The group to assign this section to.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Logistic section if added.","type":"LuaLogisticSection","optional":true}]},{"name":"get_section","order":2,"description":"Gets section on the selected index, if it exists.","parameters":[{"name":"section_index","order":0,"description":"Index of the section.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaLogisticSection","optional":true}]},{"name":"remove_section","order":1,"description":"Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not [manual](runtime:LuaLogisticSection::is_manual).","parameters":[{"name":"section_index","order":0,"description":"Index of the section.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether section was removed.","type":"boolean","optional":false}]}],"attributes":[{"name":"enabled","order":0,"description":"Turns this constant combinator on and off.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"sections","order":1,"description":"All logistic sections of this constant combinator.","read_type":{"complex_type":"array","value":"LuaLogisticSection"},"optional":false},{"name":"sections_count","order":2,"description":"Amount of logistic sections this constant combinator has.","read_type":"uint","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaContainerControlBehavior","order":25,"description":"Control behavior for container entities.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_contents","order":0,"description":"`true` if this container is sending its content to a circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaControl","order":26,"description":"This is an abstract base class containing the common functionality between [LuaPlayer](runtime:LuaPlayer) and entities (see [LuaEntity](runtime:LuaEntity)). When accessing player-related functions through a [LuaEntity](runtime:LuaEntity), it must refer to a character entity.","abstract":true,"methods":[{"name":"begin_crafting","order":19,"description":"Begins crafting the given count of the given recipe.","raises":[{"name":"on_player_main_inventory_changed","order":1,"description":"Raised if crafting was able to be started.","timeframe":"current_tick","optional":true},{"name":"on_pre_player_crafted_item","order":0,"description":"Raised if crafting was able to be started.","timeframe":"instantly","optional":true}],"parameters":[{"name":"count","order":0,"description":"The count to craft.","type":"uint","optional":false},{"name":"recipe","order":1,"description":"The recipe to craft.","type":"RecipeID","optional":false},{"name":"silent","order":2,"description":"If false and the recipe can't be crafted the requested number of times printing the failure is skipped.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The count that was actually started crafting.","type":"uint","optional":false}]},{"name":"can_insert","order":3,"description":"Can at least some items be inserted?","parameters":[{"name":"items","order":0,"description":"Items that would be inserted.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if at least a part of the given items could be inserted into this inventory.","type":"boolean","optional":false}]},{"name":"can_reach_entity","order":9,"description":"Can a given entity be opened or accessed?","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_crafting","order":20,"description":"Cancels crafting the given count of the given crafting queue index.","raises":[{"name":"on_player_cancelled_crafting","order":0,"description":"Raised if crafting was able to be cancelled.","timeframe":"instantly","optional":true},{"name":"on_player_main_inventory_changed","order":1,"description":"Raised if crafting was able to be cancelled.","timeframe":"current_tick","optional":true}],"parameters":[{"name":"count","order":1,"description":"The count to cancel crafting.","type":"uint","optional":false},{"name":"index","order":0,"description":"The crafting queue index.","type":"uint","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clear_gui_arrow","order":6,"description":"Removes the arrow created by `set_gui_arrow`.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_items_inside","order":10,"description":"Remove all items from this entity.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_selected_entity","order":14,"description":"Unselect any selected entity.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised if there is a currently selected entity.","timeframe":"instantly","optional":true}],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"disable_flashlight","order":15,"description":"Disable the flashlight.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_flashlight","order":16,"description":"Enable the flashlight.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_craftable_count","order":18,"description":"Gets the count of the given recipe that can be crafted.","parameters":[{"name":"recipe","order":0,"description":"The recipe.","type":"RecipeID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The count that can be crafted.","type":"uint","optional":false}]},{"name":"get_inventory","order":0,"description":"Get an inventory belonging to this entity. This can be either the \"main\" inventory or some auxiliary one, like the module slots or logistic trash slots.\n\nA given [defines.inventory](runtime:defines.inventory) is only meaningful for the corresponding LuaObject type. EG: get_inventory(defines.inventory.character_main) is only meaningful if 'this' is a player character. You may get a value back but if the type of 'this' isn't the type referred to by the [defines.inventory](runtime:defines.inventory) it's almost guaranteed to not be the inventory asked for.","parameters":[{"name":"inventory","order":0,"description":"","type":"defines.inventory","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The inventory or `nil` if none with the given index was found.","type":"LuaInventory","optional":true}]},{"name":"get_item_count","order":7,"description":"Get the number of all or some items in this entity.","parameters":[{"name":"item","order":0,"description":"Prototype name of the item to count. If not specified, count all items.","type":"ItemID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_main_inventory","order":2,"description":"Gets the main inventory for this character or player if this is a character or player.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The inventory or `nil` if this entity is not a character or player.","type":"LuaInventory","optional":true}]},{"name":"get_max_inventory_index","order":1,"description":"The highest index of all inventories this entity can use. Allows iteration over all of them if desired.","examples":["```\nfor k = 1, entity.get_max_inventory_index() do [...] end\n```"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"defines.inventory","optional":false}]},{"name":"get_requester_point","order":27,"description":"Gets the requester logistic point for this entity if it has one.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaLogisticPoint","optional":true}]},{"name":"has_items_inside","order":8,"description":"Does this entity have any item inside it?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"insert","order":4,"description":"Insert items into this entity. This works the same way as inserters or shift-clicking: the \"best\" inventory is chosen automatically.","parameters":[{"name":"items","order":0,"description":"The items to insert.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The number of items that were actually inserted.","type":"uint","optional":false}]},{"name":"is_cursor_blueprint","order":25,"description":"Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records from the blueprint library into account.\n\nNote that both this method refers to the currently selected blueprint, which means that a blueprint book with a selected blueprint will return the information as well.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_cursor_empty","order":26,"description":"Returns whether the player is holding something in the cursor. Takes into account items from the blueprint library, as well as items and ghost cursor.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_flashlight_enabled","order":17,"description":"Is the flashlight enabled.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_player","order":23,"description":"When `true` control adapter is a LuaPlayer object, `false` for entities including characters with players.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"mine_entity","order":21,"description":"Mines the given entity as if this player (or character) mined it.","raises":[{"name":"on_player_mined_entity","order":1,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_player_mined_item","order":2,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_pre_player_mined_item","order":0,"description":"Raised if mining is possible.","timeframe":"instantly","optional":true}],"parameters":[{"name":"entity","order":0,"description":"The entity to mine","type":"LuaEntity","optional":false},{"name":"force","order":1,"description":"Forces mining the entity even if the items can't fit in the player.","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the mining succeeded.","type":"boolean","optional":false}]},{"name":"mine_tile","order":22,"description":"Mines the given tile as if this player (or character) mined it.","raises":[{"name":"on_player_mined_item","order":0,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true},{"name":"on_player_mined_tile","order":1,"description":"Raised if mining is successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"tile","order":0,"description":"The tile to mine.","type":"LuaTile","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the mining succeeded.","type":"boolean","optional":false}]},{"name":"open_technology_gui","order":24,"description":"Open the technology GUI and select a given technology.","parameters":[{"name":"technology","order":0,"description":"The technology to select after opening the GUI.","type":"TechnologyID","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_item","order":11,"description":"Remove items from this entity.","parameters":[{"name":"items","order":0,"description":"The items to remove.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The number of items that were actually removed.","type":"uint","optional":false}]},{"name":"set_gui_arrow","order":5,"description":"Create an arrow which points at this entity. This is used in the tutorial. For examples, see `control.lua` in the campaign missions.","parameters":[{"name":"margin","order":0,"description":"","type":"uint","optional":false},{"name":"type","order":1,"description":"Where to point to. This field determines what other fields are mandatory.","type":"GuiArrowType","optional":false}],"variant_parameter_groups":[{"name":"crafting_queue","order":2,"description":"","parameters":[{"name":"crafting_queueindex","order":0,"description":"Index in the crafting queue to point to.","type":"uint","optional":false}]},{"name":"entity","order":0,"description":"","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"item_stack","order":3,"description":"","parameters":[{"name":"inventory_index","order":0,"description":"Which inventory the stack is in.","type":"defines.inventory","optional":false},{"name":"item_stack_index","order":1,"description":"Which stack to point to.","type":"uint","optional":false},{"name":"source","order":2,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"player"},{"complex_type":"literal","value":"target"},{"complex_type":"literal","value":"player-quickbar"}],"full_format":false},"optional":false}]},{"name":"position","order":1,"description":"","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:","format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"teleport","order":12,"description":"Teleport the entity to a given position, possibly on another surface.\n\nSome entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.\n\nYou can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x.\n\n`script_raised_teleported` will not be raised if teleporting a player with no character.","raises":[{"name":"on_player_changed_position","order":0,"description":"Raised if the teleported entity is a player character.","timeframe":"instantly","optional":true},{"name":"script_raised_teleported","order":1,"description":"Raised if the `raise_teleported` flag was set and the entity was successfully teleported.","timeframe":"instantly","optional":true}],"parameters":[{"name":"position","order":0,"description":"Where to teleport to.","type":"MapPosition","optional":false},{"name":"raise_teleported","order":2,"description":"If true, [defines.events.script_raised_teleported](runtime:defines.events.script_raised_teleported) will be fired on successful entity teleportation.","type":"boolean","optional":true},{"name":"snap_to_grid","order":3,"description":"If false the exact position given is used to instead of snapping to the normal entity grid. This only applies if the entity normally snaps to the grid.","type":"boolean","optional":true},{"name":"surface","order":1,"description":"Surface to teleport to. If not given, will teleport to the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface.","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if the entity was successfully teleported.","type":"boolean","optional":false}]},{"name":"update_selected_entity","order":13,"description":"Select an entity, as if by hovering the mouse above it.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised if there is an entity at the given position to select.","timeframe":"instantly","optional":true}],"parameters":[{"name":"position","order":0,"description":"Position of the entity to select.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"build_distance","order":38,"description":"The build distance of this character or max uint when not a character or player connected to a character.","read_type":"uint","optional":false},{"name":"character_additional_mining_categories","order":25,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":{"complex_type":"array","value":"string"},"write_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"character_build_distance_bonus","order":27,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_crafting_speed_modifier","order":23,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"double","write_type":"double","optional":false},{"name":"character_health_bonus","order":36,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"float","write_type":"float","optional":false},{"name":"character_inventory_slots_bonus","order":33,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_item_drop_distance_bonus","order":28,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_item_pickup_distance_bonus","order":31,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_loot_pickup_distance_bonus","order":32,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_maximum_following_robot_count_bonus","order":35,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_mining_progress","order":46,"description":"The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.","read_type":"double","optional":false},{"name":"character_mining_speed_modifier","order":24,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"double","write_type":"double","optional":false},{"name":"character_reach_distance_bonus","order":29,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_resource_reach_distance_bonus","order":30,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"character_running_speed","order":45,"description":"The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.","read_type":"double","optional":false},{"name":"character_running_speed_modifier","order":26,"description":"Modifies the running speed of this character by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.\n\nWhen called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"double","write_type":"double","optional":false},{"name":"character_trash_slot_count_bonus","order":34,"description":"When called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":"uint","write_type":"uint","optional":false},{"name":"cheat_mode","order":22,"description":"When `true` hand crafting is free and instant.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"crafting_queue","order":20,"description":"The current crafting queue items.","read_type":{"complex_type":"array","value":"CraftingQueueItem"},"optional":false},{"name":"crafting_queue_progress","order":9,"description":"The crafting queue progress in the range `[0-1]`. `0` when no recipe is being crafted.","read_type":"double","write_type":"double","optional":false},{"name":"crafting_queue_size","order":8,"description":"Size of the crafting queue.","read_type":"uint","optional":false},{"name":"cursor_ghost","order":17,"description":"The ghost prototype in the player's cursor.\n\nItems in the cursor stack will take priority over the cursor ghost.","read_type":"ItemIDAndQualityIDPair","write_type":"ItemWithQualityID","optional":true},{"name":"cursor_record","order":18,"description":"The blueprint record in the player's cursor.","read_type":"LuaRecord","optional":true},{"name":"cursor_stack","order":16,"description":"The player's cursor stack. `nil` if the player controller is a spectator.","examples":["```\n-- Even though this property is marked as read-only, it returns a LuaItemStack,\n-- meaning it can be manipulated like so:\nplayer.cursor_stack.clear()\n```"],"read_type":"LuaItemStack","optional":true},{"name":"driving","order":19,"description":"`true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.","raises":[{"name":"on_player_driving_changed_state","order":0,"description":"Raised if the driving state successfully changed.","timeframe":"instantly","optional":true}],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"drop_item_distance","order":39,"description":"The item drop distance of this character or max uint when not a character or player connected to a character.","read_type":"uint","optional":false},{"name":"following_robots","order":21,"description":"The current combat robots following the character.\n\nWhen called on a [LuaPlayer](runtime:LuaPlayer), it must be associated with a character (see [LuaPlayer::character](runtime:LuaPlayer::character)).","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"force","order":4,"description":"The force of this entity. Reading will always give a [LuaForce](runtime:LuaForce), but it is possible to assign either [string](runtime:string), [uint8](runtime:uint8) or [LuaForce](runtime:LuaForce) to this attribute to change the force.","read_type":"LuaForce","write_type":"ForceID","optional":false},{"name":"force_index","order":5,"description":"Unique [index](runtime:LuaForce::index) (ID) associated with the force of this entity.","read_type":"uint","optional":false},{"name":"in_combat","order":44,"description":"Whether this character entity is in combat.","read_type":"boolean","optional":false},{"name":"item_pickup_distance","order":41,"description":"The item pickup distance of this character or max double when not a character or player connected to a character.","read_type":"double","optional":false},{"name":"loot_pickup_distance","order":42,"description":"The loot pickup distance of this character or max double when not a character or player connected to a character.","read_type":"double","optional":false},{"name":"mining_state","order":12,"description":"Current mining state.\n\nWhen the player isn't mining tiles the player will mine whatever entity is currently selected. See [LuaControl::selected](runtime:LuaControl::selected) and [LuaControl::update_selected_entity](runtime:LuaControl::update_selected_entity).","read_type":{"complex_type":"table","parameters":[{"name":"mining","order":0,"description":"Whether the player is mining at all.","type":"boolean","optional":false},{"name":"position","order":1,"description":"What location the player is mining. Only relevant if `mining` is `true`.","type":"MapPosition","optional":true}]},"write_type":{"complex_type":"table","parameters":[{"name":"mining","order":0,"description":"Whether the player is mining at all.","type":"boolean","optional":false},{"name":"position","order":1,"description":"What location the player is mining. Only relevant if `mining` is `true`.","type":"MapPosition","optional":true}]},"optional":false},{"name":"opened","order":7,"description":"The GUI the player currently has open.\n\nThis is the GUI that will asked to close (by firing the [on_gui_closed](runtime:on_gui_closed) event) when the `Esc` or `E` keys are pressed. If this attribute is non-nil, then writing `nil` or a new GUI to it will ask the existing GUI to close.\n\nWrite supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory` or `nil`.","raises":[{"name":"on_gui_opened","order":0,"description":"Raised when writing a valid GUI target to this attribute.","timeframe":"instantly","optional":true}],"read_type":{"complex_type":"union","options":["LuaEntity","LuaItemStack","LuaEquipment","LuaEquipmentGrid","LuaPlayer","LuaGuiElement","LuaInventory","defines.gui_type"],"full_format":false},"write_type":{"complex_type":"union","options":["LuaEntity","LuaItemStack","LuaEquipment","LuaEquipmentGrid","LuaPlayer","LuaGuiElement","LuaInventory","defines.gui_type"],"full_format":false},"optional":true},{"name":"opened_gui_type","order":37,"description":"","read_type":"defines.gui_type","optional":true},{"name":"picking_state","order":14,"description":"Current item-picking state.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"position","order":2,"description":"The current position of the entity.","read_type":"MapPosition","optional":false},{"name":"reach_distance","order":40,"description":"The reach distance of this character or max uint when not a character or player connected to a character.","read_type":"uint","optional":false},{"name":"repair_state","order":15,"description":"Current repair state.","read_type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being repaired","type":"MapPosition","optional":false},{"name":"repairing","order":0,"description":"The current state","type":"boolean","optional":false}]},"write_type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being repaired","type":"MapPosition","optional":false},{"name":"repairing","order":0,"description":"The current state","type":"boolean","optional":false}]},"optional":false},{"name":"resource_reach_distance","order":43,"description":"The resource reach distance of this character or max double when not a character or player connected to a character.","read_type":"double","optional":false},{"name":"riding_state","order":11,"description":"Current riding state of this car, or of the car this player is riding in.","read_type":"RidingState","write_type":"RidingState","optional":false},{"name":"selected","order":6,"description":"The currently selected entity. Assigning an entity will select it if is selectable, otherwise the selection is cleared.","raises":[{"name":"on_selected_entity_changed","order":0,"description":"Raised when a selectable entity is written to this attribute.","timeframe":"instantly","optional":true}],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"shooting_state","order":13,"description":"Current shooting state.","read_type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being shot at","type":"MapPosition","optional":false},{"name":"state","order":0,"description":"The current state","type":"defines.shooting","optional":false}]},"write_type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"The position being shot at","type":"MapPosition","optional":false},{"name":"state","order":0,"description":"The current state","type":"defines.shooting","optional":false}]},"optional":false},{"name":"surface","order":0,"description":"The surface this entity is currently on.","read_type":"LuaSurface","optional":false},{"name":"surface_index","order":1,"description":"Unique [index](runtime:LuaSurface::index) (ID) associated with the surface this entity is currently on.","read_type":"uint","optional":false},{"name":"vehicle","order":3,"description":"The vehicle the player is currently sitting in.","read_type":"LuaEntity","optional":true},{"name":"walking_state","order":10,"description":"Current walking state.","examples":["```\n-- Make the player go north. Note that a one-shot action like this will only make the player walk for one tick.\ngame.player.walking_state = {walking = true, direction = defines.direction.north}\n```"],"read_type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"Direction where the player is walking","type":"defines.direction","optional":false},{"name":"walking","order":0,"description":"If `false`, the player is currently not walking; otherwise it's going somewhere","type":"boolean","optional":false}]},"write_type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"Direction where the player is walking","type":"defines.direction","optional":false},{"name":"walking","order":0,"description":"If `false`, the player is currently not walking; otherwise it's going somewhere","type":"boolean","optional":false}]},"optional":false}],"operators":[]},{"name":"LuaControlBehavior","order":27,"description":"The control behavior for an entity. Inserters have logistic network and circuit network behavior logic, lamps have circuit logic and so on. This is an abstract base class that concrete control behaviors inherit.\n\nAn control reference becomes invalid once the control behavior is removed or the entity (see [LuaEntity](runtime:LuaEntity)) it resides in is destroyed.","abstract":true,"methods":[{"name":"get_circuit_network","order":0,"description":"","parameters":[{"name":"wire_connector_id","order":0,"description":"Wire connector to get circuit network for.","type":"defines.wire_connector_id","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The circuit network or nil.","type":"LuaCircuitNetwork","optional":true}]}],"attributes":[{"name":"entity","order":1,"description":"The entity this control behavior belongs to.","read_type":"LuaEntity","optional":false},{"name":"type","order":0,"description":"The concrete type of this control behavior.","read_type":"defines.control_behavior.type","optional":false}],"operators":[]},{"name":"LuaCustomChartTag","order":28,"description":"A custom tag that shows on the map view.","abstract":false,"methods":[{"name":"destroy","order":0,"description":"Destroys this tag.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"force","order":5,"description":"The force this tag belongs to.","read_type":"LuaForce","optional":false},{"name":"icon","order":0,"description":"This tag's icon, if it has one. Writing `nil` removes it.","read_type":"SignalID","write_type":"SignalID","optional":false},{"name":"last_user","order":1,"description":"The player who last edited this tag.","read_type":"LuaPlayer","write_type":"LuaPlayer","optional":true},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"position","order":2,"description":"The position of this tag.","read_type":"MapPosition","optional":false},{"name":"surface","order":6,"description":"The surface this tag belongs to.","read_type":"LuaSurface","optional":false},{"name":"tag_number","order":4,"description":"The unique ID for this tag on this force.","read_type":"uint","optional":false},{"name":"text","order":3,"description":"","read_type":"string","write_type":"string","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaCustomEventPrototype","order":29,"description":"Prototype of a custom event.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaCustomInputPrototype","order":30,"description":"Prototype of a custom input.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"action","order":6,"description":"The action that happens when this custom input is triggered.","read_type":"string","optional":false},{"name":"alternative_key_sequence","order":1,"description":"The default alternative key sequence for this custom input, if any","read_type":"string","optional":true},{"name":"consuming","order":5,"description":"The consuming type.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"game-only"}],"full_format":false},"optional":false},{"name":"controller_alternative_key_sequence","order":3,"description":"The default controller alternative key sequence for this custom input, if any","read_type":"string","optional":true},{"name":"controller_key_sequence","order":2,"description":"The default controller key sequence for this custom input, if any","read_type":"string","optional":true},{"name":"enabled","order":7,"description":"Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.","read_type":"boolean","optional":false},{"name":"enabled_while_in_cutscene","order":9,"description":"Whether this custom input is enabled while using the cutscene controller.","read_type":"boolean","optional":false},{"name":"enabled_while_spectating","order":8,"description":"Whether this custom input is enabled while using the spectator controller.","read_type":"boolean","optional":false},{"name":"include_selected_prototype","order":10,"description":"Whether this custom input will include the selected prototype (if any) when triggered.","read_type":"boolean","optional":false},{"name":"item_to_spawn","order":11,"description":"The item that gets spawned when this custom input is fired, if any.","read_type":"LuaItemPrototype","optional":true},{"name":"key_sequence","order":0,"description":"The default key sequence for this custom input.","read_type":"string","optional":false},{"name":"linked_game_control","order":4,"description":"The linked game control name, if any.","read_type":"LinkedGameControl","optional":true},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaCustomTable","order":31,"description":"Lazily evaluated table. For performance reasons, we sometimes return a custom table-like type instead of a native Lua table. This custom type lazily constructs the necessary Lua wrappers of the corresponding C++ objects, therefore preventing their unnecessary construction in some cases.\n\nThere are some notable consequences to the usage of a custom table type rather than the native Lua table type: Iterating a custom table is only possible using the `pairs` Lua function; `ipairs` won't work. Another key difference is that custom tables cannot be serialised into a game save file -- if saving the game would require serialisation of a custom table, an error will be displayed and the game will not be saved.\n\nIn previous versions of Factorio, this would create a [LuaPlayer](runtime:LuaPlayer) instance for every player in the game, even though only one such wrapper is needed. In the current version, accessing [game.players](runtime:LuaGameScript::players) by itself does not create any [LuaPlayer](runtime:LuaPlayer) instances; they are created lazily when accessed. Therefore, this example only constructs one [LuaPlayer](runtime:LuaPlayer) instance, no matter how many elements there are in `game.players`.\n\n```\ngame.players[\"Oxyd\"].character.die()\n```\n\nThis statement will execute successfully and `storage.p` will be useable as one might expect. However, as soon as the user tries to save the game, a \"LuaCustomTable cannot be serialized\" error will be shown. The game will remain unsaveable so long as `storage.p` refers to an instance of a custom table.\n\n```\nstorage.p = game.players  -- This has high potential to make the game unsaveable\n```\n\nThe following will produce no output because `ipairs` is not supported with custom tables.\n\n```\nfor _, p in ipairs(game.players) do game.player.print(p.name); end  -- incorrect; use pairs instead\n```","examples":["```\n-- Custom tables may be iterated using `pairs`.\nfor _, p in pairs(game.players) do game.player.print(p.name); end\n```"],"abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"index","order":0,"description":"Access an element of this custom table.","read_type":"Any","optional":false},{"name":"length","order":1,"description":"Number of elements in this table.","read_type":"uint","optional":false}]},{"name":"LuaDamagePrototype","order":32,"description":"Prototype of a damage.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaDeciderCombinatorControlBehavior","order":33,"description":"Control behavior for decider combinators.","parent":"LuaCombinatorControlBehavior","abstract":false,"methods":[{"name":"add_condition","order":2,"description":"Adds a new condition.","parameters":[{"name":"condition","order":0,"description":"New condition to insert.","type":"DeciderCombinatorCondition","optional":false},{"name":"index","order":1,"description":"Index to insert new condition at. If not specified, appends to the end.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"add_output","order":6,"description":"Adds a new output.","parameters":[{"name":"index","order":1,"description":"Index to insert new output at. If not specified, appends to the end.","type":"uint","optional":true},{"name":"output","order":0,"description":"New output to insert.","type":"DeciderCombinatorOutput","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"get_condition","order":0,"description":"Gets the condition at `index`.","parameters":[{"name":"index","order":0,"description":"Index of condition to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"DeciderCombinatorCondition","optional":false}]},{"name":"get_output","order":4,"description":"Gets the output at `index`.","parameters":[{"name":"index","order":0,"description":"Index of output to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"DeciderCombinatorOutput","optional":false}]},{"name":"remove_condition","order":3,"description":"Removes the condition at `index`.","parameters":[{"name":"index","order":0,"description":"Index of condition to remove.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_output","order":7,"description":"Removes the output at `index`.","parameters":[{"name":"index","order":0,"description":"Index of output to remove.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_condition","order":1,"description":"Sets the condition at `index`.","parameters":[{"name":"condition","order":1,"description":"Data to set selected condition to.","type":"DeciderCombinatorCondition","optional":false},{"name":"index","order":0,"description":"Index of condition to modify.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_output","order":5,"description":"Sets the output at `index`.","parameters":[{"name":"index","order":0,"description":"Index of output to modify.","type":"uint","optional":false},{"name":"output","order":1,"description":"Data to set selected output to.","type":"DeciderCombinatorOutput","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"parameters","order":0,"description":"This decider combinator's parameters. Writing `nil` clears the combinator's parameters.","read_type":"DeciderCombinatorParameters","write_type":"DeciderCombinatorParameters","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaDecorativePrototype","order":34,"description":"Prototype of an optimized decorative.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"autoplace_specification","order":2,"description":"Autoplace specification for this decorative prototype, if any.","read_type":"AutoplaceSpecification","optional":true},{"name":"collision_box","order":0,"description":"The bounding box used for collision checking.","read_type":"BoundingBox","optional":false},{"name":"collision_mask","order":1,"description":"The collision masks this decorative uses","read_type":"CollisionMask","optional":false},{"name":"decal","order":4,"description":"","read_type":"boolean","optional":false},{"name":"grows_through_rail_path","order":5,"description":"","read_type":"boolean","optional":false},{"name":"minimal_separation","order":8,"description":"","read_type":"double","optional":false},{"name":"object_name","order":11,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"placed_effect","order":7,"description":"","read_type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":true},{"name":"render_layer","order":3,"description":"","read_type":"string","optional":false},{"name":"target_count","order":9,"description":"","read_type":"uint","optional":false},{"name":"trigger_effect","order":6,"description":"","read_type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":true},{"name":"valid","order":10,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaDisplayPanelControlBehavior","order":35,"description":"Control behavior for display panels.","parent":"LuaControlBehavior","abstract":false,"methods":[{"name":"get_message","order":0,"description":"Get a specific message definition","parameters":[{"name":"index","order":0,"description":"Message index.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The message definition at the specified index.","type":"DisplayPanelMessageDefinition","optional":false}]},{"name":"set_message","order":1,"description":"Set the message at the specified index","parameters":[{"name":"index","order":0,"description":"Message index. Use `-1` to append new element.","type":"uint","optional":false},{"name":"message","order":1,"description":"The message definition for the specified index. Specify `nil` to remove the message.","type":"DisplayPanelMessageDefinition","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"messages","order":0,"description":"The full list of configured messages.","read_type":{"complex_type":"array","value":"DisplayPanelMessageDefinition"},"write_type":{"complex_type":"array","value":"DisplayPanelMessageDefinition"},"optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaElectricEnergySourcePrototype","order":36,"description":"Prototype of an electric energy source.","abstract":false,"methods":[{"name":"get_input_flow_limit","order":0,"description":"","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_output_flow_limit","order":1,"description":"","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]}],"attributes":[{"name":"buffer_capacity","order":0,"description":"","read_type":"double","optional":false},{"name":"drain","order":2,"description":"","read_type":"double","optional":false},{"name":"emissions_per_joule","order":3,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_no_network_icon","order":4,"description":"","read_type":"boolean","optional":false},{"name":"render_no_power_icon","order":5,"description":"","read_type":"boolean","optional":false},{"name":"usage_priority","order":1,"description":"","read_type":"string","optional":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaEntity","order":37,"description":"The primary interface for interacting with entities through the Lua API. Entities are everything that exists on the map except for tiles (see [LuaTile](runtime:LuaTile)).\n\nMost functions on LuaEntity also work when the entity is contained in a ghost.","parent":"LuaControl","abstract":false,"methods":[{"name":"add_autopilot_destination","order":108,"description":"Adds the given position to this spidertron's autopilot's queue of destinations.","subclasses":["SpiderVehicle"],"parameters":[{"name":"position","order":0,"description":"The position the spidertron should move to.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_market_item","order":10,"description":"Offer a thing on the market.","examples":["```\n-- Adds market offer, 1 copper ore for 10 iron ore\nmarket.add_market_item{price={{name = \"iron-ore\", count = 10}}, offer={type=\"give-item\", item=\"copper-ore\"}}\n```","```\n-- Adds market offer, 1 copper ore for 5 iron ore and 5 stone ore\nmarket.add_market_item{price={{name = \"iron-ore\", count = 5}, {name = \"stone\", count = 5}}, offer={type=\"give-item\", item=\"copper-ore\"}}\n```"],"subclasses":["Market"],"parameters":[{"name":"offer","order":0,"description":"","type":"Offer","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"can_be_destroyed","order":5,"description":"Whether the entity can be destroyed","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_shoot","order":93,"description":"Whether this character can shoot the given entity or position.","subclasses":["Character"],"parameters":[{"name":"position","order":1,"description":"","type":"MapPosition","optional":false},{"name":"target","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_wires_reach","order":102,"description":"Can wires reach between these entities.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_deconstruction","order":15,"description":"Cancels deconstruction if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised if the entity's deconstruction was successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the deconstruction order.","type":"ForceID","optional":false},{"name":"player","order":1,"description":"The player to set the `last_user` to if any.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"cancel_upgrade","order":18,"description":"Cancels upgrade if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_upgrade","order":0,"description":"Raised if the entity way previously marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the upgrade order.","type":"ForceID","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the cancel was successful.","type":"boolean","optional":false}]},{"name":"clear_fluid_inside","order":83,"description":"Remove all fluids from this entity.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_market_items","order":13,"description":"Removes all offers from a market.","subclasses":["Market"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clone","order":78,"description":"Clones this entity.","raises":[{"name":"on_entity_cloned","order":0,"description":"Raised if the entity was successfully cloned.","timeframe":"instantly","optional":true}],"parameters":[{"name":"create_build_effect_smoke","order":3,"description":"If false, the building effect smoke will not be shown around the new entity.","type":"boolean","optional":true},{"name":"force","order":2,"description":"","type":"ForceID","optional":true},{"name":"position","order":0,"description":"The destination position","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"The destination surface","type":"LuaSurface","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.","type":"LuaEntity","optional":true}]},{"name":"connect_linked_belts","order":109,"description":"Connects current linked belt with another one.\n\nNeighbours have to be of different type. If given linked belt is connected to something else it will be disconnected first. If provided neighbour is connected to something else it will also be disconnected first. Automatically updates neighbour to be connected back to this one.\n\nCan also be used on entity ghost if it contains linked-belt.","subclasses":["LinkedBelt"],"parameters":[{"name":"neighbour","order":0,"description":"Another linked belt or entity ghost containing linked belt to connect or nil to disconnect","type":"LuaEntity","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"connect_rolling_stock","order":65,"description":"Connects the rolling stock in the given direction.","subclasses":["RollingStock"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether any connection was made","type":"boolean","optional":false}]},{"name":"copy_settings","order":62,"description":"Copies settings from the given entity onto this entity.","parameters":[{"name":"by_player","order":1,"description":"If provided, the copying is done 'as' this player and [on_entity_settings_pasted](runtime:on_entity_settings_pasted) is triggered.","type":"PlayerIdentification","optional":true},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Any items removed from this entity as a result of copying the settings.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"create_build_effect_smoke","order":90,"description":"Creates the same smoke that is created when you place a building by hand.\n\nYou can play the building sound to go with it by using [LuaSurface::play_sound](runtime:LuaSurface::play_sound), eg: `entity.surface.play_sound{path=\"entity-build/\"..entity.prototype.name, position=entity.position}`","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"damage","order":4,"description":"Damages the entity.","raises":[{"name":"on_entity_damaged","order":0,"description":"","timeframe":"instantly","optional":false}],"subclasses":["EntityWithHealth"],"parameters":[{"name":"cause","order":4,"description":"The entity that originally triggered the events that led to this damage being dealt (e.g. the character, turret, enemy, etc. that pulled the trigger). Does not need to be on the same surface as the entity being damaged.","type":"LuaEntity","optional":true},{"name":"damage","order":0,"description":"The amount of damage to be done.","type":"float","optional":false},{"name":"force","order":1,"description":"The force that will be doing the damage.","type":"ForceID","optional":false},{"name":"source","order":3,"description":"The entity that is directly dealing the damage (e.g. the projectile, flame, sticker, grenade, laser beam, etc.). Needs to be on the same surface as the entity being damaged.","type":"LuaEntity","optional":true},{"name":"type","order":2,"description":"The type of damage to be done, defaults to `\"impact\"`.","type":"DamageTypeID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"the total damage actually applied after resistances.","type":"float","optional":false}]},{"name":"deplete","order":97,"description":"Depletes and destroys this resource entity.","raises":[{"name":"on_resource_depleted","order":0,"description":"","timeframe":"instantly","optional":false}],"subclasses":["ResourceEntity"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"destroy","order":6,"description":"Destroys the entity.\n\nNot all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.","raises":[{"name":"script_raised_destroy","order":0,"description":"Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.","timeframe":"instantly","optional":true}],"parameters":[{"name":"do_cliff_correction","order":0,"description":"Whether neighbouring cliffs should be corrected. Defaults to `false`.","type":"boolean","optional":true},{"name":"item_index","order":3,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.","type":"uint","optional":true},{"name":"player","order":2,"description":"The player whose undo queue this action should be added to.","type":"PlayerIdentification","optional":true},{"name":"raise_destroy","order":1,"description":"If `true`, [script_raised_destroy](runtime:script_raised_destroy) will be called. Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"Returns `false` if the entity was valid and destruction failed, `true` in all other cases.","type":"boolean","optional":false}]},{"name":"die","order":7,"description":"Immediately kills the entity. Does nothing if the entity doesn't have health.\n\nUnlike [LuaEntity::destroy](runtime:LuaEntity::destroy), `die` will trigger the [on_entity_died](runtime:on_entity_died) event and the entity will produce a corpse and drop loot if it has any.","examples":["```\n-- This function can be called with only the `cause` argument and no `force`:\nentity.die(nil, killer_entity)\n```"],"raises":[{"name":"on_entity_died","order":0,"description":"Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `\"neutral\"` force.","timeframe":"instantly","optional":true},{"name":"on_post_entity_died","order":1,"description":"Raised if the entity was successfully killed.","timeframe":"instantly","optional":true}],"parameters":[{"name":"cause","order":1,"description":"The cause to attribute the kill to.","type":"LuaEntity","optional":true},{"name":"force","order":0,"description":"The force to attribute the kill to.","type":"ForceID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the entity was successfully killed.","type":"boolean","optional":false}]},{"name":"disconnect_linked_belts","order":110,"description":"Disconnects linked belt from its neighbour.\n\nCan also be used on entity ghost if it contains linked-belt","subclasses":["LinkedBelt"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"disconnect_rolling_stock","order":66,"description":"Tries to disconnect this rolling stock in the given direction.","subclasses":["RollingStock"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If anything was disconnected","type":"boolean","optional":false}]},{"name":"force_finish_ascending","order":120,"description":"Take an ascending cargo pod and safely make it skip all animation and immediately switch surface.","subclasses":["CargoPod"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"force_finish_descending","order":121,"description":"Take a descending cargo pod and safely make it arrive and deposit cargo.","subclasses":["CargoPod"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_beacon_effect_receivers","order":119,"description":"Returns a table with all entities affected by this beacon","subclasses":["Beacon"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_beacons","order":118,"description":"Returns a table with all beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":true}]},{"name":"get_beam_source","order":84,"description":"Get the source of this beam.","subclasses":["Beam"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"BeamTarget","optional":true}]},{"name":"get_beam_target","order":86,"description":"Get the target of this beam.","subclasses":["Beam"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"BeamTarget","optional":true}]},{"name":"get_burnt_result_inventory","order":3,"description":"The burnt result inventory for this entity or `nil` if this entity doesn't have a burnt result inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_child_signals","order":45,"description":"Returns all child signals. Child signals can be either RailSignal or RailChainSignal. Child signals are signals which are checked by this signal to determine a chain state.","subclasses":["RailChainSignal"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_circuit_network","order":58,"description":"","parameters":[{"name":"wire_connector_id","order":0,"description":"Wire connector to get circuit network for.","type":"defines.wire_connector_id","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The circuit network or nil.","type":"LuaCircuitNetwork","optional":true}]},{"name":"get_connected_rail","order":34,"description":"","subclasses":["Rail"],"parameters":[{"name":"rail_connection_direction","order":1,"description":"","type":"defines.rail_connection_direction","optional":false},{"name":"rail_direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Rail connected in the specified manner to this one, `nil` if unsuccessful.","type":"LuaEntity","optional":true},{"order":1,"description":"Rail direction of the returned rail which points to origin rail","type":"defines.rail_direction","optional":true},{"order":2,"description":"Turn to be taken when going back from returned rail to origin rail","type":"defines.rail_connection_direction","optional":true}]},{"name":"get_connected_rails","order":35,"description":"Get the rails that this signal is connected to.","subclasses":["RailSignal","RailChainSignal"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_connected_rolling_stock","order":103,"description":"Gets rolling stock connected to the given end of this stock.","subclasses":["RollingStock"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The rolling stock connected at the given end, `nil` if none is connected there.","type":"LuaEntity","optional":true},{"order":1,"description":"The rail direction of the connected rolling stock if any.","type":"defines.rail_direction","optional":true}]},{"name":"get_control_behavior","order":56,"description":"Gets the control behavior of the entity (if any).","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The control behavior or `nil`.","type":"LuaControlBehavior","optional":true}]},{"name":"get_damage_to_be_taken","order":96,"description":"Returns the amount of damage to be taken by this entity.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if this entity does not have health.","type":"float","optional":true}]},{"name":"get_driver","order":71,"description":"Gets the driver of this vehicle if any.","subclasses":["Vehicle"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the vehicle contains no driver. To check if there's a passenger see [LuaEntity::get_passenger](runtime:LuaEntity::get_passenger).","type":{"complex_type":"union","options":["LuaEntity","LuaPlayer"],"full_format":false},"optional":true}]},{"name":"get_electric_input_flow_limit","order":116,"description":"The input flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_electric_output_flow_limit","order":117,"description":"The output flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_filter","order":48,"description":"Get the filter for a slot in an inserter, loader, or logistic storage container. The entity must allow filters.","parameters":[{"name":"slot_index","order":0,"description":"Index of the slot to get the filter for.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The filter, or `nil` if the given slot has no filter.","type":"ItemFilter","optional":true}]},{"name":"get_fluid","order":122,"description":"Gets fluid of the i-th fluid storage.","parameters":[{"name":"index","order":0,"description":"Fluid storage index. Valid values are from 1 up to [LuaEntity::fluids_count](runtime:LuaEntity::fluids_count).","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Fluid in this storage. nil if fluid storage is empty.","type":"Fluid","optional":true}]},{"name":"get_fluid_contents","order":80,"description":"Get amounts of all fluids in this entity.\n\nIf information about fluid temperatures is required, [LuaEntity::fluidbox](runtime:LuaEntity::fluidbox) should be used instead.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The amounts, indexed by fluid names.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false}]},{"name":"get_fluid_count","order":79,"description":"Get the amount of all or some fluid in this entity.\n\nIf information about fluid temperatures is required, [LuaEntity::fluidbox](runtime:LuaEntity::fluidbox) should be used instead.","parameters":[{"name":"fluid","order":0,"description":"Prototype name of the fluid to count. If not specified, count all fluids.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_fuel_inventory","order":2,"description":"The fuel inventory for this entity or `nil` if this entity doesn't have a fuel inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_health_ratio","order":89,"description":"The health ratio of this entity between 1 and 0 (for full health and no health respectively).","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if this entity doesn't have health.","type":"float","optional":true}]},{"name":"get_heat_setting","order":54,"description":"Gets the heat setting for this heat interface.","subclasses":["HeatInterface"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"HeatSetting","optional":false}]},{"name":"get_inbound_signals","order":46,"description":"Returns all signals guarding entrance to a rail block this rail belongs to.","subclasses":["Rail"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_infinity_container_filter","order":50,"description":"Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.","subclasses":["InfinityContainer"],"parameters":[{"name":"index","order":0,"description":"The index to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"InfinityInventoryFilter","optional":true}]},{"name":"get_infinity_pipe_filter","order":52,"description":"Gets the filter for this infinity pipe, or `nil` if the filter is empty.","subclasses":["InfinityPipe"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"InfinityPipeFilter","optional":true}]},{"name":"get_item_insert_specification","order":28,"description":"Get an item insert specification onto a belt connectable: for a given map position provides into which line at what position item should be inserted to be closest to the provided position.","subclasses":["TransportBeltConnectable"],"parameters":[{"name":"position","order":0,"description":"Position where the item is to be inserted.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Index of the transport line that is closest to the provided map position.","type":"uint","optional":false},{"order":1,"description":"Position along the transport line where item should be dropped.","type":"float","optional":false}]},{"name":"get_line_item_position","order":29,"description":"Get a map position related to a position on a transport line.","subclasses":["TransportBeltConnectable"],"parameters":[{"name":"index","order":0,"description":"Index of the transport line. Transport lines are 1-indexed.","type":"uint","optional":false},{"name":"position","order":1,"description":"Linear position along the transport line. Clamped to the transport line range.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"MapPosition","optional":false}]},{"name":"get_logistic_point","order":63,"description":"Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.\n\nWhen `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.","parameters":[{"name":"index","order":0,"description":"If provided, only returns the `LuaLogisticPoint` specified by this index.","type":"defines.logistic_member_index","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["LuaLogisticPoint",{"complex_type":"dictionary","key":"defines.logistic_member_index","value":"LuaLogisticPoint"}],"full_format":false},"optional":true}]},{"name":"get_market_items","order":12,"description":"Get all offers in a market as an array.","subclasses":["Market"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"Offer"},"optional":false}]},{"name":"get_max_transport_line_index","order":30,"description":"Get the maximum transport line index of a belt or belt connectable entity.","subclasses":["TransportBeltConnectable"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_module_inventory","order":1,"description":"Inventory for storing modules of this entity; `nil` if this entity has no module inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_or_create_control_behavior","order":57,"description":"Gets (and or creates if needed) the control behavior of the entity.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The control behavior or `nil`.","type":"LuaControlBehavior","optional":true}]},{"name":"get_outbound_signals","order":47,"description":"Returns all signals guarding exit from a rail block this rail belongs to.","subclasses":["Rail"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_output_inventory","order":0,"description":"Gets the entity's output inventory if it has one.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"A reference to the entity's output inventory.","type":"LuaInventory","optional":true}]},{"name":"get_parent_signals","order":44,"description":"Returns all parent signals. Parent signals are always RailChainSignal. Parent signals are those signals that are checking state of this signal to determine their own chain state.","subclasses":["RailSignal","RailChainSignal"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_passenger","order":73,"description":"Gets the passenger of this car or spidertron if any.\n\nThis differs over [LuaEntity::get_driver](runtime:LuaEntity::get_driver) in that the passenger can't drive the car.","subclasses":["Car","SpiderVehicle"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the vehicle contains no passenger. To check if there's a driver see [LuaEntity::get_driver](runtime:LuaEntity::get_driver).","type":{"complex_type":"union","options":["LuaEntity","LuaPlayer"],"full_format":false},"optional":true}]},{"name":"get_priority_target","order":100,"description":"Get the entity ID name at the specified position in the turret's priority list.","parameters":[{"name":"index","order":0,"description":"The index of the entry to fetch.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The name of the entity prototype.","type":"string","optional":false}]},{"name":"get_radius","order":88,"description":"The radius of this entity.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_rail_end","order":115,"description":"Gets a LuaRailEnd object for specified end of this rail","subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRailEnd","optional":false}]},{"name":"get_rail_segment_end","order":38,"description":"Get the rail at the end of the rail segment this rail is in.\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The rail entity.","type":"LuaEntity","optional":false},{"order":1,"description":"A rail direction pointing out of the rail segment from the end rail.","type":"defines.rail_direction","optional":false}]},{"name":"get_rail_segment_length","order":40,"description":"Get the length of the rail segment this rail is in.\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_rail_segment_overlaps","order":41,"description":"Get a rail from each rail segment that overlaps with this rail's rail segment.\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_rail_segment_rails","order":39,"description":"Get all rails of a rail segment this rail is in\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"Selects end of this rail that points to a rail segment end from which to start returning rails","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Rails of this rail segment","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_rail_segment_signal","order":36,"description":"Get the rail signal at the start/end of the rail segment this rail is in.\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"The direction of travel relative to this rail.","type":"defines.rail_direction","optional":false},{"name":"in_else_out","order":1,"description":"If true, gets the signal at the entrance of the rail segment, otherwise gets the signal at the exit of the rail segment.","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the rail segment doesn't start/end with a signal.","type":"LuaEntity","optional":true}]},{"name":"get_rail_segment_stop","order":37,"description":"Get train stop at the start/end of the rail segment this rail is in.\n\nA rail segment is a continuous section of rail with no branches, signals, nor train stops.","subclasses":["Rail"],"parameters":[{"name":"direction","order":0,"description":"The direction of travel relative to this rail.","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the rail segment doesn't start/end with a train stop.","type":"LuaEntity","optional":true}]},{"name":"get_recipe","order":68,"description":"Current recipe being assembled by this machine, if any.","subclasses":["CraftingMachine"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRecipe","optional":true},{"order":1,"description":"","type":"LuaQualityPrototype","optional":true}]},{"name":"get_signal","order":59,"description":"Read a single signal from the selected wire connector","parameters":[{"name":"extra_wire_connector_id","order":2,"description":"Additional wire connector ID. If specified, signal will be added to the result","type":"defines.wire_connector_id","optional":true},{"name":"signal","order":0,"description":"The signal to read.","type":"SignalID","optional":false},{"name":"wire_connector_id","order":1,"description":"Wire connector ID from which to get the signal","type":"defines.wire_connector_id","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The current value of the signal.","type":"int","optional":false}]},{"name":"get_signals","order":60,"description":"Read all signals from the selected wire connector.","parameters":[{"name":"extra_wire_connector_id","order":1,"description":"Additional wire connector ID. If specified, signals will be added to the result","type":"defines.wire_connector_id","optional":true},{"name":"wire_connector_id","order":0,"description":"Wire connector ID from which to get the signal","type":"defines.wire_connector_id","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Current values of all signals.","type":{"complex_type":"array","value":"Signal"},"optional":true}]},{"name":"get_spider_legs","order":111,"description":"Gets legs of given SpiderVehicle.","subclasses":["SpiderVehicle"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_stopped_train","order":77,"description":"The train currently stopped at this train stop, if any.","subclasses":["TrainStop"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaTrain","optional":true}]},{"name":"get_train_stop_trains","order":76,"description":"The trains scheduled to stop at this train stop.","subclasses":["TrainStop"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTrain"},"optional":false}]},{"name":"get_transport_line","order":27,"description":"Get a transport line of a belt or belt connectable entity.","subclasses":["TransportBeltConnectable"],"parameters":[{"name":"index","order":0,"description":"Index of the requested transport line. Transport lines are 1-indexed.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaTransportLine","optional":false}]},{"name":"get_upgrade_target","order":95,"description":"Returns the new entity prototype and its quality.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if this entity is not marked for upgrade.","type":"LuaEntityPrototype","optional":true},{"order":1,"description":"`nil` if this entity is not marked for upgrade.","type":"LuaQualityPrototype","optional":true}]},{"name":"get_wire_connector","order":113,"description":"Gets a single wire connector of this entity","parameters":[{"name":"or_create","order":1,"description":"If true and connector does not exist, it will be allocated if possible","type":"boolean","optional":false},{"name":"wire_connector_id","order":0,"description":"Identifier of a specific connector to get","type":"defines.wire_connector_id","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaWireConnector","optional":false}]},{"name":"get_wire_connectors","order":114,"description":"Gets all wire connectors of this entity","parameters":[{"name":"or_create","order":0,"description":"If true, it will try to create all connectors possible","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"dictionary","key":"defines.wire_connector_id","value":"LuaWireConnector"},"optional":false}]},{"name":"ghost_has_flag","order":9,"description":"Same as [LuaEntity::has_flag](runtime:LuaEntity::has_flag), but targets the inner entity on a entity ghost.","subclasses":["EntityGhost"],"parameters":[{"name":"flag","order":0,"description":"The flag to test.","type":"EntityPrototypeFlag","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if the entity has the given flag set.","type":"boolean","optional":false}]},{"name":"has_flag","order":8,"description":"Test whether this entity's prototype has a certain flag set.\n\n`entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.","parameters":[{"name":"flag","order":0,"description":"The flag to test.","type":"EntityPrototypeFlag","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this entity has the given flag set.","type":"boolean","optional":false}]},{"name":"insert_fluid","order":82,"description":"Insert fluid into this entity. Fluidbox is chosen automatically.","parameters":[{"name":"fluid","order":0,"description":"Fluid to insert.","type":"Fluid","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Amount of fluid actually inserted.","type":"double","optional":false}]},{"name":"is_closed","order":23,"description":"","subclasses":["Gate"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this gate is currently closed.","type":"boolean","optional":false}]},{"name":"is_closing","order":24,"description":"","subclasses":["Gate"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this gate is currently closing","type":"boolean","optional":false}]},{"name":"is_connected_to_electric_network","order":75,"description":"Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_crafting","order":20,"description":"Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.","subclasses":["CraftingMachine"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_opened","order":21,"description":"","subclasses":["Gate"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this gate is currently opened.","type":"boolean","optional":false}]},{"name":"is_opening","order":22,"description":"","subclasses":["Gate"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this gate is currently opening.","type":"boolean","optional":false}]},{"name":"is_rail_in_same_rail_block_as","order":43,"description":"Checks if this rail and other rail both belong to the same rail block.","subclasses":["Rail"],"parameters":[{"name":"other_rail","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_rail_in_same_rail_segment_as","order":42,"description":"Checks if this rail and other rail both belong to the same rail segment.","subclasses":["Rail"],"parameters":[{"name":"other_rail","order":0,"description":"","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_construction","order":104,"description":"Is this entity or tile ghost or item request proxy registered for construction? If false, it means a construction robot has been dispatched to build the entity, or it is not an entity that can be constructed.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_deconstruction","order":105,"description":"Is this entity registered for deconstruction with this force? If false, it means a construction robot has been dispatched to deconstruct it, or it is not marked for deconstruction. The complexity is effectively O(1) - it depends on the number of objects targeting this entity which should be small enough.","parameters":[{"name":"force","order":0,"description":"The force construction manager to check.","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_repair","order":107,"description":"Is this entity registered for repair? If false, it means a construction robot has been dispatched to upgrade it, or it is not damaged. This is worst-case O(N) complexity where N is the current number of things in the repair queue.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_registered_for_upgrade","order":106,"description":"Is this entity registered for upgrade? If false, it means a construction robot has been dispatched to upgrade it, or it is not marked for upgrade. This is worst-case O(N) complexity where N is the current number of things in the upgrade queue.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"launch_rocket","order":31,"description":"","raises":[{"name":"on_rocket_launch_ordered","order":0,"description":"Raised if the rocket launch was successfully initiated.","timeframe":"instantly","optional":true}],"subclasses":["RocketSilo"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if the rocket was successfully launched. Return value of `false` means the silo is not ready for launch.","type":"boolean","optional":false}]},{"name":"mine","order":98,"description":"Mines this entity.\n\n'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.\n\nThe result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory.","raises":[{"name":"script_raised_destroy","order":0,"description":"Raised if the `raise_destroyed` flag was set and the entity was successfully mined.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":1,"description":"If true, when the item(s) don't fit into the given inventory the entity is force mined. If false, the mining operation fails when there isn't enough room to transfer all of the items into the inventory. Defaults to false. This is ignored and acts as `true` if no inventory is provided.","type":"boolean","optional":true},{"name":"ignore_minable","order":3,"description":"If true, the minable state of the entity is ignored. Defaults to `false`. If false, an entity that isn't minable (set as not-minable in the prototype or isn't minable for other reasons) will fail to be mined.","type":"boolean","optional":true},{"name":"inventory","order":0,"description":"If provided the item(s) will be transferred into this inventory. If provided, this must be an inventory created with [LuaGameScript::create_inventory](runtime:LuaGameScript::create_inventory) or be a basic inventory owned by some entity.","type":"LuaInventory","optional":true},{"name":"raise_destroyed","order":2,"description":"If true, [script_raised_destroy](runtime:script_raised_destroy) will be raised. Defaults to `true`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"Whether mining succeeded.","type":"boolean","optional":false}]},{"name":"order_deconstruction","order":14,"description":"Sets the entity to be deconstructed by construction robots.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised if the entity was successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force whose robots are supposed to do the deconstruction.","type":"ForceID","optional":false},{"name":"item_index","order":2,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. An index of `1` adds the action to the latest undo action on the stack. Defaults to putting it into the appropriate undo item automatically if one is not specified.","type":"uint","optional":true},{"name":"player","order":1,"description":"The player to set the last_user to, if any. Also the player whose undo queue this action should be added to.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"if the entity was marked for deconstruction.","type":"boolean","optional":false}]},{"name":"order_upgrade","order":17,"description":"Sets the entity to be upgraded by construction robots.","raises":[{"name":"on_marked_for_upgrade","order":0,"description":"Raised if the entity was successfully marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":1,"description":"The force whose robots are supposed to do the upgrade.","type":"ForceID","optional":false},{"name":"item_index","order":3,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.","type":"uint","optional":true},{"name":"player","order":2,"description":"The player whose undo queue this action should be added to.","type":"PlayerIdentification","optional":true},{"name":"target","order":0,"description":"The prototype of the entity to upgrade to.","type":"EntityWithQualityID","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Whether the entity was marked for upgrade.","type":"boolean","optional":false}]},{"name":"play_note","order":64,"description":"Plays a note with the given instrument and note.","subclasses":["ProgrammableSpeaker"],"parameters":[{"name":"instrument","order":0,"description":"","type":"uint","optional":false},{"name":"note","order":1,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the request is valid. The sound may or may not be played depending on polyphony settings.","type":"boolean","optional":false}]},{"name":"release_from_spawner","order":91,"description":"Release the unit from the spawner which spawned it. This allows the spawner to continue spawning additional units.","subclasses":["Unit","SpiderUnit"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"remove_fluid","order":81,"description":"Remove fluid from this entity.\n\nIf temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.","parameters":[{"name":"amount","order":1,"description":"Amount to remove","type":"double","optional":false},{"name":"maximum_temperature","order":3,"description":"","type":"double","optional":true},{"name":"minimum_temperature","order":2,"description":"","type":"double","optional":true},{"name":"name","order":0,"description":"Fluid prototype name.","type":"string","optional":false},{"name":"temperature","order":4,"description":"","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Amount of fluid actually removed.","type":"double","optional":false}]},{"name":"remove_market_item","order":11,"description":"Remove an offer from a market.\n\nThe other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.","subclasses":["Market"],"parameters":[{"name":"offer","order":0,"description":"Index of offer to remove.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if the offer was successfully removed; `false` when the given index was not valid.","type":"boolean","optional":false}]},{"name":"request_to_close","order":26,"description":"","subclasses":["Gate"],"parameters":[{"name":"force","order":0,"description":"The force that requests the gate to be closed.","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"request_to_open","order":25,"description":"","subclasses":["Gate"],"parameters":[{"name":"extra_time","order":1,"description":"Extra ticks to stay open.","type":"uint","optional":true},{"name":"force","order":0,"description":"The force that requests the gate to be open.","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"revive","order":32,"description":"Revive a ghost, which turns it from a ghost into a real entity or tile.","raises":[{"name":"script_raised_revive","order":0,"description":"Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.","timeframe":"instantly","optional":true},{"name":"script_raised_set_tiles","order":1,"description":"Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.","timeframe":"instantly","optional":true}],"subclasses":["Ghost"],"parameters":[{"name":"raise_revive","order":1,"description":"If true, and an entity ghost; [script_raised_revive](runtime:script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](runtime:script_raised_set_tiles) will be called.","type":"boolean","optional":true},{"name":"return_item_request_proxy","order":0,"description":"If `true` the function will return item request proxy as the third return value.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"Any items the new real entity collided with or `nil` if the ghost could not be revived.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true},{"order":1,"description":"The revived entity if an entity ghost was successfully revived.","type":"LuaEntity","optional":true},{"order":2,"description":"The item request proxy if it was requested with `return_item_request_proxy`.","type":"LuaEntity","optional":true}]},{"name":"rotate","order":70,"description":"Rotates this entity as if the player rotated it.","raises":[{"name":"on_player_rotated_entity","order":0,"description":"Raised if the `by_player` argument was given and the rotation was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"by_player","order":1,"description":"","type":"PlayerIdentification","optional":true},{"name":"reverse","order":0,"description":"If `true`, rotate the entity in the counter-clockwise direction.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"Whether the rotation was successful.","type":"boolean","optional":false}]},{"name":"set_beam_source","order":85,"description":"Set the source of this beam.","subclasses":["Beam"],"parameters":[{"name":"source","order":0,"description":"","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_beam_target","order":87,"description":"Set the target of this beam.","subclasses":["Beam"],"parameters":[{"name":"target","order":0,"description":"","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_driver","order":72,"description":"Sets the driver of this vehicle.\n\nThis differs from [LuaEntity::set_passenger](runtime:LuaEntity::set_passenger) in that the passenger can't drive the vehicle.","raises":[{"name":"on_player_driving_changed_state","order":0,"description":"","timeframe":"instantly","optional":true}],"subclasses":["Vehicle"],"parameters":[{"name":"driver","order":0,"description":"The new driver. Writing `nil` ejects the current driver, if any.","type":{"complex_type":"union","options":["LuaEntity","PlayerIdentification"],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_filter","order":49,"description":"Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID) or logistic storage container (ItemWithQualityID). The entity must allow filters.","parameters":[{"name":"filter","order":1,"description":"The item or entity to filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["ItemFilter","ItemWithQualityID","EntityID"],"full_format":false},"optional":true},{"name":"index","order":0,"description":"Index of the slot to set the filter for.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_fluid","order":123,"description":"Sets fluid to the i-th fluid storage.\n\nFluid storages that are part of FluidBoxes (also available through [LuaFluidBox](runtime:LuaFluidBox)) may reject some fluids if they do not match filters or are above the FluidBox volume. To verify how much fluid was set a return value can be used which is the same as value that would be returned by [LuaEntity::get_fluid](runtime:LuaEntity::get_fluid).","parameters":[{"name":"fluid","order":1,"description":"Fluid to set. Fluid storage will be cleared if this is not provided.","type":"Fluid","optional":true},{"name":"index","order":0,"description":"Fluid storage index. Valid values are from 1 up to [LuaEntity::fluids_count](runtime:LuaEntity::fluids_count).","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Fluid in this storage after it was set. nil if fluid storage is empty.","type":"Fluid","optional":true}]},{"name":"set_heat_setting","order":55,"description":"Sets the heat setting for this heat interface.","subclasses":["HeatInterface"],"parameters":[{"name":"filter","order":0,"description":"The new setting.","type":"HeatSetting","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_infinity_container_filter","order":51,"description":"Sets the filter for this infinity container at the given index.","subclasses":["InfinityContainer"],"parameters":[{"name":"filter","order":1,"description":"The new filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityInventoryFilter","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index to set.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_infinity_pipe_filter","order":53,"description":"Sets the filter for this infinity pipe.","subclasses":["InfinityPipe"],"parameters":[{"name":"filter","order":0,"description":"The new filter, or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityPipeFilter","nil"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_passenger","order":74,"description":"Sets the passenger of this car or spidertron.\n\nThis differs from [LuaEntity::get_driver](runtime:LuaEntity::get_driver) in that the passenger can't drive the car.","raises":[{"name":"on_player_driving_changed_state","order":0,"description":"","timeframe":"instantly","optional":true}],"subclasses":["Car","SpiderVehicle"],"parameters":[{"name":"passenger","order":0,"description":"The new passenger. Writing `nil` ejects the current passenger, if any.","type":{"complex_type":"union","options":["LuaEntity","PlayerIdentification"],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_priority_target","order":101,"description":"Set the entity ID name at the specified position in the turret's priority list.","parameters":[{"name":"entity_id","order":1,"description":"The name of the entity prototype, or `nil` to clear the entry.","type":"EntityID","optional":true},{"name":"index","order":0,"description":"The index of the entry to set.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_recipe","order":69,"description":"Sets the given recipe in this assembly machine.","subclasses":["AssemblingMachine"],"parameters":[{"name":"quality","order":1,"description":"The quality. If not provided `normal` is used.","type":"QualityID","optional":true},{"name":"recipe","order":0,"description":"The new recipe. Writing `nil` clears the recipe, if any.","type":"RecipeID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Any items removed from this entity as a result of setting the recipe.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"silent_revive","order":33,"description":"Revives a ghost silently, so the revival makes no sound and no smoke is created.","raises":[{"name":"script_raised_revive","order":0,"description":"Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.","timeframe":"instantly","optional":true},{"name":"script_raised_set_tiles","order":1,"description":"Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.","timeframe":"instantly","optional":true}],"subclasses":["Ghost"],"parameters":[{"name":"raise_revive","order":0,"description":"If true, and an entity ghost; [script_raised_revive](runtime:script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](runtime:script_raised_set_tiles) will be called.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"Any items the new real entity collided with or `nil` if the ghost could not be revived.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false},{"order":1,"description":"The revived entity if an entity ghost was successfully revived.","type":"LuaEntity","optional":true},{"order":2,"description":"The item request proxy.","type":"LuaEntity","optional":true}]},{"name":"spawn_decorations","order":99,"description":"Triggers spawn_decoration actions defined in the entity prototype or does nothing if entity is not \"turret\" or \"unit-spawner\".","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"start_fading_out","order":94,"description":"Only works if the entity is a speech-bubble, with an \"effect\" defined in its wrapper_flow_style. Starts animating the opacity of the speech bubble towards zero, and destroys the entity when it hits zero.","subclasses":["SpeechBubble"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"stop_spider","order":112,"description":"Sets the [speed](runtime:LuaEntity::speed) of the given SpiderVehicle to zero. Notably does not clear its [autopilot_destination](runtime:LuaEntity::autopilot_destination), which it will continue moving towards if set.","subclasses":["SpiderVehicle"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"supports_backer_name","order":61,"description":"Whether this entity supports a backer name.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"to_be_deconstructed","order":16,"description":"Is this entity marked for deconstruction?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"to_be_upgraded","order":19,"description":"Is this entity marked for upgrade?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"toggle_equipment_movement_bonus","order":92,"description":"Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.\n\nThis property can also be read and written on the equipment grid of this entity.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"update_connections","order":67,"description":"Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. The game doesn't do this automatically as we don't want to lose performance by checking this in normal games.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"absorbed_pollution","order":112,"description":"","subclasses":["Spawner"],"read_type":"double","optional":false},{"name":"active","order":9,"description":"Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).\n\nEntities that are not active naturally can't be set to be active (setting it to be active will do nothing)\n\nGhosts, simple smoke, and corpses can't be modified at this time.\n\nIt is even possible to set the character to not be active, so he can't move and perform most of the tasks.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"ai_settings","order":139,"description":"The ai settings of this unit.","subclasses":["Unit","SpiderUnit"],"read_type":"LuaAISettings","optional":false},{"name":"alert_parameters","order":106,"description":"","subclasses":["ProgrammableSpeaker"],"read_type":"ProgrammableSpeakerAlertParameters","write_type":"ProgrammableSpeakerAlertParameters","optional":false},{"name":"allow_dispatching_robots","order":149,"description":"Whether this character's personal roboports are allowed to dispatch robots.","subclasses":["Character"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"always_on","order":190,"description":"If the lamp is always on when not driven by control behavior.","subclasses":["Lamp"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"amount","order":23,"description":"Count of resource units contained.","subclasses":["ResourceEntity"],"read_type":"uint","write_type":"uint","optional":false},{"name":"armed","order":132,"description":"Whether this land mine is armed.","subclasses":["LandMine"],"read_type":"boolean","optional":false},{"name":"artillery_auto_targeting","order":191,"description":"If this artillery auto-targets enemies.","subclasses":["ArtilleryWagon","ArtilleryTurret"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"associated_player","order":124,"description":"The player this character is associated with, if any. Set to `nil` to clear.\n\nThe player will be automatically disassociated when a controller is set on the character. Also, all characters associated to a player will be logged off when the player logs off in multiplayer.\n\nReading this property will return a [LuaPlayer](runtime:LuaPlayer), while [PlayerIdentification](runtime:PlayerIdentification) can be used when writing.\n\nA character associated with a player is not directly controlled by any player.","subclasses":["Character"],"read_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"write_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true},{"name":"autopilot_destination","order":157,"description":"Destination of this spidertron's autopilot, if any. Writing `nil` clears all destinations.","subclasses":["SpiderVehicle"],"read_type":"MapPosition","write_type":"MapPosition","optional":true},{"name":"autopilot_destinations","order":158,"description":"The queued destination positions of spidertron's autopilot.","subclasses":["SpiderVehicle"],"read_type":{"complex_type":"array","value":"MapPosition"},"optional":false},{"name":"backer_name","order":49,"description":"The backer name assigned to this entity. Entities that support backer names are labs, locomotives, radars, roboports, and train stops. `nil` if this entity doesn't support backer names.\n\nWhile train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.","raises":[{"name":"on_entity_renamed","order":0,"description":"","timeframe":"instantly","optional":false}],"read_type":"string","write_type":"string","optional":true},{"name":"beacons_count","order":118,"description":"Number of beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)","read_type":"uint","optional":true},{"name":"belt_neighbours","order":47,"description":"The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see [LuaEntity::neighbours](runtime:LuaEntity::neighbours) for that.","subclasses":["TransportBeltConnectable"],"read_type":{"complex_type":"table","parameters":[{"name":"inputs","order":0,"description":"Array of transport belt connectable entities.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"outputs","order":1,"description":"Array of transport belt connectable entities.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},"optional":false},{"name":"belt_shape","order":185,"description":"Gives what is the current shape of a transport-belt.\n\nCan also be used on entity ghost if it contains transport-belt.","subclasses":["TransportBelt"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"straight"},{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"right"}],"full_format":false},"optional":false},{"name":"belt_to_ground_type","order":64,"description":"Whether this underground belt goes into or out of the ground.","subclasses":["UndergroundBelt"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"optional":false},{"name":"bonus_mining_progress","order":81,"description":"The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.","read_type":"double","write_type":"double","optional":true},{"name":"bonus_progress","order":58,"description":"The current productivity bonus progress, as a number in range `[0, 1]`.","subclasses":["CraftingMachine"],"read_type":"double","write_type":"double","optional":false},{"name":"bounding_box","order":84,"description":"[LuaEntityPrototype::collision_box](runtime:LuaEntityPrototype::collision_box) around entity's given position and respecting the current entity orientation.","read_type":"BoundingBox","optional":false},{"name":"burner","order":99,"description":"The burner energy source for this entity, if any.","read_type":"LuaBurner","optional":true},{"name":"cargo_pod","order":193,"description":"Gets the cargo pod attached to this rocket silo rocket if one exists.","subclasses":["RocketSiloRocket"],"read_type":"LuaEntity","optional":true},{"name":"chain_signal_state","order":54,"description":"The state of this chain signal.","subclasses":["RailChainSignal"],"read_type":"defines.chain_signal_state","optional":false},{"name":"character_corpse_death_cause","order":123,"description":"The reason this character corpse character died. `\"\"` if there is no reason.","subclasses":["CharacterCorpse"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"character_corpse_player_index","order":121,"description":"The player index associated with this character corpse.\n\nThe index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.","subclasses":["CharacterCorpse"],"read_type":"uint","write_type":"uint","optional":false},{"name":"character_corpse_tick_of_death","order":122,"description":"The tick this character corpse died at.","subclasses":["CharacterCorpse"],"read_type":"uint","write_type":"uint","optional":false},{"name":"cliff_orientation","order":20,"description":"The orientation of this cliff.","subclasses":["Cliff"],"read_type":"CliffOrientation","optional":false},{"name":"color","order":52,"description":"The color of this character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. `nil` if this entity doesn't use custom colors.\n\nCar color is overridden by the color of the current driver/passenger, if there is one.","read_type":"Color","write_type":"Color","optional":true},{"name":"combat_robot_owner","order":164,"description":"The owner of this combat robot, if any.","subclasses":["CombatRobot"],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"combinator_description","order":116,"description":"The description on this combinator","read_type":"string","write_type":"string","optional":false},{"name":"commandable","order":187,"description":"Returns a LuaCommandable for this entity or nil if entity is not commandable.","read_type":"LuaCommandable","optional":true},{"name":"connected_rail","order":134,"description":"The rail entity this train stop is connected to, if any.","subclasses":["TrainStop"],"read_type":"LuaEntity","optional":true},{"name":"connected_rail_direction","order":135,"description":"Rail direction to which this train stop is binding. This returns a value even when no rails are present.","subclasses":["TrainStop"],"read_type":"defines.rail_direction","optional":false},{"name":"consumption_bonus","order":63,"description":"The consumption bonus of this entity.","read_type":"double","optional":false},{"name":"consumption_modifier","order":26,"description":"Multiplies the energy consumption.","subclasses":["Car"],"read_type":"float","write_type":"float","optional":false},{"name":"copy_color_from_train_stop","order":181,"description":"If this RollingStock has 'copy color from train stop' enabled.","subclasses":["RollingStock"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"corpse_expires","order":153,"description":"Whether this corpse will ever fade away.","subclasses":["Corpse"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"corpse_immune_to_entity_placement","order":154,"description":"If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of [CorpsePrototype::remove_on_entity_placement](prototype:CorpsePrototype::remove_on_entity_placement).","subclasses":["Corpse"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"crafting_progress","order":57,"description":"The current crafting progress, as a number in range `[0, 1]`.","subclasses":["CraftingMachine"],"read_type":"float","write_type":"float","optional":false},{"name":"crafting_speed","order":56,"description":"The current crafting speed, including speed bonuses from modules and beacons.","subclasses":["CraftingMachine"],"read_type":"double","optional":false},{"name":"crane_destination","order":177,"description":"Destination of the crane of this entity. Throws when trying to set the destination out of range.","subclasses":["AgriculturalTower"],"read_type":"MapPosition","write_type":"MapPosition","optional":false},{"name":"crane_destination_3d","order":178,"description":"Destination of the crane of this entity in 3D. Throws when trying to set the destination out of range.","subclasses":["AgriculturalTower"],"read_type":"Vector3D","write_type":"Vector3D","optional":false},{"name":"crane_grappler_destination","order":179,"description":"Will set destination for the grappler of crane of this entity. The crane grappler will start moving to reach the destination, but the rest of the arm will remain stationary. Throws when trying to set the destination out of range.","subclasses":["AgriculturalTower"],"write_type":"MapPosition","optional":false},{"name":"crane_grappler_destination_3d","order":180,"description":"Will set destination in 3D for the grappler of crane of this entity. The crane grappler will start moving to reach the destination, but the rest of the arm will remain stationary. Throws when trying to set the destination out of range.","subclasses":["AgriculturalTower"],"write_type":"Vector3D","optional":false},{"name":"custom_status","order":143,"description":"A custom status for this entity that will be displayed in the GUI.","read_type":"CustomEntityStatus","write_type":"CustomEntityStatus","optional":true},{"name":"damage_dealt","order":71,"description":"The damage dealt by this turret, artillery turret, or artillery wagon.","subclasses":["Turret"],"read_type":"double","write_type":"double","optional":false},{"name":"destructible","order":10,"description":"If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.\n\nEntities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"direction","order":16,"description":"The current direction this entity is facing.","read_type":"defines.direction","write_type":"defines.direction","optional":false},{"name":"draw_data","order":183,"description":"Gives a draw data of the given entity if it supports such data.","subclasses":["RollingStock"],"read_type":"RollingStockDrawData","optional":false},{"name":"driver_is_gunner","order":28,"description":"Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.","subclasses":["Car","SpiderVehicle"],"read_type":"boolean","write_type":"boolean","optional":true},{"name":"drop_position","order":35,"description":"Position where the entity puts its stuff.\n\nMining drills and crafting machines can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position.\n\nMeaningful only for entities that put stuff somewhere, such as mining drills, crafting machines with a drop target or inserters.","read_type":"MapPosition","write_type":"MapPosition","optional":false},{"name":"drop_target","order":37,"description":"The entity this entity is putting its items to. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position. `nil` if there is no entity to put items to, or if this is not an entity that puts items somewhere.","read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"effective_speed","order":31,"description":"The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. `nil` if this is not a unit.","subclasses":["Unit"],"read_type":"float","optional":true},{"name":"effectivity_modifier","order":25,"description":"Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.","subclasses":["Car"],"read_type":"float","write_type":"float","optional":false},{"name":"effects","order":117,"description":"The effects being applied to this entity, if any. For beacons, this is the effect the beacon is broadcasting.","read_type":"ModuleEffects","optional":true},{"name":"electric_buffer_size","order":75,"description":"The buffer size for the electric energy source. `nil` if the entity doesn't have an electric energy source.\n\nWrite access is limited to the ElectricEnergyInterface type.","read_type":"double","write_type":"double","optional":true},{"name":"electric_drain","order":76,"description":"The electric drain for the electric energy source. `nil` if the entity doesn't have an electric energy source.","read_type":"double","optional":true},{"name":"electric_emissions_per_joule","order":77,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. `nil` if the entity doesn't have an electric energy source. Multiplying values in the returned table by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":true},{"name":"electric_network_id","order":148,"description":"Returns the id of the electric network that this entity is connected to, if any.","read_type":"uint","optional":true},{"name":"electric_network_statistics","order":107,"description":"The electric network statistics for this electric pole.","subclasses":["ElectricPole"],"read_type":"LuaFlowStatistics","optional":false},{"name":"enable_logistics_while_moving","order":144,"description":"Whether equipment grid logistics are enabled while this vehicle is moving.","subclasses":["Vehicle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"energy","order":40,"description":"Energy stored in the entity's energy buffer (energy stored in electrical devices etc.). Always 0 for entities that don't have the concept of energy stored inside.","examples":["```\ngame.player.print(\"Machine energy: \" .. game.player.selected.energy .. \"J\")\ngame.player.selected.energy = 3000\n```"],"read_type":"double","write_type":"double","optional":false},{"name":"energy_generated_last_tick","order":150,"description":"How much energy this generator generated in the last tick.","subclasses":["Generator"],"read_type":"double","optional":false},{"name":"entity_label","order":50,"description":"The label on this spider-vehicle entity, if any. `nil` if this is not a spider-vehicle.","raises":[{"name":"on_entity_renamed","order":0,"description":"","timeframe":"instantly","optional":false}],"read_type":"string","write_type":"string","optional":true},{"name":"filter_slot_count","order":89,"description":"The number of filter slots this inserter, loader, mining drill or logistic storage container has. 0 if not one of those entities.","read_type":"uint","optional":false},{"name":"fluidbox","order":48,"description":"Fluidboxes of this entity.","read_type":"LuaFluidBox","optional":false},{"name":"fluids_count","order":188,"description":"Returns count of fluid storages. This includes fluid storages provided by FluidBoxes but also covers other fluid storages like FluidTurret's internal buffer and FluidWagon's fluid since they are not FluidBox and cannot be exposed through [LuaFluidBox](runtime:LuaFluidBox).","read_type":"uint","optional":false},{"name":"follow_offset","order":167,"description":"The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.","subclasses":["SpiderVehicle"],"read_type":"Vector","write_type":"Vector","optional":true},{"name":"follow_target","order":166,"description":"The follow target of this spidertron, if any.","subclasses":["SpiderVehicle"],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"friction_modifier","order":27,"description":"Multiplies the car friction rate.","examples":["```\n-- This will allow the car to go much faster\ngame.player.vehicle.friction_modifier = 0.5\n```"],"subclasses":["Car"],"read_type":"float","write_type":"float","optional":false},{"name":"ghost_localised_description","order":5,"description":"","subclasses":["Ghost"],"read_type":"LocalisedString","optional":false},{"name":"ghost_localised_name","order":4,"description":"Localised name of the entity or tile contained in this ghost.","subclasses":["Ghost"],"read_type":"LocalisedString","optional":false},{"name":"ghost_name","order":1,"description":"Name of the entity or tile contained in this ghost","subclasses":["Ghost"],"read_type":"string","optional":false},{"name":"ghost_prototype","order":34,"description":"The prototype of the entity or tile contained in this ghost.","subclasses":["Ghost"],"read_type":{"complex_type":"union","options":["LuaEntityPrototype","LuaTilePrototype"],"full_format":false},"optional":false},{"name":"ghost_type","order":7,"description":"The prototype type of the entity or tile contained in this ghost.","subclasses":["Ghost"],"read_type":"string","optional":false},{"name":"ghost_unit_number","order":79,"description":"The [unit_number](runtime:LuaEntity::unit_number) of the entity contained in this ghost. It is the same as the unit number of the [EntityWithOwnerPrototype](prototype:EntityWithOwnerPrototype) that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`.","subclasses":["EntityGhost"],"read_type":"uint","optional":true},{"name":"gps_tag","order":186,"description":"Returns a [rich text](https://wiki.factorio.com/Rich_text) string containing this entity's position and surface name as a gps tag. [Printing](runtime:LuaGameScript::print) it will ping the location of the entity.","examples":["```\n-- called on a LuaEntity on the default surface it returns:\nentity.gps_tag -- => \"[gps=-4,-9]\"\n\n-- called on a LuaEntity on \"custom-surface\" it returns:\ndifferent_entity.gps_tag -- => \"[gps=1,-5,custom-surface]\"\n```"],"read_type":"string","optional":false},{"name":"graphics_variation","order":92,"description":"The graphics variation for this entity. `nil` if this entity doesn't use graphics variations.","read_type":"uint8","write_type":"uint8","optional":true},{"name":"grid","order":91,"description":"This entity's equipment grid, if any.","read_type":"LuaEquipmentGrid","optional":true},{"name":"health","order":14,"description":"The current health of the entity, if any. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.\n\nTo get the maximum possible health of this entity, see [LuaEntity::max_health](runtime:LuaEntity::max_health).","read_type":"float","write_type":"float","optional":true},{"name":"held_stack","order":43,"description":"The item stack currently held in an inserter's hand.","subclasses":["Inserter"],"read_type":"LuaItemStack","optional":false},{"name":"held_stack_position","order":44,"description":"Current position of the inserter's \"hand\".","subclasses":["Inserter"],"read_type":"MapPosition","optional":false},{"name":"highlight_box_blink_interval","order":141,"description":"The blink interval of this highlight box entity. `0` indicates no blink.","subclasses":["HighlightBox"],"read_type":"uint","write_type":"uint","optional":false},{"name":"highlight_box_type","order":140,"description":"The highlight box type of this highlight box entity.","subclasses":["HighlightBox"],"read_type":"CursorBoxRenderType","write_type":"CursorBoxRenderType","optional":false},{"name":"ignore_unprioritised_targets","order":73,"description":"Whether this turret shoots at targets that are not on its priority list.","subclasses":["Turret"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"infinity_container_filters","order":119,"description":"The filters for this infinity container.","subclasses":["InfinityContainer"],"read_type":{"complex_type":"array","value":"InfinityInventoryFilter"},"write_type":{"complex_type":"array","value":"InfinityInventoryFilter"},"optional":false},{"name":"initial_amount","order":24,"description":"Count of initial resource units contained. `nil` if this is not an infinite resource.\n\nIf this is not an infinite resource, writing will produce an error.","subclasses":["ResourceEntity"],"read_type":"uint","write_type":"uint","optional":true},{"name":"inserter_filter_mode","order":128,"description":"The filter mode for this filter inserter. `nil` if this inserter doesn't use filters.","subclasses":["Inserter"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"whitelist"},{"complex_type":"literal","value":"blacklist"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"whitelist"},{"complex_type":"literal","value":"blacklist"}],"full_format":false},"optional":true},{"name":"inserter_stack_size_override","order":109,"description":"Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.\n\nSet to `0` to reset.","subclasses":["Inserter"],"read_type":"uint","write_type":"uint","optional":false},{"name":"inserter_target_pickup_count","order":108,"description":"Returns the current target pickup count of the inserter.\n\nThis considers the circuit network, manual override and the inserter stack size limit based on technology.","subclasses":["Inserter"],"read_type":"uint","optional":false},{"name":"is_entity_with_health","order":163,"description":"If this entity is EntityWithHealth","read_type":"boolean","optional":false},{"name":"is_entity_with_owner","order":162,"description":"If this entity is EntityWithOwner","read_type":"boolean","optional":false},{"name":"is_headed_to_trains_front","order":182,"description":"If the rolling stock is facing train's front.","subclasses":["RollingStock"],"read_type":"boolean","optional":false},{"name":"is_military_target","order":161,"description":"Whether this entity is a MilitaryTarget. Can be written to if [LuaEntityPrototype::allow_run_time_change_of_is_military_target](runtime:LuaEntityPrototype::allow_run_time_change_of_is_military_target) returns `true`.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"item_requests","order":69,"description":"Items this ghost will request when revived or items this item request proxy is requesting.","read_type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false},{"name":"kills","order":72,"description":"The number of units killed by this turret, artillery turret, or artillery wagon.","subclasses":["Turret"],"read_type":"uint","write_type":"uint","optional":false},{"name":"last_user","order":74,"description":"The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. `nil` if the last user is not part of the save anymore.\n\nReading this property will return a [LuaPlayer](runtime:LuaPlayer), while [PlayerIdentification](runtime:PlayerIdentification) can be used when writing.","subclasses":["EntityWithOwner","DeconstructibleTileProxy","TileGhost"],"read_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"write_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true},{"name":"link_id","order":165,"description":"The link ID this linked container is using.","subclasses":["LinkedContainer"],"read_type":"uint","write_type":"uint","optional":false},{"name":"linked_belt_neighbour","order":169,"description":"Neighbour to which this linked belt is connected to, if any.\n\nCan also be used on entity ghost if it contains linked-belt.\n\nMay return entity ghost which contains linked belt to which connection is made.","subclasses":["LinkedBelt"],"read_type":"LuaEntity","optional":true},{"name":"linked_belt_type","order":168,"description":"Type of linked belt. Changing type will also flip direction so the belt is out of the same side.\n\nCan only be changed when linked belt is disconnected (has no neighbour set).\n\nCan also be used on entity ghost if it contains linked-belt.","subclasses":["LinkedBelt"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"optional":false},{"name":"loader_container","order":90,"description":"The container entity this loader is pointing at/pulling from depending on the [LuaEntity::loader_type](runtime:LuaEntity::loader_type), if any.","subclasses":["Loader"],"read_type":"LuaEntity","optional":true},{"name":"loader_type","order":65,"description":"Whether this loader gets items from or puts item into a container.","subclasses":["Loader"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"optional":false},{"name":"localised_description","order":3,"description":"","read_type":"LocalisedString","optional":false},{"name":"localised_name","order":2,"description":"Localised name of the entity.","read_type":"LocalisedString","optional":false},{"name":"logistic_cell","order":68,"description":"The logistic cell this entity is a part of. Will be `nil` if this entity is not a part of any logistic cell.","read_type":"LuaLogisticCell","optional":false},{"name":"logistic_network","order":67,"description":"The logistic network this entity is a part of, or `nil` if this entity is not a part of any logistic network.","read_type":"LuaLogisticNetwork","write_type":"LuaLogisticNetwork","optional":false},{"name":"max_health","order":15,"description":"Max health of this entity. Quality of entity is taken into account.","read_type":"float","optional":false},{"name":"minable","order":11,"description":"Not minable entities can still be destroyed.\n\nEntities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"mining_drill_filter_mode","order":129,"description":"The filter mode for this mining drill. `nil` if this mining drill doesn't have filters.","subclasses":["MiningDrill"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"whitelist"},{"complex_type":"literal","value":"blacklist"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"whitelist"},{"complex_type":"literal","value":"blacklist"}],"full_format":false},"optional":true},{"name":"mining_progress","order":80,"description":"The mining progress for this mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.","read_type":"double","write_type":"double","optional":true},{"name":"mining_target","order":88,"description":"The mining target, if any.","subclasses":["MiningDrill"],"read_type":"LuaEntity","optional":true},{"name":"mirroring","order":17,"description":"If the entity is currently mirrored.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"name","order":0,"description":"Name of the entity prototype. E.g. \"inserter\" or \"fast-inserter\".","read_type":"string","optional":false},{"name":"name_tag","order":173,"description":"Name tag of this entity. Returns `nil` if entity has no name tag. When name tag is already used by other entity, the name will be removed from the other entity. Entity name tags can also be set in the entity \"extra settings\" GUI in the map editor.","read_type":"string","write_type":"string","optional":false},{"name":"neighbour_bonus","order":138,"description":"The current total neighbour bonus of this reactor.","subclasses":["Reactor"],"read_type":"double","optional":false},{"name":"neighbours","order":46,"description":"A list of neighbours for certain types of entities. Applies to underground belts, walls, gates, reactors, cliffs, and pipe-connectable entities.","lists":["Differs depending on the type of entity:\n\n- When called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to.\n- When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none.\n- When called on a wall-connectable entity or reactor, this is a dictionary of all connections indexed by the connection direction \"north\", \"south\", \"east\", and \"west\".\n- When called on a cliff entity, this is a dictionary of all connections indexed by the connection direction \"north\", \"south\", \"east\", and \"west\"."],"read_type":{"complex_type":"union","options":[{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaEntity"}},{"complex_type":"array","value":{"complex_type":"array","value":"LuaEntity"}},"LuaEntity"],"full_format":false},"optional":true},{"name":"object_name","order":196,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"operable","order":13,"description":"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.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"orientation","order":19,"description":"The smooth orientation of this entity.","read_type":"RealOrientation","write_type":"RealOrientation","optional":false},{"name":"parameters","order":105,"description":"","subclasses":["ProgrammableSpeaker"],"read_type":"ProgrammableSpeakerParameters","write_type":"ProgrammableSpeakerParameters","optional":false},{"name":"pickup_position","order":36,"description":"Where the inserter will pick up items from.\n\nInserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.","subclasses":["Inserter"],"read_type":"MapPosition","write_type":"MapPosition","optional":false},{"name":"pickup_target","order":38,"description":"The entity this inserter will attempt to pick up items from. If there are multiple possible entities at the pick-up point, writing to this attribute allows a mod to choose which one to pick up items from. The entity needs to collide with the tile box under the pick-up position. `nil` if there is no entity to pull items from.","subclasses":["Inserter"],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"player","order":70,"description":"The player connected to this character, if any.","subclasses":["Character"],"read_type":"LuaPlayer","optional":true},{"name":"pollution_bonus","order":61,"description":"The pollution bonus of this entity.","read_type":"double","optional":false},{"name":"power_production","order":82,"description":"The power production specific to the ElectricEnergyInterface entity type.","subclasses":["ElectricEnergyInterface"],"read_type":"double","write_type":"double","optional":false},{"name":"power_switch_state","order":115,"description":"The state of this power switch.","subclasses":["PowerSwitch"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"power_usage","order":83,"description":"The power usage specific to the ElectricEnergyInterface entity type.","subclasses":["ElectricEnergyInterface"],"read_type":"double","write_type":"double","optional":false},{"name":"previous_recipe","order":42,"description":"The previous recipe this furnace was using, if any.","subclasses":["Furnace"],"read_type":"RecipeIDAndQualityIDPair","optional":true},{"name":"procession_tick","order":194,"description":"how far into the current procession the cargo pod is.","subclasses":["CargoPod"],"read_type":"MapTick","write_type":"MapTick","optional":false},{"name":"productivity_bonus","order":60,"description":"The productivity bonus of this entity.\n\nThis includes force based bonuses as well as beacon/module bonuses.","read_type":"double","optional":false},{"name":"products_finished","order":110,"description":"The number of products this machine finished crafting in its lifetime.","subclasses":["CraftingMachine"],"read_type":"uint","write_type":"uint","optional":false},{"name":"prototype","order":33,"description":"The entity prototype of this entity.","read_type":"LuaEntityPrototype","optional":false},{"name":"proxy_target","order":101,"description":"The target entity for this item-request-proxy, if any.","subclasses":["ItemRequestProxy"],"read_type":"LuaEntity","optional":true},{"name":"pump_rail_target","order":147,"description":"The rail target of this pump, if any.","subclasses":["Pump"],"read_type":"LuaEntity","optional":true},{"name":"quality","order":170,"description":"The quality of this entity.\n\nNot all entities support quality and will give the \"normal\" quality back if they don't.","read_type":"LuaQualityPrototype","optional":false},{"name":"radar_scan_progress","order":172,"description":"The current radar scan progress, as a number in range `[0, 1]`.","subclasses":["Radar"],"read_type":"float","optional":false},{"name":"rail_layer","order":171,"description":"Gets rail layer of a given signal","subclasses":["RailSignal","RailChainSignal"],"read_type":"defines.rail_layer","optional":false},{"name":"recipe_locked","order":133,"description":"When locked; the recipe in this assembling machine can't be changed by the player.","subclasses":["AssemblingMachine"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"relative_turret_orientation","order":21,"description":"The relative orientation of the vehicle turret, artillery turret, artillery wagon. `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.\n\nWriting does nothing if the vehicle doesn't have a turret.","read_type":"RealOrientation","write_type":"RealOrientation","optional":true},{"name":"remove_unfiltered_items","order":120,"description":"Whether items not included in this infinity container filters should be removed from the container.","subclasses":["InfinityContainer"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"render_player","order":145,"description":"The player that this `simple-entity-with-owner`, `simple-entity-with-force`, or `highlight-box` is visible to. `nil` when this entity is rendered for all players.\n\nReading this property will return a [LuaPlayer](runtime:LuaPlayer), while [PlayerIdentification](runtime:PlayerIdentification) can be used when writing.","read_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"write_type":{"complex_type":"union","options":["LuaPlayer","PlayerIdentification"],"full_format":false},"optional":true},{"name":"render_to_forces","order":146,"description":"The forces that this `simple-entity-with-owner` or `simple-entity-with-force` is visible to. `nil` or an empty array when this entity is rendered for all forces.\n\nReading will always give an array of [LuaForce](runtime:LuaForce)","read_type":"ForceSet","write_type":"ForceSet","optional":true},{"name":"request_from_buffers","order":152,"description":"Whether this requester chest is set to also request from buffer chests.\n\nUseable only on entities that have requester slots.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"result_quality","order":59,"description":"The result quality used when this crafting machine finishes crafting.\n\nThis may be `nil` when crafting is not in progress.\n\nThis has no effect if the machine is not currently crafting.\n\nThis can never be set to `nil`.","subclasses":["CraftingMachine"],"read_type":"LuaQualityPrototype","write_type":"QualityID","optional":true},{"name":"robot_order_queue","order":192,"description":"Get the current queue of robot orders.","subclasses":["ConstructionRobot","LogisticRobot"],"read_type":{"complex_type":"array","value":"WorkerRobotOrder"},"optional":false},{"name":"rocket_parts","order":66,"description":"Number of rocket parts in the silo.","subclasses":["RocketSilo"],"read_type":"uint","write_type":"uint","optional":false},{"name":"rocket_silo_status","order":174,"description":"The status of this rocket silo entity.","subclasses":["RocketSilo"],"read_type":"defines.rocket_silo_status","optional":false},{"name":"rotatable","order":12,"description":"When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.\n\nEntities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"secondary_bounding_box","order":85,"description":"The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.","read_type":"BoundingBox","optional":true},{"name":"secondary_selection_box","order":87,"description":"The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.","read_type":"BoundingBox","optional":true},{"name":"selected_gun_index","order":39,"description":"Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.","subclasses":["Character","Car","SpiderVehicle"],"read_type":"uint","write_type":"uint","optional":true},{"name":"selection_box","order":86,"description":"[LuaEntityPrototype::selection_box](runtime:LuaEntityPrototype::selection_box) around entity's given position and respecting the current entity orientation.","read_type":"BoundingBox","optional":false},{"name":"shooting_target","order":100,"description":"The shooting target for this turret, if any. Can't be set to `nil` via script.","subclasses":["Turret"],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"signal_state","order":53,"description":"The state of this rail signal.","subclasses":["RailSignal","RailChainSignal"],"read_type":"defines.signal_state","optional":false},{"name":"spawn_shift","order":113,"description":"","subclasses":["Spawner"],"read_type":"double","optional":false},{"name":"spawning_cooldown","order":111,"description":"","subclasses":["Spawner"],"read_type":"double","optional":false},{"name":"speed","order":30,"description":"The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron.\n\nOnly the speed of units, cars, and projectiles are writable.","read_type":"float","write_type":"float","optional":true},{"name":"speed_bonus","order":62,"description":"The speed bonus of this entity.\n\nThis includes force based bonuses as well as beacon/module bonuses.","read_type":"double","optional":false},{"name":"splitter_filter","order":127,"description":"The filter for this splitter, if any is set.","subclasses":["Splitter"],"read_type":"ItemFilter","write_type":"ItemFilter","optional":true},{"name":"splitter_input_priority","order":130,"description":"The input priority for this splitter.","subclasses":["Splitter"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"right"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"right"}],"full_format":false},"optional":false},{"name":"splitter_output_priority","order":131,"description":"The output priority for this splitter.","subclasses":["Splitter"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"right"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"right"}],"full_format":false},"optional":false},{"name":"stack","order":32,"description":"","subclasses":["ItemEntity"],"read_type":"LuaItemStack","optional":false},{"name":"status","order":142,"description":"The status of this entity, if any.\n\nThis is always the actual status of the entity, even if [LuaEntity::custom_status](runtime:LuaEntity::custom_status) is set.","read_type":"defines.entity_status","optional":true},{"name":"sticked_to","order":103,"description":"The entity this sticker is sticked to.","subclasses":["Sticker"],"read_type":"LuaEntity","optional":false},{"name":"sticker_vehicle_modifiers","order":104,"description":"The vehicle modifiers applied to this entity through the attached stickers.","read_type":{"complex_type":"table","parameters":[{"name":"friction_modifier","order":2,"description":"","type":"double","optional":false},{"name":"speed_max","order":1,"description":"","type":"double","optional":false},{"name":"speed_modifier","order":0,"description":"","type":"double","optional":false}]},"optional":true},{"name":"stickers","order":102,"description":"The sticker entities attached to this entity, if any.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":true},{"name":"storage_filter","order":151,"description":"The storage filter for this logistic storage container.\n\nUseable only on logistic containers with the `\"storage\"` [logistic_mode](runtime:LuaEntityPrototype::logistic_mode).","read_type":"LuaItemPrototype","write_type":"LuaItemPrototype","optional":true},{"name":"supports_direction","order":18,"description":"Whether the entity has direction. When it is false for this entity, it will always return north direction when asked for.","read_type":"boolean","optional":false},{"name":"tags","order":155,"description":"The tags associated with this entity ghost. `nil` if this is not an entity ghost.","read_type":"Tags","write_type":"Tags","optional":true},{"name":"temperature","order":41,"description":"The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source.","read_type":"double","write_type":"double","optional":true},{"name":"tick_grown","order":189,"description":"The tick when this plant is fully grown.","subclasses":["Plant"],"read_type":"MapTick","write_type":"MapTick","optional":false},{"name":"tick_of_last_attack","order":125,"description":"The last tick this character entity was attacked.","subclasses":["Character"],"read_type":"uint","write_type":"uint","optional":false},{"name":"tick_of_last_damage","order":126,"description":"The last tick this character entity was damaged.","subclasses":["Character"],"read_type":"uint","write_type":"uint","optional":false},{"name":"tile_height","order":176,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.","read_type":"uint","optional":false},{"name":"tile_width","order":175,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.","read_type":"uint","optional":false},{"name":"time_to_live","order":51,"description":"The ticks left before a combat robot, highlight box, smoke, or sticker entity is destroyed.","subclasses":["CombatRobot","HighlightBox","Smoke","Sticker"],"read_type":"uint64","write_type":"uint64","optional":false},{"name":"time_to_next_effect","order":156,"description":"The ticks until the next trigger effect of this smoke-with-trigger.","subclasses":["SmokeWithTrigger"],"read_type":"uint","write_type":"uint","optional":false},{"name":"timeout","order":137,"description":"The timeout that's left on this landmine in ticks. It describes the time between the landmine being placed and it being armed.","subclasses":["LandMine"],"read_type":"uint","write_type":"uint","optional":false},{"name":"to_be_looted","order":55,"description":"Will this item entity be picked up automatically when the player walks over it?","subclasses":["ItemEntity"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"torso_orientation","order":22,"description":"The torso orientation of this spider vehicle.","subclasses":["SpiderVehicle"],"read_type":"RealOrientation","write_type":"RealOrientation","optional":false},{"name":"train","order":45,"description":"The train this rolling stock belongs to, if any. `nil` if this is not a rolling stock.","read_type":"LuaTrain","optional":true},{"name":"train_stop_priority","order":184,"description":"Priority of this train stop.","subclasses":["TrainStop"],"read_type":"uint8","write_type":"uint8","optional":false},{"name":"trains_count","order":159,"description":"Amount of trains related to this particular train stop. Includes train stopped at this train stop (until it finds a path to next target) and trains having this train stop as goal or waypoint.\n\nTrain may be included multiple times when braking distance covers this train stop multiple times.\n\nValue may be read even when train stop has no control behavior.","subclasses":["TrainStop"],"read_type":"uint","optional":false},{"name":"trains_in_block","order":136,"description":"The number of trains in this rail block for this rail entity.","subclasses":["Rail"],"read_type":"uint","optional":false},{"name":"trains_limit","order":160,"description":"Amount of trains above which no new trains will be sent to this train stop. Writing nil will disable the limit (will set a maximum possible value).\n\nWhen a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it.","subclasses":["TrainStop"],"read_type":"uint","write_type":"uint","optional":false},{"name":"tree_color_index","order":93,"description":"Index of the tree color.","subclasses":["Tree"],"read_type":"uint8","write_type":"uint8","optional":false},{"name":"tree_color_index_max","order":94,"description":"Maximum index of the tree colors.","subclasses":["Tree"],"read_type":"uint8","optional":false},{"name":"tree_gray_stage_index","order":97,"description":"Index of the tree gray stage","subclasses":["Tree"],"read_type":"uint8","write_type":"uint8","optional":false},{"name":"tree_gray_stage_index_max","order":98,"description":"Maximum index of the tree gray stages.","subclasses":["Tree"],"read_type":"uint8","optional":false},{"name":"tree_stage_index","order":95,"description":"Index of the tree stage.","subclasses":["Tree"],"read_type":"uint8","write_type":"uint8","optional":false},{"name":"tree_stage_index_max","order":96,"description":"Maximum index of the tree stages.","subclasses":["Tree"],"read_type":"uint8","optional":false},{"name":"type","order":6,"description":"The entity prototype type of this entity.","read_type":"string","optional":false},{"name":"unit_number","order":78,"description":"A unique number identifying this entity for the lifetime of the save. These are allocated sequentially, and not re-used (until overflow).\n\nOnly entities inheriting from [EntityWithOwnerPrototype](prototype:EntityWithOwnerPrototype), as well as [ItemRequestProxyPrototype](prototype:ItemRequestProxyPrototype) and [EntityGhostPrototype](prototype:EntityGhostPrototype) are assigned a unit number. Returns `nil` otherwise.","read_type":"uint","optional":true},{"name":"units","order":114,"description":"The units associated with this spawner entity.","subclasses":["Spawner"],"read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"use_filters","order":8,"description":"If set to 'true', this inserter will use filtering logic.\n\nThis has no effect if the prototype does not support filters.","subclasses":["Inserter"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":195,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vehicle_automatic_targeting_parameters","order":29,"description":"Read when this spidertron auto-targets enemies","subclasses":["SpiderVehicle"],"read_type":"VehicleAutomaticTargetingParameters","write_type":"VehicleAutomaticTargetingParameters","optional":false}],"operators":[]},{"name":"LuaEntityPrototype","order":38,"description":"Prototype of an entity.","parent":"LuaPrototypeBase","abstract":false,"methods":[{"name":"get_crafting_speed","order":2,"description":"The crafting speed of this crafting-machine.","subclasses":["CraftingMachine"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_inserter_extension_speed","order":9,"description":"The extension speed of this inserter.","subclasses":["Inserter"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_inserter_rotation_speed","order":10,"description":"The rotation speed of this inserter.","subclasses":["Inserter"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_inventory_size","order":1,"description":"Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.","parameters":[{"name":"index","order":0,"description":"","type":"defines.inventory","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"get_max_circuit_wire_distance","order":5,"description":"The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_max_distance_of_nearby_sector_revealed","order":13,"description":"The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.","subclasses":["Radar","CargoLandingPad"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"get_max_distance_of_sector_revealed","order":12,"description":"The radius of the area this radar can chart, in chunks.","subclasses":["Radar"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"get_max_energy","order":8,"description":"The max energy for this flying robot prototype.","subclasses":["FlyingRobot"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_max_energy_production","order":7,"description":"The theoretical maximum energy production for this entity.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_max_energy_usage","order":6,"description":"The theoretical maximum energy usage for this entity.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_max_health","order":14,"description":"Max health of this entity. Will be `0` if this is not an entity with health.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"float","optional":false}]},{"name":"get_max_wire_distance","order":4,"description":"The maximum wire distance for this entity. 0 if the entity doesn't support wires.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_researching_speed","order":11,"description":"The base researching speed of this lab prototype.","subclasses":["Lab"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_supply_area_distance","order":3,"description":"The supply area of this electric pole or beacon prototype.","subclasses":["ElectricPole","Beacon"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"has_flag","order":0,"description":"Test whether this entity prototype has a certain flag set.","parameters":[{"name":"flag","order":0,"description":"The flag to test.","type":"EntityPrototypeFlag","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if this prototype has the given flag set.","type":"boolean","optional":false}]}],"attributes":[{"name":"absorptions_to_join_attack","order":157,"description":"A table of pollutions amounts that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.","subclasses":["SpiderUnit","Unit"],"read_type":{"complex_type":"dictionary","key":"string","value":"float"},"optional":true},{"name":"active_energy_usage","order":192,"description":"The active energy usage of this rocket silo or combinator prototype.","subclasses":["RocketSilo","Combinator"],"read_type":"double","optional":true},{"name":"additional_pastable_entities","order":41,"description":"Entities this entity can be pasted onto in addition to the normal allowed ones.","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":false},{"name":"affected_by_tiles","order":163,"description":"Whether this unit prototype is affected by tile walking speed modifiers.","subclasses":["Unit"],"read_type":"boolean","optional":true},{"name":"air_resistance","order":62,"description":"The air resistance of this rolling stock prototype.","subclasses":["RollingStock"],"read_type":"double","optional":true},{"name":"alert_icon_scale","order":167,"description":"The alert icon scale of this entity prototype.","read_type":"float","optional":false},{"name":"alert_icon_shift","order":166,"description":"The alert icon shift of this entity prototype.","read_type":"Vector","optional":false},{"name":"alert_when_attacking","order":110,"description":"Whether this turret raises an alert when attacking","subclasses":["Turret"],"read_type":"boolean","optional":true},{"name":"alert_when_damaged","order":109,"description":"Whether this entity raises an alert when damaged.","subclasses":["EntityWithHealth"],"read_type":"boolean","optional":true},{"name":"allow_access_to_all_forces","order":170,"description":"Whether this market allows access to all forces or just friendly ones.","subclasses":["Market"],"read_type":"boolean","optional":true},{"name":"allow_burner_leech","order":95,"description":"Whether this inserter allows burner leeching.","subclasses":["Inserter"],"read_type":"boolean","optional":true},{"name":"allow_copy_paste","order":42,"description":"When false copy-paste is not allowed for this entity.","read_type":"boolean","optional":false},{"name":"allow_custom_vectors","order":94,"description":"Whether this inserter allows custom pickup and drop vectors.","subclasses":["Inserter"],"read_type":"boolean","optional":true},{"name":"allow_passengers","order":173,"description":"Whether this vehicle allows passengers.","subclasses":["Vehicle"],"read_type":"boolean","optional":true},{"name":"allow_run_time_change_of_is_military_target","order":181,"description":"True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)","subclasses":["EntityWithOwner"],"read_type":"boolean","optional":true},{"name":"allowed_effects","order":115,"description":"The allowed module effects for this entity, if any.","read_type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true},{"name":"allowed_module_categories","order":116,"description":"The allowed module categories for this entity, if any.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":true},{"name":"always_on","order":144,"description":"Whether the lamp is always on (except when out of power or turned off by the circuit network).","subclasses":["Lamp"],"read_type":"boolean","optional":true},{"name":"ammo_category","order":131,"description":"Name of the ammo category of this land mine.","subclasses":["LandMine"],"read_type":"string","optional":true},{"name":"animation_speed_coefficient","order":189,"description":"The animation speed coefficient of this belt connectable prototype.","subclasses":["BeltConnectable"],"read_type":"double","optional":true},{"name":"attack_parameters","order":32,"description":"The attack parameters for this entity, if any.","read_type":"AttackParameters","optional":true},{"name":"attack_result","order":30,"description":"The attack result of this entity, if any.","read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"automated_ammo_count","order":140,"description":"The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.","subclasses":["ArtilleryTurret","AmmoTurret"],"read_type":"uint","optional":true},{"name":"automatic_weapon_cycling","order":186,"description":"Whether this spider vehicle prototype automatically cycles weapons.","subclasses":["SpiderVehicle"],"read_type":"boolean","optional":true},{"name":"autoplace_specification","order":27,"description":"Autoplace specification for this entity prototype, if any.","read_type":"AutoplaceSpecification","optional":true},{"name":"beacon_counter","order":105,"description":"The beacon counter used by effect receiver when deciding which sample to take from beacon profile.","subclasses":["Beacon"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"total"},{"complex_type":"literal","value":"same_type"}],"full_format":false},"optional":true},{"name":"belt_distance","order":137,"description":"","subclasses":["Loader"],"read_type":"double","optional":true},{"name":"belt_length","order":138,"description":"","subclasses":["Loader"],"read_type":"double","optional":true},{"name":"belt_speed","order":28,"description":"The speed of this transport belt.","subclasses":["TransportBeltConnectable"],"read_type":"double","optional":true},{"name":"boiler_mode","order":90,"description":"The boiler operation mode of this boiler prototype.","subclasses":["Boiler"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"heat-fluid-inside"},{"complex_type":"literal","value":"output-to-separate-pipe"}],"full_format":false},"optional":true},{"name":"braking_force","order":61,"description":"The braking force of this vehicle prototype.","subclasses":["Vehicle"],"read_type":"double","optional":true},{"name":"build_base_evolution_requirement","order":49,"description":"The evolution requirement to build this entity as a base when expanding enemy bases.","read_type":"double","optional":false},{"name":"build_distance","order":210,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"building_grid_bit_shift","order":82,"description":"The log2 of grid size of the building","read_type":"uint","optional":false},{"name":"bulk","order":93,"description":"Whether this inserter is a bulk-type.","subclasses":["Inserter"],"read_type":"boolean","optional":true},{"name":"burner_prototype","order":76,"description":"The burner energy source prototype this entity uses, if any.","read_type":"LuaBurnerPrototype","optional":true},{"name":"burns_fluid","order":85,"description":"Whether this generator prototype burns fluid.","subclasses":["Generator"],"read_type":"boolean","optional":true},{"name":"call_for_help_radius","order":147,"description":"","subclasses":["Spawner"],"read_type":"double","optional":true},{"name":"can_open_gates","order":162,"description":"Whether this unit prototype can open gates.","subclasses":["Unit"],"read_type":"boolean","optional":true},{"name":"chain_shooting_cooldown_modifier","order":187,"description":"The chain shooting cooldown modifier of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"read_type":"double","optional":true},{"name":"character_corpse","order":222,"description":"","subclasses":["Character"],"read_type":"LuaEntityPrototype","optional":true},{"name":"chunk_exploration_radius","order":188,"description":"The chunk exploration radius of this spider vehicle prototype.","subclasses":["SpiderVehicle"],"read_type":"double","optional":true},{"name":"cliff_explosive_prototype","order":153,"description":"The item prototype name used to destroy this cliff.","subclasses":["Cliff"],"read_type":"string","optional":true},{"name":"collision_box","order":7,"description":"The bounding box used for collision checking.","read_type":"BoundingBox","optional":false},{"name":"collision_mask","order":13,"description":"The collision masks this entity uses","read_type":"CollisionMask","optional":false},{"name":"collision_mask_collides_with_self","order":112,"description":"Does this prototype collision mask collide with itself?","read_type":"boolean","optional":false},{"name":"collision_mask_collides_with_tiles_only","order":113,"description":"Does this prototype collision mask collide with tiles only?","read_type":"boolean","optional":false},{"name":"collision_mask_considers_tile_transitions","order":114,"description":"Does this prototype collision mask consider tile transitions?","read_type":"boolean","optional":false},{"name":"color","order":111,"description":"The color of the prototype, if any.","read_type":"Color","optional":true},{"name":"connection_distance","order":200,"description":"","subclasses":["RollingStock"],"read_type":"double","optional":true},{"name":"construction_radius","order":127,"description":"The construction radius for this roboport prototype.","subclasses":["Roboport"],"read_type":"double","optional":true},{"name":"consumption","order":59,"description":"The energy consumption of this car prototype.","subclasses":["Car"],"read_type":"double","optional":true},{"name":"container_distance","order":136,"description":"","subclasses":["Loader"],"read_type":"double","optional":true},{"name":"corpses","order":17,"description":"Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototype name.","subclasses":["EntityWithHealth"],"read_type":{"complex_type":"dictionary","key":"string","value":"LuaEntityPrototype"},"optional":true},{"name":"count_as_rock_for_filtered_deconstruction","order":99,"description":"If this simple-entity is counted as a rock for the deconstruction planner \"trees and rocks only\" filter.","subclasses":["SimpleEntity"],"read_type":"boolean","optional":true},{"name":"crafting_categories","order":55,"description":"The [crafting categories](runtime:LuaRecipeCategoryPrototype) this entity prototype supports.\n\nThe value in the dictionary is meaningless and exists just to allow for easy lookup.","subclasses":["CraftingMachine","Character"],"read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":true},{"name":"create_ghost_on_death","order":130,"description":"If this prototype will attempt to create a ghost of itself on death.\n\nIf this is false then a ghost will never be made, if it's true a ghost may be made.","read_type":"boolean","optional":false},{"name":"created_effect","order":45,"description":"The trigger to run when this entity is created, if any.","read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"created_smoke","order":44,"description":"The smoke trigger run when this entity is built, if any.","read_type":{"complex_type":"table","parameters":[{"name":"initial_height","order":3,"description":"","type":"float","optional":false},{"name":"max_radius","order":4,"description":"","type":"float","optional":true},{"name":"offset_deviation","order":2,"description":"","type":"BoundingBox","optional":false},{"name":"offsets","order":1,"description":"","type":{"complex_type":"array","value":"Vector"},"optional":false},{"name":"smoke_name","order":0,"description":"","type":"string","optional":false},{"name":"speed","order":5,"description":"","type":"Vector","optional":false},{"name":"speed_from_center","order":10,"description":"","type":"float","optional":false},{"name":"speed_from_center_deviation","order":11,"description":"","type":"float","optional":false},{"name":"speed_multiplier","order":6,"description":"","type":"float","optional":false},{"name":"speed_multiplier_deviation","order":7,"description":"","type":"float","optional":false},{"name":"starting_frame","order":8,"description":"","type":"float","optional":false},{"name":"starting_frame_deviation","order":9,"description":"","type":"float","optional":false}]},"optional":true},{"name":"damage_hit_tint","order":221,"description":"","subclasses":["Character"],"read_type":"Color","optional":true},{"name":"darkness_for_all_lamps_off","order":143,"description":"Value between 0 and 1 darkness where all lamps of this lamp prototype are off.","subclasses":["Lamp"],"read_type":"float","optional":true},{"name":"darkness_for_all_lamps_on","order":142,"description":"Value between 0 and 1 darkness where all lamps of this lamp prototype are on.","subclasses":["Lamp"],"read_type":"float","optional":true},{"name":"destroy_non_fuel_fluid","order":87,"description":"Whether this generator prototype destroys non-fuel fluids.","subclasses":["Generator"],"read_type":"boolean","optional":true},{"name":"distraction_cooldown","order":164,"description":"The distraction cooldown of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"uint","optional":true},{"name":"distribution_effectivity","order":102,"description":"The distribution effectivity for this beacon prototype.","subclasses":["Beacon"],"read_type":"double","optional":true},{"name":"distribution_effectivity_bonus_per_quality_level","order":103,"description":"The distribution effectivity bonus per quality level for this beacon prototype.","subclasses":["Beacon"],"read_type":"double","optional":true},{"name":"door_opening_speed","order":121,"description":"The door opening speed for this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"double","optional":true},{"name":"draw_cargo","order":71,"description":"Whether this logistics or construction robot renders its cargo when flying.","subclasses":["RobotWithLogisticsInterface"],"read_type":"boolean","optional":true},{"name":"drawing_box_vertical_extension","order":11,"description":"Extra vertical space needed to see the whole entity in GUIs. This is used to calculate the correct zoom and positioning in the entity info gui, for example in the entity tooltip.","read_type":"double","optional":false},{"name":"drop_item_distance","order":211,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"dying_speed","order":191,"description":"The dying time of this corpse prototype.","subclasses":["Corpse"],"read_type":"float","optional":true},{"name":"effect_receiver","order":169,"description":"Effect receiver prototype of this crafting machine, lab, or mining drill.","subclasses":["CraftingMachine","Lab","MiningDrill"],"read_type":"EffectReceiver","optional":true},{"name":"effectivity","order":58,"description":"The effectivity of this car prototype, generator prototype.","subclasses":["Car","Generator"],"read_type":"double","optional":true},{"name":"electric_energy_source_prototype","order":77,"description":"The electric energy source prototype this entity uses, if any.","read_type":"LuaElectricEnergySourcePrototype","optional":true},{"name":"emissions_per_second","order":16,"description":"A table of pollution emissions per second the entity will create, grouped by the name of the pollution type.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"enemy_map_color","order":48,"description":"The enemy map color used when charting this entity.","read_type":"Color","optional":false},{"name":"energy_per_hit_point","order":129,"description":"The energy used per hit point taken for this vehicle during collisions.","subclasses":["Vehicle"],"read_type":"double","optional":true},{"name":"energy_per_move","order":72,"description":"The energy consumed per tile moved for this flying robot.","subclasses":["FlyingRobot"],"read_type":"double","optional":true},{"name":"energy_per_tick","order":73,"description":"The energy consumed per tick for this flying robot.","subclasses":["FlyingRobot"],"read_type":"double","optional":true},{"name":"energy_usage","order":57,"description":"The direct energy usage of this entity, if any.","read_type":"double","optional":true},{"name":"engine_starting_speed","order":123,"description":"The engine starting speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"read_type":"double","optional":true},{"name":"enter_vehicle_distance","order":216,"description":"","subclasses":["Character"],"read_type":"double","optional":true},{"name":"explosion_beam","order":106,"description":"Whether this explosion has a beam.","subclasses":["Explosion"],"read_type":"double","optional":true},{"name":"explosion_rotate","order":107,"description":"Whether this explosion rotates.","subclasses":["Explosion"],"read_type":"double","optional":true},{"name":"fast_replaceable_group","order":22,"description":"The group of mutually fast-replaceable entities, if any.","read_type":"string","optional":true},{"name":"filter_count","order":100,"description":"The filter count of this inserter, loader, mining drill or logistic chest. For logistic containers, `nil` means no limit.","subclasses":["Inserter","Loader","LogisticContainer","MiningDrill"],"read_type":"uint","optional":true},{"name":"final_attack_result","order":31,"description":"The final attack result for this projectile.","subclasses":["Projectile"],"read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"fixed_recipe","order":126,"description":"The fixed recipe name for this assembling machine prototype, if any.","subclasses":["AssemblingMachine"],"read_type":"string","optional":true},{"name":"flags","order":39,"description":"The flags for this entity prototype.","read_type":"EntityPrototypeFlags","optional":false},{"name":"fluid_capacity","order":91,"description":"The fluid capacity of this entity or 0 if this entity doesn't support fluids.\n\nCrafting machines will report 0 due to their fluid capacity being whatever a given recipe needs.","read_type":"double","optional":false},{"name":"fluid_energy_source_prototype","order":79,"description":"The fluid energy source prototype this entity uses, if any.","read_type":"LuaFluidEnergySourcePrototype","optional":true},{"name":"fluid_usage_per_tick","order":83,"description":"The fluid usage of this generator prototype.","subclasses":["Generator"],"read_type":"double","optional":true},{"name":"fluidbox_prototypes","order":134,"description":"The fluidbox prototypes for this entity.","read_type":{"complex_type":"array","value":"LuaFluidBoxPrototype"},"optional":false},{"name":"flying_acceleration","order":125,"description":"The flying acceleration for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"read_type":"double","optional":true},{"name":"flying_speed","order":124,"description":"The flying speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"read_type":"double","optional":true},{"name":"friction_force","order":60,"description":"The friction of this vehicle prototype.","subclasses":["Vehicle"],"read_type":"double","optional":true},{"name":"friendly_map_color","order":47,"description":"The friendly map color used when charting this entity.","read_type":"Color","optional":false},{"name":"grid_prototype","order":174,"description":"The equipment grid prototype for this entity, if any.","read_type":"LuaEquipmentGridPrototype","optional":true},{"name":"growth_grid_tile_size","order":205,"description":"","subclasses":["AgriculturalTower"],"read_type":"uint","optional":true},{"name":"growth_ticks","order":203,"description":"","subclasses":["Plant"],"read_type":"uint","optional":true},{"name":"guns","order":66,"description":"A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaItemPrototype"},"optional":true},{"name":"harvest_emissions","order":204,"description":"A table of pollutants that this plant will release when it is harvested.","subclasses":["Plant"],"read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":true},{"name":"has_belt_immunity","order":155,"description":"Whether this unit, car, or character prototype has belt immunity.","subclasses":["Unit","Car","Character"],"read_type":"boolean","optional":true},{"name":"healing_per_tick","order":15,"description":"Amount this entity can heal per tick, if any.","read_type":"float","optional":true},{"name":"heat_buffer_prototype","order":81,"description":"The heat buffer prototype this entity uses, if any.","read_type":"LuaHeatBufferPrototype","optional":true},{"name":"heat_energy_source_prototype","order":78,"description":"The heat energy source prototype this entity uses, if any.","read_type":"LuaHeatEnergySourcePrototype","optional":true},{"name":"height","order":183,"description":"The height of this spider vehicle prototype.","subclasses":["SpiderUnit","SpiderVehicle"],"read_type":"double","optional":true},{"name":"indexed_guns","order":67,"description":"A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.","subclasses":["Car","SpiderVehicle","ArtilleryTurret","ArtilleryWagon"],"read_type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true},{"name":"infinite_depletion_resource_amount","order":3,"description":"Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource.","subclasses":["ResourceEntity"],"read_type":"uint","optional":true},{"name":"infinite_resource","order":0,"description":"Whether this resource is infinite.","subclasses":["ResourceEntity"],"read_type":"boolean","optional":true},{"name":"ingredient_count","order":54,"description":"The max number of ingredients this crafting machine prototype supports.","subclasses":["CraftingMachine"],"read_type":"uint","optional":true},{"name":"inserter_chases_belt_items","order":98,"description":"True if this inserter chases items on belts for pickup.","subclasses":["Inserter"],"read_type":"boolean","optional":true},{"name":"inserter_drop_position","order":97,"description":"The drop position for this inserter.","subclasses":["Inserter"],"read_type":"Vector","optional":true},{"name":"inserter_pickup_position","order":96,"description":"The pickup position for this inserter.","subclasses":["Inserter"],"read_type":"Vector","optional":true},{"name":"inserter_stack_size_bonus","order":177,"description":"The built-in stack size bonus of this inserter prototype.","subclasses":["Inserter"],"read_type":"uint","optional":true},{"name":"instruments","order":50,"description":"The instruments for this programmable speaker.","subclasses":["ProgrammableSpeaker"],"read_type":{"complex_type":"array","value":"ProgrammableSpeakerInstrument"},"optional":true},{"name":"inventory_type","order":53,"description":"The inventory type this container or linked container uses.","subclasses":["ContainerEntity","LinkedContainer"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"normal"},{"complex_type":"literal","value":"with_bar"},{"complex_type":"literal","value":"with_filters_and_bar"}],"full_format":false},"optional":true},{"name":"is_building","order":139,"description":"","lists":["These are the objects that are considered buildings:\n\n- AccumulatorPrototype\n- ArtilleryTurretPrototype\n- BeaconPrototype\n- BoilerPrototype\n- BurnerGeneratorPrototype\n- CombinatorPrototype \u2192 ArithmeticCombinator, DeciderCombinator\n- ConstantCombinatorPrototype\n- ContainerPrototype \u2192 LogisticContainer, InfinityContainer\n- CraftingMachinePrototype \u2192 AssemblingMachine, RocketSilo, Furnace\n- ElectricEnergyInterfacePrototype\n- ElectricPolePrototype\n- EnemySpawnerPrototype\n- GatePrototype\n- GeneratorPrototype\n- HeatInterfacePrototype\n- HeatPipePrototype\n- InserterPrototype\n- LabPrototype\n- LampPrototype\n- LinkedContainerPrototype\n- MarketPrototype\n- MiningDrillPrototype\n- OffshorePumpPrototype\n- PipePrototype \u2192 InfinityPipe\n- PipeToGroundPrototype\n- PowerSwitchPrototype\n- ProgrammableSpeakerPrototype\n- PumpPrototype\n- RadarPrototype\n- RailPrototype \u2192 CurvedRail, StraightRail\n- RailSignalBasePrototype \u2192 RailChainSignal, RailSignal\n- ReactorPrototype\n- RoboportPrototype\n- SimpleEntityPrototype\n- SimpleEntityWithOwnerPrototype \u2192 SimpleEntityWithForce\n- SolarPanelPrototype\n- StorageTankPrototype\n- TrainStopPrototype\n- TransportBeltConnectablePrototype \u2192 LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt\n- TurretPrototype \u2192 AmmoTurret, ElectricTurret, FluidTurret\n- WallPrototype"],"read_type":"boolean","optional":false},{"name":"is_entity_with_owner","order":179,"description":"True if this is entity-with-owner","read_type":"boolean","optional":false},{"name":"is_military_target","order":180,"description":"True if this entity-with-owner is military target","subclasses":["EntityWithOwner"],"read_type":"boolean","optional":true},{"name":"item_pickup_distance","order":214,"description":"","subclasses":["Character"],"read_type":"double","optional":true},{"name":"items_to_place_this","order":6,"description":"Items that when placed will produce this entity, if any. Construction bots will choose the first item in the list to build this entity.","read_type":{"complex_type":"array","value":"ItemStackDefinition"},"optional":true},{"name":"joint_distance","order":201,"description":"","subclasses":["RollingStock"],"read_type":"double","optional":true},{"name":"lab_inputs","order":168,"description":"The item prototype names that are the inputs of this lab prototype.","subclasses":["Lab"],"read_type":{"complex_type":"array","value":"string"},"optional":true},{"name":"lamp_energy_usage","order":193,"description":"The lamp energy usage of this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"double","optional":true},{"name":"launch_wait_time","order":119,"description":"The rocket launch delay for this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"uint8","optional":true},{"name":"light_blinking_speed","order":120,"description":"The light blinking speed for this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"double","optional":true},{"name":"logistic_mode","order":37,"description":"The logistic mode of this logistic container.","subclasses":["LogisticContainer"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"requester"},{"complex_type":"literal","value":"active-provider"},{"complex_type":"literal","value":"passive-provider"},{"complex_type":"literal","value":"buffer"},{"complex_type":"literal","value":"storage"},{"complex_type":"literal","value":"none"}],"full_format":false},"optional":true},{"name":"logistic_parameters","order":182,"description":"The logistic parameters for this roboport.","subclasses":["Roboport"],"read_type":{"complex_type":"table","parameters":[{"name":"charge_approach_distance","order":3,"description":"","type":"float","optional":false},{"name":"charging_distance","order":7,"description":"","type":"float","optional":false},{"name":"charging_energy","order":9,"description":"","type":"double","optional":false},{"name":"charging_station_count","order":6,"description":"","type":"uint","optional":false},{"name":"charging_station_shift","order":8,"description":"","type":"Vector","optional":false},{"name":"charging_threshold_distance","order":10,"description":"","type":"float","optional":false},{"name":"construction_radius","order":5,"description":"","type":"float","optional":false},{"name":"logistic_radius","order":4,"description":"","type":"float","optional":false},{"name":"logistics_connection_distance","order":14,"description":"","type":"float","optional":false},{"name":"robot_limit","order":13,"description":"","type":"uint","optional":false},{"name":"robot_vertical_acceleration","order":11,"description":"","type":"float","optional":false},{"name":"robots_shrink_when_entering_and_exiting","order":15,"description":"","type":"boolean","optional":false},{"name":"spawn_and_station_height","order":0,"description":"","type":"float","optional":false},{"name":"spawn_and_station_shadow_height_offset","order":1,"description":"","type":"float","optional":false},{"name":"stationing_offset","order":12,"description":"","type":"Vector","optional":false},{"name":"stationing_render_layer_swap_height","order":2,"description":"","type":"float","optional":false}]},"optional":true},{"name":"logistic_radius","order":128,"description":"The logistic radius for this roboport prototype.","subclasses":["Roboport"],"read_type":"double","optional":true},{"name":"loot","order":24,"description":"Loot that will be dropped when this entity is killed, if any.","subclasses":["EntityWithHealth"],"read_type":{"complex_type":"array","value":"Loot"},"optional":true},{"name":"loot_pickup_distance","order":215,"description":"","subclasses":["Character"],"read_type":"double","optional":true},{"name":"manual_range_modifier","order":190,"description":"The manual range modifier for this artillery turret or wagon prototype.","subclasses":["ArtilleryWagon","ArtilleryTurret"],"read_type":"double","optional":true},{"name":"map_color","order":46,"description":"The map color used when charting this entity if a friendly or enemy color isn't defined, if any.","read_type":"Color","optional":true},{"name":"map_generator_bounding_box","order":9,"description":"The bounding box used for map generator collision checking.","read_type":"BoundingBox","optional":false},{"name":"max_count_of_owned_units","order":148,"description":"Count of enemies this spawner can sustain.","subclasses":["Spawner"],"read_type":"double","optional":true},{"name":"max_darkness_to_spawn","order":146,"description":"The maximum darkness at which this unit spawner can spawn entities.","subclasses":["Spawner"],"read_type":"float","optional":true},{"name":"max_friends_around_to_spawn","order":149,"description":"How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.","subclasses":["Spawner"],"read_type":"double","optional":true},{"name":"max_payload_size","order":70,"description":"The max payload size of this logistics or construction robot.","subclasses":["RobotWithLogisticsInterface"],"read_type":"uint","optional":true},{"name":"max_polyphony","order":51,"description":"The maximum polyphony for this programmable speaker.","subclasses":["ProgrammableSpeaker"],"read_type":"uint","optional":true},{"name":"max_power_output","order":88,"description":"The default maximum power output of this generator prototype.","subclasses":["BurnerGenerator","Generator"],"read_type":"double","optional":true},{"name":"max_pursue_distance","order":159,"description":"The maximum pursue distance of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"double","optional":true},{"name":"max_speed","order":141,"description":"The max speed of this projectile or flying robot prototype.","subclasses":["Projectile","FlyingRobot"],"read_type":"double","optional":true},{"name":"max_to_charge","order":75,"description":"The maximum energy for this flying robot above which it won't try to recharge when stationing.","subclasses":["FlyingRobot"],"read_type":"float","optional":true},{"name":"max_underground_distance","order":38,"description":"The max underground distance for underground belts and underground pipes.","subclasses":["UndergroundBelt","PipeToGround"],"read_type":"uint8","optional":true},{"name":"maximum_corner_sliding_distance","order":209,"description":"","subclasses":["Character"],"read_type":"double","optional":true},{"name":"maximum_temperature","order":84,"description":"The maximum fluid temperature of this generator prototype.","subclasses":["Generator"],"read_type":"double","optional":true},{"name":"min_darkness_to_spawn","order":145,"description":"The minimum darkness at which this unit spawner can spawn entities.","subclasses":["Spawner"],"read_type":"float","optional":true},{"name":"min_pursue_time","order":158,"description":"The minimum pursue time of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"uint","optional":true},{"name":"min_to_charge","order":74,"description":"The minimum energy for this flying robot before it tries to recharge.","subclasses":["FlyingRobot"],"read_type":"float","optional":true},{"name":"mineable_properties","order":5,"description":"Whether this entity is minable and what can be obtained by mining it.","read_type":"MineableProperties","optional":false},{"name":"minimum_resource_amount","order":1,"description":"Minimum amount of this resource.","subclasses":["ResourceEntity"],"read_type":"uint","optional":true},{"name":"mining_drill_radius","order":34,"description":"The mining radius of this mining drill prototype.","subclasses":["MiningDrill"],"read_type":"double","optional":true},{"name":"mining_speed","order":35,"description":"The mining speed of this mining drill/character prototype.","subclasses":["MiningDrill","Character"],"read_type":"double","optional":true},{"name":"module_inventory_size","order":52,"description":"The module inventory size. `nil` if this entity doesn't support modules.","read_type":"uint","optional":true},{"name":"move_while_shooting","order":161,"description":"Whether this unit prototype can move while shooting.","subclasses":["Unit"],"read_type":"boolean","optional":true},{"name":"neighbour_bonus","order":135,"description":"","subclasses":["Reactor"],"read_type":"double","optional":true},{"name":"next_upgrade","order":23,"description":"The next upgrade for this entity, if any.","read_type":"LuaEntityPrototype","optional":true},{"name":"normal_resource_amount","order":2,"description":"The normal amount for this resource.","subclasses":["ResourceEntity"],"read_type":"uint","optional":true},{"name":"object_name","order":224,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"profile","order":104,"description":"The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver","subclasses":["Beacon"],"read_type":{"complex_type":"array","value":"double"},"optional":true},{"name":"protected_from_tile_building","order":178,"description":"True if this entity prototype should be included during tile collision checks with [LuaTilePrototype::check_collision_with_entities](runtime:LuaTilePrototype::check_collision_with_entities) enabled.","read_type":"boolean","optional":false},{"name":"pumping_speed","order":92,"description":"The pumping speed of this offshore or normal pump.","subclasses":["OffshorePump","Pump"],"read_type":"double","optional":true},{"name":"radar_range","order":160,"description":"The radar range of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"uint","optional":true},{"name":"radius","order":152,"description":"The radius of this entity prototype.","read_type":"double","optional":false},{"name":"radius_visualisation_specification","order":202,"description":"","read_type":"RadiusVisualisationSpecification","optional":true},{"name":"reach_distance","order":212,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"reach_resource_distance","order":213,"description":"","subclasses":["Character"],"read_type":"double","optional":true},{"name":"related_underground_belt","order":176,"description":"","subclasses":["TransportBelt"],"read_type":"LuaEntityPrototype","optional":true},{"name":"remains_when_mined","order":40,"description":"The remains left behind when this entity is mined.","read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":false},{"name":"remove_decoratives","order":175,"description":"Whether this entity should remove decoratives that collide with it when this entity is built.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"automatic"},{"complex_type":"literal","value":"true"},{"complex_type":"literal","value":"false"}],"full_format":false},"optional":false},{"name":"repair_speed_modifier","order":25,"description":"Repair-speed modifier for this entity, if any. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`.","subclasses":["EntityWithHealth"],"read_type":"float","optional":true},{"name":"resistances","order":21,"description":"List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`).","subclasses":["EntityWithHealth"],"read_type":{"complex_type":"dictionary","key":"string","value":"Resistance"},"optional":true},{"name":"resource_categories","order":56,"description":"The [resource categories](runtime:LuaResourceCategoryPrototype) this character or mining drill supports.\n\nThe value in the dictionary is meaningless and exists just to allow for easy lookup.","subclasses":["MiningDrill","Character"],"read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":true},{"name":"resource_category","order":4,"description":"Name of the category of this resource.\n\nDuring data stage, this property is named \"category\".","subclasses":["ResourceEntity"],"read_type":"string","optional":true},{"name":"resource_drain_rate_percent","order":36,"description":"The resource drain rate percent of this mining drill prototype.","subclasses":["MiningDrill"],"read_type":"uint8","optional":true},{"name":"respawn_time","order":220,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"result_units","order":29,"description":"The result units and spawn points with weight and evolution factor for a biter spawner entity.","subclasses":["Spawner"],"read_type":{"complex_type":"array","value":"UnitSpawnDefinition"},"optional":true},{"name":"rising_speed","order":122,"description":"The rising speed for this rocket silo rocket prototype.","subclasses":["RocketSiloRocket"],"read_type":"double","optional":true},{"name":"rocket_entity_prototype","order":154,"description":"The rocket entity prototype associated with this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"LuaEntityPrototype","optional":true},{"name":"rocket_parts_required","order":117,"description":"The rocket parts required for this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"uint","optional":true},{"name":"rocket_rising_delay","order":118,"description":"The rocket rising delay for this rocket silo prototype.","subclasses":["RocketSilo"],"read_type":"uint8","optional":true},{"name":"rotation_speed","order":64,"description":"The rotation speed of this car prototype.","subclasses":["Car"],"read_type":"double","optional":true},{"name":"running_speed","order":208,"description":"The movement speed of this character prototype.","subclasses":["Character"],"read_type":"double","optional":true},{"name":"scale_fluid_usage","order":86,"description":"Whether this generator prototype scales fluid usage.","subclasses":["Generator"],"read_type":"boolean","optional":true},{"name":"secondary_collision_box","order":8,"description":"The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.","read_type":"BoundingBox","optional":true},{"name":"selectable_in_game","order":18,"description":"Is this entity selectable?","read_type":"boolean","optional":false},{"name":"selection_box","order":10,"description":"The bounding box used for drawing selection.","read_type":"BoundingBox","optional":false},{"name":"selection_priority","order":19,"description":"The selection priority of this entity - a value between `0` and `255`.","read_type":"uint","optional":false},{"name":"shooting_cursor_size","order":43,"description":"The cursor size used when shooting at this entity.","read_type":"float","optional":false},{"name":"spawn_cooldown","order":33,"description":"The spawning cooldown for this enemy spawner prototype.","subclasses":["Spawner"],"read_type":{"complex_type":"table","parameters":[{"name":"max","order":1,"description":"","type":"double","optional":false},{"name":"min","order":0,"description":"","type":"double","optional":false}]},"optional":true},{"name":"spawn_decoration","order":198,"description":"","subclasses":["Spawner","Turret"],"read_type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":true},{"name":"spawn_decorations_on_expansion","order":199,"description":"","subclasses":["Spawner","Turret"],"read_type":"boolean","optional":true},{"name":"spawning_radius","order":150,"description":"How far from the spawner can the units be spawned.","subclasses":["Spawner"],"read_type":"double","optional":true},{"name":"spawning_spacing","order":151,"description":"What spaces should be between the spawned units.","subclasses":["Spawner"],"read_type":"double","optional":true},{"name":"spawning_time_modifier","order":165,"description":"The spawning time modifier of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"double","optional":true},{"name":"speed","order":68,"description":"The default speed of this flying robot, rolling stock or unit. For rolling stocks, this is their `max_speed`.","subclasses":["FlyingRobot","RollingStock","Unit"],"read_type":"double","optional":true},{"name":"speed_multiplier_when_out_of_energy","order":69,"description":"The speed multiplier when this flying robot is out of energy.","subclasses":["FlyingRobot"],"read_type":"float","optional":true},{"name":"sticker_box","order":12,"description":"The bounding box used to attach sticker type entities.","read_type":"BoundingBox","optional":false},{"name":"supports_direction","order":171,"description":"Whether this entity prototype could possibly ever be rotated.","read_type":"boolean","optional":false},{"name":"surface_conditions","order":207,"description":"The surface conditions required to build this entity.","read_type":{"complex_type":"array","value":"SurfaceCondition"},"optional":true},{"name":"tank_driving","order":63,"description":"If this car prototype uses tank controls to drive.","subclasses":["Car"],"read_type":"boolean","optional":true},{"name":"target_temperature","order":89,"description":"The target temperature of this boiler prototype.","subclasses":["Boiler"],"read_type":"double","optional":true},{"name":"terrain_friction_modifier","order":172,"description":"The terrain friction modifier for this vehicle.","subclasses":["Vehicle"],"read_type":"float","optional":true},{"name":"ticks_to_keep_aiming_direction","order":218,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"ticks_to_keep_gun","order":217,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"ticks_to_stay_in_combat","order":219,"description":"","subclasses":["Character"],"read_type":"uint","optional":true},{"name":"tile_height","order":196,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)","read_type":"uint","optional":false},{"name":"tile_width","order":195,"description":"Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)","read_type":"uint","optional":false},{"name":"time_to_live","order":101,"description":"The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.","read_type":"uint","optional":false},{"name":"timeout","order":132,"description":"The time it takes this land mine to arm.","subclasses":["LandMine"],"read_type":"uint","optional":true},{"name":"torso_bob_speed","order":185,"description":"The torso bob speed of this spider vehicle prototype.","subclasses":["SpiderUnit","SpiderVehicle"],"read_type":"double","optional":true},{"name":"torso_rotation_speed","order":184,"description":"The torso rotation speed of this spider vehicle prototype.","subclasses":["SpiderUnit","SpiderVehicle"],"read_type":"double","optional":true},{"name":"tree_color_count","order":108,"description":"If it is a tree, return the number of colors it supports.","subclasses":["Tree"],"read_type":"uint8","optional":true},{"name":"trigger_collision_mask","order":133,"description":"The collision mask entities must collide with to make this landmine blow up.","subclasses":["LandMine"],"read_type":"CollisionMask","optional":true},{"name":"trigger_target_mask","order":14,"description":"The trigger target mask for this entity prototype type.\n\nThe values in the dictionary are meaningless and exists just to allow the dictionary type for easy lookup.","read_type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":false},{"name":"turret_range","order":26,"description":"The range of this turret.","subclasses":["Turret"],"read_type":"uint","optional":true},{"name":"turret_rotation_speed","order":65,"description":"The turret rotation speed of this car prototype.","subclasses":["Car"],"read_type":"float","optional":true},{"name":"use_exact_mode","order":194,"description":"Whether this logistic container prototype uses exact mode","subclasses":["LogisticContainer"],"read_type":"boolean","optional":true},{"name":"valid","order":223,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vector_to_place_result","order":206,"description":"","subclasses":["MiningDrill","CraftingMachine"],"read_type":"Vector","optional":true},{"name":"vertical_selection_shift","order":197,"description":"Vertical selection shift used by rolling stocks. It affects selection box vertical position but is also used to shift rolling stock graphics along the rails to fine tune train's look.","subclasses":["RollingStock"],"read_type":"double","optional":true},{"name":"vision_distance","order":156,"description":"The vision distance of this unit prototype.","subclasses":["SpiderUnit","Unit"],"read_type":"double","optional":true},{"name":"void_energy_source_prototype","order":80,"description":"The void energy source prototype this entity uses, if any.","read_type":"LuaVoidEnergySourcePrototype","optional":true},{"name":"weight","order":20,"description":"The weight of this vehicle prototype.","subclasses":["Vehicle"],"read_type":"double","optional":true}],"operators":[]},{"name":"LuaEquipment","order":39,"description":"An item in a [LuaEquipmentGrid](runtime:LuaEquipmentGrid), for example a fusion reactor placed in one's power armor.\n\nAn equipment reference becomes invalid once the equipment is removed or the equipment grid it resides in is destroyed.","abstract":false,"methods":[],"attributes":[{"name":"burner","order":16,"description":"The burner energy source for this equipment, if any.","read_type":"LuaBurner","optional":true},{"name":"energy","order":12,"description":"Current available energy.","read_type":"double","write_type":"double","optional":false},{"name":"generator_power","order":11,"description":"Energy generated per tick.","read_type":"double","optional":false},{"name":"ghost_name","order":1,"description":"Name of the equipment contained in this ghost","subclasses":["Ghost"],"read_type":"string","optional":false},{"name":"ghost_prototype","order":15,"description":"The prototype of the equipment contained in this ghost.","subclasses":["Ghost"],"read_type":"LuaEquipmentPrototype","optional":false},{"name":"ghost_type","order":3,"description":"Type of the equipment contained in this ghost.","subclasses":["Ghost"],"read_type":"string","optional":false},{"name":"max_energy","order":13,"description":"Maximum amount of energy that can be stored in this equipment.","read_type":"double","optional":false},{"name":"max_shield","order":8,"description":"Maximum shield value.","read_type":"double","optional":false},{"name":"max_solar_power","order":9,"description":"Maximum solar power generated.","read_type":"double","optional":false},{"name":"movement_bonus","order":10,"description":"Movement speed bonus.","read_type":"double","optional":false},{"name":"name","order":0,"description":"Name of this equipment.","read_type":"string","optional":false},{"name":"object_name","order":19,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"position","order":5,"description":"Position of this equipment in the equipment grid.","read_type":"EquipmentPosition","optional":false},{"name":"prototype","order":14,"description":"","read_type":"LuaEquipmentPrototype","optional":false},{"name":"quality","order":4,"description":"Quality of this equipment.","read_type":"LuaQualityPrototype","optional":false},{"name":"shape","order":6,"description":"Shape of this equipment.","read_type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"width","order":0,"description":"","type":"uint","optional":false}]},"optional":false},{"name":"shield","order":7,"description":"Current shield value of the equipment.\n\nCan't be set higher than [LuaEquipment::max_shield](runtime:LuaEquipment::max_shield).","read_type":"double","write_type":"double","optional":false},{"name":"to_be_removed","order":17,"description":"If this equipment is marked to be removed.","read_type":"boolean","optional":false},{"name":"type","order":2,"description":"Type of this equipment.","read_type":"string","optional":false},{"name":"valid","order":18,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaEquipmentCategoryPrototype","order":40,"description":"Prototype of an equipment category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaEquipmentGrid","order":41,"description":"An equipment grid is for example the inside of a power armor.","abstract":false,"methods":[{"name":"can_move","order":4,"description":"Check whether moving an equipment would succeed.","parameters":[{"name":"equipment","order":0,"description":"The equipment to move","type":"LuaEquipment","optional":false},{"name":"position","order":1,"description":"Where to put it","type":"EquipmentPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_removal","order":13,"description":"Cancels removal for the given equipment.","parameters":[{"name":"equipment","order":0,"description":"","type":"LuaEquipment","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the equipment removal was successfully cancelled.","type":"boolean","optional":false}]},{"name":"clear","order":2,"description":"Clear all equipment from the grid, removing it without actually returning it.","parameters":[{"name":"by_player","order":0,"description":"If provided, the action is done 'as' this player and [on_player_removed_equipment](runtime:on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"count","order":10,"description":"Get the number of all or some equipment in this grid.","parameters":[{"name":"equipment","order":0,"description":"Prototype name of the equipment to count. If not specified, count all equipment.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"find","order":9,"description":"Find equipment by name.","parameters":[{"name":"equipment","order":0,"description":"Prototype of the equipment to find.","type":"EquipmentWithQualityID","optional":false},{"name":"search_ghosts","order":1,"description":"If ghosts inner equipment should be searched. Defaults to `false`","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The first found equipment, or `nil` if equipment could not be found.","type":"LuaEquipment","optional":true}]},{"name":"get","order":6,"description":"Find equipment in the Equipment Grid based off a position.","parameters":[{"name":"position","order":0,"description":"The position","type":"EquipmentPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The found equipment, or `nil` if equipment could not be found at the given position.","type":"LuaEquipment","optional":true}]},{"name":"get_contents","order":7,"description":"Get counts of all equipment in this grid.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The counts, indexed by equipment names.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_generator_energy","order":8,"description":"Total energy per tick generated by the equipment inside this grid.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"move","order":5,"description":"Move an equipment within this grid.","parameters":[{"name":"equipment","order":0,"description":"The equipment to move","type":"LuaEquipment","optional":false},{"name":"position","order":1,"description":"Where to put it","type":"EquipmentPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"`true` if the equipment was successfully moved.","type":"boolean","optional":false}]},{"name":"order_removal","order":12,"description":"Marks the given equipment for removal. If the given equipment is a ghost it is removed.","parameters":[{"name":"equipment","order":0,"description":"","type":"LuaEquipment","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the equipment was successfully marked for removal (or in the case of a ghost; removed.)","type":"boolean","optional":false}]},{"name":"put","order":3,"description":"Insert an equipment into the grid.","parameters":[{"name":"by_player","order":3,"description":"If provided the action is done 'as' this player and [on_player_placed_equipment](runtime:on_player_placed_equipment) is triggered.","type":"PlayerIdentification","optional":true},{"name":"ghost","order":4,"description":"If true, place the equipment as a ghost.","type":"boolean","optional":true},{"name":"name","order":0,"description":"Equipment prototype name","type":"EquipmentID","optional":false},{"name":"position","order":2,"description":"Grid position to put the equipment in.","type":"EquipmentPosition","optional":true},{"name":"quality","order":1,"description":"The quality, `nil` for any or if not provided `normal` is used.","type":"QualityID","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The newly-added equipment, or `nil` if the equipment could not be added.","type":"LuaEquipment","optional":true}]},{"name":"revive","order":11,"description":"Revives the given equipment ghost if possible.","parameters":[{"name":"equipment","order":0,"description":"The equipment ghost to revive.","type":"LuaEquipment","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaEquipment","optional":false}]},{"name":"take","order":0,"description":"Remove an equipment from the grid.","parameters":[{"name":"by_player","order":2,"description":"If provided the action is done 'as' this player and [on_player_removed_equipment](runtime:on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true},{"name":"equipment","order":1,"description":"Take this exact equipment.","type":"LuaEquipment","optional":true},{"name":"position","order":0,"description":"Take the equipment that contains this position in the grid.","type":"EquipmentPosition","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The removed equipment, or `nil` if no equipment was removed.","type":"SimpleItemStack","optional":true}]},{"name":"take_all","order":1,"description":"Remove all equipment from the grid.","parameters":[{"name":"by_player","order":0,"description":"If provided, the action is done 'as' this player and [on_player_removed_equipment](runtime:on_player_removed_equipment) is triggered.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"List of the equipment that has been removed.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]}],"attributes":[{"name":"available_in_batteries","order":5,"description":"The total energy stored in all batteries in the equipment grid.","read_type":"double","optional":false},{"name":"battery_capacity","order":6,"description":"Total energy storage capacity of all batteries in the equipment grid.","read_type":"double","optional":false},{"name":"entity_owner","order":11,"description":"The entity that this equipment grid is owned by (in some inventory or item stack.)\n\nIf the owning entity is a character owned by some player and the player is disconnected this will return `nil`.","read_type":"LuaEntity","optional":true},{"name":"equipment","order":3,"description":"All the equipment in this grid.","read_type":{"complex_type":"array","value":"LuaEquipment"},"optional":false},{"name":"height","order":2,"description":"Height of the equipment grid.","read_type":"uint","optional":false},{"name":"inhibit_movement_bonus","order":9,"description":"Whether this grid's equipment movement bonus is active.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"max_shield","order":8,"description":"The maximum amount of shields this equipment grid has.","read_type":"float","optional":false},{"name":"max_solar_energy","order":4,"description":"Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generated energy varies depending on the daylight levels.","read_type":"double","optional":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player_owner","order":12,"description":"The player that this equipment grid is owned by (in some inventory or item stack.)","read_type":"LuaPlayer","optional":true},{"name":"prototype","order":0,"description":"","read_type":"LuaEquipmentGridPrototype","optional":false},{"name":"shield","order":7,"description":"The amount of shields this equipment grid has.","read_type":"float","optional":false},{"name":"unique_id","order":10,"description":"Unique identifier of this equipment grid.","read_type":"uint","optional":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"width","order":1,"description":"Width of the equipment grid.","read_type":"uint","optional":false}],"operators":[]},{"name":"LuaEquipmentGridPrototype","order":42,"description":"Prototype of an equipment grid.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"equipment_categories","order":0,"description":"Equipment category names for the [categories](runtime:LuaEquipmentPrototype::equipment_categories) that may be inserted into this equipment grid. The grid will accept any equipment that has at least one category in this list.","read_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"height","order":2,"description":"","read_type":"uint","optional":false},{"name":"locked","order":3,"description":"If the player can move equipment into or out of this grid.","read_type":"boolean","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"width","order":1,"description":"","read_type":"uint","optional":false}],"operators":[]},{"name":"LuaEquipmentPrototype","order":43,"description":"Prototype of a modular equipment.","parent":"LuaPrototypeBase","abstract":false,"methods":[{"name":"get_energy_consumption","order":1,"description":"","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_movement_bonus","order":2,"description":"","subclasses":["MovementBonusEquipment"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"float","optional":true}]},{"name":"get_shield","order":0,"description":"The shield value of this equipment. 0 for non-shield equipment.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"float","optional":false}]}],"attributes":[{"name":"attack_parameters","order":10,"description":"The equipment attack parameters.","subclasses":["ActiveDefenseEquipment"],"read_type":"AttackParameters","optional":true},{"name":"automatic","order":11,"description":"Whether this active defense equipment is automatic. Returns false if not active defense equipment.","read_type":"boolean","optional":false},{"name":"background_color","order":9,"description":"The background color of this equipment prototype.","read_type":"Color","optional":false},{"name":"burner_prototype","order":7,"description":"The burner energy source prototype this equipment uses, if any.","read_type":"LuaBurnerPrototype","optional":true},{"name":"electric_energy_source_prototype","order":8,"description":"The electric energy source prototype this equipment uses, if any.","read_type":"LuaElectricEnergySourcePrototype","optional":true},{"name":"energy_per_shield","order":3,"description":"The energy per shield point restored. 0 for non-shield equipment.","read_type":"double","optional":false},{"name":"energy_production","order":2,"description":"The max power generated by this equipment.","read_type":"double","optional":false},{"name":"energy_source","order":5,"description":"The energy source prototype for the equipment.","read_type":"LuaElectricEnergySourcePrototype","optional":false},{"name":"equipment_categories","order":6,"description":"Category names for this equipment. These [categories](runtime:LuaEquipmentGridPrototype::equipment_categories) will be used to determine whether this equipment is allowed in a particular equipment grid.","read_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"logistic_parameters","order":4,"description":"The logistic parameters for this roboport equipment.","subclasses":["RoboportEquipment"],"read_type":{"complex_type":"table","parameters":[{"name":"charge_approach_distance","order":3,"description":"","type":"float","optional":false},{"name":"charging_distance","order":7,"description":"","type":"float","optional":false},{"name":"charging_energy","order":9,"description":"","type":"double","optional":false},{"name":"charging_station_count","order":6,"description":"","type":"uint","optional":false},{"name":"charging_station_shift","order":8,"description":"","type":"Vector","optional":false},{"name":"charging_threshold_distance","order":10,"description":"","type":"float","optional":false},{"name":"construction_radius","order":5,"description":"","type":"float","optional":false},{"name":"logistic_radius","order":4,"description":"","type":"float","optional":false},{"name":"logistics_connection_distance","order":14,"description":"","type":"float","optional":false},{"name":"robot_limit","order":13,"description":"","type":"uint","optional":false},{"name":"robot_vertical_acceleration","order":11,"description":"","type":"float","optional":false},{"name":"robots_shrink_when_entering_and_exiting","order":15,"description":"","type":"boolean","optional":false},{"name":"spawn_and_station_height","order":0,"description":"","type":"float","optional":false},{"name":"spawn_and_station_shadow_height_offset","order":1,"description":"","type":"float","optional":false},{"name":"stationing_offset","order":12,"description":"","type":"Vector","optional":false},{"name":"stationing_render_layer_swap_height","order":2,"description":"","type":"float","optional":false}]},"optional":true},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"shape","order":0,"description":"Shape of this equipment prototype.","read_type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"points","order":2,"description":"Only set when the shape is \"manual\"","type":{"complex_type":"array","value":"EquipmentPoint"},"optional":true},{"name":"width","order":0,"description":"","type":"uint","optional":false}]},"optional":false},{"name":"take_result","order":1,"description":"The result item when taking this equipment out of an equipment grid, if any.","read_type":"LuaItemPrototype","optional":true},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaFlowStatistics","order":44,"description":"Encapsulates statistic data for different parts of the game.\n\nIn the context of flow statistics, `input`, `output` and `storage` describe in which position of the associated GUI the values are shown. Input values are shown on the far left side, output values to the immediate right, and storage values (if present) to the far right.\n\n- The item production GUI shows \"consumption\" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.\n\n- The kills GUI shows \"losses\" on the right, so `output` describes how many of the force's entities were killed by enemies.\n\n- The electric network GUI shows \"power consumption\" on the left side, so in this case `input` describes the power consumption numbers. In addition, electric networks are currently the only ones that utilize the `storage` part of their statistics, showing accumulator charges to the far right of the GUI.","abstract":false,"methods":[{"name":"clear","order":8,"description":"Reset all the statistics data to 0.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_flow_count","order":6,"description":"Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.\n\nUse `sample_index` to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.\n\nAll return values are normalized to be per-tick for electric networks and per-minute for all other types.","parameters":[{"name":"category","order":1,"description":"The statistics category to read from. Valid choices are `\"input\"`, `\"output\"` and `\"storage\"`.","type":"string","optional":false},{"name":"count","order":4,"description":"If true, the count of items/fluids/entities is returned instead of the per-time-frame value.","type":"boolean","optional":true},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false},{"name":"precision_index","order":2,"description":"The precision to read.","type":"defines.flow_precision_index","optional":false},{"name":"sample_index","order":3,"description":"The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.","type":"uint16","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_input_count","order":0,"description":"Gets the total input count for a given prototype.","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false}]},{"name":"get_output_count","order":2,"description":"Gets the total output count for a given prototype.","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false}]},{"name":"get_storage_count","order":4,"description":"Gets the total storage count for a given prototype.","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false}]},{"name":"on_flow","order":7,"description":"Adds a value to this flow statistics.","parameters":[{"name":"count","order":1,"description":"The count: positive or negative determines if the value goes in the input or output statistics.","type":"float","optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_input_count","order":1,"description":"Sets the total input count for a given prototype.","parameters":[{"name":"count","order":1,"description":"The new count. The type depends on the instance of the statistics.","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_output_count","order":3,"description":"Sets the total output count for a given prototype.","parameters":[{"name":"count","order":1,"description":"The new count. The type depends on the instance of the statistics.","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_storage_count","order":5,"description":"Sets the total storage count for a given prototype.","parameters":[{"name":"count","order":1,"description":"The new count. The type depends on the instance of the statistics.","type":{"complex_type":"union","options":["uint64","double"],"full_format":false},"optional":false},{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"force","order":3,"description":"The force these statistics belong to. `nil` for pollution statistics.","read_type":"LuaForce","optional":true},{"name":"input_counts","order":0,"description":"List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"union","options":["uint64","double"],"full_format":false}},"optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"output_counts","order":1,"description":"List of output counts indexed by prototype name. Represents the data that is shown in the middle of the GUI for electric networks and on the right side for all other statistics types.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"union","options":["uint64","double"],"full_format":false}},"optional":false},{"name":"storage_counts","order":2,"description":"List of storage counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for electric networks. For other statistics types these values are currently unused and hidden.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"union","options":["uint64","double"],"full_format":false}},"optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaFluidBox","order":45,"description":"An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe. See [Fluid](runtime:Fluid).\n\nDo note that reading from a [LuaFluidBox](runtime:LuaFluidBox) creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.","examples":["```\n-- Double the temperature of the fluid in entity's first fluid box.\nfluid = entity.fluidbox[1]\nfluid.temperature = fluid.temperature * 2\nentity.fluidbox[1] = fluid\n```"],"abstract":false,"methods":[{"name":"add_linked_connection","order":10,"description":"Registers a linked connection between this entity and other entity. Because entity may have multiple fluidboxes, each with multiple connections that could be linked, a unique value for this and other linked_connection_id may need to be given.\n\nIt may happen a linked connection is not established immediately due to crafting machines being possible to not have certain fluidboxes exposed at a given point in time, but once they appear (due to recipe changes that would use them) they will be linked. Linked connections are persisted as (this_entity, this_linked_connection_id, other_entity, other_linked_connection_id) so if a pipe connection definition's value of linked_connection_id changes existing connections may not restore correct connections.\n\nEvery fluidbox connection that was defined in prototypes as connection_type==\"linked\" may be linked to at most 1 other fluidbox. When trying to connect already used connection, previous connection will be removed.\n\nLinked connections cannot go to the same entity even if they would be part of other fluidbox.","parameters":[{"name":"other_entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"other_linked_connection_id","order":2,"description":"","type":"uint","optional":false},{"name":"this_linked_connection_id","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"flush","order":9,"description":"Flushes all fluid from this fluidbox and its fluid system.","parameters":[{"name":"fluid","order":1,"description":"If provided, only this fluid is flushed.","type":"FluidID","optional":true},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The removed fluid.","type":{"complex_type":"dictionary","key":"string","value":"float"},"optional":false}]},{"name":"get_capacity","order":1,"description":"The capacity of the given fluidbox index.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_connections","order":2,"description":"The fluidboxes to which the fluidbox at the given index is connected.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaFluidBox"},"optional":false}]},{"name":"get_filter","order":4,"description":"Get a fluid box filter","parameters":[{"name":"index","order":0,"description":"The index of the filter to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The filter at the requested index, or `nil` if there isn't one.","type":"FluidBoxFilter","optional":true}]},{"name":"get_fluid_segment_contents","order":8,"description":"Gets counts of all fluids in the fluid segment. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid segment.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The counts, indexed by fluid name.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":true}]},{"name":"get_fluid_segment_id","order":7,"description":"Gets the unique ID of the fluid segment this fluid box belongs to. May return `nil` for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid segment.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"get_linked_connection","order":12,"description":"Returns other end of a linked connection.","parameters":[{"name":"this_linked_connection_id","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Other entity to which a linked connection was made","type":"LuaEntity","optional":true},{"order":1,"description":"linked_connection_id on other entity","type":"uint","optional":true}]},{"name":"get_linked_connections","order":13,"description":"Returns list of all linked connections registered for this entity.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"FluidBoxConnectionRecord"},"optional":false}]},{"name":"get_locked_fluid","order":6,"description":"Returns the fluid the fluidbox is locked onto","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the fluidbox is not locked to any fluid.","type":"string","optional":true}]},{"name":"get_pipe_connections","order":3,"description":"Get the fluid box's connections and associated data.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"PipeConnection"},"optional":false}]},{"name":"get_prototype","order":0,"description":"The prototype of this fluidbox index. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["LuaFluidBoxPrototype",{"complex_type":"array","value":"LuaFluidBoxPrototype"}],"full_format":false},"optional":false}]},{"name":"remove_linked_connection","order":11,"description":"Removes linked connection record. If connected, other end will be also removed.","parameters":[{"name":"this_linked_connection_id","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_filter","order":5,"description":"Set a fluid box filter.\n\nSome entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.","parameters":[{"name":"filter","order":1,"description":"The filter to set. Setting `nil` clears the filter.","type":{"complex_type":"union","options":["FluidBoxFilterSpec","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index of the filter to set.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the filter was set successfully.","type":"boolean","optional":false}]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":0,"description":"The entity that owns this fluidbox.","read_type":"LuaEntity","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"index","order":0,"description":"Access, set or clear a fluid box. The index must always be in bounds (see [LuaFluidBox::length_operator](runtime:LuaFluidBox::length_operator)). New fluidboxes may not be added or removed using this operator.\n\nIs `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.","read_type":"Fluid","optional":true},{"name":"length","order":1,"description":"Number of fluid boxes.","read_type":"uint","optional":false}]},{"name":"LuaFluidBoxPrototype","order":46,"description":"A prototype of a fluidbox owned by some [LuaEntityPrototype](runtime:LuaEntityPrototype).","abstract":false,"methods":[],"attributes":[{"name":"entity","order":0,"description":"The entity that this belongs to.","read_type":"LuaEntityPrototype","optional":false},{"name":"filter","order":5,"description":"The filter, if any is set.","read_type":"LuaFluidPrototype","optional":true},{"name":"index","order":1,"description":"The index of this fluidbox prototype in the owning entity.","read_type":"uint","optional":false},{"name":"maximum_temperature","order":7,"description":"The maximum temperature, if any is set.","read_type":"double","optional":true},{"name":"minimum_temperature","order":6,"description":"The minimum temperature, if any is set.","read_type":"double","optional":true},{"name":"object_name","order":11,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"pipe_connections","order":2,"description":"The pipe connection points.","read_type":{"complex_type":"array","value":"PipeConnectionDefinition"},"optional":false},{"name":"production_type","order":3,"description":"The production type.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"input-output"},{"complex_type":"literal","value":"output"},{"complex_type":"literal","value":"none"}],"full_format":false},"optional":false},{"name":"render_layer","order":9,"description":"The render layer.","read_type":"string","optional":false},{"name":"secondary_draw_orders","order":8,"description":"The secondary draw orders for the 4 possible connection directions.","read_type":{"complex_type":"array","value":"int"},"optional":false},{"name":"valid","order":10,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"volume","order":4,"description":"","read_type":"double","optional":false}],"operators":[]},{"name":"LuaFluidEnergySourcePrototype","order":47,"description":"Prototype of a fluid energy source.","abstract":false,"methods":[],"attributes":[{"name":"burns_fluid","order":4,"description":"","read_type":"boolean","optional":false},{"name":"destroy_non_fuel_fluid","order":6,"description":"","read_type":"boolean","optional":false},{"name":"effectivity","order":3,"description":"","read_type":"double","optional":false},{"name":"emissions_per_joule","order":0,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"fluid_box","order":10,"description":"The fluid box for this energy source.","read_type":"LuaFluidBoxPrototype","optional":false},{"name":"fluid_usage_per_tick","order":7,"description":"","read_type":"double","optional":false},{"name":"maximum_temperature","order":9,"description":"","read_type":"double","optional":false},{"name":"object_name","order":12,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_no_network_icon","order":1,"description":"","read_type":"boolean","optional":false},{"name":"render_no_power_icon","order":2,"description":"","read_type":"boolean","optional":false},{"name":"scale_fluid_usage","order":5,"description":"","read_type":"boolean","optional":false},{"name":"smoke","order":8,"description":"The smoke sources for this prototype, if any.","read_type":{"complex_type":"array","value":"SmokeSource"},"optional":false},{"name":"valid","order":11,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaFluidPrototype","order":48,"description":"Prototype of a fluid.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"base_color","order":3,"description":"","read_type":"Color","optional":false},{"name":"default_temperature","order":0,"description":"Default temperature of this fluid.","read_type":"double","optional":false},{"name":"emissions_multiplier","order":6,"description":"A multiplier on the amount of emissions produced when this fluid is burnt in a generator. A value above `1.0` increases emissions and vice versa. The multiplier can't be negative.","read_type":"double","optional":false},{"name":"flow_color","order":4,"description":"","read_type":"Color","optional":false},{"name":"fuel_value","order":7,"description":"The amount of energy in Joules one unit of this fluid will produce when burnt in a generator. A value of `0` means this fluid can't be used for energy generation. The value can't be negative.","read_type":"double","optional":false},{"name":"gas_temperature","order":5,"description":"The temperature above which this fluid will be shown as gaseous inside tanks and pipes.","read_type":"double","optional":false},{"name":"heat_capacity","order":2,"description":"The amount of energy in Joules required to heat one unit of this fluid by 1\u00b0C.","read_type":"double","optional":false},{"name":"max_temperature","order":1,"description":"Maximum temperature this fluid can reach.","read_type":"double","optional":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaFontPrototype","order":49,"description":"Prototype of a font.","abstract":false,"methods":[],"attributes":[{"name":"border","order":4,"description":"","read_type":"boolean","optional":false},{"name":"border_color","order":6,"description":"The border color, if any.","read_type":"Color","optional":true},{"name":"filtered","order":5,"description":"","read_type":"boolean","optional":false},{"name":"from","order":1,"description":"","read_type":"string","optional":false},{"name":"name","order":0,"description":"Name of this prototype.","read_type":"string","optional":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"size","order":2,"description":"","read_type":"int","optional":false},{"name":"spacing","order":3,"description":"","read_type":"float","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaForce","order":50,"description":"`LuaForce` encapsulates data local to each \"force\" or \"faction\" of the game. Default forces are player, enemy and neutral. Players and mods can create additional forces (up to 64 total).","abstract":false,"methods":[{"name":"add_chart_tag","order":43,"description":"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.\n\nThe chunk must be charted for a tag to be valid at that location.","raises":[{"name":"on_chart_tag_added","order":0,"description":"Raised if the chart tag was successfully added.","timeframe":"instantly","optional":true}],"parameters":[{"name":"surface","order":0,"description":"Which surface to add the tag to.","type":"SurfaceIdentification","optional":false},{"name":"tag","order":1,"description":"The tag to add.","type":"ChartTagSpec","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaCustomChartTag","optional":true}]},{"name":"add_research","order":49,"description":"Add this technology to the back of the research queue if the queue is enabled. Otherwise, set this technology to be researched now.","raises":[{"name":"on_research_started","order":0,"description":"Raised if the technology was successfully added.","timeframe":"instantly","optional":true}],"parameters":[{"name":"technology","order":0,"description":"","type":"TechnologyID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the technology was successfully added.","type":"boolean","optional":false}]},{"name":"cancel_charting","order":21,"description":"Cancels pending chart requests for the given surface or all surfaces.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"cancel_current_research","order":50,"description":"Stop the research currently in progress. This will remove any dependent technologies from the research queue.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"chart","order":12,"description":"Chart a portion of the map. The chart for the given area is refreshed; it creates chart for any parts of the given area that haven't been charted yet.","examples":["```\n-- Charts a 2048x2048 rectangle centered around the origin.\ngame.player.force.chart(game.player.surface, {{x = -1024, y = -1024}, {x = 1024, y = 1024}})\n```"],"parameters":[{"name":"area","order":1,"description":"The area on the given surface to chart.","type":"BoundingBox","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"chart_all","order":15,"description":"Chart all generated chunks.","parameters":[{"name":"surface","order":0,"description":"Which surface to chart or all if not given.","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"clear_chart","order":13,"description":"Erases chart data for this force.","parameters":[{"name":"surface","order":0,"description":"Which surface to erase chart data for or if not provided all surfaces charts are erased.","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"copy_chart","order":17,"description":"Copies the given surface's chart from the given force to this force.","parameters":[{"name":"destination_surface","order":2,"description":"The surface to copy to.","type":"SurfaceIdentification","optional":false},{"name":"source_force","order":0,"description":"The force to copy from","type":"ForceID","optional":false},{"name":"source_surface","order":1,"description":"The surface to copy from.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"copy_from","order":16,"description":"Copies all of the given changeable values (except charts) from the given force to this force.","parameters":[{"name":"force","order":0,"description":"The force to copy from.","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"create_space_platform","order":63,"description":"Creates a new space platform on this force.","parameters":[{"name":"name","order":0,"description":"The platform name. If not provided, a random name will be used.","type":"string","optional":true},{"name":"planet","order":1,"description":"The planet that the platform will orbit.","type":"SpaceLocationID","optional":false},{"name":"starter_pack","order":2,"description":"The starter pack required to build the platform.","type":"ItemID","optional":false}],"format":{"takes_table":true,"table_optional":true},"return_values":[{"order":0,"description":"","type":"LuaSpacePlatform","optional":true}]},{"name":"disable_all_prototypes","order":3,"description":"Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"disable_research","order":1,"description":"Disable research for this force.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_all_prototypes","order":4,"description":"Enables all recipes and technologies. The opposite of [LuaForce::disable_all_prototypes](runtime:LuaForce::disable_all_prototypes).","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_all_recipes","order":6,"description":"Unlock all recipes.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_all_technologies","order":7,"description":"Unlock all technologies.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_research","order":2,"description":"Enable research for this force.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"find_chart_tags","order":44,"description":"Finds all custom chart tags within the given bounding box on the given surface.","parameters":[{"name":"area","order":1,"description":"","type":"BoundingBox","optional":true},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaCustomChartTag"},"optional":false}]},{"name":"find_logistic_network_by_position","order":34,"description":"","parameters":[{"name":"position","order":0,"description":"Position to find a network for","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"Surface to search on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The found network or `nil`.","type":"LuaLogisticNetwork","optional":true}]},{"name":"get_ammo_damage_modifier","order":22,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_cease_fire","order":29,"description":"Is `other` force in this force's cease fire list?","parameters":[{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_entity_build_count_statistics","order":75,"description":"The entity build statistics for this force (built and mined) for the given surface.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaFlowStatistics","optional":false}]},{"name":"get_entity_count","order":0,"description":"Count entities of given type.\n\nThis function has O(1) time complexity as entity counts are kept and maintained in the game engine.","parameters":[{"name":"name","order":0,"description":"Prototype name of the entity.","type":"EntityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of entities of given prototype belonging to this force.","type":"uint","optional":false}]},{"name":"get_evolution_factor","order":64,"description":"Fetches the evolution factor of this force on the given surface.","parameters":[{"name":"surface","order":0,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_evolution_factor_by_killing_spawners","order":67,"description":"Fetches the spawner kill part of the evolution factor of this force on the given surface.","parameters":[{"name":"surface","order":0,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_evolution_factor_by_pollution","order":65,"description":"Fetches the pollution part of the evolution factor of this force on the given surface.","parameters":[{"name":"surface","order":0,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_evolution_factor_by_time","order":66,"description":"Fetches the time part of the evolution factor of this force on the given surface.","parameters":[{"name":"surface","order":0,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_fluid_production_statistics","order":73,"description":"The fluid production statistics for this force for the given surface.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaFlowStatistics","optional":false}]},{"name":"get_friend","order":31,"description":"Is `other` force in this force's friends list.","parameters":[{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_gun_speed_modifier","order":24,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_hand_crafting_disabled_for_recipe","order":47,"description":"Gets if the given recipe is explicitly disabled from being hand crafted.","parameters":[{"name":"recipe","order":0,"description":"","type":"RecipeID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_item_launched","order":40,"description":"Gets the count of a given item launched in rockets.","parameters":[{"name":"item","order":0,"description":"The item to get","type":"ItemID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The count of the item that has been launched.","type":"uint","optional":false}]},{"name":"get_item_production_statistics","order":72,"description":"The item production statistics for this force for the given surface.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaFlowStatistics","optional":false}]},{"name":"get_kill_count_statistics","order":74,"description":"The kill counter statistics for this force for the given surface.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaFlowStatistics","optional":false}]},{"name":"get_linked_inventory","order":51,"description":"Gets the linked inventory for the given prototype and link ID if it exists or `nil`.","parameters":[{"name":"link_id","order":1,"description":"","type":"uint","optional":false},{"name":"prototype","order":0,"description":"","type":"EntityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":true}]},{"name":"get_spawn_position","order":36,"description":"","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"MapPosition","optional":false}]},{"name":"get_surface_hidden","order":38,"description":"","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_turret_attack_modifier","order":26,"description":"","parameters":[{"name":"turret","order":0,"description":"Turret prototype name","type":"EntityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"is_chunk_charted","order":18,"description":"Has a chunk been charted?","parameters":[{"name":"position","order":1,"description":"Position of the chunk.","type":"ChunkPosition","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_chunk_requested_for_charting","order":20,"description":"Has a chunk been requested for charting?","parameters":[{"name":"position","order":1,"description":"Position of the chunk.","type":"ChunkPosition","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_chunk_visible","order":19,"description":"Is the given chunk currently charted and visible (not covered by fog of war) on the map.","parameters":[{"name":"position","order":1,"description":"","type":"ChunkPosition","optional":false},{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_enemy","order":53,"description":"Is this force an enemy? This differs from `get_cease_fire` in that it is always false for neutral force. This is equivalent to checking the `enemy` ForceCondition.","parameters":[{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_friend","order":52,"description":"Is this force a friend? This differs from `get_friend` in that it is always true for neutral force. This is equivalent to checking the `friend` ForceCondition.","parameters":[{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_pathfinder_busy","order":32,"description":"Is pathfinder busy? When the pathfinder is busy, it won't accept any more pathfinding requests.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_quality_unlocked","order":59,"description":"Is the specified quality unlocked for this force?","parameters":[{"name":"quality","order":0,"description":"Name of the quality.","type":"QualityID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"is_space_location_unlocked","order":56,"description":"Is the specified planet unlocked for this force?","parameters":[{"name":"name","order":0,"description":"Name of the planet.","type":"SpaceLocationID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"is_space_platforms_unlocked","order":62,"description":"Are the space platforms unlocked? This basically just controls the availability of the space platforms button.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"kill_all_units","order":33,"description":"Kill all units and flush the pathfinder.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"lock_quality","order":57,"description":"Locks the quality to not be accessible to this force.","parameters":[{"name":"quality","order":0,"description":"Name of the quality.","type":"QualityID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"lock_space_location","order":54,"description":"Locks the planet to not be accessible to this force.","parameters":[{"name":"name","order":0,"description":"Name of the planet.","type":"SpaceLocationID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"lock_space_platforms","order":60,"description":"Locks the space platforms, which disables the space platforms button","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"play_sound","order":46,"description":"Play a sound for every player in this force.\n\nThe sound is not played if its location is not [charted](runtime:LuaForce::chart) for this force.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"print","order":42,"description":"Print text to the chat console of all players on this force.\n\nBy default, messages that are identical to a message sent in the last 60 ticks are not printed again.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false},{"name":"print_settings","order":1,"description":"","type":"PrintSettings","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"rechart","order":14,"description":"Force a rechart of the whole chart.","parameters":[{"name":"surface","order":0,"description":"Which surface to rechart or all if not given.","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"research_all_technologies","order":8,"description":"Research all technologies.","raises":[{"name":"on_research_finished","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"include_disabled_prototypes","order":0,"description":"Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"reset","order":10,"description":"Reset everything. All technologies are set to not researched, all modifiers are set to default values.","raises":[{"name":"on_force_reset","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reset_evolution","order":45,"description":"Resets evolution for this force to zero.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reset_recipes","order":5,"description":"Load the original version of all recipes from the prototypes.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reset_technologies","order":9,"description":"Load the original versions of technologies from prototypes. Preserves research state of technologies.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reset_technology_effects","order":11,"description":"Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.","raises":[{"name":"on_technology_effects_reset","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_ammo_damage_modifier","order":23,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false},{"name":"modifier","order":1,"description":"","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_cease_fire","order":28,"description":"Add `other` force to this force's cease fire list. Forces on the cease fire list won't be targeted for attack.","raises":[{"name":"on_force_cease_fire_changed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"cease_fire","order":1,"description":"","type":"boolean","optional":false},{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_evolution_factor","order":68,"description":"Sets the evolution factor of this force on the given surface.","parameters":[{"name":"factor","order":0,"description":"","type":"double","optional":false},{"name":"surface","order":1,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_evolution_factor_by_killing_spawners","order":71,"description":"Sets the spawner kill part of the evolution factor of this force on the given surface.","parameters":[{"name":"factor","order":0,"description":"","type":"double","optional":false},{"name":"surface","order":1,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_evolution_factor_by_pollution","order":69,"description":"Sets the pollution part of the evolution factor of this force on the given surface.","parameters":[{"name":"factor","order":0,"description":"","type":"double","optional":false},{"name":"surface","order":1,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_evolution_factor_by_time","order":70,"description":"Sets the time part of the evolution factor of this force on the given surface.","parameters":[{"name":"factor","order":0,"description":"","type":"double","optional":false},{"name":"surface","order":1,"description":"Defaults to \"nauvis\".","type":"SurfaceIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_friend","order":30,"description":"Add `other` force to this force's friends list. Friends have unrestricted access to buildings and turrets won't fire at them.","raises":[{"name":"on_force_friends_changed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"friend","order":1,"description":"","type":"boolean","optional":false},{"name":"other","order":0,"description":"","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_gun_speed_modifier","order":25,"description":"","parameters":[{"name":"ammo","order":0,"description":"Ammo category","type":"string","optional":false},{"name":"modifier","order":1,"description":"","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_hand_crafting_disabled_for_recipe","order":48,"description":"Sets if the given recipe can be hand-crafted. This is used to explicitly disable hand crafting a recipe - it won't allow hand-crafting otherwise not hand-craftable recipes.","parameters":[{"name":"hand_crafting_disabled","order":1,"description":"","type":"boolean","optional":false},{"name":"recipe","order":0,"description":"","type":"RecipeID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_item_launched","order":41,"description":"Sets the count of a given item launched in rockets.","parameters":[{"name":"count","order":1,"description":"The count to set","type":"uint","optional":false},{"name":"item","order":0,"description":"The item to set","type":"ItemID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_spawn_position","order":35,"description":"","parameters":[{"name":"position","order":0,"description":"The new position on the given surface.","type":"MapPosition","optional":false},{"name":"surface","order":1,"description":"Surface to set the spawn position for.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_surface_hidden","order":37,"description":"","parameters":[{"name":"hidden","order":1,"description":"Whether to hide the surface or not.","type":"boolean","optional":false},{"name":"surface","order":0,"description":"Surface to set hidden for.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_turret_attack_modifier","order":27,"description":"","parameters":[{"name":"modifier","order":1,"description":"","type":"double","optional":false},{"name":"turret","order":0,"description":"Turret prototype name","type":"EntityID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unchart_chunk","order":39,"description":"","parameters":[{"name":"position","order":0,"description":"The chunk position to unchart.","type":"ChunkPosition","optional":false},{"name":"surface","order":1,"description":"Surface to unchart on.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unlock_quality","order":58,"description":"Unlocks the quality to be accessible to this force.","parameters":[{"name":"quality","order":0,"description":"Name of the quality.","type":"QualityID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unlock_space_location","order":55,"description":"Unlocks the planet to be accessible to this force.","parameters":[{"name":"name","order":0,"description":"Name of the planet.","type":"SpaceLocationID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unlock_space_platforms","order":61,"description":"Unlocks the space platforms, which enables the space platforms button","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"ai_controllable","order":21,"description":"Enables some higher-level AI behaviour for this force. When set to `true`, biters belonging to this force will automatically expand into new territories, build new spawners, and form unit groups. By default, this value is `true` for the enemy force and `false` for all others.\n\nSetting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.\n\nIt is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"artillery_range_modifier","order":24,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"beacon_distribution_modifier","order":25,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"belt_stack_size_bonus","order":15,"description":"Belt stack size bonus.","read_type":"uint","write_type":"uint","optional":false},{"name":"bulk_inserter_capacity_bonus","order":14,"description":"Number of items that can be transferred by bulk inserters. When writing to this value, it must be >= 0 and <= 254.","read_type":"uint","write_type":"uint","optional":false},{"name":"character_build_distance_bonus","order":26,"description":"","read_type":"uint","write_type":"uint","optional":false},{"name":"character_health_bonus","order":34,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"character_inventory_slots_bonus","order":32,"description":"The number of additional inventory slots the character main inventory has.","read_type":"uint","write_type":"uint","optional":false},{"name":"character_item_drop_distance_bonus","order":27,"description":"","read_type":"uint","write_type":"uint","optional":false},{"name":"character_item_pickup_distance_bonus","order":30,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"character_logistic_requests","order":37,"description":"`true` if character requester logistics is enabled.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"character_loot_pickup_distance_bonus","order":31,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"character_reach_distance_bonus","order":28,"description":"","read_type":"uint","write_type":"uint","optional":false},{"name":"character_resource_reach_distance_bonus","order":29,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"character_running_speed_modifier","order":23,"description":"Modifies the running speed of all characters in this force by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.","read_type":"double","write_type":"double","optional":false},{"name":"character_trash_slot_count","order":16,"description":"Number of character trash slots.","read_type":"double","write_type":"double","optional":false},{"name":"color","order":50,"description":"Effective color of this force.","read_type":"Color","optional":false},{"name":"connected_players","order":40,"description":"The connected players belonging to this force.\n\nThis is primarily useful when you want to do some action against all online players of this force.\n\nThis does *not* index using player index. See [LuaPlayer::index](runtime:LuaPlayer::index) on each player instance for the player index.","read_type":{"complex_type":"array","value":"LuaPlayer"},"optional":false},{"name":"create_ghost_on_entity_death","order":19,"description":"When an entity dies, a ghost will be placed for automatic reconstruction.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"current_research","order":10,"description":"The currently ongoing technology research, if any.","read_type":"LuaTechnology","optional":true},{"name":"custom_color","order":49,"description":"Custom color for this force. If specified, will take priority over other sources of the force color. Writing `nil` clears custom color. Will return `nil` if it was not specified or if was set to `{0,0,0,0}`.","read_type":"Color","write_type":"Color","optional":true},{"name":"deconstruction_time_to_live","order":33,"description":"The time, in ticks, before a deconstruction order is removed.","read_type":"uint","write_type":"uint","optional":false},{"name":"following_robots_lifetime_modifier","order":18,"description":"Additional lifetime for following robots.","read_type":"double","write_type":"double","optional":false},{"name":"friendly_fire","order":43,"description":"If friendly fire is enabled for this force.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"index","order":45,"description":"This force's index in [LuaGameScript::forces](runtime:LuaGameScript::forces) (unique ID). It is assigned when a force is created, and remains so until it is [merged](runtime:on_forces_merged) (ie. deleted). Indexes of merged forces can be reused.","read_type":"uint","optional":false},{"name":"inserter_stack_size_bonus","order":13,"description":"The inserter stack size bonus for non stack inserters","read_type":"double","write_type":"double","optional":false},{"name":"items_launched","order":39,"description":"All of the items that have been launched in rockets.","read_type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false},{"name":"laboratory_productivity_bonus","order":6,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"laboratory_speed_modifier","order":5,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"logistic_networks","order":22,"description":"List of logistic networks, grouped by surface.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaLogisticNetwork"}},"optional":false},{"name":"manual_crafting_speed_modifier","order":4,"description":"Multiplier of the manual crafting speed. Default value is `0`. The actual crafting speed will be multiplied by `1 + manual_crafting_speed_modifier`.","examples":["```\n-- Double the player's crafting speed\ngame.player.force.manual_crafting_speed_modifier = 1\n```"],"read_type":"double","write_type":"double","optional":false},{"name":"manual_mining_speed_modifier","order":3,"description":"Multiplier of the manual mining speed. Default value is `0`. The actual mining speed will be multiplied by `1 + manual_mining_speed_modifier`.","examples":["```\n-- Double the player's mining speed\ngame.player.force.manual_mining_speed_modifier = 1\n```"],"read_type":"double","write_type":"double","optional":false},{"name":"max_failed_attempts_per_tick_per_construction_queue","order":36,"description":"","read_type":"uint","write_type":"uint","optional":false},{"name":"max_successful_attempts_per_tick_per_construction_queue","order":35,"description":"","read_type":"uint","write_type":"uint","optional":false},{"name":"maximum_following_robot_count","order":17,"description":"Maximum number of follower robots.","read_type":"uint","write_type":"uint","optional":false},{"name":"mining_drill_productivity_bonus","order":41,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"name","order":0,"description":"Name of the force.","examples":["```\ngame.player.print(game.player.force.name) -- => \"player\"\n```"],"read_type":"string","optional":false},{"name":"object_name","order":52,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"platforms","order":48,"description":"The space platforms that belong to this force mapped by their index value.\n\nThis will include platforms that are pending deletion.","read_type":{"complex_type":"dictionary","key":"uint","value":"LuaSpacePlatform"},"optional":false},{"name":"players","order":20,"description":"Players belonging to this force.","read_type":{"complex_type":"array","value":"LuaPlayer"},"optional":false},{"name":"previous_research","order":12,"description":"The previous research, if any.","read_type":"LuaTechnology","write_type":"LuaTechnology","optional":true},{"name":"recipes","order":2,"description":"Recipes available to this force, indexed by `name`.","examples":["```\n-- Prints the category of the given recipe\ngame.player.print(game.player.force.recipes[\"transport-belt\"].category)\n```"],"read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipe"},"optional":false},{"name":"research_enabled","order":47,"description":"Whether research is enabled for this force, see [LuaForce::enable_research](runtime:LuaForce::enable_research) and [LuaForce::disable_research](runtime:LuaForce::disable_research).","read_type":"boolean","optional":false},{"name":"research_progress","order":11,"description":"Progress of current research, as a number in range `[0, 1]`.","read_type":"double","write_type":"double","optional":false},{"name":"research_queue","order":46,"description":"The research queue of this force. The first technology in the array is the currently active one. Reading this attribute gives an array of [LuaTechnology](runtime:LuaTechnology).\n\nTo write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research.  Writing to this when the research queue is disabled will simply set the last research in the table as the current research.\n\nThis only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.","read_type":{"complex_type":"array","value":"TechnologyID"},"write_type":{"complex_type":"array","value":"TechnologyID"},"optional":false},{"name":"rockets_launched","order":38,"description":"The number of rockets launched.","read_type":"uint","write_type":"uint","optional":false},{"name":"share_chart","order":44,"description":"If sharing chart data is enabled for this force.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"technologies","order":1,"description":"Technologies owned by this force, indexed by `name`.","examples":["```\n-- Researches the technology for the player's force\ngame.player.force.technologies[\"steel-processing\"].researched = true\n```"],"read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnology"},"optional":false},{"name":"train_braking_force_bonus","order":42,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"valid","order":51,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"worker_robots_battery_modifier","order":8,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"worker_robots_speed_modifier","order":7,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"worker_robots_storage_bonus","order":9,"description":"","read_type":"double","write_type":"double","optional":false}],"operators":[]},{"name":"LuaFuelCategoryPrototype","order":51,"description":"Prototype of a fuel category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaGameScript","order":52,"description":"Main toplevel type, provides access to most of the API though its members. An instance of LuaGameScript is available as the global object named `game`.","abstract":false,"methods":[{"name":"auto_save","order":21,"description":"Instruct the game to perform an auto-save.\n\nOnly the server will save in multiplayer. In single player a standard auto-save is triggered.","parameters":[{"name":"name","order":0,"description":"The autosave name if any. Saves will be named _autosave-*name* when provided.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"ban_player","order":29,"description":"Bans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_banned","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to ban.","type":{"complex_type":"union","options":["PlayerIdentification","string"],"full_format":false},"optional":false},{"name":"reason","order":1,"description":"The reason given if any.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"check_consistency","order":10,"description":"Run internal consistency checks. Allegedly prints any errors it finds.\n\nExists mainly for debugging reasons.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_force","order":17,"description":"Create a new force.\n\nThe game currently supports a maximum of 64 forces, including the three built-in forces. This means that a maximum of 61 new forces may be created. Force names must be unique.","raises":[{"name":"on_force_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"force","order":0,"description":"Name of the new force","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The force that was just created","type":"LuaForce","optional":false}]},{"name":"create_inventory","order":39,"description":"Creates an inventory that is not owned by any game object.\n\nIt can be resized later with [LuaInventory::resize](runtime:LuaInventory::resize).\n\nMake sure to destroy it when you are done with it using [LuaInventory::destroy](runtime:LuaInventory::destroy).","parameters":[{"name":"gui_title","order":1,"description":"The title of the GUI that is shown when this inventory is opened.","type":"LocalisedString","optional":true},{"name":"size","order":0,"description":"The number of slots the inventory initially has.","type":"uint16","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaInventory","optional":false}]},{"name":"create_profiler","order":38,"description":"Creates a [LuaProfiler](runtime:LuaProfiler), which is used for measuring script performance.\n\nLuaProfiler cannot be serialized.","parameters":[{"name":"stopped","order":0,"description":"Create the timer stopped","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaProfiler","optional":false}]},{"name":"create_random_generator","order":26,"description":"Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.\n\n*Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).","parameters":[{"name":"seed","order":0,"description":"","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRandomGenerator","optional":false}]},{"name":"create_surface","order":19,"description":"Create a new surface.\n\nThe game currently supports a maximum of 4 294 967 295 surfaces, including the default surface. Surface names must be unique.","raises":[{"name":"on_surface_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"name","order":0,"description":"Name of the new surface.","type":"string","optional":false},{"name":"settings","order":1,"description":"Map generation settings.","type":"MapGenSettings","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The surface that was just created.","type":"LuaSurface","optional":false}]},{"name":"delete_surface","order":22,"description":"Deletes the given surface and all entities on it if possible.","raises":[{"name":"on_pre_surface_deleted","order":0,"description":"","timeframe":"future_tick","optional":false},{"name":"on_surface_deleted","order":1,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"surface","order":0,"description":"The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the surface was queued to be deleted.","type":"boolean","optional":false}]},{"name":"disable_replay","order":23,"description":"Disables replay saving for the current save file. Once done there's no way to re-enable replay saving for the save file without loading an old save.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_tip_triggers_in_custom_scenarios","order":24,"description":"Enables tip triggers in custom scenarios, that unlock new tips and show notices about unlocked tips.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"force_crc","order":16,"description":"Force a CRC check. Tells all peers to calculate their current CRC, which are then compared to each other. If a mismatch is detected, the game desyncs and some peers are forced to reconnect.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_entity_by_tag","order":4,"description":"Gets an entity by its [name tag](runtime:LuaEntity::name_tag). Entity name tags can also be set in the entity \"extra settings\" GUI in the map editor.","parameters":[{"name":"tag","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaEntity","optional":true}]},{"name":"get_entity_by_unit_number","order":44,"description":"Returns entity with a specified unit number or nil if entity with such number was not found or prototype does not have [EntityPrototypeFlags::get-by-unit-number](prototype:EntityPrototypeFlags::get_by_unit_number) flag set.","parameters":[{"name":"unit_number","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaEntity","optional":true}]},{"name":"get_map_exchange_string","order":35,"description":"Gets the map exchange string for the map generation settings that were used to create this map.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_player","order":36,"description":"Gets the given player or returns `nil` if no player is found.","parameters":[{"name":"player","order":0,"description":"The player index or name.","type":{"complex_type":"union","options":["uint","string"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaPlayer","optional":true}]},{"name":"get_pollution_statistics","order":42,"description":"The pollution statistics for this the given surface.","parameters":[{"name":"surface","order":0,"description":"","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaFlowStatistics","optional":false}]},{"name":"get_script_inventories","order":40,"description":"Gets the inventories created through [LuaGameScript::create_inventory](runtime:LuaGameScript::create_inventory).\n\nInventories created through console commands will be owned by `\"core\"`.","parameters":[{"name":"mod","order":0,"description":"The mod whose inventories to get. If not provided all inventories are returned.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"A mapping of mod name to array of inventories owned by that mod.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"LuaInventory"}},"optional":false}]},{"name":"get_surface","order":37,"description":"Gets the given surface or returns `nil` if no surface is found.\n\nThis is a shortcut for [LuaGameScript::surfaces](runtime:LuaGameScript::surfaces).","parameters":[{"name":"surface","order":0,"description":"The surface index or name.","type":{"complex_type":"union","options":["uint","string"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaSurface","optional":true}]},{"name":"get_vehicles","order":43,"description":"Returns vehicles in game","parameters":[{"name":"force","order":1,"description":"","type":"ForceID","optional":true},{"name":"has_passenger","order":5,"description":"","type":"boolean","optional":true},{"name":"is_moving","order":4,"description":"","type":"boolean","optional":true},{"name":"surface","order":2,"description":")","type":"SurfaceIdentification","optional":true},{"name":"type","order":3,"description":"","type":{"complex_type":"union","options":["EntityID",{"complex_type":"array","value":"EntityID"}],"full_format":false},"optional":true},{"name":"unit_number","order":0,"description":"","type":"uint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"is_demo","order":6,"description":"Is this the demo version of Factorio?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_multiplayer","order":34,"description":"Whether the save is loaded as a multiplayer map.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"kick_player","order":28,"description":"Kicks the given player from this multiplayer game. Does nothing if this is a single player game or if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_kicked","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to kick.","type":"PlayerIdentification","optional":false},{"name":"reason","order":1,"description":"The reason given if any.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"merge_forces","order":18,"description":"Marks two forces to be merged together. All players and entities in the source force will be reassigned to the target force. The source force will then be destroyed. Importantly, this does not merge technologies or bonuses, which are instead retained from the target force.\n\nThe three built-in forces (player, enemy and neutral) can't be destroyed, meaning they can't be used as the source argument to this function.\n\nThe source force is not removed until the end of the current tick, or if called during the [on_forces_merging](runtime:on_forces_merging) or [on_forces_merged](runtime:on_forces_merged) event, the end of the next tick.","raises":[{"name":"on_forces_merged","order":1,"description":"","timeframe":"future_tick","optional":false},{"name":"on_forces_merging","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"destination","order":1,"description":"The force to reassign all entities to.","type":"ForceID","optional":false},{"name":"source","order":0,"description":"The force to remove.","type":"ForceID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"mute_player","order":32,"description":"Mutes the given player. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_muted","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to mute.","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"play_sound","order":27,"description":"Play a sound for every player in the game.\n\nThe sound is not played if its location is not [charted](runtime:LuaForce::chart) for that player.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"print","order":25,"description":"Print text to the chat console all players.\n\nBy default, messages that are identical to a message sent in the last 60 ticks are not printed again.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false},{"name":"print_settings","order":1,"description":"","type":"PrintSettings","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"purge_player","order":31,"description":"Purges the given players messages from the game. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to purge.","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"regenerate_entity","order":11,"description":"Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities.\n\nAll specified entity prototypes must be autoplacable.","parameters":[{"name":"entities","order":0,"description":"Prototype names of entity or entities to autoplace.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"reload_mods","order":8,"description":"Forces a reload of all mods.\n\nThis will act like saving and loading from the mod(s) perspective.\n\nThis will do nothing if run in multiplayer.\n\nThis disables the replay if replay is enabled.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reload_script","order":7,"description":"Forces a reload of the scenario script from the original scenario location.\n\nThis disables the replay if replay is enabled.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"remove_offline_players","order":15,"description":"Remove players who are currently not connected from the map.","raises":[{"name":"on_player_removed","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_pre_player_removed","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"players","order":0,"description":"List of players to remove. If not specified, remove all offline players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"reset_game_state","order":1,"description":"Reset scenario state (game_finished, player_won, etc.).","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"reset_time_played","order":41,"description":"Resets the amount of time played for this map.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"save_atlas","order":9,"description":"Saves the current configuration of Atlas to a file. This will result in huge file containing all of the game graphics moved to as small space as possible.\n\nExists mainly for debugging reasons.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"server_save","order":20,"description":"Instruct the server to save the map. Only actually saves when in multiplayer.","parameters":[{"name":"name","order":0,"description":"Save file name. If not specified, the currently running save is overwritten.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_game_state","order":0,"description":"Set scenario state. Any parameters not provided do not change the current state.","parameters":[{"name":"can_continue","order":3,"description":"","type":"boolean","optional":true},{"name":"game_finished","order":0,"description":"","type":"boolean","optional":true},{"name":"next_level","order":2,"description":"","type":"string","optional":true},{"name":"player_won","order":1,"description":"","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"set_lose_ending_info","order":3,"description":"Set losing ending information for the current scenario.","parameters":[{"name":"bullet_points","order":2,"description":"","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"final_message","order":3,"description":"","type":"LocalisedString","optional":true},{"name":"image_path","order":4,"description":"","type":"string","optional":true},{"name":"message","order":1,"description":"","type":"LocalisedString","optional":true},{"name":"title","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"set_wait_for_screenshots_to_finish","order":13,"description":"Forces the screenshot saving system to wait until all queued screenshots have been written to disk.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_win_ending_info","order":2,"description":"Set winning ending information for the current scenario.","parameters":[{"name":"bullet_points","order":2,"description":"","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"final_message","order":3,"description":"","type":"LocalisedString","optional":true},{"name":"image_path","order":4,"description":"","type":"string","optional":true},{"name":"message","order":1,"description":"","type":"LocalisedString","optional":true},{"name":"title","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"show_message_dialog","order":5,"description":"Show an in-game message dialog.\n\nCan only be used when the map contains exactly one player.","parameters":[{"name":"image","order":1,"description":"Path to an image to show on the dialog","type":"string","optional":true},{"name":"point_to","order":2,"description":"If specified, dialog will show an arrow pointing to this place. When not specified, the arrow will point to the player's position. (Use `point_to={type=\"nowhere\"}` to remove the arrow entirely.) The dialog itself will be placed near the arrow's target.","type":"GuiArrowSpecification","optional":true},{"name":"style","order":3,"description":"The gui style to use for this speech bubble. Must be of type speech_bubble.","type":"string","optional":true},{"name":"text","order":0,"description":"What the dialog should say","type":"LocalisedString","optional":false},{"name":"wrapper_frame_style","order":4,"description":"Must be of type flow_style.","type":"string","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"take_screenshot","order":12,"description":"Take a screenshot of the game and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter.\n\nIf Factorio is running headless, this function will do nothing.","parameters":[{"name":"allow_in_replay","order":12,"description":"Whether to save the screenshot even during replay playback. Defaults to `false`.","type":"boolean","optional":true},{"name":"anti_alias","order":10,"description":"Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.","type":"boolean","optional":true},{"name":"by_player","order":1,"description":"If defined, the screenshot will only be taken for this player.","type":"PlayerIdentification","optional":true},{"name":"daytime","order":13,"description":"Overrides the current surface daytime for the duration of screenshot rendering.","type":"double","optional":true},{"name":"force_render","order":15,"description":"Screenshot requests are processed in between game update and render. The game may skip rendering (ie. drop frames) if the previous frame has not finished rendering or the game simulation starts to fall below 60 updates per second. If `force_render` is set to `true`, the game won't drop frames and process the screenshot request at the end of the update in which the request was created. This is not honored on multiplayer clients that are catching up to server. Defaults to `false`.","type":"boolean","optional":true},{"name":"path","order":6,"description":"The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `\"save/here/screenshot.png\"`) will create the necessary folder structure in `script-output`. Defaults to `\"screenshot.png\"`.","type":"string","optional":true},{"name":"player","order":0,"description":"The player to focus on. Defaults to the local player.","type":"PlayerIdentification","optional":true},{"name":"position","order":3,"description":"If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.","type":"MapPosition","optional":true},{"name":"quality","order":11,"description":"The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.","type":"int","optional":true},{"name":"resolution","order":4,"description":"The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048). The `x` value of the position is used as the width, the `y` value as the height.","type":"TilePosition","optional":true},{"name":"show_cursor_building_preview","order":9,"description":"When `true` and when `player` is specified, the building preview for the item in the player's cursor will also be rendered. Defaults to `false`.","type":"boolean","optional":true},{"name":"show_entity_info","order":8,"description":"Whether to include entity info (\"Alt mode\") or not. Defaults to `false`.","type":"boolean","optional":true},{"name":"show_gui","order":7,"description":"Whether to include GUIs in the screenshot or not. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":2,"description":"If defined, the screenshot will be taken on this surface.","type":"SurfaceIdentification","optional":true},{"name":"water_tick","order":14,"description":"Overrides the tick of water animation, if animated water is enabled.","type":"uint","optional":true},{"name":"zoom","order":5,"description":"The map zoom to take the screenshot at. Defaults to `1`.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"take_technology_screenshot","order":14,"description":"Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter.","parameters":[{"name":"path","order":0,"description":"The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `\"save/here/screenshot.png\"`) will create the necessary folder structure in `script-output`. Defaults to `\"technology-screenshot.png\"`.","type":"string","optional":true},{"name":"player","order":1,"description":"The screenshot will be taken for this player.","type":"PlayerIdentification","optional":false},{"name":"quality","order":4,"description":"The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.","type":"int","optional":true},{"name":"selected_technology","order":2,"description":"The technology to highlight.","type":"TechnologyID","optional":true},{"name":"skip_disabled","order":3,"description":"If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"unban_player","order":30,"description":"Unbans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_unbanned","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to unban.","type":{"complex_type":"union","options":["PlayerIdentification","string"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unmute_player","order":33,"description":"Unmutes the given player. Does nothing if the player running this isn't an admin.","raises":[{"name":"on_console_command","order":1,"description":"","timeframe":"instantly","optional":false},{"name":"on_player_unmuted","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"player","order":0,"description":"The player to unmute.","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"autosave_enabled","order":23,"description":"True by default. Can be used to disable autosaving. Make sure to turn it back on soon after.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"backer_names","order":20,"description":"Array of the names of all the backers that supported the game development early on. These are used as names for labs, locomotives, radars, roboports, and train stops.","read_type":{"complex_type":"LuaCustomTable","key":"uint","value":"string"},"optional":false},{"name":"blueprints","order":26,"description":"Records contained in the \"game blueprints\" tab of the blueprint library.","read_type":{"complex_type":"array","value":"LuaRecord"},"optional":false},{"name":"connected_players","order":18,"description":"The players that are currently online.\n\nThis does *not* index using player index. See [LuaPlayer::index](runtime:LuaPlayer::index) on each player instance for the player index. This is primarily useful when you want to do some action against all online players.","read_type":{"complex_type":"array","value":"LuaPlayer"},"optional":false},{"name":"console_command_used","order":7,"description":"Whether a console command has been used.","read_type":"boolean","optional":false},{"name":"default_map_gen_settings","order":21,"description":"The default map gen settings for this save.","read_type":"MapGenSettings","optional":false},{"name":"difficulty","order":5,"description":"Current scenario difficulty.","read_type":"defines.difficulty","optional":false},{"name":"difficulty_settings","order":4,"description":"The currently active set of difficulty settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game. This is however not recommended as different difficulties can have differing technology and recipe trees, which can cause problems for players.","examples":["```\n-- This will set the technology price multiplier to 12.\ngame.difficulty_settings.technology_price_multiplier = 12\n```"],"read_type":"DifficultySettings","optional":false},{"name":"draw_resource_selection","order":24,"description":"True by default. Can be used to disable the highlighting of resource patches when they are hovered on the map.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"enemy_has_vision_on_land_mines","order":22,"description":"Determines if enemy land mines are completely invisible or not.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"finished","order":13,"description":"True while the victory screen is shown.","read_type":"boolean","optional":false},{"name":"finished_but_continuing","order":14,"description":"True after players finished the game and clicked \"continue\".","read_type":"boolean","optional":false},{"name":"forces","order":6,"description":"Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `name`s as the keys. Iterating with `ipairs()` will not work at all.","read_type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaForce"},"optional":false},{"name":"map_settings","order":3,"description":"The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.\n\nThis does not contain difficulty settings, use [LuaGameScript::difficulty_settings](runtime:LuaGameScript::difficulty_settings) instead.","read_type":"MapSettings","optional":false},{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"permissions","order":19,"description":"","read_type":"LuaPermissionGroups","optional":false},{"name":"planets","order":17,"description":"","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaPlanet"},"optional":false},{"name":"player","order":1,"description":"This property is only populated inside [custom command](runtime:LuaCommandProcessor) handlers and when writing [Lua console commands](https://wiki.factorio.com/Console#Scripting_and_cheat_commands). Returns the player that is typing the command, `nil` in all other instances.\n\nSee [LuaGameScript::players](runtime:LuaGameScript::players) for accessing all players.","read_type":"LuaPlayer","optional":true},{"name":"players","order":2,"description":"Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `index`es as the keys. Iterating with `ipairs()` will not work at all.\n\nIf only a single player is required, [LuaGameScript::get_player](runtime:LuaGameScript::get_player) should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua.","read_type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaPlayer"},"optional":false},{"name":"simulation","order":8,"description":"Simulation-related functions, or `nil` if the current game is not a simulation.","read_type":"LuaSimulation","optional":false},{"name":"speed","order":15,"description":"Speed to update the map at. 1.0 is normal speed -- 60 UPS. Minimum value is 0.01.","read_type":"float","write_type":"float","optional":false},{"name":"surfaces","order":16,"description":"Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `name`s as the keys. Iterating with `ipairs()` will not work at all.","read_type":{"complex_type":"LuaCustomTable","key":{"complex_type":"union","options":["uint","string"],"full_format":false},"value":"LuaSurface"},"optional":false},{"name":"technology_notifications_enabled","order":27,"description":"True by default. Can be used to prevent the game engine from printing certain messages.","lists":["Prevented messages:\n\n- \"player-started-research\"\n- \"player-queued-research\"\n- \"player-cancelled-research\"\n- \"technology-researched\""],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"tick","order":9,"description":"Current map tick.","read_type":"uint","optional":false},{"name":"tick_paused","order":11,"description":"If the tick has been paused. This means that entity update has been paused.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"ticks_played","order":10,"description":"The number of ticks since this game was created using either \"new game\" or \"new game from scenario\". Notably, this number progresses even when the game is [tick_paused](runtime:LuaGameScript::tick_paused).\n\nThis differs from [LuaGameScript::tick](runtime:LuaGameScript::tick) in that creating a game from a scenario always starts with this value at `0`, even if the scenario has its own level data where the `tick` has progressed past `0`.","read_type":"uint","optional":false},{"name":"ticks_to_run","order":12,"description":"The number of ticks to be run while the tick is paused.\n\nWhen [LuaGameScript::tick_paused](runtime:LuaGameScript::tick_paused) is true, ticks_to_run behaves the following way: While this is > 0, the entity update is running normally and this value is decremented every tick. When this reaches 0, the game will pause again.","read_type":"uint","write_type":"uint","optional":false},{"name":"train_manager","order":25,"description":"","read_type":"LuaTrainManager","optional":false}],"operators":[]},{"name":"LuaGenericOnOffControlBehavior","order":53,"description":"An abstract base class for behaviors that support switching the entity on or off based on some condition.","parent":"LuaControlBehavior","abstract":true,"methods":[],"attributes":[{"name":"circuit_condition","order":2,"description":"The circuit condition. Writing `nil` clears the circuit condition.","examples":["```\n-- Tell an entity to be active (for example a lamp to be lit) when it receives a\n-- circuit signal of more than 4 chain signals.\na_behavior.circuit_condition = {condition={\n  comparator=\">\",\n  first_signal={type=\"item\", name=\"rail-chain-signal\"},\n  constant=4}\n}\n```"],"read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"circuit_enable_disable","order":1,"description":"`true` if this entity enable/disable state is controlled by circuit condition","read_type":"boolean","write_type":"boolean","optional":false},{"name":"connect_to_logistic_network","order":3,"description":"`true` if this should connect to the logistic network.","read_type":"boolean","optional":false},{"name":"disabled","order":0,"description":"If the entity is currently disabled because of the control behavior.","read_type":"boolean","optional":false},{"name":"logistic_condition","order":4,"description":"The logistic condition. Writing `nil` clears the logistic condition.","examples":["```\n-- Tell an entity to be active (for example a lamp to be lit) when the logistics\n-- network it's connected to has more than four chain signals.\na_behavior.logistic_condition = {condition={\n  comparator=\">\",\n  first_signal={type=\"item\", name=\"rail-chain-signal\"},\n  constant=4}\n}\n```"],"read_type":"CircuitConditionDefinition","optional":false}],"operators":[]},{"name":"LuaGroup","order":54,"description":"Item group or subgroup.","abstract":false,"methods":[],"attributes":[{"name":"group","order":3,"description":"The parent group.","subclasses":["ItemSubGroup"],"read_type":"LuaGroup","optional":false},{"name":"localised_name","order":1,"description":"Localised name of the group.","read_type":"LocalisedString","optional":false},{"name":"name","order":0,"description":"","read_type":"string","optional":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"order","order":6,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","read_type":"string","optional":false},{"name":"order_in_recipe","order":5,"description":"The additional order value used in recipe ordering.","subclasses":["ItemGroup"],"read_type":"string","optional":false},{"name":"subgroups","order":4,"description":"Subgroups of this group.","subclasses":["ItemGroup"],"read_type":{"complex_type":"array","value":"LuaGroup"},"optional":false},{"name":"type","order":2,"description":"","read_type":"string","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaGui","order":55,"description":"The root of the GUI. This type houses the root elements, `top`, `left`, `center`,  `goal`, and `screen`, to which other elements can be added to be displayed on screen.\n\nEvery player can have a different GUI state.","abstract":false,"methods":[],"attributes":[{"name":"center","order":4,"description":"The center part of the GUI. It is a flow element.","read_type":"LuaGuiElement","optional":false},{"name":"children","order":1,"description":"The children GUI elements mapped by name <> element.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaGuiElement"},"optional":false},{"name":"goal","order":5,"description":"The flow used in the objectives window. It is a flow element. The objectives window is only visible when the flow is not empty or the objective text is set.","read_type":"LuaGuiElement","optional":false},{"name":"left","order":3,"description":"The left part of the GUI. It is a flow element inside a scroll pane element.","read_type":"LuaGuiElement","optional":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player","order":0,"description":"The player who owns this gui.","read_type":"LuaPlayer","optional":false},{"name":"relative","order":7,"description":"For showing a GUI somewhere relative to one of the game GUIs. It is an empty-widget element.","read_type":"LuaGuiElement","optional":false},{"name":"screen","order":6,"description":"For showing a GUI somewhere on the entire screen. It is an empty-widget element.","read_type":"LuaGuiElement","optional":false},{"name":"top","order":2,"description":"The top part of the GUI. It is a flow element inside a scroll pane element.","read_type":"LuaGuiElement","optional":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaGuiElement","order":56,"description":"An element of a custom GUI. This type is used to represent [any kind](runtime:GuiElementType) of a GUI element - labels, buttons and frames are all instances of this type. Just like [LuaEntity](runtime:LuaEntity), different kinds of elements support different attributes; attempting to access an attribute on an element that doesn't support it (for instance, trying to access the `column_count` of a `textfield`) will result in a runtime error.\n\nFor information on all supported GUI elements, see [GuiElementType](runtime:GuiElementType).\n\nEach GUI element allows access to its children by having them as attributes. Thus, one can use the `parent.child` syntax to refer to children. Lua also supports the `parent[\"child\"]` syntax to refer to the same element. This can be used in cases where the child has a name that isn't a valid Lua identifier.","examples":["```\n-- This will add a label called \"greeting\" to the top flow.\n-- Immediately after, it will change its text to illustrate accessing child elements.\ngame.player.gui.top.add{type=\"label\", name=\"greeting\", caption=\"Hi\"}\ngame.player.gui.top.greeting.caption = \"Hello there!\"\ngame.player.gui.top[\"greeting\"].caption = \"Actually, never mind, I don't like your face\"\n```","```\n-- This will add a tabbed-pane and 2 tabs with contents.\nlocal tabbed_pane = game.player.gui.top.add{type=\"tabbed-pane\"}\nlocal tab1 = tabbed_pane.add{type=\"tab\", caption=\"Tab 1\"}\nlocal tab2 = tabbed_pane.add{type=\"tab\", caption=\"Tab 2\"}\nlocal label1 = tabbed_pane.add{type=\"label\", caption=\"Label 1\"}\nlocal label2 = tabbed_pane.add{type=\"label\", caption=\"Label 2\"}\ntabbed_pane.add_tab(tab1, label1)\ntabbed_pane.add_tab(tab2, label2)\n```"],"abstract":false,"methods":[{"name":"add","order":0,"description":"Add a new child element to this GuiElement.","parameters":[{"name":"anchor","order":11,"description":"Where to position the child element when in the `relative` element.","type":"GuiAnchor","optional":true},{"name":"caption","order":2,"description":"Text displayed on the child element. For frames, this is their title. For other elements, like buttons or labels, this is the content. Whilst this attribute may be used on all elements, it doesn't make sense for tables and flows as they won't display it.","type":"LocalisedString","optional":true},{"name":"elem_tooltip","order":4,"description":"Elem tooltip of the child element. Will be displayed above `tooltip`.","type":"ElemID","optional":true},{"name":"enabled","order":5,"description":"Whether the child element is enabled. Defaults to `true`.","type":"boolean","optional":true},{"name":"game_controller_interaction","order":12,"description":"How the element should interact with game controllers. Defaults to [defines.game_controller_interaction.normal](runtime:defines.game_controller_interaction.normal).","type":"defines.game_controller_interaction","optional":true},{"name":"ignored_by_interaction","order":7,"description":"Whether the child element is ignored by interaction. Defaults to `false`.","type":"boolean","optional":true},{"name":"index","order":10,"description":"Location in its parent that the child element should slot into. By default, the child will be appended onto the end.","type":"uint","optional":true},{"name":"name","order":1,"description":"Name of the child element. It must be unique within the parent element.","type":"string","optional":true},{"name":"raise_hover_events","order":13,"description":"Whether this element will raise [on_gui_hover](runtime:on_gui_hover) and [on_gui_leave](runtime:on_gui_leave). Defaults to `false`.","type":"boolean","optional":true},{"name":"style","order":8,"description":"The name of the style prototype to apply to the new element.","type":"string","optional":true},{"name":"tags","order":9,"description":"[Tags](runtime:Tags) associated with the child element.","type":"Tags","optional":true},{"name":"tooltip","order":3,"description":"Tooltip of the child element.","type":"LocalisedString","optional":true},{"name":"type","order":0,"description":"The kind of element to add, which potentially has its own attributes as listed below.","type":"GuiElementType","optional":false},{"name":"visible","order":6,"description":"Whether the child element is visible. Defaults to `true`.","type":"boolean","optional":true}],"variant_parameter_groups":[{"name":"button","order":0,"description":"","parameters":[{"name":"auto_toggle","order":1,"description":"Whether the button will automatically toggle when clicked. Defaults to `false`.","type":"boolean","optional":true},{"name":"mouse_button_filter","order":0,"description":"Which mouse buttons the button responds to. Defaults to `\"left-and-right\"`.","type":"MouseButtonFlags","optional":true},{"name":"toggled","order":2,"description":"The initial toggled state of the button. Defaults to `false`.","type":"boolean","optional":true}]},{"name":"camera","order":14,"description":"","parameters":[{"name":"position","order":0,"description":"The position the camera centers on.","type":"MapPosition","optional":false},{"name":"surface_index","order":1,"description":"The surface that the camera will render. Defaults to the player's current surface.","type":"uint","optional":true},{"name":"zoom","order":2,"description":"The initial camera zoom. Defaults to `0.75`.","type":"double","optional":true}]},{"name":"checkbox","order":6,"description":"","parameters":[{"name":"state","order":0,"description":"The initial checked-state of the checkbox.","type":"boolean","optional":false}]},{"name":"choose-elem-button","order":15,"description":"","parameters":[{"name":"achievement","order":9,"description":"If type is `\"achievement\"` - the default value for the button.","type":"string","optional":true},{"name":"decorative","order":7,"description":"If type is `\"decorative\"` - the default value for the button.","type":"string","optional":true},{"name":"elem_filters","order":16,"description":"Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.","type":"PrototypeFilter","optional":true},{"name":"elem_type","order":0,"description":"The type of the button.","type":"ElemType","optional":false},{"name":"entity","order":3,"description":"If type is `\"entity\"` - the default value for the button.","type":"string","optional":true},{"name":"entity-with-quality","order":13,"description":"If type is `\"entity-with-quality\"` - the default value for the button.","type":"string","optional":true},{"name":"equipment","order":10,"description":"If type is `\"equipment\"` - the default value for the button.","type":"string","optional":true},{"name":"equipment-with-quality","order":15,"description":"If type is `\"equipment-with-quality\"` - the default value for the button.","type":"string","optional":true},{"name":"fluid","order":5,"description":"If type is `\"fluid\"` - the default value for the button.","type":"string","optional":true},{"name":"item","order":1,"description":"If type is `\"item\"` - the default value for the button.","type":"string","optional":true},{"name":"item-group","order":8,"description":"If type is `\"item-group\"` - the default value for the button.","type":"string","optional":true},{"name":"item-with-quality","order":12,"description":"If type is `\"item-with-quality\"` - the default value for the button.","type":"string","optional":true},{"name":"recipe","order":6,"description":"If type is `\"recipe\"` - the default value for the button.","type":"string","optional":true},{"name":"recipe-with-quality","order":14,"description":"If type is `\"recipe-with-quality\"` - the default value for the button.","type":"string","optional":true},{"name":"signal","order":4,"description":"If type is `\"signal\"` - the default value for the button.","type":"SignalID","optional":true},{"name":"technology","order":11,"description":"If type is `\"technology\"` - the default value for the button.","type":"string","optional":true},{"name":"tile","order":2,"description":"If type is `\"tile\"` - the default value for the button.","type":"string","optional":true}]},{"name":"drop-down","order":11,"description":"","parameters":[{"name":"items","order":0,"description":"The initial items in the dropdown.","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"selected_index","order":1,"description":"The index of the initially selected item. Defaults to 0.","type":"uint","optional":true}]},{"name":"flow","order":1,"description":"","parameters":[{"name":"direction","order":0,"description":"The initial direction of the flow's layout. Defaults to `\"horizontal\"`.","type":"GuiDirection","optional":true}]},{"name":"frame","order":2,"description":"","parameters":[{"name":"direction","order":0,"description":"The initial direction of the frame's layout. Defaults to `\"horizontal\"`.","type":"GuiDirection","optional":true}]},{"name":"line","order":12,"description":"","parameters":[{"name":"direction","order":0,"description":"The initial direction of the line. Defaults to `\"horizontal\"`.","type":"GuiDirection","optional":true}]},{"name":"list-box","order":13,"description":"","parameters":[{"name":"items","order":0,"description":"The initial items in the listbox.","type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"selected_index","order":1,"description":"The index of the initially selected item. Defaults to 0.","type":"uint","optional":true}]},{"name":"minimap","order":18,"description":"","parameters":[{"name":"chart_player_index","order":2,"description":"The player index the map should use. Defaults to the current player.","type":"uint","optional":true},{"name":"force","order":3,"description":"The force this minimap should use. Defaults to the player's current force.","type":"string","optional":true},{"name":"position","order":0,"description":"The position the minimap centers on. Defaults to the player's current position.","type":"MapPosition","optional":true},{"name":"surface_index","order":1,"description":"The surface the camera will render. Defaults to the player's current surface.","type":"uint","optional":true},{"name":"zoom","order":4,"description":"The initial camera zoom. Defaults to `0.75`.","type":"double","optional":true}]},{"name":"progressbar","order":5,"description":"","parameters":[{"name":"value","order":0,"description":"The initial value of the progressbar, in the range `[0, 1]`. Defaults to `0`.","type":"double","optional":true}]},{"name":"radiobutton","order":7,"description":"","parameters":[{"name":"state","order":0,"description":"The initial checked-state of the radiobutton.","type":"boolean","optional":false}]},{"name":"scroll-pane","order":10,"description":"","parameters":[{"name":"horizontal_scroll_policy","order":0,"description":"Policy of the horizontal scroll bar. Defaults to `\"auto\"`.","type":"ScrollPolicy","optional":true},{"name":"vertical_scroll_policy","order":1,"description":"Policy of the vertical scroll bar. Defaults to `\"auto\"`.","type":"ScrollPolicy","optional":true}]},{"name":"slider","order":17,"description":"","parameters":[{"name":"discrete_slider","order":4,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"discrete_values","order":5,"description":"Defaults to `true`.","type":"boolean","optional":true},{"name":"maximum_value","order":1,"description":"The maximum value for the slider. Defaults to `30`.","type":"double","optional":true},{"name":"minimum_value","order":0,"description":"The minimum value for the slider. Defaults to `0`.","type":"double","optional":true},{"name":"value","order":2,"description":"The initial value for the slider. Defaults to `minimum_value`.","type":"double","optional":true},{"name":"value_step","order":3,"description":"The minimum value the slider can move. Defaults to `1`.","type":"double","optional":true}]},{"name":"sprite","order":9,"description":"","parameters":[{"name":"resize_to_sprite","order":1,"description":"Whether the widget should resize according to the sprite in it. Defaults to `true`.","type":"boolean","optional":true},{"name":"sprite","order":0,"description":"Path to the image to display.","type":"SpritePath","optional":true}]},{"name":"sprite-button","order":8,"description":"","parameters":[{"name":"auto_toggle","order":6,"description":"Whether the button will automatically toggle when clicked. Defaults to `false`.","type":"boolean","optional":true},{"name":"clicked_sprite","order":2,"description":"Path to the image to display on the button when it is clicked.","type":"SpritePath","optional":true},{"name":"hovered_sprite","order":1,"description":"Path to the image to display on the button when it is hovered.","type":"SpritePath","optional":true},{"name":"mouse_button_filter","order":5,"description":"The mouse buttons that the button responds to. Defaults to `\"left-and-right\"`.","type":"MouseButtonFlags","optional":true},{"name":"number","order":3,"description":"The number shown on the button.","type":"double","optional":true},{"name":"show_percent_for_small_numbers","order":4,"description":"Formats small numbers as percentages. Defaults to `false`.","type":"boolean","optional":true},{"name":"sprite","order":0,"description":"Path to the image to display on the button.","type":"SpritePath","optional":true},{"name":"toggled","order":7,"description":"The initial toggled state of the button. Defaults to `false`.","type":"boolean","optional":true}]},{"name":"switch","order":20,"description":"","parameters":[{"name":"allow_none_state","order":1,"description":"Whether the switch can be set to a middle state. Defaults to `false`.","type":"boolean","optional":true},{"name":"left_label_caption","order":2,"description":"","type":"LocalisedString","optional":true},{"name":"left_label_tooltip","order":3,"description":"","type":"LocalisedString","optional":true},{"name":"right_label_caption","order":4,"description":"","type":"LocalisedString","optional":true},{"name":"right_label_tooltip","order":5,"description":"","type":"LocalisedString","optional":true},{"name":"switch_state","order":0,"description":"If set to \"none\", `allow_none_state` must be `true`. Defaults to `\"left\"`.","type":"SwitchState","optional":true}]},{"name":"tab","order":19,"description":"","parameters":[{"name":"badge_text","order":0,"description":"The text to display after the normal tab text (designed to work with numbers).","type":"LocalisedString","optional":true}]},{"name":"table","order":3,"description":"","parameters":[{"name":"column_count","order":0,"description":"Number of columns. This can't be changed after the table is created.","type":"uint","optional":false},{"name":"draw_horizontal_line_after_headers","order":3,"description":"Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`.","type":"boolean","optional":true},{"name":"draw_horizontal_lines","order":2,"description":"Whether the table should draw horizontal grid lines. Defaults to `false`.","type":"boolean","optional":true},{"name":"draw_vertical_lines","order":1,"description":"Whether the table should draw vertical grid lines. Defaults to `false`.","type":"boolean","optional":true},{"name":"vertical_centering","order":4,"description":"Whether the content of the table should be vertically centered. Defaults to `true`.","type":"boolean","optional":true}]},{"name":"text-box","order":16,"description":"","parameters":[{"name":"icon_selector","order":1,"description":"Whether to add the rich text icon selector to the text box. This attribute can't be changed after creating the widget. Defaults to `false`.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The initial text contained in the text-box.","type":"string","optional":true}]},{"name":"textfield","order":4,"description":"","parameters":[{"name":"allow_decimal","order":2,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"allow_negative","order":3,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"icon_selector","order":6,"description":"Whether to add the rich text icon selector to the text field. This attribute can't be changed after creating the widget. Defaults to `false`.","type":"boolean","optional":true},{"name":"is_password","order":4,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"lose_focus_on_confirm","order":5,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"numeric","order":1,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The initial text contained in the textfield.","type":"string","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:","format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The GUI element that was added.","type":"LuaGuiElement","optional":false}]},{"name":"add_item","order":9,"description":"Inserts a string at the end or at the given index of this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":1,"description":"The index at which to insert the item.","type":"uint","optional":true},{"name":"string","order":0,"description":"The text to insert.","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_tab","order":26,"description":"Adds the given tab and content widgets to this tabbed pane as a new tab.","subclasses":["tabbed-pane"],"parameters":[{"name":"content","order":1,"description":"The content to show when this tab is selected. Can be any type of GUI element.","type":"LuaGuiElement","optional":false},{"name":"tab","order":0,"description":"The tab to add, must be a GUI element of type \"tab\".","type":"LuaGuiElement","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"bring_to_front","order":30,"description":"Moves this GUI element to the \"front\" so it will draw over other elements.\n\nOnly works for elements in [LuaGui::screen](runtime:LuaGui::screen).","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear","order":1,"description":"Remove children of this element. Any [LuaGuiElement](runtime:LuaGuiElement) objects referring to the destroyed elements become invalid after this operation.","examples":["```\ngame.player.gui.top.clear()\n```"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_items","order":6,"description":"Removes the items in this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"close_dropdown","order":31,"description":"Closes the dropdown list if this is a dropdown and it is open.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"destroy","order":2,"description":"Remove this element, along with its children. Any [LuaGuiElement](runtime:LuaGuiElement) objects referring to the destroyed elements become invalid after this operation.\n\nThe top-level GUI elements - [LuaGui::top](runtime:LuaGui::top), [LuaGui::left](runtime:LuaGui::left), [LuaGui::center](runtime:LuaGui::center) and [LuaGui::screen](runtime:LuaGui::screen) - can't be destroyed.","examples":["```\ngame.player.gui.top.greeting.destroy()\n```"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"focus","order":18,"description":"Focuses this GUI element if possible.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"force_auto_center","order":28,"description":"Forces this frame to re-auto-center. Only works on frames stored directly in [LuaGui::screen](runtime:LuaGui::screen).","raises":[{"name":"on_gui_location_changed","order":0,"description":"","timeframe":"future_tick","optional":false}],"subclasses":["frame"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_index_in_parent","order":4,"description":"Gets the index that this element has in its parent element.\n\nThis iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_item","order":7,"description":"Gets the item at the given index from this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index to get","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"get_mod","order":3,"description":"The mod that owns this Gui element or `nil` if it's owned by the scenario script.\n\nThis has a not-super-expensive, but non-free cost to get.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"get_slider_discrete_values","order":15,"description":"Returns whether this slider only allows discrete values.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_slider_maximum","order":12,"description":"Gets this sliders maximum value.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_slider_minimum","order":11,"description":"Gets this sliders minimum value.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_slider_value_step","order":14,"description":"Gets the minimum distance this slider can move.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"remove_item","order":10,"description":"Removes the item at the given index from this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_tab","order":27,"description":"Removes the given tab and its associated content from this tabbed pane.\n\nRemoving a tab does not destroy the tab or the tab contents. It just removes them from the view. When removing tabs, [LuaGuiElement::selected_tab_index](runtime:LuaGuiElement::selected_tab_index) needs to be manually updated.","subclasses":["tabbed-pane"],"parameters":[{"name":"tab","order":0,"description":"The tab to remove or `nil` to remove all tabs.","type":"LuaGuiElement","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_bottom","order":20,"description":"Scrolls this scroll bar to the bottom.","subclasses":["scroll-pane","text-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_element","order":23,"description":"Scrolls this scroll bar such that the specified GUI element is visible to the player.","subclasses":["scroll-pane"],"parameters":[{"name":"element","order":0,"description":"The element to scroll to.","type":"LuaGuiElement","optional":false},{"name":"scroll_mode","order":1,"description":"Where the element should be positioned in the scroll-pane. Defaults to `\"in-view\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"in-view"},{"complex_type":"literal","value":"top-third"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_item","order":29,"description":"Scrolls the scroll bar such that the specified listbox item is visible to the player.","subclasses":["list-box"],"parameters":[{"name":"index","order":0,"description":"The item index to scroll to.","type":"int","optional":false},{"name":"scroll_mode","order":1,"description":"Where the item should be positioned in the list-box. Defaults to `\"in-view\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"in-view"},{"complex_type":"literal","value":"top-third"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_left","order":21,"description":"Scrolls this scroll bar to the left.","subclasses":["scroll-pane","text-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_right","order":22,"description":"Scrolls this scroll bar to the right.","subclasses":["scroll-pane","text-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"scroll_to_top","order":19,"description":"Scrolls this scroll bar to the top.","subclasses":["scroll-pane","text-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"select","order":25,"description":"Selects a range of text in this textbox.","examples":["```\n-- Select the characters \"amp\" from \"example\":\ntextbox.select(3, 5)\n```","```\n-- Move the cursor to the start of the text box:\ntextbox.select(1, 0)\n```"],"subclasses":["textfield","text-box"],"parameters":[{"name":"end_index","order":1,"description":"The index of the last character to select","type":"int","optional":false},{"name":"start_index","order":0,"description":"The index of the first character to select","type":"int","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"select_all","order":24,"description":"Selects all the text in this textbox.","subclasses":["textfield","text-box"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_item","order":8,"description":"Sets the given string at the given index in this dropdown or listbox.","subclasses":["drop-down","list-box"],"parameters":[{"name":"index","order":0,"description":"The index whose text to replace.","type":"uint","optional":false},{"name":"string","order":1,"description":"The text to set at the given index.","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_slider_discrete_values","order":17,"description":"Sets whether this slider only allows discrete values.","parameters":[{"name":"value","order":0,"description":"","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_slider_minimum_maximum","order":13,"description":"Sets this sliders minimum and maximum values. The minimum can't be >= the maximum.","parameters":[{"name":"maximum","order":1,"description":"","type":"double","optional":false},{"name":"minimum","order":0,"description":"","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_slider_value_step","order":16,"description":"Sets the minimum distance this slider can move. The minimum distance can't be > (max - min).","parameters":[{"name":"value","order":0,"description":"","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"swap_children","order":5,"description":"Swaps the children at the given indices in this element.","parameters":[{"name":"index_1","order":0,"description":"The index of the first child.","type":"uint","optional":false},{"name":"index_2","order":1,"description":"The index of the second child.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"allow_decimal","order":55,"description":"Whether this textfield (when in numeric mode) allows decimal numbers.","subclasses":["textfield"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"allow_negative","order":56,"description":"Whether this textfield (when in numeric mode) allows negative numbers.","subclasses":["textfield"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"allow_none_state","order":67,"description":"Whether the `\"none\"` state is allowed for this switch.\n\nThis can't be set to false if the current switch_state is 'none'.","subclasses":["switch"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"anchor","order":63,"description":"The anchor for this relative widget, if any. Setting `nil` clears the anchor.","read_type":"GuiAnchor","write_type":"GuiAnchor","optional":true},{"name":"auto_center","order":28,"description":"Whether this frame auto-centers on window resize when stored in [LuaGui::screen](runtime:LuaGui::screen).","subclasses":["frame"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"auto_toggle","order":30,"description":"Whether this button will automatically toggle when clicked.","subclasses":["button","sprite-button"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"badge_text","order":29,"description":"The text to display after the normal tab text (designed to work with numbers)","subclasses":["tab"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"caption","order":4,"description":"The text displayed on this element. For frames, this is the \"heading\". For other elements, like buttons or labels, this is the content.\n\nWhilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it.","read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"children","order":22,"description":"The child-elements of this GUI element.","read_type":{"complex_type":"array","value":"LuaGuiElement"},"optional":false},{"name":"children_names","order":10,"description":"Names of all the children of this element. These are the identifiers that can be used to access the child as an attribute of this element.","read_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"clicked_sprite","order":16,"description":"The sprite to display on this sprite-button when it is clicked.","subclasses":["sprite-button"],"read_type":"SpritePath","write_type":"SpritePath","optional":false},{"name":"column_count","order":50,"description":"The number of columns in this table.","subclasses":["table"],"read_type":"uint","optional":false},{"name":"direction","order":6,"description":"Direction of this element's layout.","subclasses":["frame","flow","line"],"read_type":"GuiDirection","optional":false},{"name":"drag_target","order":59,"description":"The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level.\n\nOnly top-level elements in [LuaGui::screen](runtime:LuaGui::screen) can be `drag_target`s.","examples":["```\n-- This creates a frame that contains a dragging handle which can move the frame.\nlocal frame = player.gui.screen.add{type=\"frame\", direction=\"vertical\"}\nlocal dragger = frame.add{type=\"empty-widget\", style=\"draggable_space\"}\ndragger.style.size = {128, 24}\ndragger.drag_target = frame\n```"],"subclasses":["flow","frame","label","table","empty-widget"],"read_type":"LuaGuiElement","write_type":"LuaGuiElement","optional":true},{"name":"draw_horizontal_line_after_headers","order":49,"description":"Whether this table should draw a horizontal grid line below the first table row.","subclasses":["table"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"draw_horizontal_lines","order":48,"description":"Whether this table should draw horizontal grid lines.","subclasses":["table"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"draw_vertical_lines","order":47,"description":"Whether this table should draw vertical grid lines.","subclasses":["table"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"elem_filters","order":40,"description":"The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`.\n\nWriting to this field does not change or clear the currently selected element.","examples":["```\n-- This will configure a choose-elem-button of type \"entity\" to only show items of type \"furnace\".\nbutton.elem_filters = {{filter = \"type\", type = \"furnace\"}}\n```","```\n-- Then, there are some types of filters that work on a specific kind of attribute. The following will configure a\n--   choose-elem-button of type \"entity\" to only show entities that have their \"hidden\" flags set.\nbutton.elem_filters = {{filter = \"hidden\"}}\n```","```\n-- Lastly, these filters can be combined at will, taking care to specify how they should be combined (either \"and\" or \"or\").\n--   The following will filter for any entities that are \"furnaces\" and that are not \"hidden\".\nbutton.elem_filters = {{filter = \"type\", type = \"furnace\"}, {filter = \"hidden\", invert = true, mode = \"and\"}}\n```"],"subclasses":["choose-elem-button"],"read_type":"PrototypeFilter","write_type":"PrototypeFilter","optional":true},{"name":"elem_tooltip","order":18,"description":"The element tooltip to display when hovering over this element, or `nil`.","read_type":"ElemID","write_type":"ElemID","optional":true},{"name":"elem_type","order":38,"description":"The elem type of this choose-elem-button.","subclasses":["choose-elem-button"],"read_type":"ElemType","optional":false},{"name":"elem_value","order":39,"description":"The elem value of this choose-elem-button, if any.\n\nThe `\"signal\"` type operates with [SignalID](runtime:SignalID).\n\nThe `\"with-quality\"` types operate with `\"name\"` and optional `\"quality\"`\n\nThe remaining types use strings.","subclasses":["choose-elem-button"],"read_type":{"complex_type":"union","options":["string","SignalID","table"],"full_format":false},"write_type":{"complex_type":"union","options":["string","SignalID","table"],"full_format":false},"optional":true},{"name":"enabled","order":44,"description":"Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"entity","order":62,"description":"The entity associated with this entity-preview, camera, minimap, if any.","subclasses":["entity-preview","camera","minimap"],"read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"force","order":37,"description":"The force this minimap is using, if any.","subclasses":["minimap"],"read_type":"string","write_type":"string","optional":true},{"name":"game_controller_interaction","order":32,"description":"How this element should interact with game controllers.","read_type":"defines.game_controller_interaction","write_type":"defines.game_controller_interaction","optional":false},{"name":"gui","order":1,"description":"The GUI this element is a child of.","read_type":"LuaGui","optional":false},{"name":"horizontal_scroll_policy","order":19,"description":"Policy of the horizontal scroll bar.","subclasses":["scroll-pane"],"read_type":"ScrollPolicy","write_type":"ScrollPolicy","optional":false},{"name":"hovered_sprite","order":15,"description":"The sprite to display on this sprite-button when it is hovered.","subclasses":["sprite-button"],"read_type":"SpritePath","write_type":"SpritePath","optional":false},{"name":"ignored_by_interaction","order":45,"description":"Whether this GUI element is ignored by interaction. This makes clicks on this element 'go through' to the GUI element or even the game surface below it.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"index","order":0,"description":"The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).","read_type":"uint","optional":false},{"name":"is_password","order":57,"description":"Whether this textfield displays as a password field, which renders all characters as `*`.","subclasses":["textfield"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"items","order":23,"description":"The items in this dropdown or listbox.","subclasses":["drop-down","list-box"],"read_type":{"complex_type":"array","value":"LocalisedString"},"write_type":{"complex_type":"array","value":"LocalisedString"},"optional":false},{"name":"left_label_caption","order":68,"description":"The text shown for the left switch label.","subclasses":["switch"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"left_label_tooltip","order":69,"description":"The tooltip shown on the left switch label.","subclasses":["switch"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"location","order":27,"description":"The location of this widget when stored in [LuaGui::screen](runtime:LuaGui::screen). `nil` if not set or not in [LuaGui::screen](runtime:LuaGui::screen).","read_type":"GuiLocation","write_type":"GuiLocation","optional":true},{"name":"locked","order":46,"description":"Whether this choose-elem-button can be changed by the player.","subclasses":["choose-elem-button"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"lose_focus_on_confirm","order":58,"description":"Whether this textfield loses focus after [defines.events.on_gui_confirmed](runtime:defines.events.on_gui_confirmed) is fired.","subclasses":["textfield"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"minimap_player_index","order":36,"description":"The player index this minimap is using.","subclasses":["minimap"],"read_type":"uint","write_type":"uint","optional":false},{"name":"mouse_button_filter","order":53,"description":"The mouse button filters for this button or sprite-button.","subclasses":["button","sprite-button"],"read_type":"MouseButtonFlags","write_type":"MouseButtonFlags","optional":false},{"name":"name","order":3,"description":"The name of this element. `\"\"` if no name was set.","examples":["```\ngame.player.gui.top.greeting.name == \"greeting\"\n```"],"read_type":"string","write_type":"string","optional":false},{"name":"number","order":25,"description":"The number to be shown in the bottom right corner of this sprite-button, or `nil` to show nothing.","subclasses":["sprite-button"],"read_type":"double","write_type":"double","optional":true},{"name":"numeric","order":54,"description":"Whether this textfield is limited to only numeric characters.","subclasses":["textfield"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":73,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"parent","order":2,"description":"The direct parent of this element. `nil` if this is a top-level element.","read_type":"LuaGuiElement","optional":true},{"name":"player_index","order":12,"description":"Index into [LuaGameScript::players](runtime:LuaGameScript::players) specifying the player who owns this element.","read_type":"uint","optional":false},{"name":"position","order":33,"description":"The position this camera or minimap is focused on, if any.","subclasses":["camera","minimap"],"read_type":"MapPosition","write_type":"MapPosition","optional":false},{"name":"raise_hover_events","order":65,"description":"Whether this element will raise [on_gui_hover](runtime:on_gui_hover) and [on_gui_leave](runtime:on_gui_leave).","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_only","order":43,"description":"Whether this text-box is read-only. Defaults to `false`.","subclasses":["text-box"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"resize_to_sprite","order":14,"description":"Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.","subclasses":["sprite"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"right_label_caption","order":70,"description":"The text shown for the right switch label.","subclasses":["switch"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"right_label_tooltip","order":71,"description":"The tooltip shown on the right switch label.","subclasses":["switch"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"selectable","order":41,"description":"Whether the contents of this text-box are selectable. Defaults to `true`.","subclasses":["text-box"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"selected_index","order":24,"description":"The selected index for this dropdown or listbox. Returns `0` if none is selected.","subclasses":["drop-down","list-box"],"read_type":"uint","write_type":"uint","optional":false},{"name":"selected_tab_index","order":60,"description":"The selected tab index for this tabbed pane, if any.","subclasses":["tabbed-pane"],"read_type":"uint","write_type":"uint","optional":true},{"name":"show_percent_for_small_numbers","order":26,"description":"Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.","subclasses":["sprite-button"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"slider_value","order":52,"description":"The value of this slider element.","subclasses":["slider"],"read_type":"double","write_type":"double","optional":false},{"name":"sprite","order":13,"description":"The sprite to display on this sprite-button or sprite in the default state.","subclasses":["sprite-button","sprite"],"read_type":"SpritePath","write_type":"SpritePath","optional":false},{"name":"state","order":11,"description":"Is this checkbox or radiobutton checked?","subclasses":["checkbox","radiobutton"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"style","order":7,"description":"The style of this element. When read, this evaluates to a [LuaStyle](runtime:LuaStyle). For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style.","read_type":{"complex_type":"union","options":["LuaStyle","string"],"full_format":false},"write_type":{"complex_type":"union","options":["LuaStyle","string"],"full_format":false},"optional":false},{"name":"surface_index","order":34,"description":"The surface index this camera or minimap is using.","subclasses":["camera","minimap"],"read_type":"uint","write_type":"uint","optional":false},{"name":"switch_state","order":66,"description":"The switch state for this switch.\n\nIf [LuaGuiElement::allow_none_state](runtime:LuaGuiElement::allow_none_state) is false this can't be set to `\"none\"`.","subclasses":["switch"],"read_type":"SwitchState","write_type":"SwitchState","optional":false},{"name":"tabs","order":61,"description":"The tabs and contents being shown in this tabbed-pane.","subclasses":["tabbed-pane"],"read_type":{"complex_type":"array","value":"TabAndContent"},"optional":false},{"name":"tags","order":64,"description":"The tags associated with this LuaGuiElement.","read_type":"Tags","write_type":"Tags","optional":false},{"name":"text","order":9,"description":"The text contained in this textfield or text-box.","subclasses":["textfield","text-box"],"read_type":"string","write_type":"string","optional":false},{"name":"toggled","order":31,"description":"Whether this button is currently toggled. When a button is toggled, it will use the `selected_graphical_set` and `selected_font_color` defined in its style.","subclasses":["button","sprite-button"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"tooltip","order":17,"description":"The text to display when hovering over this element. Writing `\"\"` or `nil` will disable the tooltip.","read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"type","order":21,"description":"The type of this GUI element.","read_type":"GuiElementType","optional":false},{"name":"valid","order":72,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"value","order":5,"description":"How much this progress bar is filled. It is a value in the range `[0, 1]`.","subclasses":["progressbar"],"read_type":"double","write_type":"double","optional":false},{"name":"vertical_centering","order":51,"description":"Whether the content of this table should be vertically centered. Overrides [LuaStyle::column_alignments](runtime:LuaStyle::column_alignments). Defaults to `true`.","subclasses":["table"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"vertical_scroll_policy","order":20,"description":"Policy of the vertical scroll bar.","subclasses":["scroll-pane"],"read_type":"ScrollPolicy","write_type":"ScrollPolicy","optional":false},{"name":"visible","order":8,"description":"Sets whether this GUI element is visible or completely hidden, taking no space in the layout.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"word_wrap","order":42,"description":"Whether this text-box will word-wrap automatically. Defaults to `false`.","subclasses":["text-box"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"zoom","order":35,"description":"The zoom this camera or minimap is using. This value must be positive.","subclasses":["camera","minimap"],"read_type":"double","write_type":"double","optional":false}],"operators":[{"name":"index","order":0,"description":"The indexing operator. Gets children by name.","read_type":"LuaGuiElement","optional":true}]},{"name":"LuaHeatBufferPrototype","order":57,"description":"Prototype of a heat buffer.","abstract":false,"methods":[],"attributes":[{"name":"connections","order":7,"description":"","read_type":{"complex_type":"array","value":"HeatConnection"},"optional":false},{"name":"default_temperature","order":1,"description":"","read_type":"double","optional":false},{"name":"max_temperature","order":0,"description":"","read_type":"double","optional":false},{"name":"max_transfer","order":3,"description":"","read_type":"double","optional":false},{"name":"min_temperature_gradient","order":4,"description":"","read_type":"double","optional":false},{"name":"min_working_temperature","order":5,"description":"","read_type":"double","optional":false},{"name":"minimum_glow_temperature","order":6,"description":"","read_type":"double","optional":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"specific_heat","order":2,"description":"","read_type":"double","optional":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaHeatEnergySourcePrototype","order":58,"description":"Prototype of a heat energy source.","abstract":false,"methods":[],"attributes":[{"name":"connections","order":10,"description":"","read_type":{"complex_type":"array","value":"HeatConnection"},"optional":false},{"name":"default_temperature","order":4,"description":"","read_type":"double","optional":false},{"name":"emissions_per_joule","order":0,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"heat_buffer_prototype","order":11,"description":"","read_type":"LuaHeatBufferPrototype","optional":false},{"name":"max_temperature","order":3,"description":"","read_type":"double","optional":false},{"name":"max_transfer","order":6,"description":"","read_type":"double","optional":false},{"name":"min_temperature_gradient","order":7,"description":"","read_type":"double","optional":false},{"name":"min_working_temperature","order":8,"description":"","read_type":"double","optional":false},{"name":"minimum_glow_temperature","order":9,"description":"","read_type":"double","optional":false},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_no_network_icon","order":1,"description":"","read_type":"boolean","optional":false},{"name":"render_no_power_icon","order":2,"description":"","read_type":"boolean","optional":false},{"name":"specific_heat","order":5,"description":"","read_type":"double","optional":false},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaHelpers","order":59,"description":"Provides various helper and utility functions. It is accessible through the global object named `helpers`.","abstract":false,"methods":[{"name":"check_prototype_translations","order":9,"description":"Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect.\n\nAlso prints true/false if called from the console.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_profiler","order":12,"description":"Creates a [LuaProfiler](runtime:LuaProfiler), which is used for measuring script performance.\n\nLuaProfiler cannot be serialized.","parameters":[{"name":"stopped","order":0,"description":"Create the timer stopped","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaProfiler","optional":false}]},{"name":"decode_string","order":7,"description":"Base64 decodes and inflates the given string.","parameters":[{"name":"string","order":0,"description":"The string to decode.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The decoded string or `nil` if the decode failed.","type":"string","optional":true}]},{"name":"direction_to_string","order":4,"description":"Converts the given direction into the string version of the direction.","parameters":[{"name":"direction","order":0,"description":"","type":"defines.direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"encode_string","order":6,"description":"Deflates and base64 encodes the given string.","parameters":[{"name":"string","order":0,"description":"The string to encode.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The encoded string or `nil` if the encode failed.","type":"string","optional":true}]},{"name":"evaluate_expression","order":5,"description":"Evaluate an expression, substituting variables as provided.","examples":["```\n-- Calculate the number of research units required to unlock mining productivity level 10\nlocal formula = game.forces[\"player\"].technologies[\"mining-productivity-4\"].research_unit_count_formula\nlocal units = helpers.evaluate_expression(formula, { L = 10, l = 10 })\n```"],"parameters":[{"name":"expression","order":0,"description":"The expression to evaluate.","type":"MathExpression","optional":false},{"name":"variables","order":1,"description":"Variables to be substituted.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"is_valid_sound_path","order":10,"description":"Checks if the given SoundPath is valid.","parameters":[{"name":"sound_path","order":0,"description":"Path to the sound.","type":"SoundPath","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_valid_sprite_path","order":11,"description":"Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`.","parameters":[{"name":"sprite_path","order":0,"description":"Path to the image.","type":"SpritePath","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"json_to_table","order":1,"description":"Convert a JSON string to a table.","parameters":[{"name":"json","order":0,"description":"The string to convert.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The returned object, or `nil` if the JSON string was invalid.","type":"AnyBasic","optional":true}]},{"name":"parse_map_exchange_string","order":8,"description":"Convert a map exchange string to map gen settings and map settings.","parameters":[{"name":"map_exchange_string","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"MapExchangeStringData","optional":false}]},{"name":"remove_path","order":3,"description":"Remove a file or directory in the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). Can be used to remove files created by [LuaHelpers::write_file](runtime:LuaHelpers::write_file).","parameters":[{"name":"path","order":0,"description":"The path to the file or directory to remove, relative to `script-output`.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"table_to_json","order":0,"description":"Convert a table to a JSON string","parameters":[{"name":"data","order":0,"description":"","type":"table","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"write_file","order":2,"description":"Write a file to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name and file extension of the file can be specified via the `filename` parameter.","parameters":[{"name":"append","order":2,"description":"If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.","type":"boolean","optional":true},{"name":"data","order":1,"description":"The content to write to the file.","type":"LocalisedString","optional":false},{"name":"filename","order":0,"description":"The name of the file. Providing a directory path (ex. `\"save/here/example.txt\"`) will create the necessary folder structure in `script-output`.","type":"string","optional":false},{"name":"for_player","order":3,"description":"If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaInserterControlBehavior","order":60,"description":"Control behavior for inserters.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_hand_read_mode","order":2,"description":"The hand read mode for the inserter.","read_type":"defines.control_behavior.inserter.hand_read_mode","write_type":"defines.control_behavior.inserter.hand_read_mode","optional":false},{"name":"circuit_read_hand_contents","order":1,"description":"`true` if the contents of the inserter hand should be sent to the circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_set_filters","order":0,"description":"`true` if filters are set from circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_set_stack_size","order":3,"description":"If the stack size of the inserter is set through the circuit network or not.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_stack_control_signal","order":4,"description":"The signal used to set the stack size of the inserter.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaInventory","order":61,"description":"A storage of item stacks.","abstract":false,"methods":[{"name":"can_insert","order":1,"description":"Can at least some items be inserted?","parameters":[{"name":"items","order":0,"description":"Items that would be inserted.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if at least a part of the given items could be inserted into this inventory.","type":"boolean","optional":false}]},{"name":"can_set_filter","order":13,"description":"If the given inventory slot filter can be set to the given filter.","parameters":[{"name":"filter","order":1,"description":"The item filter","type":"ItemFilter","optional":false},{"name":"index","order":0,"description":"The item stack index","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":0,"description":"Make this inventory empty.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"count_empty_stacks","order":18,"description":"Counts the number of empty stacks.","parameters":[{"name":"include_bar","order":1,"description":"If true, slots blocked by the current bar will be included. Defaults to true.","type":"boolean","optional":true},{"name":"include_filtered","order":0,"description":"If true, filtered slots will be included. Defaults to false.","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"destroy","order":22,"description":"Destroys this inventory.\n\nOnly inventories created by [LuaGameScript::create_inventory](runtime:LuaGameScript::create_inventory) can be destroyed this way.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"find_empty_stack","order":17,"description":"Finds the first empty stack. Filtered slots are excluded unless a filter item is given.","parameters":[{"name":"item","order":0,"description":"If given, empty stacks that are filtered for this item will be included.","type":"ItemWithQualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The first empty stack, or `nil` if there aren't any empty stacks.","type":"LuaItemStack","optional":true},{"order":1,"description":"The stack index of the matching stack, if any is found.","type":"uint","optional":true}]},{"name":"find_item_stack","order":16,"description":"Finds the first LuaItemStack in the inventory that matches the given item name.","parameters":[{"name":"item","order":0,"description":"The item to find","type":"ItemWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The first matching stack, or `nil` if none match.","type":"LuaItemStack","optional":true},{"order":1,"description":"The stack index of the matching stack, if any is found.","type":"uint","optional":true}]},{"name":"get_bar","order":9,"description":"Get the current bar. This is the index at which the red area starts.\n\nOnly useable if this inventory supports having a bar.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_contents","order":7,"description":"Get counts of all items in this inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"List of all items in the inventory.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"get_filter","order":14,"description":"Gets the filter for the given item stack index.","parameters":[{"name":"index","order":0,"description":"The item stack index","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The current filter or `nil` if none.","type":"ItemFilter","optional":true}]},{"name":"get_insertable_count","order":19,"description":"Gets the number of the given item that can be inserted into this inventory.\n\nThis is a \"best guess\" number; things like assembling machine filtered slots, module slots, items with durability, and items with mixed health will cause the result to be inaccurate. The main use for this is in checking how many of a basic item can fit into a basic inventory.\n\nThis accounts for the 'bar' on the inventory.","parameters":[{"name":"item","order":0,"description":"The item to check.","type":"ItemWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_item_count","order":4,"description":"Get the number of all or some items in this inventory.","parameters":[{"name":"item","order":0,"description":"The item to count. If not specified, count all items.","type":"ItemWithQualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"insert","order":2,"description":"Insert items into this inventory.","parameters":[{"name":"items","order":0,"description":"Items to insert.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items actually inserted.","type":"uint","optional":false}]},{"name":"is_empty","order":5,"description":"Does this inventory contain nothing?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_filtered","order":12,"description":"If this inventory supports filters and has at least 1 filter set.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_full","order":6,"description":"Is every stack in this inventory full? Ignores stacks blocked by the current bar.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove","order":3,"description":"Remove items from this inventory.","parameters":[{"name":"items","order":0,"description":"Items to remove.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]},{"name":"resize","order":21,"description":"Resizes the inventory.\n\nItems in slots beyond the new capacity are deleted.\n\nOnly inventories created by [LuaGameScript::create_inventory](runtime:LuaGameScript::create_inventory) can be resized.","raises":[{"name":"on_pre_script_inventory_resized","order":0,"description":"","timeframe":"instantly","optional":false},{"name":"on_script_inventory_resized","order":1,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"size","order":0,"description":"New size of a inventory","type":"uint16","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_bar","order":10,"description":"Set the current bar.\n\nOnly useable if this inventory supports having a bar.","parameters":[{"name":"bar","order":0,"description":"The new limit. Omitting this parameter will clear the limit.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_filter","order":15,"description":"Sets the filter for the given item stack index.\n\nSome inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).","parameters":[{"name":"filter","order":1,"description":"The new filter. `nil` erases any existing filter.","type":{"complex_type":"union","options":["ItemFilter","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The item stack index.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the filter was allowed to be set.","type":"boolean","optional":false}]},{"name":"sort_and_merge","order":20,"description":"Sorts and merges the items in this inventory.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"supports_bar","order":8,"description":"Does this inventory support a bar? Bar is the draggable red thing, found for example on chests, that limits the portion of the inventory that may be manipulated by machines.\n\n\"Supporting a bar\" doesn't mean that the bar is set to some nontrivial value. Supporting a bar means the inventory supports having this limit at all. The character's inventory is an example of an inventory without a bar; the wooden chest's inventory is an example of one with a bar.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"supports_filters","order":11,"description":"If this inventory supports filters.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"entity_owner","order":1,"description":"The entity that owns this inventory, if any.","read_type":"LuaEntity","optional":true},{"name":"equipment_owner","order":3,"description":"The equipment that owns this inventory, if any.","read_type":"LuaEquipment","optional":true},{"name":"index","order":0,"description":"The inventory index this inventory uses, if any.","read_type":"defines.inventory","optional":true},{"name":"mod_owner","order":4,"description":"The mod that owns this inventory, if any.","read_type":"string","optional":true},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player_owner","order":2,"description":"The player that owns this inventory, if any.","read_type":"LuaPlayer","optional":true},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"index","order":0,"description":"The indexing operator.","examples":["```\n-- Will get the first item in the player's inventory.\ngame.player.get_main_inventory()[1]\n```"],"read_type":"LuaItemStack","optional":false},{"name":"length","order":1,"description":"Get the number of slots in this inventory.","examples":["```\n-- Will print the number of slots in the player's main inventory.\ngame.player.print(#game.player.get_main_inventory())\n```"],"read_type":"uint","optional":false}]},{"name":"LuaItem","order":62,"description":"A reference to an item with data. In contrast to LuaItemStack, this is binding to a specific item data even if it would move between entities or inventories.","parent":"LuaItemCommon","abstract":false,"methods":[],"attributes":[{"name":"item_stack","order":4,"description":"Object representing the item stack this item is located in right now. If its not possible to locate the item stack holding this item, a nil will be returned","read_type":"LuaItemStack","optional":true},{"name":"name","order":1,"description":"Name of the item prototype","read_type":"string","optional":false},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"prototype","order":2,"description":"Item prototype of this item","read_type":"LuaItemPrototype","optional":false},{"name":"quality","order":3,"description":"The quality of this item.","read_type":"LuaQualityPrototype","optional":false},{"name":"type","order":0,"description":"Type of the item prototype","read_type":"string","optional":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaItemCommon","order":63,"description":"Common methods related to usage of item with data. It is useful when LuaItemStack contains item with data or in general with LuaItem as it can only point at an item with data.","abstract":true,"methods":[{"name":"build_blueprint","order":3,"description":"Build this blueprint at the given location.\n\nBuilt entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.","subclasses":["BlueprintItem"],"parameters":[{"name":"build_mode","order":4,"description":"If `normal`, blueprint will not be built if any one thing can't be built. If `forced`, anything that can be built is built and obstructing nature entities will be deconstructed. If `superforced`, all obstructions will be deconstructed and the blueprint will be built.","type":"defines.build_mode","optional":true},{"name":"by_player","order":6,"description":"The player to use if any. If provided [defines.events.on_built_entity](runtime:defines.events.on_built_entity) will also be fired on successful entity creation.","type":"PlayerIdentification","optional":true},{"name":"direction","order":3,"description":"The direction to use when building","type":"defines.direction","optional":true},{"name":"force","order":1,"description":"Force to use for the building","type":"ForceID","optional":false},{"name":"position","order":2,"description":"The position to build at","type":"MapPosition","optional":false},{"name":"raise_built","order":7,"description":"If true; [defines.events.script_raised_built](runtime:defines.events.script_raised_built) will be fired on successful entity creation. Note: this is ignored if by_player is provided.","type":"boolean","optional":true},{"name":"skip_fog_of_war","order":5,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to build on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Array of created ghosts","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"cancel_deconstruct_area","order":22,"description":"Cancel deconstruct the given area with this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for canceling deconstruction","type":"ForceID","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":5,"description":"If the cancel deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to cancel deconstruct on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clear_blueprint","order":1,"description":"Clears this blueprint item.","subclasses":["BlueprintItem"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_deconstruction_item","order":23,"description":"Clears all settings/filters on this deconstruction item resetting it to default values.","subclasses":["DeconstructionItem"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_upgrade_item","order":24,"description":"Clears all settings/filters on this upgrade item resetting it to default values.","subclasses":["UpgradeItem"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_blueprint","order":4,"description":"Sets up this blueprint using the found blueprintable entities/tiles on the surface.","subclasses":["BlueprintItem"],"parameters":[{"name":"always_include_tiles","order":3,"description":"When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.","type":"boolean","optional":true},{"name":"area","order":2,"description":"The bounding box","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"Force to use for the creation","type":"ForceID","optional":false},{"name":"include_entities","order":4,"description":"When true, entities are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_fuel","order":8,"description":"When true, train fuel is included in the blueprint, Defaults to true.","type":"boolean","optional":true},{"name":"include_modules","order":5,"description":"When true, modules are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_station_names","order":6,"description":"When true, station names are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"include_trains","order":7,"description":"When true, trains are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to create from","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The blueprint entity index to source entity mapping.","type":{"complex_type":"dictionary","key":"uint","value":"LuaEntity"},"optional":false}]},{"name":"deconstruct_area","order":21,"description":"Deconstruct the given area with this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for the deconstruction","type":"ForceID","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":5,"description":"If the deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to deconstruct on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"get_blueprint_entities","order":9,"description":"The entities in this blueprint.","subclasses":["BlueprintItem"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":true}]},{"name":"get_blueprint_entity_count","order":13,"description":"Gets the number of entities in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_blueprint_entity_tag","order":7,"description":"Gets the given tag on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to get.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":true}]},{"name":"get_blueprint_entity_tags","order":5,"description":"Gets the tags for the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Tags","optional":false}]},{"name":"get_blueprint_tiles","order":11,"description":"A list of the tiles in this blueprint.","subclasses":["BlueprintItem"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"Tile"},"optional":true}]},{"name":"get_entity_filter","order":17,"description":"Gets the entity filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"get_inventory","order":0,"description":"Access the inner inventory of an item.","parameters":[{"name":"inventory","order":0,"description":"Index of the inventory to access, which can only be [defines.inventory.item_main](runtime:defines.inventory.item_main).","type":"defines.inventory","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if there is no inventory with the given index.","type":"LuaInventory","optional":true}]},{"name":"get_mapper","order":25,"description":"Gets the filter at the given index for this upgrade item.\n\nIn contrast to [LuaItemCommon::set_mapper](runtime:LuaItemCommon::set_mapper), indices past the upgrade item's current size are considered to be out of bounds.","subclasses":["UpgradeItem"],"parameters":[{"name":"index","order":0,"description":"The index of the mapper to read.","type":"uint","optional":false},{"name":"type","order":1,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"from"},{"complex_type":"literal","value":"to"}],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["UpgradeMapperSource","UpgradeMapperDestination"],"full_format":false},"optional":false}]},{"name":"get_tag","order":14,"description":"Gets the tag with the given name or returns `nil` if it doesn't exist.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag_name","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":true}]},{"name":"get_tile_filter","order":19,"description":"Gets the tile filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"is_blueprint_setup","order":2,"description":"Is this blueprint item setup? I.e. is it a non-empty blueprint?","subclasses":["BlueprintItem"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove_tag","order":16,"description":"Removes a tag with the given name.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the tag existed and was removed.","type":"boolean","optional":false}]},{"name":"set_blueprint_entities","order":10,"description":"Set new entities to be a part of this blueprint.","subclasses":["BlueprintItem"],"parameters":[{"name":"entities","order":0,"description":"The new blueprint entities.","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_entity_tag","order":8,"description":"Sets the given tag on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to set.","type":"string","optional":false},{"name":"value","order":2,"description":"The tag value to set or `nil` to clear the tag.","type":"AnyBasic","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_entity_tags","order":6,"description":"Sets the tags on the given blueprint entity index in this blueprint item.","subclasses":["BlueprintItem"],"parameters":[{"name":"index","order":0,"description":"The entity index","type":"uint","optional":false},{"name":"tags","order":1,"description":"","type":"Tags","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_tiles","order":12,"description":"Set specific tiles in this blueprint.","subclasses":["BlueprintItem"],"parameters":[{"name":"tiles","order":0,"description":"Tiles to be a part of the blueprint.","type":{"complex_type":"array","value":"Tile"},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_entity_filter","order":18,"description":"Sets the entity filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"filter","order":1,"description":"Writing `nil` removes the filter.","type":{"complex_type":"union","options":["string","LuaEntityPrototype","LuaEntity","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the new filter was successfully set (meaning it was valid).","type":"boolean","optional":false}]},{"name":"set_mapper","order":26,"description":"Sets the module filter at the given index for this upgrade item.\n\nIn contrast to [LuaItemCommon::get_mapper](runtime:LuaItemCommon::get_mapper), indices past the upgrade item's current size are valid and expand the list of mappings accordingly, if within reasonable bounds.","subclasses":["UpgradeItem"],"parameters":[{"name":"index","order":0,"description":"The index of the mapper to set.","type":"uint","optional":false},{"name":"mapper","order":2,"description":"The mapper to set or `nil`","type":{"complex_type":"union","options":["UpgradeMapperSource","UpgradeMapperDestination","nil"],"full_format":false},"optional":false},{"name":"type","order":1,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"from"},{"complex_type":"literal","value":"to"}],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_tag","order":15,"description":"Sets the tag with the given name and value.","subclasses":["ItemWithTags"],"parameters":[{"name":"tag","order":1,"description":"","type":"AnyBasic","optional":false},{"name":"tag_name","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_tile_filter","order":20,"description":"Sets the tile filter at the given index for this deconstruction item.","subclasses":["DeconstructionItem"],"parameters":[{"name":"filter","order":1,"description":"Writing `nil` removes the filter.","type":{"complex_type":"union","options":["string","LuaTilePrototype","LuaTile","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the new filter was successfully set (meaning it was valid).","type":"boolean","optional":false}]}],"attributes":[{"name":"active_index","order":22,"description":"The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.","subclasses":["BlueprintBookItem"],"read_type":"uint","write_type":"uint","optional":true},{"name":"allow_manual_label_change","order":25,"description":"Whether the label for this item can be manually changed. When false the label can only be changed through the API.","subclasses":["ItemWithLabel"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"ammo","order":40,"description":"Number of bullets left in the magazine.","subclasses":["AmmoItem"],"read_type":"uint","write_type":"uint","optional":false},{"name":"blueprint_absolute_snapping","order":19,"description":"If absolute snapping is enabled on this blueprint item.","subclasses":["BlueprintItem"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"blueprint_position_relative_to_grid","order":18,"description":"The offset from the absolute grid. `nil` if absolute snapping is not enabled.","subclasses":["BlueprintItem"],"read_type":"TilePosition","write_type":"TilePosition","optional":true},{"name":"blueprint_snap_to_grid","order":17,"description":"The snapping grid size in this blueprint item. `nil` if snapping is not enabled.","subclasses":["BlueprintItem"],"read_type":"TilePosition","write_type":"TilePosition","optional":true},{"name":"cost_to_build","order":20,"description":"List of raw materials required to build this blueprint.","subclasses":["BlueprintItem"],"read_type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false},{"name":"custom_description","order":29,"description":"The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty value.","subclasses":["ItemWithTags"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"default_icons","order":21,"description":"The default icons for a blueprint item.","subclasses":["BlueprintItem"],"read_type":{"complex_type":"array","value":"BlueprintSignalIcon"},"optional":false},{"name":"durability","order":39,"description":"Durability of the contained item. Automatically capped at the item's maximum durability.","subclasses":["Tool"],"read_type":"double","write_type":"double","optional":false},{"name":"entity_color","order":27,"description":"If this is an item with entity data, get the stored entity color.","subclasses":["ItemWithEntityData"],"read_type":"Color","write_type":"Color","optional":true},{"name":"entity_filter_count","order":30,"description":"The number of entity filters this deconstruction item supports.","subclasses":["DeconstructionItem"],"read_type":"uint","optional":false},{"name":"entity_filter_mode","order":34,"description":"The blacklist/whitelist entity filter mode for this deconstruction item.","subclasses":["DeconstructionItem"],"read_type":"defines.deconstruction_item.entity_filter_mode","write_type":"defines.deconstruction_item.entity_filter_mode","optional":false},{"name":"entity_filters","order":31,"description":"The entity filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be entity prototype names that don't have the `\"not-deconstructable\"` flag set and are either a `cliff` or marked as `minable`.","subclasses":["DeconstructionItem"],"read_type":{"complex_type":"array","value":"string"},"write_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"entity_label","order":26,"description":"If this is an item with entity data, get the stored entity label.","subclasses":["ItemWithEntityData"],"read_type":"string","write_type":"string","optional":true},{"name":"grid","order":15,"description":"The equipment grid of this item, if any.","read_type":"LuaEquipmentGrid","optional":true},{"name":"is_ammo","order":10,"description":"If this is an ammo item.","read_type":"boolean","optional":false},{"name":"is_armor","order":11,"description":"If this is an armor item.","read_type":"boolean","optional":false},{"name":"is_blueprint","order":0,"description":"If this is a blueprint item.","read_type":"boolean","optional":false},{"name":"is_blueprint_book","order":1,"description":"If this is a blueprint book item.","read_type":"boolean","optional":false},{"name":"is_deconstruction_item","order":7,"description":"If this is a deconstruction tool item.","read_type":"boolean","optional":false},{"name":"is_item_with_entity_data","order":4,"description":"If this is an item with entity data item.","read_type":"boolean","optional":false},{"name":"is_item_with_inventory","order":3,"description":"If this is an item with inventory item.","read_type":"boolean","optional":false},{"name":"is_item_with_label","order":2,"description":"If this is an item with label item.","read_type":"boolean","optional":false},{"name":"is_item_with_tags","order":6,"description":"If this is an item with tags item.","read_type":"boolean","optional":false},{"name":"is_repair_tool","order":12,"description":"If this is a repair tool item.","read_type":"boolean","optional":false},{"name":"is_selection_tool","order":5,"description":"If this is a selection tool item.","read_type":"boolean","optional":false},{"name":"is_tool","order":9,"description":"If this is a tool item.","read_type":"boolean","optional":false},{"name":"is_upgrade_item","order":8,"description":"If this is a upgrade item.","read_type":"boolean","optional":false},{"name":"item_number","order":13,"description":"The unique identifier for this item, if any. Note that this ID stays the same no matter where the item is moved to.","read_type":"uint","optional":true},{"name":"label","order":23,"description":"The current label for this item, if any.","subclasses":["ItemWithLabel"],"read_type":"string","write_type":"string","optional":true},{"name":"label_color","order":24,"description":"The current label color for this item, if any.","subclasses":["ItemWithLabel"],"read_type":"Color","write_type":"Color","optional":true},{"name":"mapper_count","order":38,"description":"The current count of mappers in the upgrade item.","subclasses":["UpgradeItem"],"read_type":"uint","optional":false},{"name":"owner_location","order":16,"description":"The location of this item if it can be found.","read_type":"ItemLocationData","optional":false},{"name":"preview_icons","order":14,"description":"Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. An item that doesn't have icons returns `nil` on read and throws error on write.","read_type":{"complex_type":"array","value":"BlueprintSignalIcon"},"write_type":{"complex_type":"array","value":"BlueprintSignalIcon"},"optional":true},{"name":"tags","order":28,"description":"","subclasses":["ItemWithTags"],"read_type":"Tags","write_type":"Tags","optional":false},{"name":"tile_filter_count","order":32,"description":"The number of tile filters this deconstruction item supports.","subclasses":["DeconstructionItem"],"read_type":"uint","optional":false},{"name":"tile_filter_mode","order":35,"description":"The blacklist/whitelist tile filter mode for this deconstruction item.","subclasses":["DeconstructionItem"],"read_type":"defines.deconstruction_item.tile_filter_mode","write_type":"defines.deconstruction_item.tile_filter_mode","optional":false},{"name":"tile_filters","order":33,"description":"The tile filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. Reading filters always returns an array of strings which are the tile prototype names.","subclasses":["DeconstructionItem"],"read_type":{"complex_type":"array","value":"TileID"},"write_type":{"complex_type":"array","value":"TileID"},"optional":false},{"name":"tile_selection_mode","order":36,"description":"The tile selection mode for this deconstruction item.","subclasses":["DeconstructionItem"],"read_type":"defines.deconstruction_item.tile_selection_mode","write_type":"defines.deconstruction_item.tile_selection_mode","optional":false},{"name":"trees_and_rocks_only","order":37,"description":"If this deconstruction item is set to allow trees and rocks only.","subclasses":["DeconstructionItem"],"read_type":"boolean","write_type":"boolean","optional":false}],"operators":[]},{"name":"LuaItemPrototype","order":64,"description":"Prototype of an item. For example, an item prototype can be obtained from [LuaGameScript::item_prototypes](runtime:LuaGameScript::item_prototypes) by its name: `prototypes.item[\"iron-plate\"]`.","parent":"LuaPrototypeBase","abstract":false,"methods":[{"name":"get_ammo_type","order":2,"description":"The type of this ammo prototype.","subclasses":["AmmoItem"],"parameters":[{"name":"ammo_source_type","order":0,"description":"Defaults to `\"default\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"default"},{"complex_type":"literal","value":"player"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"vehicle"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AmmoType","optional":true}]},{"name":"get_cursor_box_type","order":6,"description":"","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"CursorBoxRenderType","optional":true}]},{"name":"get_durability","order":12,"description":"The durability of this tool item prototype.","subclasses":["ToolItem"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":true}]},{"name":"get_entity_filter_mode","order":7,"description":"The entity filter mode used by this selection tool.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"PrototypeFilterMode","optional":true}]},{"name":"get_entity_filters","order":9,"description":"The entity filters used by this selection tool.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true}]},{"name":"get_entity_type_filters","order":10,"description":"The entity type filters used by this selection tool indexed by entity type.\n\nThe boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":true}]},{"name":"get_inventory_size_bonus","order":3,"description":"The inventory size bonus for this armor prototype.","subclasses":["ArmorPrototype"],"parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":true}]},{"name":"get_selection_border_color","order":4,"description":"The color used when doing normal selection with this selection tool prototype.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Color","optional":true}]},{"name":"get_selection_mode_flags","order":5,"description":"Flags that affect which entities will be selected.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"SelectionModeFlags","optional":true}]},{"name":"get_spoil_ticks","order":1,"description":"The number of ticks before this item spoils, or `0` if it does not spoil.","parameters":[{"name":"quality","order":0,"description":"","type":"QualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_tile_filter_mode","order":8,"description":"The tile filter mode used by this selection tool.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"PrototypeFilterMode","optional":true}]},{"name":"get_tile_filters","order":11,"description":"The tile filters used by this selection tool.","subclasses":["SelectionTool"],"parameters":[{"name":"selection_mode","order":0,"description":"","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTilePrototype"},"optional":true}]},{"name":"has_flag","order":0,"description":"Test whether this item prototype has a certain flag set.","parameters":[{"name":"flag","order":0,"description":"The flag to test.","type":"ItemPrototypeFlag","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"always_include_tiles","order":52,"description":"If tiles area always included when doing selection with this selection tool prototype.","subclasses":["SelectionTool"],"read_type":"boolean","optional":true},{"name":"ammo_category","order":24,"description":"","subclasses":["AmmoItem"],"read_type":"LuaAmmoCategoryPrototype","optional":true},{"name":"attack_parameters","order":34,"description":"The gun attack parameters.","subclasses":["Gun"],"read_type":"AttackParameters","optional":true},{"name":"beacon_tint","order":48,"description":"","subclasses":["ModuleItem"],"read_type":{"complex_type":"array","value":"Color"},"optional":true},{"name":"burnt_result","order":6,"description":"The result of burning this item as fuel, if any.","read_type":"LuaItemPrototype","optional":true},{"name":"can_be_mod_opened","order":15,"description":"If this item can be mod-opened.","read_type":"boolean","optional":false},{"name":"capsule_action","order":32,"description":"The capsule action for this capsule item prototype.","subclasses":["Capsule"],"read_type":"CapsuleAction","optional":true},{"name":"category","order":45,"description":"The name of a [LuaModuleCategoryPrototype](runtime:LuaModuleCategoryPrototype). Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.","subclasses":["ModuleItem"],"read_type":"string","optional":true},{"name":"collision_box","order":29,"description":"The collision box used by character entities when wearing this armor.","subclasses":["ArmorPrototype"],"read_type":"BoundingBox","optional":true},{"name":"default_import_location","order":23,"description":"","read_type":"LuaSpaceLocationPrototype","optional":false},{"name":"default_label_color","order":41,"description":"The default label color used for this item with label, if any.","subclasses":["ItemWithLabel"],"read_type":"Color","optional":true},{"name":"destroyed_by_dropping_trigger","order":19,"description":"","read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"draw_label_for_cursor_render","order":42,"description":"If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor.","subclasses":["ItemWithLabel"],"read_type":"boolean","optional":true},{"name":"drawing_box","order":30,"description":"The drawing box used by character entities when wearing this armor.","subclasses":["ArmorPrototype"],"read_type":"BoundingBox","optional":true},{"name":"durability_description_key","order":56,"description":"The durability message key used when displaying the durability of this tool.","subclasses":["ToolItem"],"read_type":"string","optional":true},{"name":"durability_description_value","order":57,"description":"The durability message value used when displaying the durability of this tool.","subclasses":["ToolItem"],"read_type":"string","optional":true},{"name":"entity_filter_slots","order":54,"description":"The number of entity filters this deconstruction item has.","subclasses":["DeconstructionItem"],"read_type":"uint","optional":true},{"name":"equipment_grid","order":27,"description":"The prototype of this armor's equipment grid, if any.","subclasses":["Armor"],"read_type":"LuaEquipmentGridPrototype","optional":true},{"name":"filter_mode","order":39,"description":"The filter mode used by this item with inventory.","subclasses":["ItemWithInventory"],"read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"none"},{"complex_type":"literal","value":"whitelist"},{"complex_type":"literal","value":"blacklist"}],"full_format":false},"optional":true},{"name":"flags","order":13,"description":"The flags for this item prototype.","read_type":"ItemPrototypeFlags","optional":false},{"name":"fuel_acceleration_multiplier","order":8,"description":"The acceleration multiplier when this item is used as fuel in a vehicle.","read_type":"double","optional":false},{"name":"fuel_acceleration_multiplier_quality_bonus","order":11,"description":"Additional fuel acceleration multiplier per quality level.","read_type":"double","optional":false},{"name":"fuel_category","order":5,"description":"The fuel category, if any.","read_type":"string","optional":true},{"name":"fuel_emissions_multiplier","order":10,"description":"The emissions multiplier if this is used as fuel.","read_type":"double","optional":false},{"name":"fuel_glow_color","order":22,"description":"","read_type":"Color","optional":true},{"name":"fuel_top_speed_multiplier","order":9,"description":"The fuel top speed multiplier when this item is used as fuel in a vehicle.","read_type":"double","optional":false},{"name":"fuel_top_speed_multiplier_quality_bonus","order":12,"description":"Additional fuel top speed multiplier per quality level.","read_type":"double","optional":false},{"name":"fuel_value","order":7,"description":"Fuel value when burned.","read_type":"float","optional":false},{"name":"infinite","order":58,"description":"If this tool item has infinite durability.","subclasses":["ToolItem"],"read_type":"boolean","optional":true},{"name":"ingredient_to_weight_coefficient","order":21,"description":"","read_type":"double","optional":false},{"name":"inventory_size","order":35,"description":"The main inventory size for item-with-inventory-prototype.","subclasses":["ItemWithInventoryPrototype"],"read_type":"uint","optional":true},{"name":"item_filters","order":36,"description":"","subclasses":["ItemWithInventory"],"read_type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true},{"name":"item_group_filters","order":37,"description":"","subclasses":["ItemWithInventory"],"read_type":{"complex_type":"array","value":"LuaGroup"},"optional":true},{"name":"item_subgroup_filters","order":38,"description":"","subclasses":["ItemWithInventory"],"read_type":{"complex_type":"array","value":"LuaGroup"},"optional":true},{"name":"localised_filter_message","order":40,"description":"The localised string used when the player attempts to put items into this item with inventory that aren't allowed.","subclasses":["ItemWithInventory"],"read_type":"LocalisedString","optional":true},{"name":"magazine_size","order":25,"description":"Size of full magazine.","subclasses":["AmmoItem"],"read_type":"float","optional":true},{"name":"manual_length_limit","order":51,"description":"","subclasses":["RailPlanner"],"read_type":"double","optional":true},{"name":"module_effects","order":44,"description":"Effects of this module.","subclasses":["ModuleItem"],"read_type":"ModuleEffects","optional":true},{"name":"object_name","order":60,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"place_as_equipment_result","order":1,"description":"Prototype of the equipment that will be created by placing this item in an equipment grid, if any.","read_type":"LuaEquipmentPrototype","optional":true},{"name":"place_as_tile_result","order":2,"description":"The place-as-tile result if one is defined, if any.","read_type":"PlaceAsTileResult","optional":true},{"name":"place_result","order":0,"description":"Prototype of the entity that will be created by placing this item, if any.","read_type":"LuaEntityPrototype","optional":true},{"name":"plant_result","order":17,"description":"The result entity when planting this item as a seed.","read_type":"LuaEntityPrototype","optional":true},{"name":"provides_flight","order":31,"description":"If this armor provides flight to character entities when worm.","subclasses":["ArmorPrototype"],"read_type":"boolean","optional":true},{"name":"radius_color","order":33,"description":"","subclasses":["Capsule"],"read_type":"Color","optional":true},{"name":"rails","order":49,"description":"Prototypes of all rails possible to be used by this rail planner prototype.","subclasses":["RailPlanner"],"read_type":{"complex_type":"array","value":"LuaEntityPrototype"},"optional":true},{"name":"reload_time","order":26,"description":"Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.","subclasses":["AmmoItem"],"read_type":"float","optional":true},{"name":"requires_beacon_alt_mode","order":47,"description":"","subclasses":["ModuleItem"],"read_type":"boolean","optional":true},{"name":"resistances","order":28,"description":"Resistances of this armor item, if any, indexed by damage type name.","subclasses":["Armor"],"read_type":{"complex_type":"dictionary","key":"string","value":"Resistance"},"optional":true},{"name":"rocket_launch_products","order":14,"description":"The results of launching this item in a rocket.","read_type":{"complex_type":"array","value":"Product"},"optional":false},{"name":"skip_fog_of_war","order":53,"description":"If this selection tool skips things covered by fog of war.","subclasses":["SelectionTool"],"read_type":"boolean","optional":true},{"name":"speed","order":43,"description":"The repairing speed if this is a repairing tool.","subclasses":["RepairTool"],"read_type":"float","optional":true},{"name":"spoil_result","order":16,"description":"The spoil result of this item, if any","read_type":"LuaItemPrototype","optional":true},{"name":"spoil_to_trigger_result","order":18,"description":"","read_type":"SpoilToTriggerResult","optional":true},{"name":"stack_size","order":4,"description":"Maximum stack size of the item specified by this prototype.","read_type":"uint","optional":false},{"name":"stackable","order":3,"description":"Is this item allowed to stack at all?","read_type":"boolean","optional":false},{"name":"support","order":50,"description":"The rail support used by this rail planner.","subclasses":["RailPlanner"],"read_type":"LuaEntityPrototype","optional":true},{"name":"tier","order":46,"description":"Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.","subclasses":["ModuleItem"],"read_type":"uint","optional":true},{"name":"tile_filter_slots","order":55,"description":"The number of tile filters this deconstruction item has.","subclasses":["DeconstructionItem"],"read_type":"uint","optional":true},{"name":"valid","order":59,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"weight","order":20,"description":"Weight of this item","read_type":"double","optional":false}],"operators":[]},{"name":"LuaItemStack","order":65,"description":"A reference to an item and count owned by some external entity.\n\nIn most instances this is a simple reference as in: it points at a specific slot in an inventory and not the item in the slot.\n\nIn the instance this references an item on a [LuaTransportLine](runtime:LuaTransportLine) the reference is only guaranteed to stay valid (and refer to the same item) as long as nothing changes the transport line.","parent":"LuaItemCommon","abstract":false,"methods":[{"name":"add_ammo","order":0,"description":"Add ammo to this ammo item.","subclasses":["AmmoItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of ammo to add.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_durability","order":2,"description":"Add durability to this tool item.","subclasses":["ToolItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of durability to add.","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"can_set_stack","order":5,"description":"Would a call to [LuaItemStack::set_stack](runtime:LuaItemStack::set_stack) succeed?","parameters":[{"name":"stack","order":0,"description":"Stack that would be set, possibly `nil`.","type":"ItemStackIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":11,"description":"Clear this item stack.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_grid","order":12,"description":"Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grids.","subclasses":["ItemWithEntityData"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaEquipmentGrid","optional":false}]},{"name":"drain_ammo","order":1,"description":"Remove ammo from this ammo item.","subclasses":["AmmoItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of ammo to remove.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"drain_durability","order":3,"description":"Remove durability from this tool item.","subclasses":["ToolItem"],"parameters":[{"name":"amount","order":0,"description":"Amount of durability to remove.","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"export_stack","order":8,"description":"Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The exported string","type":"string","optional":false}]},{"name":"import_stack","order":9,"description":"Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.","parameters":[{"name":"data","order":0,"description":"The string to import","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.","type":"int","optional":false}]},{"name":"set_stack","order":6,"description":"Set this item stack to another item stack.","parameters":[{"name":"stack","order":0,"description":"Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if [LuaItemStack::clear](runtime:LuaItemStack::clear) was called.","type":"ItemStackIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the stack was set successfully. Returns `false` if this stack was not [valid for write](runtime:LuaItemStack::can_set_stack).","type":"boolean","optional":false}]},{"name":"spoil","order":13,"description":"Spoils this item if the item can spoil.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"swap_stack","order":10,"description":"Swaps this item stack with the given item stack if allowed.","parameters":[{"name":"stack","order":0,"description":"","type":"LuaItemStack","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the 2 stacks were swapped successfully.","type":"boolean","optional":false}]},{"name":"transfer_stack","order":7,"description":"Transfers the given item stack into this item stack.","parameters":[{"name":"stack","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`true` if the full stack was transferred.","type":"boolean","optional":false}]},{"name":"use_capsule","order":4,"description":"Use the capsule item with the entity as the source, targeting the given position.","parameters":[{"name":"entity","order":0,"description":"The entity to use the capsule item with.","type":"LuaEntity","optional":false},{"name":"target_position","order":1,"description":"The position to use the capsule item with.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Array of the entities that were created by the capsule action.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]}],"attributes":[{"name":"count","order":4,"description":"Number of items in this stack.","read_type":"uint","write_type":"uint","optional":false},{"name":"health","order":5,"description":"How much health the item has, as a number in range `[0, 1]`.","read_type":"float","write_type":"float","optional":false},{"name":"is_module","order":10,"description":"If this is a module","read_type":"boolean","optional":false},{"name":"item","order":9,"description":"If the item has additional data, returns LuaItem pointing at the extra data, otherwise returns nil.","read_type":"LuaItem","optional":true},{"name":"name","order":2,"description":"Prototype name of the item held in this stack.","read_type":"string","optional":false},{"name":"object_name","order":12,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"prototype","order":1,"description":"Prototype of the item held in this stack.","read_type":"LuaItemPrototype","optional":false},{"name":"quality","order":6,"description":"The quality of this item.","read_type":"LuaQualityPrototype","optional":false},{"name":"spoil_percent","order":8,"description":"The percent spoiled this item is if it spoils. `0` in the case of the item not spoiling.","read_type":"double","write_type":"double","optional":false},{"name":"spoil_tick","order":7,"description":"The tick this item spoils, or `0` if it does not spoil. When writing, setting to anything < the current game tick will spoil the item instantly.","read_type":"uint","write_type":"uint","optional":false},{"name":"type","order":3,"description":"Type of the item prototype.","read_type":"string","optional":false},{"name":"valid","order":11,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"valid_for_read","order":0,"description":"Is this valid for reading? Differs from the usual `valid` in that `valid` will be `true` even if the item stack is blank but the entity that holds it is still valid.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLampControlBehavior","order":66,"description":"Control behavior for lamps.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"blue_signal","order":4,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"color","order":6,"description":"The color the lamp is showing, if any.","read_type":"Color","optional":true},{"name":"color_mode","order":1,"description":"","read_type":"defines.control_behavior.lamp.color_mode","write_type":"defines.control_behavior.lamp.color_mode","optional":false},{"name":"green_signal","order":3,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"red_signal","order":2,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"rgb_signal","order":5,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"use_colors","order":0,"description":"`true` if the lamp should set the color from the circuit network signals.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLazyLoadedValue","order":67,"description":"A lazily loaded value. For performance reasons, we sometimes return a custom lazily-loaded value type instead of the native Lua value. This custom type lazily constructs the necessary value when [LuaLazyLoadedValue::get](runtime:LuaLazyLoadedValue::get) is called, therefore preventing its unnecessary construction in some cases.\n\nAn instance of LuaLazyLoadedValue is only valid during the event it was created from and cannot be saved.","abstract":false,"methods":[{"name":"get","order":0,"description":"Gets the value of this lazy loaded value.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Any","optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLoaderControlBehavior","order":68,"description":"Control behavior for loaders.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_read_transfers","order":1,"description":"`true` if the transfers between loader's belt and container should be pulsed to the circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_set_filters","order":0,"description":"`true` if filters are set from circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLogisticCell","order":69,"description":"Logistic cell of a particular [LuaEntity](runtime:LuaEntity). A \"Logistic Cell\" is the given name for settings and properties used by what would normally be seen as a \"Roboport\". A logistic cell however doesn't have to be attached to the roboport entity (the character has one for the personal roboport).","abstract":false,"methods":[{"name":"is_in_construction_range","order":1,"description":"Is a given position within the construction range of this cell?","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_in_logistic_range","order":0,"description":"Is a given position within the logistic range of this cell?","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_neighbour_with","order":2,"description":"Are two cells neighbours?","parameters":[{"name":"other","order":0,"description":"","type":"LuaLogisticCell","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"charge_approach_distance","order":7,"description":"Radius at which the robots hover when waiting to be charged.","read_type":"float","optional":false},{"name":"charging_robot_count","order":8,"description":"Number of robots currently charging.","read_type":"uint","optional":false},{"name":"charging_robots","order":13,"description":"Robots currently being charged.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"construction_radius","order":2,"description":"Construction radius of this cell.","read_type":"float","optional":false},{"name":"logistic_network","order":11,"description":"The network that owns this cell, if any.","read_type":"LuaLogisticNetwork","optional":true},{"name":"logistic_radius","order":0,"description":"Logistic radius of this cell.","read_type":"float","optional":false},{"name":"logistics_connection_distance","order":1,"description":"Logistic connection distance of this cell.","read_type":"float","optional":false},{"name":"mobile","order":5,"description":"`true` if this is a mobile cell. In vanilla, only the logistic cell created by a character's personal roboport is mobile.","read_type":"boolean","optional":false},{"name":"neighbours","order":12,"description":"Neighbouring cells.","read_type":{"complex_type":"array","value":"LuaLogisticCell"},"optional":false},{"name":"object_name","order":16,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":10,"description":"This cell's owner.","read_type":"LuaEntity","optional":false},{"name":"stationed_construction_robot_count","order":4,"description":"Number of stationed construction robots in this cell.","read_type":"uint","optional":false},{"name":"stationed_logistic_robot_count","order":3,"description":"Number of stationed logistic robots in this cell.","read_type":"uint","optional":false},{"name":"to_charge_robot_count","order":9,"description":"Number of robots waiting to charge.","read_type":"uint","optional":false},{"name":"to_charge_robots","order":14,"description":"Robots waiting to charge.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"transmitting","order":6,"description":"`true` if this cell is active.","read_type":"boolean","optional":false},{"name":"valid","order":15,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLogisticContainerControlBehavior","order":70,"description":"Control behavior for logistic chests.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_condition","order":2,"description":"The circuit condition for the logistic container.","read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"circuit_condition_enabled","order":1,"description":"Whether the circuit condition is in effect","read_type":"boolean","write_type":"boolean","optional":false},{"name":"circuit_exclusive_mode_of_operation","order":0,"description":"The circuit mode of operations for the logistic container. Can only be set on containers whose [logistic_mode](runtime:LuaEntityPrototype::logistic_mode) is set to `\"requester\"` or `\"buffer\"`.","read_type":"defines.control_behavior.logistic_container.exclusive_mode","write_type":"defines.control_behavior.logistic_container.exclusive_mode","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLogisticNetwork","order":71,"description":"A single logistic network of a given force on a given surface.","abstract":false,"methods":[{"name":"can_satisfy_request","order":7,"description":"Can the network satisfy a request for a given item and count.","parameters":[{"name":"count","order":1,"description":"Count to check. Defaults to 1.","type":"uint","optional":true},{"name":"include_buffers","order":2,"description":"Should buffers be considered? Defaults to false.","type":"boolean","optional":true},{"name":"item","order":0,"description":"Item name to check.","type":"ItemWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the network can satisfy the request.","type":"boolean","optional":false}]},{"name":"find_cell_closest_to","order":4,"description":"Find logistic cell closest to a given position.","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if no cell was found.","type":"LuaLogisticCell","optional":true}]},{"name":"get_contents","order":1,"description":"Get item counts for the entire network, similar to how [LuaInventory::get_contents](runtime:LuaInventory::get_contents) does.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"List of all items in the network.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"get_item_count","order":0,"description":"Count given or all items in the network or given members.","parameters":[{"name":"item","order":0,"description":"Item name to count. If not given, gives counts of all items in the network.","type":"ItemWithQualityID","optional":true},{"name":"member","order":1,"description":"Logistic members to check. If not given, gives count in the entire network.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"storage"},{"complex_type":"literal","value":"providers"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"int","optional":false}]},{"name":"get_supply_counts","order":8,"description":"Get the amount of items of the given type indexed by the storage member.","parameters":[{"name":"item","order":0,"description":"Item name to check.","type":"ItemWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LogisticsNetworkSupplyCounts","optional":false}]},{"name":"get_supply_points","order":9,"description":"Gets the logistic points with of the given type indexed by the storage member.","parameters":[{"name":"item","order":0,"description":"Item name to check.","type":"ItemWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LogisticsNetworkSupplyPoints","optional":false}]},{"name":"insert","order":3,"description":"Insert items into the logistic network. This will actually insert the items into some logistic chests.","parameters":[{"name":"item","order":0,"description":"What to insert.","type":"ItemStackIdentification","optional":false},{"name":"members","order":1,"description":"Which logistic members to insert the items to. `\"storage-empty\"` inserts into storage chests that are completely empty, `\"storage-empty-slot\"` inserts into storage chests that have an empty slot. If not specified, inserts items into the logistic network in the usual order.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"storage"},{"complex_type":"literal","value":"storage-empty"},{"complex_type":"literal","value":"storage-empty-slot"},{"complex_type":"literal","value":"requester"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items actually inserted.","type":"uint","optional":false}]},{"name":"remove_item","order":2,"description":"Remove items from the logistic network. This will actually remove the items from some logistic chests.","parameters":[{"name":"item","order":0,"description":"What to remove.","type":"ItemStackIdentification","optional":false},{"name":"members","order":1,"description":"Which logistic members to remove from. If not specified, removes from the network in the usual order.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"active-provider"},{"complex_type":"literal","value":"passive-provider"},{"complex_type":"literal","value":"buffer"},{"complex_type":"literal","value":"storage"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items removed.","type":"uint","optional":false}]},{"name":"select_drop_point","order":6,"description":"Find a logistic point to drop the specific item stack.","parameters":[{"name":"members","order":1,"description":"When given, it will find from only the specific type of member. If not specified, selects with normal priorities.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"storage"},{"complex_type":"literal","value":"storage-empty"},{"complex_type":"literal","value":"storage-empty-slot"},{"complex_type":"literal","value":"requester"}],"full_format":false},"optional":true},{"name":"stack","order":0,"description":"Name of the item to drop off.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"`nil` if no point was found.","type":"LuaLogisticPoint","optional":true}]},{"name":"select_pickup_point","order":5,"description":"Find the 'best' logistic point with this item ID and from the given position or from given chest type.","parameters":[{"name":"include_buffers","order":2,"description":"Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position.","type":"boolean","optional":true},{"name":"members","order":3,"description":"When given, it will find from only the specific type of member. If not specified, selects with normal priorities. Not considered if position is specified.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"active-provider"},{"complex_type":"literal","value":"passive-provider"},{"complex_type":"literal","value":"buffer"},{"complex_type":"literal","value":"storage"}],"full_format":false},"optional":true},{"name":"name","order":0,"description":"Name of the item to pick up.","type":"ItemWithQualityID","optional":false},{"name":"position","order":1,"description":"When given, it will find the storage 'best' storage point from this position.","type":"MapPosition","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"`nil` if no point was found.","type":"LuaLogisticPoint","optional":true}]}],"attributes":[{"name":"active_provider_points","order":15,"description":"All active provider points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"all_construction_robots","order":5,"description":"The total number of construction robots in the network (idle and active + in roboports).","read_type":"uint","optional":false},{"name":"all_logistic_robots","order":3,"description":"The total number of logistic robots in the network (idle and active + in roboports).","read_type":"uint","optional":false},{"name":"available_construction_robots","order":4,"description":"Number of construction robots available for a job.","read_type":"uint","optional":false},{"name":"available_logistic_robots","order":2,"description":"Number of logistic robots available for a job.","read_type":"uint","optional":false},{"name":"cells","order":7,"description":"All cells in this network.","read_type":{"complex_type":"array","value":"LuaLogisticCell"},"optional":false},{"name":"construction_robots","order":20,"description":"All construction robots in this logistic network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"empty_provider_points","order":16,"description":"All things that have empty provider points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"empty_providers","order":9,"description":"All entities that have empty logistic provider points in this network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"force","order":1,"description":"The force this logistic network belongs to.","read_type":"LuaForce","optional":false},{"name":"logistic_members","order":12,"description":"All other entities that have logistic points in this network (inserters mostly).","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"logistic_robots","order":21,"description":"All logistic robots in this logistic network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"network_id","order":0,"description":"The unique logistic network ID.","read_type":"uint","optional":false},{"name":"object_name","order":23,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"passive_provider_points","order":14,"description":"All passive provider points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"provider_points","order":13,"description":"All things that have provider points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"providers","order":8,"description":"All entities that have logistic provider points in this network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"requester_points","order":17,"description":"All things that have requester points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"requesters","order":10,"description":"All entities that have logistic requester points in this network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"robot_limit","order":6,"description":"Maximum number of robots the network can work with. Currently only used for the personal roboport.","read_type":"uint","optional":false},{"name":"robots","order":19,"description":"All robots in this logistic network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"storage_points","order":18,"description":"All things that have storage points in this network.","read_type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"storages","order":11,"description":"All entities that have logistic storage points in this network.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"valid","order":22,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLogisticPoint","order":72,"description":"Logistic point of a particular [LuaEntity](runtime:LuaEntity). A \"Logistic point\" is the name given for settings and properties used by requester, provider, and storage points in a given logistic network. These \"points\" don't have to be a logistic container but often are. One other entity that can own several points is the \"character\" character type entity.","abstract":false,"methods":[{"name":"add_section","order":0,"description":"Adds a new logistic section to this logistic point if possible.","parameters":[{"name":"group","order":0,"description":"The group to assign this section to.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The added logistic section.","type":"LuaLogisticSection","optional":true}]},{"name":"get_section","order":2,"description":"Gets section on the selected index, if it exists","parameters":[{"name":"section_index","order":0,"description":"Index of the section","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaLogisticSection","optional":false}]},{"name":"remove_section","order":1,"description":"Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not [manual](runtime:LuaLogisticSection::is_manual).","parameters":[{"name":"section_index","order":0,"description":"Index of the section","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether section was removed.","type":"boolean","optional":false}]}],"attributes":[{"name":"enabled","order":10,"description":"Whether this logistic point is active, related to disabling logistics on player/spidertron.\n\nWhen the logistic point is disabled it won't request and auto trash will do nothing.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"exact","order":8,"description":"If this logistic point is using the exact mode. In exact mode robots never over-deliver requests.","read_type":"boolean","optional":false},{"name":"filters","order":3,"description":"The logistic filters for this logistic point, if this uses any.\n\nThe returned array will always have an entry for each filter and will be indexed in sequence when not `nil`.","read_type":{"complex_type":"array","value":"CompiledLogisticFilter"},"optional":true},{"name":"force","order":5,"description":"The force of this logistic point.\n\nThis will always be the same as the [LuaLogisticPoint::owner](runtime:LuaLogisticPoint::owner) force.","read_type":"LuaForce","optional":false},{"name":"logistic_member_index","order":2,"description":"The Logistic member index of this logistic point.","read_type":"uint","optional":false},{"name":"logistic_network","order":1,"description":"","read_type":"LuaLogisticNetwork","optional":false},{"name":"mode","order":4,"description":"The logistic mode.","read_type":"defines.logistic_mode","optional":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":0,"description":"The [LuaEntity](runtime:LuaEntity) owner of this LuaLogisticPoint.","read_type":"LuaEntity","optional":false},{"name":"sections","order":11,"description":"All logistic sections of this logistic point.","read_type":{"complex_type":"array","value":"LuaLogisticSection"},"optional":false},{"name":"sections_count","order":12,"description":"Amount of logistic sections this logistic point has.","read_type":"uint","optional":false},{"name":"targeted_items_deliver","order":7,"description":"Items targeted to be dropped off into this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.","read_type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false},{"name":"targeted_items_pickup","order":6,"description":"Items targeted to be picked up from this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.","read_type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false},{"name":"trash_not_requested","order":9,"description":"Whether this logistic point is set to trash unrequested items.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaLogisticSection","order":73,"description":"Logistic section of a particular [LuaLogisticPoint](runtime:LuaLogisticPoint) or [LuaConstantCombinatorControlBehavior](runtime:LuaConstantCombinatorControlBehavior).","abstract":false,"methods":[{"name":"clear_slot","order":2,"description":"Clears the logistic request and auto-trash from the given slot.\n\nThis can only be called when the section [is manual](runtime:LuaLogisticSection::is_manual).","parameters":[{"name":"slot_index","order":0,"description":"Index of a slot to clear.","type":"LogisticFilterIndex","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"get_slot","order":1,"description":"Gets current settings of logistic request and auto-trash from the given slot.","parameters":[{"name":"slot_index","order":0,"description":"Index of a slot to read.","type":"LogisticFilterIndex","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LogisticFilter","optional":false}]},{"name":"set_slot","order":0,"description":"Sets logistic request and auto-trash slot to the given value.\n\nThis will silently fail if personal logistics are not researched yet.\n\nThis can only be called when the section [is manual](runtime:LuaLogisticSection::is_manual).","raises":[{"name":"on_entity_logistic_slot_changed","order":0,"description":"Raised if setting of logistic slot was successful.","timeframe":"instantly","optional":true}],"parameters":[{"name":"filter","order":1,"description":"The details of the filter to set.","type":"LogisticFilter","optional":false},{"name":"slot_index","order":0,"description":"Index of a slot to set.","type":"LogisticFilterIndex","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"active","order":7,"description":"Whether this section is active. This can only be written to when the section [is manual](runtime:LuaLogisticSection::is_manual).","read_type":"boolean","write_type":"boolean","optional":false},{"name":"filters","order":2,"description":"The logistic filters for this section.\n\nThis can only be written to when the section [is manual](runtime:LuaLogisticSection::is_manual).","read_type":{"complex_type":"array","value":"LogisticFilter"},"write_type":{"complex_type":"array","value":"LogisticFilter"},"optional":false},{"name":"filters_count","order":3,"description":"Amount of filters this section has","read_type":"uint","optional":false},{"name":"group","order":4,"description":"The group this section belongs to.\n\nAn empty string when in no group.\n\nThis can only be written to when the section [is manual](runtime:LuaLogisticSection::is_manual).","read_type":"string","write_type":"string","optional":false},{"name":"index","order":1,"description":"The section index of this section.","read_type":"uint","optional":false},{"name":"is_manual","order":6,"description":"Shortcut to check whether [LuaLogisticSection::type](runtime:LuaLogisticSection::type) is equal to [manual](runtime:defines.logistic_section_type.manual).","read_type":"boolean","optional":false},{"name":"multiplier","order":8,"description":"Multiplier applied to all filters before they are used by game. This can only be written to when the section [is manual](runtime:LuaLogisticSection::is_manual).","read_type":"float","write_type":"float","optional":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":0,"description":"The [LuaEntity](runtime:LuaEntity) owner of this LuaLogisticSection.","read_type":"LuaEntity","optional":false},{"name":"type","order":5,"description":"The type of this logistic section. Sections that are not manual are controlled by game itself and may not be allowed to be changed by script.","read_type":"defines.logistic_section_type","optional":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaMiningDrillControlBehavior","order":74,"description":"Control behavior for mining drills.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_read_resources","order":0,"description":"`true` if this drill should send the resources in the field to the circuit network.\n\nWhich resources depends on [LuaMiningDrillControlBehavior::resource_read_mode](runtime:LuaMiningDrillControlBehavior::resource_read_mode)","read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"resource_read_mode","order":1,"description":"If the mining drill should send just the resources in its area or the entire field it's on to the circuit network.","read_type":"defines.control_behavior.mining_drill.resource_read_mode","write_type":"defines.control_behavior.mining_drill.resource_read_mode","optional":false},{"name":"resource_read_targets","order":2,"description":"The resource entities that the mining drill will send information about to the circuit network or an empty array.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaModSettingPrototype","order":75,"description":"Prototype of a mod setting.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"allow_blank","order":6,"description":"Whether this string setting allows blank values. `nil` if not a string setting.","read_type":"boolean","optional":true},{"name":"allowed_values","order":5,"description":"The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.","read_type":{"complex_type":"union","options":[{"complex_type":"array","value":"string"},{"complex_type":"array","value":"int"},{"complex_type":"array","value":"double"}],"full_format":false},"optional":true},{"name":"auto_trim","order":7,"description":"Whether this string setting auto-trims values. `nil` if not a string setting","read_type":"boolean","optional":true},{"name":"default_value","order":2,"description":"The default value of this setting.","read_type":{"complex_type":"union","options":["boolean","double","int","string","Color"],"full_format":false},"optional":false},{"name":"maximum_value","order":4,"description":"The maximum value for this setting. `nil` if this setting type doesn't support a maximum.","read_type":{"complex_type":"union","options":["double","int"],"full_format":false},"optional":true},{"name":"minimum_value","order":3,"description":"The minimum value for this setting. `nil` if this setting type doesn't support a minimum.","read_type":{"complex_type":"union","options":["double","int"],"full_format":false},"optional":true},{"name":"mod","order":0,"description":"The mod that owns this setting.","read_type":"string","optional":false},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"setting_type","order":1,"description":"","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"startup"},{"complex_type":"literal","value":"runtime-global"},{"complex_type":"literal","value":"runtime-per-user"}],"full_format":false},"optional":false},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaModuleCategoryPrototype","order":76,"description":"Prototype of a module category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaNamedNoiseExpression","order":77,"description":"Prototype of a named noise expression.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"expression","order":1,"description":"The expression itself.","read_type":"string","optional":false},{"name":"intended_property","order":0,"description":"Name of the property that this expression is intended to provide a value for, if any.","read_type":"string","optional":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaNamedNoiseFunction","order":78,"description":"Prototype of a named noise function.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"expression","order":0,"description":"","read_type":"string","optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaParticlePrototype","order":79,"description":"Prototype of an optimized particle.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"ended_in_water_trigger_effect","order":1,"description":"","read_type":"TriggerEffectItem","optional":false},{"name":"ended_on_ground_trigger_effect","order":2,"description":"","read_type":"TriggerEffectItem","optional":false},{"name":"fade_out_time","order":5,"description":"","read_type":"uint","optional":false},{"name":"life_time","order":6,"description":"","read_type":"uint","optional":false},{"name":"mining_particle_frame_speed","order":11,"description":"","read_type":"float","optional":false},{"name":"movement_modifier","order":9,"description":"","read_type":"float","optional":false},{"name":"movement_modifier_when_on_ground","order":8,"description":"","read_type":"float","optional":false},{"name":"object_name","order":13,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"regular_trigger_effect","order":0,"description":"","read_type":"TriggerEffectItem","optional":false},{"name":"regular_trigger_effect_frequency","order":7,"description":"","read_type":"uint","optional":false},{"name":"render_layer","order":3,"description":"","read_type":"RenderLayer","optional":false},{"name":"render_layer_when_on_ground","order":4,"description":"","read_type":"RenderLayer","optional":false},{"name":"valid","order":12,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vertical_acceleration","order":10,"description":"","read_type":"float","optional":false}],"operators":[]},{"name":"LuaPermissionGroup","order":80,"description":"A permission group that defines what players in this group are allowed to do.","abstract":false,"methods":[{"name":"add_player","order":0,"description":"Adds the given player to this group.","parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the player was added.","type":"boolean","optional":false}]},{"name":"allows_action","order":2,"description":"Whether this group allows the given action.","parameters":[{"name":"action","order":0,"description":"The action in question.","type":"defines.input_action","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"destroy","order":4,"description":"Destroys this group.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the group was successfully destroyed.","type":"boolean","optional":false}]},{"name":"remove_player","order":1,"description":"Removes the given player from this group.","parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the player was removed.","type":"boolean","optional":false}]},{"name":"set_allows_action","order":3,"description":"Sets whether this group allows the performance the given action.","parameters":[{"name":"action","order":0,"description":"The action in question.","type":"defines.input_action","optional":false},{"name":"allow_action","order":1,"description":"Whether to allow the specified action.","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the value was successfully applied.","type":"boolean","optional":false}]}],"attributes":[{"name":"group_id","order":2,"description":"The group ID","read_type":"uint","optional":false},{"name":"name","order":0,"description":"The name of this group. Setting the name to `nil` or an empty string sets the name to the default value.","read_type":"string","write_type":"string","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"players","order":1,"description":"The players in this group.","read_type":{"complex_type":"array","value":"LuaPlayer"},"optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaPermissionGroups","order":81,"description":"All permission groups.","abstract":false,"methods":[{"name":"create_group","order":0,"description":"Creates a new permission group.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if the calling player doesn't have permission to make groups.","type":"LuaPermissionGroup","optional":true}]},{"name":"get_group","order":1,"description":"Gets the permission group with the given name or group ID.","parameters":[{"name":"group","order":0,"description":"","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if there is no matching group.","type":"LuaPermissionGroup","optional":true}]}],"attributes":[{"name":"groups","order":0,"description":"All of the permission groups.","read_type":{"complex_type":"array","value":"LuaPermissionGroup"},"optional":false},{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaPlanet","order":82,"description":"The runtime values of a planet","abstract":false,"methods":[{"name":"associate_surface","order":1,"description":"Associates the given surface with this planet. Surface must not already be associated with a planet and the planet must not already have an associated surface.\n\nPlanet must not be using [entities_require_heating](runtime:LuaSpaceLocationPrototype::entities_require_heating).","parameters":[{"name":"surface","order":0,"description":"The surface to be associated.","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"create_surface","order":0,"description":"Creates the associated surface if one doesn't already exist.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaSurface","optional":false}]},{"name":"reset_map_gen_settings","order":2,"description":"Resets the map gen settings on this planet to the default from-prototype state.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"name","order":0,"description":"The planets name.","read_type":"string","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"prototype","order":1,"description":"","read_type":"LuaSpaceLocationPrototype","optional":false},{"name":"surface","order":2,"description":"The surface for this planet if one currently exists.\n\nPlanets do not default generate their surface. [LuaPlanet::create_surface](runtime:LuaPlanet::create_surface) can be used to force the surface to exist.\n\n[LuaPlanet::associate_surface](runtime:LuaPlanet::associate_surface) can be used to create an association with an existing surface.","read_type":"LuaSurface","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaPlayer","order":83,"description":"A player in the game. Pay attention that a player may or may not have a character, which is the [LuaEntity](runtime:LuaEntity) of the little guy running around the world doing things.","parent":"LuaControl","abstract":false,"methods":[{"name":"activate_paste","order":58,"description":"Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"add_alert","order":17,"description":"Adds an alert to this player for the given entity of the given alert type.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"type","order":1,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_custom_alert","order":18,"description":"Adds a custom alert to this player.","parameters":[{"name":"entity","order":0,"description":"If the alert is clicked, the map will open at the position of this entity.","type":"LuaEntity","optional":false},{"name":"icon","order":1,"description":"","type":"SignalID","optional":false},{"name":"message","order":2,"description":"","type":"LocalisedString","optional":false},{"name":"show_on_map","order":3,"description":"","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_recipe_notification","order":56,"description":"Adds the given recipe to the list of recipe notifications for this player.","parameters":[{"name":"recipe","order":0,"description":"Recipe to add.","type":"RecipeID","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"add_to_clipboard","order":57,"description":"Adds the given blueprint to this player's clipboard queue.","parameters":[{"name":"blueprint","order":0,"description":"The blueprint to add.","type":"LuaItemStack","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"associate_character","order":35,"description":"Associates a character with this player.\n\nThe character must not be connected to any controller.\n\nIf this player is currently disconnected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)) the character will be immediately \"logged off\".\n\nSee [LuaPlayer::get_associated_characters](runtime:LuaPlayer::get_associated_characters) for more information.","parameters":[{"name":"character","order":0,"description":"The character entity.","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"build_from_cursor","order":30,"description":"Builds whatever is in the cursor on the surface the player is on. The cursor stack will automatically be reduced as if the player built normally.","raises":[{"name":"on_built_entity","order":1,"description":"Raised if the cursor was successfully built.","timeframe":"instantly","optional":true},{"name":"on_pre_build","order":0,"description":"Raised if the cursor was successfully built.","timeframe":"instantly","optional":true}],"parameters":[{"name":"build_mode","order":3,"description":"Which build mode should be used instead of normal build. Defaults to normal.","type":"defines.build_mode","optional":true},{"name":"direction","order":1,"description":"Direction the entity would be placed","type":"defines.direction","optional":true},{"name":"mirror","order":2,"description":"Whether to mirror the entity","type":"boolean","optional":true},{"name":"position","order":0,"description":"Where the entity would be placed","type":"MapPosition","optional":false},{"name":"skip_fog_of_war","order":5,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"terrain_building_size","order":4,"description":"The size for building terrain if building terrain. Defaults to 2.","type":"uint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"can_build_from_cursor","order":29,"description":"Checks if this player can build what ever is in the cursor on the surface the player is on.","parameters":[{"name":"build_mode","order":2,"description":"Which build mode should be used instead of normal build. Defaults to normal.","type":"defines.build_mode","optional":true},{"name":"direction","order":1,"description":"Direction the entity would be placed","type":"defines.direction","optional":true},{"name":"position","order":0,"description":"Where the entity would be placed","type":"MapPosition","optional":false},{"name":"skip_fog_of_war","order":4,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"terrain_building_size","order":3,"description":"The size for building terrain if building terrain. Defaults to 2.","type":"uint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_place_entity","order":28,"description":"Checks if this player can build the given entity at the given location on the surface the player is on.","parameters":[{"name":"direction","order":2,"description":"Direction the entity would be placed. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"name","order":0,"description":"Name of the entity to check.","type":"EntityID","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear_console","order":2,"description":"Clear the chat console.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_cursor","order":15,"description":"Invokes the \"clear cursor\" action on the player as if the user pressed it.","raises":[{"name":"on_player_cursor_stack_changed","order":0,"description":"Raised when the cursor was successfully cleared.","timeframe":"current_tick","optional":true}],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the cursor is now empty.","type":"boolean","optional":false}]},{"name":"clear_inventory_highlights","order":31,"description":"Clears the blinking of the inventory based on insertion of items","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_local_flying_texts","order":38,"description":"Clear any active flying texts for this player.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_recipe_notifications","order":55,"description":"Clears all recipe notifications for this player.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_selection","order":60,"description":"Clears the players selection tool selection position.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"connect_to_server","order":49,"description":"Asks the player if they would like to connect to the given server.\n\nThis only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.","parameters":[{"name":"address","order":0,"description":"The server (address:port) if port is not given the default Factorio port is used.","type":"string","optional":false},{"name":"description","order":2,"description":"","type":"LocalisedString","optional":true},{"name":"name","order":1,"description":"The name of the server.","type":"LocalisedString","optional":true},{"name":"password","order":3,"description":"The password if different from the one used to join this game. Note, if the current password is not empty but the one required to join the new server is an empty string should be given for this field.","type":"string","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"create_character","order":16,"description":"Creates and attaches a character entity to this player.\n\nThe player must not have a character already connected and must be online (see [LuaPlayer::connected](runtime:LuaPlayer::connected)).","parameters":[{"name":"character","order":0,"description":"The character to create else the default is used.","type":"EntityWithQualityID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the character was created.","type":"boolean","optional":false}]},{"name":"create_local_flying_text","order":37,"description":"Spawn flying text that is only visible to this player. Either `position` or `create_at_cursor` are required. When `create_at_cursor` is `true`, all parameters other than `text` are ignored.\n\nIf no custom `speed` is set and the text is longer than 25 characters, its `time_to_live` and `speed` are dynamically adjusted to give players more time to read it.\n\nLocal flying text is not saved, which means it will disappear after a save/load-cycle.","parameters":[{"name":"color","order":3,"description":"The color of the flying text. Defaults to white text.","type":"Color","optional":true},{"name":"create_at_cursor","order":2,"description":"If `true`, the flying text is created at the player's cursor. Defaults to `false`.","type":"boolean","optional":true},{"name":"position","order":1,"description":"The location on the map at which to show the flying text.","type":"MapPosition","optional":true},{"name":"speed","order":5,"description":"The speed at which the text rises upwards in tiles/second. Can't be a negative value.","type":"double","optional":true},{"name":"text","order":0,"description":"The flying text to show.","type":"LocalisedString","optional":false},{"name":"time_to_live","order":4,"description":"The amount of ticks that the flying text will be shown for. Defaults to `80`.","type":"uint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"disable_alert","order":25,"description":"Disables alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the alert type was disabled (false if it was already disabled).","type":"boolean","optional":false}]},{"name":"disable_recipe_groups","order":7,"description":"Disable recipe groups.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"disable_recipe_subgroups","order":9,"description":"Disable recipe subgroups.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"disassociate_character","order":36,"description":"Disassociates a character from this player. This is functionally the same as setting [LuaEntity::associated_player](runtime:LuaEntity::associated_player) to `nil`.\n\nSee [LuaPlayer::get_associated_characters](runtime:LuaPlayer::get_associated_characters) for more information.","parameters":[{"name":"character","order":0,"description":"The character entity","type":"LuaEntity","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"drag_wire","order":6,"description":"Start/end wire dragging at the specified location, wire type is based on the cursor contents","parameters":[{"name":"position","order":0,"description":"Position at which cursor was clicked. Used only to decide which side of arithmetic combinator, decider combinator or power switch is to be connected. Entity itself to be connected is based on the player's selected entity.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"`true` if the action did something","type":"boolean","optional":false}]},{"name":"enable_alert","order":24,"description":"Enables alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the alert type was enabled (false if it was already enabled).","type":"boolean","optional":false}]},{"name":"enable_recipe_groups","order":8,"description":"Enable recipe groups.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enable_recipe_subgroups","order":10,"description":"Enable recipe subgroups.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"enter_space_platform","order":61,"description":"Enters the given space platform if possible.","parameters":[{"name":"space_platform","order":0,"description":"","type":"SpacePlatformIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the player entered the platform.","type":"boolean","optional":false}]},{"name":"exit_cutscene","order":44,"description":"Exit the current cutscene. Errors if not in a cutscene.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_active_quick_bar_page","order":41,"description":"Gets which quick bar page is being used for the given screen page or `nil` if not known.","parameters":[{"name":"index","order":0,"description":"The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint8","optional":true}]},{"name":"get_alerts","order":20,"description":"Get all alerts matching the given filters, or all alerts if no filters are given.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":1,"description":"","type":"LuaEntityPrototype","optional":true},{"name":"surface","order":4,"description":"","type":"SurfaceIdentification","optional":true},{"name":"type","order":3,"description":"","type":"defines.alert_type","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"A mapping of surface index to an array of arrays of [alerts](runtime:Alert) indexed by the [alert type](runtime:defines.alert_type).","type":{"complex_type":"dictionary","key":"uint","value":{"complex_type":"dictionary","key":"defines.alert_type","value":{"complex_type":"array","value":"Alert"}}},"optional":false}]},{"name":"get_associated_characters","order":34,"description":"The characters associated with this player.\n\nThe array will always be empty when the player is disconnected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)) regardless of there being associated characters.\n\nCharacters associated with this player will be logged off when this player disconnects but are not controlled by any player.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_goal_description","order":3,"description":"Get the current goal description, as a localised string.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"get_infinity_inventory_filter","order":53,"description":"Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.","parameters":[{"name":"index","order":0,"description":"The index to get.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"InfinityInventoryFilter","optional":true}]},{"name":"get_quick_bar_slot","order":39,"description":"Gets the quick bar filter for the given slot or `nil`.","parameters":[{"name":"index","order":0,"description":"The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaItemPrototype","optional":true}]},{"name":"is_alert_enabled","order":26,"description":"If the given alert type is currently enabled.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_alert_muted","order":23,"description":"If the given alert type is currently muted.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_shortcut_available","order":46,"description":"Is a custom Lua shortcut currently available?","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_shortcut_toggled","order":45,"description":"Is a custom Lua shortcut currently toggled?","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"jump_to_cutscene_waypoint","order":43,"description":"Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscene.","parameters":[{"name":"waypoint_index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"land_on_planet","order":63,"description":"Ejects this player from the current space platform and lands on the current planet.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the player successfully landed on the planet.","type":"boolean","optional":false}]},{"name":"leave_space_platform","order":62,"description":"Ejects this player from the current space platform if in a platform. The player is left on the platform at the position of the hub.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"mute_alert","order":21,"description":"Mutes alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the alert type was muted (false if it was already muted).","type":"boolean","optional":false}]},{"name":"pipette_entity","order":27,"description":"Invokes the \"smart pipette\" action on the player as if the user pressed it.","raises":[{"name":"on_player_pipette","order":0,"description":"Raised if the entity was successfully pipetted.","timeframe":"instantly","optional":true}],"parameters":[{"name":"allow_ghost","order":1,"description":"Defaults to false.","type":"boolean","optional":true},{"name":"entity","order":0,"description":"","type":"EntityWithQualityID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the smart pipette found something to place.","type":"boolean","optional":false}]},{"name":"play_sound","order":33,"description":"Play a sound for this player.\n\nThe sound is not played if its location is not [charted](runtime:LuaForce::chart) for this player.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of the player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"print","order":1,"description":"Print text to the chat console.\n\nBy default, messages that are identical to a message sent in the last 60 ticks are not printed again.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false},{"name":"print_settings","order":1,"description":"","type":"PrintSettings","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"print_entity_statistics","order":11,"description":"Print entity statistics to the player's console.","parameters":[{"name":"entities","order":0,"description":"Entity prototypes to get statistics for. If not specified or empty, display statistics for all entities.","type":{"complex_type":"array","value":"EntityWithQualityID"},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"print_lua_object_statistics","order":13,"description":"Print LuaObject counts per mod.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"print_robot_jobs","order":12,"description":"Print construction robot job counts to the players console.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"remove_alert","order":19,"description":"Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"icon","order":5,"description":"","type":"SignalID","optional":true},{"name":"message","order":6,"description":"","type":"LocalisedString","optional":true},{"name":"position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":1,"description":"","type":"EntityID","optional":true},{"name":"surface","order":4,"description":"","type":"SurfaceIdentification","optional":true},{"name":"type","order":3,"description":"","type":"defines.alert_type","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"request_translation","order":51,"description":"Requests a translation for the given localised string. If the request is successful, the [on_string_translated](runtime:on_string_translated) event will be fired with the results.\n\nDoes nothing if this player is not connected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)).","raises":[{"name":"on_string_translated","order":0,"description":"Raised if the request was successfully sent.","timeframe":"future_tick","optional":true}],"parameters":[{"name":"localised_string","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The unique ID for the requested translation.","type":"uint","optional":true}]},{"name":"request_translations","order":52,"description":"Requests translation for the given set of localised strings. If the request is successful, a [on_string_translated](runtime:on_string_translated) event will be fired for each string with the results.\n\nDoes nothing if this player is not connected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)).","raises":[{"name":"on_string_translated","order":0,"description":"Raised if the request was successfully sent.","timeframe":"future_tick","optional":true}],"parameters":[{"name":"localised_strings","order":0,"description":"","type":{"complex_type":"array","value":"LocalisedString"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The unique IDs for the requested translations.","type":{"complex_type":"array","value":"uint"},"optional":true}]},{"name":"set_active_quick_bar_page","order":42,"description":"Sets which quick bar page is being used for the given screen page.","parameters":[{"name":"page_index","order":1,"description":"The new quick bar page.","type":"uint","optional":false},{"name":"screen_index","order":0,"description":"The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_controller","order":5,"description":"Set the controller type of the player.\n\nSetting a player to [defines.controllers.editor](runtime:defines.controllers.editor) auto promotes the player to admin and enables cheat mode. Setting a player to [defines.controllers.editor](runtime:defines.controllers.editor) also requires the calling player be an admin.","parameters":[{"name":"character","order":1,"description":"Entity to control. Mandatory when `type` is [defines.controllers.character](runtime:defines.controllers.character), ignored otherwise.","type":"LuaEntity","optional":true},{"name":"chart_mode_cutoff","order":6,"description":"If specified and `type` is [defines.controllers.cutscene](runtime:defines.controllers.cutscene), the game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value.","type":"double","optional":true},{"name":"final_transition_time","order":5,"description":"If specified and `type` is [defines.controllers.cutscene](runtime:defines.controllers.cutscene), it is the time in ticks it will take for the camera to pan from the final waypoint back to the starting position. If not given the camera will not pan back to the start position/zoom.","type":"uint","optional":true},{"name":"position","order":7,"description":"If specified and `type` is [defines.controllers.remote](runtime:defines.controllers.remote), the position the remote controller will be centered on.","type":"MapPosition","optional":true},{"name":"start_position","order":3,"description":"If specified and `type` is [defines.controllers.cutscene](runtime:defines.controllers.cutscene), the cutscene will start at this position. If not given the start position will be the player position.","type":"MapPosition","optional":true},{"name":"start_zoom","order":4,"description":"If specified and `type` is [defines.controllers.cutscene](runtime:defines.controllers.cutscene), the cutscene will start at this zoom level. If not given the start zoom will be the players zoom.","type":"double","optional":true},{"name":"surface","order":8,"description":"If specified and `type` is [defines.controllers.remote](runtime:defines.controllers.remote), the surface the remote controller will be put on.","type":"SurfaceIdentification","optional":true},{"name":"type","order":0,"description":"Which controller to use.","type":"defines.controllers","optional":false},{"name":"waypoints","order":2,"description":"List of waypoints for the cutscene controller. This parameter is mandatory when `type` is [defines.controllers.cutscene](runtime:defines.controllers.cutscene).","type":"CutsceneWaypoint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"set_ending_screen_data","order":0,"description":"Setup the screen to be shown when the game is finished.","parameters":[{"name":"file","order":1,"description":"Path to image to be shown.","type":"string","optional":true},{"name":"message","order":0,"description":"Message to be shown.","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_goal_description","order":4,"description":"Set the text in the goal window (top left).","parameters":[{"name":"only_update","order":1,"description":"When `true`, won't play the \"goal updated\" sound.","type":"boolean","optional":true},{"name":"text","order":0,"description":"The text to display. Lines can be delimited with `\\n`. Passing an empty string or omitting this parameter entirely will make the goal window disappear.","type":"LocalisedString","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_infinity_inventory_filter","order":54,"description":"Sets the filter for this map editor infinity filters at the given index.","parameters":[{"name":"filter","order":1,"description":"The new filter or `nil` to clear the filter.","type":{"complex_type":"union","options":["InfinityInventoryFilter","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The index to set.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_quick_bar_slot","order":40,"description":"Sets the quick bar filter for the given slot. If a [LuaItemStack](runtime:LuaItemStack) is provided, the slot will be set to that particular item instance if it has extra data, for example a specific blueprint or spidertron remote. Otherwise, it will be set to all items of that prototype, for example iron plates.","parameters":[{"name":"filter","order":1,"description":"The filter or `nil` to clear it.","type":{"complex_type":"union","options":["LuaItemStack","ItemWithQualityID","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_shortcut_available","order":48,"description":"Make a custom Lua shortcut available or unavailable.","parameters":[{"name":"available","order":1,"description":"","type":"boolean","optional":false},{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_shortcut_toggled","order":47,"description":"Toggle or untoggle a custom Lua shortcut","parameters":[{"name":"prototype_name","order":0,"description":"Prototype name of the custom shortcut.","type":"string","optional":false},{"name":"toggled","order":1,"description":"","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"start_selection","order":59,"description":"Starts selection with selection tool from the specified position. Does nothing if the players cursor is not a selection tool.","parameters":[{"name":"position","order":0,"description":"The position to start selection from.","type":"MapPosition","optional":false},{"name":"selection_mode","order":1,"description":"The type of selection to start.","type":"defines.selection_mode","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"toggle_map_editor","order":50,"description":"Toggles this player into or out of the map editor. Does nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.","raises":[{"name":"on_player_toggled_map_editor","order":1,"description":"Raised if the map editor was successfully toggled.","timeframe":"instantly","optional":true},{"name":"on_pre_player_toggled_map_editor","order":0,"description":"Raised if the map editor was successfully toggled.","timeframe":"instantly","optional":true}],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"unlock_achievement","order":14,"description":"Unlock the achievements of the given player. This has any effect only when this is the local player, the achievement isn't unlocked so far and the achievement is of the type \"achievement\".","parameters":[{"name":"name","order":0,"description":"name of the achievement to unlock","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"unmute_alert","order":22,"description":"Unmutes alerts for the given alert category.","parameters":[{"name":"alert_type","order":0,"description":"","type":"defines.alert_type","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the alert type was unmuted (false if it was wasn't muted).","type":"boolean","optional":false}]},{"name":"use_from_cursor","order":32,"description":"Uses the current item in the cursor if it's a capsule or does nothing if not.","parameters":[{"name":"position","order":0,"description":"Where the item would be used.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"admin","order":21,"description":"`true` if the player is an admin.\n\nTrying to change player admin status from the console when you aren't an admin does nothing.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"afk_time","order":23,"description":"How many ticks since the last action of this player.","read_type":"uint","optional":false},{"name":"auto_sort_main_inventory","order":41,"description":"If the main inventory will be auto sorted.","read_type":"boolean","optional":false},{"name":"blueprint_to_setup","order":33,"description":"The item stack containing a blueprint to be setup.","read_type":"LuaItemStack","optional":false},{"name":"blueprints","order":34,"description":"Records contained in the player's blueprint library.","read_type":{"complex_type":"array","value":"LuaRecord"},"optional":false},{"name":"centered_on","order":13,"description":"The entity being centered on in remote view.\n\nWhen writing, the player will be switched to remote view (if not already in it) and centered on the given entity.","read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"character","order":4,"description":"The character attached to this player, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)).","read_type":"LuaEntity","write_type":"LuaEntity","optional":true},{"name":"chat_color","order":17,"description":"The color used when this player talks in game.","read_type":"Color","write_type":"Color","optional":false},{"name":"color","order":16,"description":"The color associated with the player. This will be used to tint the player's character as well as their buildings and vehicles.","read_type":"Color","write_type":"Color","optional":false},{"name":"connected","order":20,"description":"`true` if the player is currently connected to the game.","read_type":"boolean","optional":false},{"name":"controller_type","order":9,"description":"","read_type":"defines.controllers","optional":false},{"name":"cursor_stack_temporary","order":43,"description":"Returns true if the current item stack in cursor will be destroyed after clearing the cursor. Manually putting it into inventory still preserves the item. If the cursor stack is not one of the supported types (blueprint, blueprint-book, deconstruction-planner, upgrade-planner), write operation will be silently ignored.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"cutscene_character","order":5,"description":"When in a cutscene; the character this player would be using once the cutscene is over, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](runtime:LuaPlayer::connected)).","read_type":"LuaEntity","optional":true},{"name":"display_density_scale","order":31,"description":"The display density scale for this player. The display density scale is the factor of [LuaPlayer::display_scale](runtime:LuaPlayer::display_scale) that is determined by the physical DPI of the screen that Factorio is running on. In most cases, the default value is 1. If the player is playing on a high-density display, this value may be 2 or greater.\n\nDuring [on_player_created](runtime:on_player_created), this attribute will always return a scale of `1`. To get the actual scale, listen to the [on_player_display_density_scale_changed](runtime:on_player_display_density_scale_changed) event raised shortly afterwards.","read_type":"double","optional":false},{"name":"display_resolution","order":29,"description":"The display resolution for this player.\n\nDuring [on_player_created](runtime:on_player_created), this attribute will always return a resolution of `{width=1920, height=1080}`. To get the actual resolution, listen to the [on_player_display_resolution_changed](runtime:on_player_display_resolution_changed) event raised shortly afterwards.","read_type":"DisplayResolution","optional":false},{"name":"display_scale","order":30,"description":"The display scale for this player.\n\nDuring [on_player_created](runtime:on_player_created), this attribute will always return a scale of `1`. To get the actual scale, listen to the [on_player_display_scale_changed](runtime:on_player_display_scale_changed) event raised shortly afterwards.","read_type":"double","optional":false},{"name":"drag_target","order":45,"description":"The wire drag target for this player, if any.","read_type":"DragTarget","optional":true},{"name":"entity_copy_source","order":22,"description":"The source entity used during entity settings copy-paste, if any.","read_type":"LuaEntity","optional":true},{"name":"game_view_settings","order":14,"description":"The player's game view settings.","read_type":"GameViewSettings","write_type":"GameViewSettings","optional":false},{"name":"gui","order":7,"description":"","read_type":"LuaGui","optional":false},{"name":"hand_location","order":42,"description":"The original location of the item in the cursor, marked with a hand. `nil` if the cursor stack is empty. When writing, the specified inventory slot must be empty and the cursor stack must not be empty.","read_type":"ItemStackLocation","write_type":"ItemStackLocation","optional":true},{"name":"index","order":6,"description":"This player's index in [LuaGameScript::players](runtime:LuaGameScript::players) (unique ID). It is assigned when a player is created, and remains so (even when the player is not [connected](runtime:LuaPlayer::connected)) until the player is irreversibly [removed](runtime:on_player_removed). Indexes of removed players can be reused.","read_type":"uint","optional":false},{"name":"infinity_inventory_filters","order":40,"description":"The filters for this map editor infinity inventory settings.","read_type":{"complex_type":"array","value":"InfinityInventoryFilter"},"write_type":{"complex_type":"array","value":"InfinityInventoryFilter"},"optional":false},{"name":"input_method","order":36,"description":"The input method of the player, mouse and keyboard or game controller","read_type":"defines.input_method","optional":false},{"name":"last_online","order":25,"description":"At what tick this player was last online.","read_type":"uint","optional":false},{"name":"locale","order":32,"description":"The active locale for this player.\n\nDuring [on_player_created](runtime:on_player_created), this attribute will be `en`. To get the actual value, listen to the [on_player_locale_changed](runtime:on_player_locale_changed) event raised shortly afterwards.","read_type":"string","optional":false},{"name":"map_view_settings","order":46,"description":"The player's map view settings. To write to this, use a table containing the fields that should be changed.","write_type":"MapViewSettings","optional":false},{"name":"minimap_enabled","order":15,"description":"`true` if the minimap is visible.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"mod_settings","order":27,"description":"The current per-player settings for the this player, indexed by prototype name. Returns the same structure as [LuaSettings::get_player_settings](runtime:LuaSettings::get_player_settings). This table becomes invalid if its associated player does.\n\nEven though this attribute is marked as read-only, individual settings can be changed by overwriting their [ModSetting](runtime:ModSetting) table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.","examples":["```\n-- Change the value of the \"active_lifestyle\" setting\nplayer.mod_settings[\"active_lifestyle\"] = {value = true}\n```"],"read_type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false},{"name":"name","order":18,"description":"The player's username.","read_type":"string","optional":false},{"name":"object_name","order":48,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"online_time","order":24,"description":"How many ticks did this player spend playing this save (all sessions combined).","read_type":"uint","optional":false},{"name":"opened_self","order":8,"description":"`true` if the player opened itself. I.e. if they opened the character or god-controller GUI.","read_type":"boolean","optional":false},{"name":"permission_group","order":26,"description":"The permission group this player is part of, if any.","read_type":"LuaPermissionGroup","write_type":"LuaPermissionGroup","optional":true},{"name":"physical_position","order":2,"description":"The current position of this players physical controller.","read_type":"MapPosition","optional":false},{"name":"physical_surface","order":0,"description":"The surface this players physical controller is on.","read_type":"LuaSurface","optional":false},{"name":"physical_surface_index","order":1,"description":"Unique ID associated with the surface this players physical controller is currently on.","read_type":"uint","optional":false},{"name":"physical_vehicle","order":3,"description":"The current vehicle of this players physical controller.","read_type":"MapPosition","optional":false},{"name":"remove_unfiltered_items","order":39,"description":"If items not included in this map editor infinity inventory filters should be removed.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"render_mode","order":35,"description":"The render mode of the player, like map or zoom to world. The render mode can be set using [LuaPlayer::open_map](runtime:LuaPlayer::open_map), [LuaPlayer::zoom_to_world](runtime:LuaPlayer::zoom_to_world) and [LuaPlayer::close_map](runtime:LuaPlayer::close_map).","read_type":"defines.render_mode","optional":false},{"name":"show_on_map","order":38,"description":"If `true`, circle and name of given player is rendered on the map/chart.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"spectator","order":37,"description":"If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"spidertron_remote_selection","order":11,"description":"All SpiderVehicles currently selected by the player, if they are holding a spidertron remote.","read_type":{"complex_type":"array","value":"LuaEntity"},"write_type":{"complex_type":"array","value":"LuaEntity"},"optional":true},{"name":"stashed_controller_type","order":10,"description":"The stashed controller type, if any. This is mainly useful when a player is in the map editor.","read_type":"defines.controllers","optional":true},{"name":"tag","order":19,"description":"The tag that is shown after the player in chat, on the map and above multiplayer selection rectangles.","read_type":"string","write_type":"string","optional":false},{"name":"ticks_to_respawn","order":28,"description":"The number of ticks until this player will respawn. `nil` if this player is not waiting to respawn.\n\nSet to `nil` to immediately respawn the player.\n\nSet to any positive value to trigger the respawn state for this player.","read_type":"uint","write_type":"uint","optional":true},{"name":"undo_redo_stack","order":44,"description":"The undo and redo stack for this player.","read_type":"LuaUndoRedoStack","optional":false},{"name":"valid","order":47,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"zoom","order":12,"description":"The player's zoom-level.","write_type":"double","optional":false}],"operators":[]},{"name":"LuaProcessionLayerInheritanceGroupPrototype","order":84,"description":"Prototype of a procession inheritance group which synchronizes offsets between procession steps.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaProcessionPrototype","order":85,"description":"Prototype of a procession.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaProfiler","order":86,"description":"An object used to measure script performance.\n\nSince performance is non-deterministic, these objects don't allow reading the raw time values from Lua. They can be used anywhere a [LocalisedString](runtime:LocalisedString) is used, except for [LuaGuiElement::add](runtime:LuaGuiElement::add)'s LocalisedString arguments, [LuaSurface::create_entity](runtime:LuaSurface::create_entity)'s `text` argument, and [LuaEntity::add_market_item](runtime:LuaEntity::add_market_item).","abstract":false,"methods":[{"name":"add","order":3,"description":"Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at once.\n\nIf other is running, the time to now will be added.","parameters":[{"name":"other","order":0,"description":"The timer to add to this timer.","type":"LuaProfiler","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"divide","order":4,"description":"Divides the current duration by a set value. Useful for calculating the average of many iterations.\n\nDoes nothing if this isn't stopped.","parameters":[{"name":"number","order":0,"description":"The number to divide by. Must be > 0.","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"reset","order":0,"description":"Resets the clock, also restarting it.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"restart","order":2,"description":"Start the clock again, without resetting it.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"stop","order":1,"description":"Stops the clock.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaProgrammableSpeakerControlBehavior","order":87,"description":"Control behavior for programmable speakers.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_condition","order":1,"description":"","read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"circuit_parameters","order":0,"description":"","read_type":"ProgrammableSpeakerCircuitParameters","write_type":"ProgrammableSpeakerCircuitParameters","optional":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaPrototypeBase","order":88,"description":"Base for all prototype classes.","abstract":true,"methods":[],"attributes":[{"name":"group","order":5,"description":"Group of this prototype.","read_type":"LuaGroup","optional":false},{"name":"hidden","order":7,"description":"","read_type":"boolean","optional":false},{"name":"hidden_in_factoriopedia","order":8,"description":"","read_type":"boolean","optional":false},{"name":"localised_description","order":4,"description":"","read_type":"LocalisedString","optional":false},{"name":"localised_name","order":3,"description":"","read_type":"LocalisedString","optional":false},{"name":"name","order":1,"description":"Name of this prototype.","read_type":"string","optional":false},{"name":"order","order":2,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","read_type":"string","optional":false},{"name":"parameter","order":9,"description":"","read_type":"boolean","optional":false},{"name":"subgroup","order":6,"description":"Subgroup of this prototype.","read_type":"LuaGroup","optional":false},{"name":"type","order":0,"description":"Type of this prototype.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaPrototypes","order":89,"description":"Provides read-only access to prototypes. It is accessible through the global object named `prototypes`.","abstract":false,"methods":[{"name":"get_achievement_filtered","order":4,"description":"Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every achievement prototype that is not allowed to be completed on the peaceful difficulty setting.\nlocal prototypes = prototypes.get_achievement_filtered{{filter=\"allowed-without-fight\", invert=true}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"AchievementPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAchievementPrototype"},"optional":false}]},{"name":"get_decorative_filtered","order":6,"description":"Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every decorative prototype that is auto-placed.\nlocal prototypes = prototypes.get_decorative_filtered{{filter=\"autoplace\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"DecorativePrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDecorativePrototype"},"optional":false}]},{"name":"get_entity_filtered","order":0,"description":"Returns a dictionary of all LuaEntityPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every entity prototype that can craft recipes involving fluids in the way some assembling machines can\nlocal prototypes = prototypes.get_entity_filtered{{filter=\"crafting-category\", crafting_category=\"crafting-with-fluid\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"EntityPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEntityPrototype"},"optional":false}]},{"name":"get_equipment_filtered","order":2,"description":"Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every equipment prototype that functions as a battery.\nlocal prototypes = prototypes.get_equipment_filtered{{filter=\"type\", type=\"battery-equipment\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"EquipmentPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentPrototype"},"optional":false}]},{"name":"get_fluid_filtered","order":7,"description":"Returns a dictionary of all LuaFluidPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every fluid prototype that has a heat capacity of exactly `100`.\nlocal prototypes = prototypes.get_fluid_filtered{{filter=\"heat-capacity\", comparison=\"=\", value=100}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFluidPrototype"},"optional":false}]},{"name":"get_history","order":10,"description":"Gets the prototype history for the given type and name.","parameters":[{"name":"name","order":1,"description":"","type":"string","optional":false},{"name":"type","order":0,"description":"","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"PrototypeHistory","optional":false}]},{"name":"get_item_filtered","order":1,"description":"Returns a dictionary of all LuaItemPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every item prototype that has a fuel top speed multiplier larger than 1.\nlocal prototypes = prototypes.get_item_filtered{{filter = \"fuel-top-speed-multiplier\", comparison = \">\", value = 1}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaItemPrototype"},"optional":false}]},{"name":"get_mod_setting_filtered","order":3,"description":"Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every mod setting prototype that belongs to the specified mod.\nlocal prototypes = prototypes.get_mod_setting_filtered{{filter=\"mod\", mod=\"space-exploration\"}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"ModSettingPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModSettingPrototype"},"optional":false}]},{"name":"get_recipe_filtered","order":8,"description":"Returns a dictionary of all LuaRecipePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every recipe prototype that takes less than half a second to craft (at crafting speed `1`).\nlocal prototypes = prototypes.get_recipe_filtered{{filter=\"energy\", comparison=\"<\", value=0.5}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"RecipePrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipePrototype"},"optional":false}]},{"name":"get_technology_filtered","order":9,"description":"Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every technology prototype that can be researched at the start of the game.\nlocal prototypes = prototypes.get_technology_filtered{{filter=\"has-prerequisites\", invert=true}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"TechnologyPrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnologyPrototype"},"optional":false}]},{"name":"get_tile_filtered","order":5,"description":"Returns a dictionary of all LuaTilePrototypes that fit the given filters. The prototypes are indexed by `name`.","examples":["```\n-- Get every tile prototype that improves a player's walking speed by at least 50%.\nlocal prototypes = prototypes.get_tile_filtered{{filter=\"walking-speed-modifier\", comparison=\"\u2265\", value=1.5}}\n```"],"parameters":[{"name":"filters","order":0,"description":"","type":{"complex_type":"array","value":"TilePrototypeFilter"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTilePrototype"},"optional":false}]}],"attributes":[{"name":"achievement","order":26,"description":"A dictionary containing every LuaAchievementPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAchievementPrototype"},"optional":false},{"name":"active_trigger","order":37,"description":"A dictionary containing every LuaActiveTriggerPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaActiveTriggerPrototype"},"optional":false},{"name":"airborne_pollutant","order":40,"description":"A dictionary containing every LuaAirbornePollutantPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAirbornePollutantPrototype"},"optional":false},{"name":"ammo_category","order":19,"description":"A dictionary containing every LuaAmmoCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAmmoCategoryPrototype"},"optional":false},{"name":"asteroid_chunk","order":38,"description":"A dictionary containing every LuaAsteroidChunkPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAsteroidChunkPrototype"},"optional":false},{"name":"autoplace_control","order":16,"description":"A dictionary containing every LuaAutoplaceControlPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaAutoplaceControlPrototype"},"optional":false},{"name":"burner_usage","order":41,"description":"A dictionary containing every LuaBurnerUsagePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaBurnerUsagePrototype"},"optional":false},{"name":"collision_layer","order":39,"description":"A dictionary containing every LuaCollisionLayerPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaCollisionLayerPrototype"},"optional":false},{"name":"custom_event","order":36,"description":"A dictionary containing every defined custom event, indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaCustomEventPrototype"},"optional":false},{"name":"custom_input","order":18,"description":"A dictionary containing every LuaCustomInputPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaCustomInputPrototype"},"optional":false},{"name":"damage","order":9,"description":"A dictionary containing every LuaDamagePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDamagePrototype"},"optional":false},{"name":"decorative","order":14,"description":"A dictionary containing every LuaDecorativePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaDecorativePrototype"},"optional":false},{"name":"entity","order":4,"description":"A dictionary containing every LuaEntityPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEntityPrototype"},"optional":false},{"name":"equipment","order":8,"description":"A dictionary containing every LuaEquipmentPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentPrototype"},"optional":false},{"name":"equipment_category","order":28,"description":"A dictionary containing every LuaEquipmentCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentCategoryPrototype"},"optional":false},{"name":"equipment_grid","order":11,"description":"A dictionary containing every LuaEquipmentGridPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaEquipmentGridPrototype"},"optional":false},{"name":"fluid","order":6,"description":"A dictionary containing every LuaFluidPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFluidPrototype"},"optional":false},{"name":"font","order":1,"description":"A dictionary containing every LuaFontPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFontPrototype"},"optional":false},{"name":"fuel_category","order":24,"description":"A dictionary containing every LuaFuelCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaFuelCategoryPrototype"},"optional":false},{"name":"item","order":5,"description":"A dictionary containing every LuaItemPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaItemPrototype"},"optional":false},{"name":"item_group","order":23,"description":"A dictionary containing every ItemGroup indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaGroup"},"optional":false},{"name":"item_subgroup","order":22,"description":"A dictionary containing every ItemSubgroup indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaGroup"},"optional":false},{"name":"map_gen_preset","order":2,"description":"A dictionary containing every MapGenPreset indexed by `name`.\n\nA MapGenPreset is an exact copy of the prototype table provided from the data stage.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"MapGenPreset"},"optional":false},{"name":"max_beacon_supply_area_distance","order":49,"description":"","read_type":"uint","optional":false},{"name":"max_electric_pole_connection_distance","order":48,"description":"","read_type":"double","optional":false},{"name":"max_electric_pole_supply_area_distance","order":47,"description":"","read_type":"float","optional":false},{"name":"max_force_distraction_chunk_distance","order":46,"description":"","read_type":"uint","optional":false},{"name":"max_force_distraction_distance","order":45,"description":"","read_type":"double","optional":false},{"name":"max_gate_activation_distance","order":50,"description":"","read_type":"double","optional":false},{"name":"max_inserter_reach_distance","order":51,"description":"","read_type":"double","optional":false},{"name":"max_pipe_to_ground_distance","order":52,"description":"","read_type":"uint8","optional":false},{"name":"max_underground_belt_distance","order":53,"description":"","read_type":"uint8","optional":false},{"name":"mod_setting","order":17,"description":"A dictionary containing every LuaModSettingPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModSettingPrototype"},"optional":false},{"name":"module_category","order":27,"description":"A dictionary containing every LuaModuleCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaModuleCategoryPrototype"},"optional":false},{"name":"named_noise_expression","order":20,"description":"A dictionary containing every LuaNamedNoiseExpression indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaNamedNoiseExpression"},"optional":false},{"name":"named_noise_function","order":21,"description":"A dictionary containing every LuaNamedNoiseFunction indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaNamedNoiseFunction"},"optional":false},{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"particle","order":15,"description":"A dictionary containing every LuaParticlePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaParticlePrototype"},"optional":false},{"name":"procession","order":43,"description":"A dictionary containing every LuaProcessionPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaProcessionPrototype"},"optional":false},{"name":"procession_layer_inheritance_group","order":44,"description":"A dictionary containing every LuaProcessionLayerInheritanceGroupPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaProcessionLayerInheritanceGroupPrototype"},"optional":false},{"name":"quality","order":32,"description":"","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaQualityPrototype"},"optional":false},{"name":"recipe","order":12,"description":"A dictionary containing every LuaRecipePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipePrototype"},"optional":false},{"name":"recipe_category","order":31,"description":"A dictionary containing every LuaRecipeCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaRecipeCategoryPrototype"},"optional":false},{"name":"resource_category","order":25,"description":"A dictionary containing every LuaResourceCategoryPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaResourceCategoryPrototype"},"optional":false},{"name":"shortcut","order":30,"description":"A dictionary containing every LuaShortcutPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaShortcutPrototype"},"optional":false},{"name":"space_connection","order":35,"description":"","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaSpaceConnectionPrototype"},"optional":false},{"name":"space_location","order":34,"description":"","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaSpaceLocationPrototype"},"optional":false},{"name":"style","order":3,"description":"The styles that [LuaGuiElement](runtime:LuaGuiElement) can use, indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"string"},"optional":false},{"name":"surface","order":42,"description":"A dictionary containing every LuaSurfacePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaSurfacePrototype"},"optional":false},{"name":"surface_property","order":33,"description":"","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaSurfacePropertyPrototype"},"optional":false},{"name":"technology","order":13,"description":"A dictionary containing every [LuaTechnologyPrototype](runtime:LuaTechnologyPrototype) indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTechnologyPrototype"},"optional":false},{"name":"tile","order":7,"description":"A dictionary containing every LuaTilePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTilePrototype"},"optional":false},{"name":"trivial_smoke","order":29,"description":"A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaTrivialSmokePrototype"},"optional":false},{"name":"virtual_signal","order":10,"description":"A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"LuaVirtualSignalPrototype"},"optional":false}],"operators":[]},{"name":"LuaPumpControlBehavior","order":90,"description":"Control behavior for pumps.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"set_filter","order":0,"description":"`true` if the pump should set its fluid filter from the circuit network signals.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaQualityPrototype","order":91,"description":"Prototype of a quality.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"beacon_power_usage_multiplier","order":4,"description":"","read_type":"float","optional":false},{"name":"draw_sprite_by_default","order":3,"description":"","read_type":"boolean","optional":false},{"name":"level","order":0,"description":"Level basically specifies the stat-increasing value of this quality level","read_type":"uint","optional":false},{"name":"mining_drill_resource_drain_multiplier","order":5,"description":"","read_type":"float","optional":false},{"name":"next","order":1,"description":"The next higher level of the quality","read_type":"LuaQualityPrototype","optional":false},{"name":"next_probability","order":2,"description":"The probability multiplier of getting the next level of quality","read_type":"double","optional":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRCON","order":92,"description":"An interface to send messages to the calling RCON interface through the global object named `rcon`.","abstract":false,"methods":[{"name":"print","order":0,"description":"Print text to the calling RCON interface if any.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaRadarControlBehavior","order":93,"description":"Control behavior for radars","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRailEnd","order":94,"description":"Utility object that binds to a rail entity and rail_direction to allow easier traversal over rails","abstract":false,"methods":[{"name":"flip_direction","order":1,"description":"Moves to opposite end on the rail this object points to","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_rail_extensions","order":5,"description":"Returns all possible rail extensions from this position as defined by the planner item.","parameters":[{"name":"planner_item","order":0,"description":"Rail planner that defines possible rail extensions","type":"ItemID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"RailExtensionData"},"optional":false}]},{"name":"make_copy","order":0,"description":"Creates a copy of this LuaRailEnd object.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRailEnd","optional":false}]},{"name":"move_forward","order":2,"description":"Moves forward by 1 rail to the specified connection direction","parameters":[{"name":"connection_direction","order":0,"description":"","type":"defines.rail_connection_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the move was successful. False if there is no rail connected in given connection_direction","type":"boolean","optional":false}]},{"name":"move_natural","order":3,"description":"Moves forward by 1 rail in the natural direction. Natural direction is a move in the direction taken by the train over rail connection related to this rail end. If there are no trains, the natural direction is straight if straight connected rail exists, otherwise it is right if right connected rail exists, otherwise it is left if left connected rail exists. Natural direction is not defined if there are no rails connected to this end and this method will fail.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the move was successful. False only when there are no rails connected on this end","type":"boolean","optional":false}]},{"name":"move_to_segment_end","order":4,"description":"Moves forward until a rail segment boundary is reached. If this rail end is at the segment boundary, it will not move at all. When a rail segment is cyclical, it will reach the rail segment boundary at some arbitrary position unless the segment boundary is well defined by presence of rail signals, train stop or other rails connecting to the rails loop.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"alternative_in_signal_location","order":6,"description":"Location of the alternative incoming signal, which goes to the right relative to the rail end movement. Not all places have alternative incoming signal spot, so when it is not available, a nil will be given instead","read_type":"RailLocation","optional":true},{"name":"alternative_out_signal_location","order":4,"description":"Location of the alternative outgoing signal, which goes to the right relative to the rail end movement. Not all places have alternative outgoing signal spot, so when it is not available, a nil will be given instead","read_type":"RailLocation","optional":true},{"name":"direction","order":1,"description":"Which end of the rail this RailEnd is binding to.","read_type":"defines.rail_direction","optional":false},{"name":"in_signal_location","order":5,"description":"Location of an incoming signal, which goes to the left relative to the rail end movement.","read_type":"RailLocation","optional":false},{"name":"location","order":2,"description":"Location of the rail end","read_type":"RailLocation","optional":false},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"out_signal_location","order":3,"description":"Location of an outgoing signal, which goes to the right relative to the rail end movement.","read_type":"RailLocation","optional":false},{"name":"rail","order":0,"description":"Rail to which this RailEnd is binding to.","read_type":"LuaEntity","optional":false},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRailPath","order":95,"description":"A rail path.","abstract":false,"methods":[],"attributes":[{"name":"current","order":1,"description":"The current rail index.","read_type":"uint","optional":false},{"name":"is_front","order":5,"description":"If the path goes from the front of the train","read_type":"boolean","optional":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"rails","order":4,"description":"Array of the rails that this path travels over.","read_type":{"complex_type":"LuaCustomTable","key":"uint","value":"LuaEntity"},"optional":false},{"name":"size","order":0,"description":"The total number of rails in this path.","read_type":"uint","optional":false},{"name":"total_distance","order":2,"description":"The total path distance.","read_type":"double","optional":false},{"name":"travelled_distance","order":3,"description":"The total distance traveled.","read_type":"double","optional":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRailSignalBaseControlBehavior","order":96,"description":"Control behavior for rail signals and rail chain signals.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"blue_signal","order":3,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"circuit_condition","order":6,"description":"The circuit condition when controlling the signal through the circuit network.","read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"close_signal","order":4,"description":"If this will close the rail signal based off the circuit condition.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"green_signal","order":2,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":8,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"orange_signal","order":1,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"read_signal","order":5,"description":"If this will read the rail signal state.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"red_signal","order":0,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"valid","order":7,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRandomGenerator","order":97,"description":"A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. This random generator can be saved and loaded and will maintain its state.\n\nNote this is entirely different from calling [math.random](libraries.html)() and you should be sure you actually want to use this over calling `math.random()`. If you aren't sure if you need to use this over calling `math.random()` then you probably don't need to use this.","examples":["```\n-- Create a generator and use it to print a random number.\nstorage.generator = game.create_random_generator()\ngame.player.print(storage.generator())\n```"],"abstract":false,"methods":[{"name":"re_seed","order":0,"description":"Re-seeds the random generator with the given value.\n\nSeeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.","parameters":[{"name":"seed","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"call","order":0,"description":"Generates a random number. If no parameters are given a number in the `[0, 1)` range is returned. If a single parameter is given a floored number in the `[1, N]` range is returned. If 2 parameters are given a floored number in the `[N1, N2]` range is returned.","parameters":[{"name":"lower","order":0,"description":"Inclusive lower bound on the result","type":"int","optional":true},{"name":"upper","order":1,"description":"Inclusive upper bound on the result","type":"int","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]}]},{"name":"LuaReactorControlBehavior","order":98,"description":"Control behavior for Reactor","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_fuel","order":0,"description":"If this will read fuel inventory and currently burning fuel","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_temperature","order":1,"description":"If this will read temperature of the reactor","read_type":"boolean","write_type":"boolean","optional":false},{"name":"temperature_signal","order":2,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRecipe","order":99,"description":"A crafting recipe. Recipes belong to forces (see [LuaForce](runtime:LuaForce)) because some recipes are unlocked by research, and researches are per-force.","abstract":false,"methods":[{"name":"reload","order":0,"description":"Reload the recipe from the prototype.","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"category","order":5,"description":"Category of the recipe.","read_type":"string","optional":false},{"name":"enabled","order":4,"description":"Can the recipe be used?","read_type":"boolean","write_type":"boolean","optional":false},{"name":"energy","order":10,"description":"Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.","read_type":"double","optional":false},{"name":"force","order":14,"description":"The force that owns this recipe.","read_type":"LuaForce","optional":false},{"name":"group","order":12,"description":"Group of this recipe.","read_type":"LuaGroup","optional":false},{"name":"hidden","order":8,"description":"Is the recipe hidden? Hidden recipes don't show up in the crafting menu.","read_type":"boolean","optional":false},{"name":"hidden_from_flow_stats","order":9,"description":"Is the recipe hidden from flow statistics?","read_type":"boolean","write_type":"boolean","optional":false},{"name":"ingredients","order":6,"description":"The ingredients to this recipe.","examples":["```\n-- The ingredients of \"advanced-oil-processing\" would look like this:\n{{type=\"fluid\", name=\"crude-oil\", amount=100}, {type=\"fluid\", name=\"water\", amount=50}}\n```"],"read_type":{"complex_type":"array","value":"Ingredient"},"optional":false},{"name":"localised_description","order":2,"description":"","read_type":"LocalisedString","optional":false},{"name":"localised_name","order":1,"description":"Localised name of the recipe.","read_type":"LocalisedString","optional":false},{"name":"name","order":0,"description":"Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.","read_type":"string","optional":false},{"name":"object_name","order":17,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"order","order":11,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","read_type":"string","optional":false},{"name":"productivity_bonus","order":15,"description":"The productivity bonus for this recipe.","read_type":"float","write_type":"float","optional":false},{"name":"products","order":7,"description":"The results/products of this recipe.","examples":["```\n-- The products of \"advanced-oil-processing\" would look like this:\n{{type=\"fluid\", name=\"heavy-oil\", amount=25}, {type=\"fluid\", name=\"light-oil\", amount=45}, {type=\"fluid\", name=\"petroleum-gas\", amount=55}}\n```"],"read_type":{"complex_type":"array","value":"Product"},"optional":false},{"name":"prototype","order":3,"description":"The prototype for this recipe.","read_type":"LuaRecipePrototype","optional":false},{"name":"subgroup","order":13,"description":"Subgroup of this recipe.","read_type":"LuaGroup","optional":false},{"name":"valid","order":16,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRecipeCategoryPrototype","order":100,"description":"Prototype of a recipe category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRecipePrototype","order":101,"description":"A crafting recipe prototype.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"allow_as_intermediate","order":13,"description":"If this recipe is enabled for the purpose of intermediate hand-crafting.","read_type":"boolean","optional":false},{"name":"allow_decomposition","order":18,"description":"Is this recipe allowed to be broken down for the recipe tooltip \"Total raw\" calculations?","read_type":"boolean","optional":false},{"name":"allow_inserter_overload","order":12,"description":"If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).","read_type":"boolean","optional":false},{"name":"allow_intermediates","order":14,"description":"If this recipe is allowed to use intermediate recipes when hand-crafting.","read_type":"boolean","optional":false},{"name":"allowed_effects","order":26,"description":"The allowed module effects for this recipe, if any.","read_type":{"complex_type":"dictionary","key":"string","value":"boolean"},"optional":true},{"name":"allowed_module_categories","order":27,"description":"The allowed module categories for this recipe, if any.","read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":true},{"name":"alternative_unlock_methods","order":30,"description":"Alternative technologies that can unlocked this recipe.","read_type":{"complex_type":"array","value":"LuaTechnologyPrototype"},"optional":true},{"name":"always_show_made_in","order":7,"description":"Should this recipe always show \"Made in\" in the tooltip?","read_type":"boolean","optional":false},{"name":"always_show_products","order":16,"description":"If the products are always shown in the recipe tooltip.","read_type":"boolean","optional":false},{"name":"category","order":1,"description":"Category of the recipe.","read_type":"string","optional":false},{"name":"crafting_machine_tints","order":31,"description":"","read_type":{"complex_type":"array","value":"Color"},"optional":false},{"name":"effect_limitation_messages","order":28,"description":"","read_type":{"complex_type":"array","value":"LocalisedString"},"optional":true},{"name":"emissions_multiplier","order":17,"description":"The emissions multiplier for this recipe.","read_type":"double","optional":false},{"name":"enabled","order":0,"description":"If this recipe prototype is enabled by default (enabled at the beginning of a game).","read_type":"boolean","optional":false},{"name":"energy","order":8,"description":"Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.","read_type":"double","optional":false},{"name":"hidden_from_flow_stats","order":5,"description":"Is the recipe hidden from flow statistics (item/fluid production statistics)?","read_type":"boolean","optional":false},{"name":"hidden_from_player_crafting","order":6,"description":"Is the recipe hidden from player crafting? The recipe will still show up for selection in machines.","read_type":"boolean","optional":false},{"name":"hide_from_flow_stats","order":21,"description":"","read_type":"boolean","optional":false},{"name":"hide_from_player_crafting","order":22,"description":"","read_type":"boolean","optional":false},{"name":"hide_from_signal_gui","order":20,"description":"Is this recipe is marked to be hidden from the signal GUI.","read_type":"boolean","optional":false},{"name":"ingredients","order":2,"description":"The ingredients to this recipe.","examples":["```\n-- The ingredients of \"advanced-oil-processing\" would look like this\n{{type=\"fluid\", name=\"crude-oil\", amount=100}, {type=\"fluid\", name=\"water\", amount=50}}\n```"],"read_type":{"complex_type":"array","value":"Ingredient"},"optional":false},{"name":"is_parameter","order":25,"description":"","read_type":"boolean","optional":false},{"name":"main_product","order":4,"description":"The main product of this recipe, if any.","read_type":"Product","optional":true},{"name":"maximum_productivity","order":11,"description":"The maximal productivity bonus that can be achieved with this recipe.","read_type":"double","optional":false},{"name":"object_name","order":33,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"overload_multiplier","order":10,"description":"Used to determine how many extra items are put into an assembling machine before it's considered \"full enough\".","read_type":"uint","optional":false},{"name":"preserve_products_in_machine_output","order":24,"description":"","read_type":"boolean","optional":false},{"name":"products","order":3,"description":"The results/products of this recipe.","examples":["```\n-- The products of \"advanced-oil-processing\" would look like this:\n{{type=\"fluid\", name=\"heavy-oil\", amount=25}, {type=\"fluid\", name=\"light-oil\", amount=45}, {type=\"fluid\", name=\"petroleum-gas\", amount=55}}\n```"],"read_type":{"complex_type":"array","value":"Product"},"optional":false},{"name":"request_paste_multiplier","order":9,"description":"The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.","read_type":"uint","optional":false},{"name":"show_amount_in_title","order":15,"description":"If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.","read_type":"boolean","optional":false},{"name":"surface_conditions","order":29,"description":"The surface conditions required to craft this recipe.","read_type":{"complex_type":"array","value":"SurfaceCondition"},"optional":true},{"name":"trash","order":23,"description":"The 'trash' items that this recipe might produce as a result of spoiling.","read_type":{"complex_type":"array","value":"LuaItemPrototype"},"optional":true},{"name":"unlock_results","order":19,"description":"Is this recipe unlocks the result item(s) so they're shown in filter-select GUIs.","read_type":"boolean","optional":false},{"name":"valid","order":32,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRecord","order":102,"description":"A reference to a record in the blueprint library. Records in the \"my blueprints\" shelf are read-only, but records in the \"game blueprints\" shelf are read/write.","abstract":false,"methods":[{"name":"build_blueprint","order":2,"description":"Build this blueprint at the given location.\n\nBuilt entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.","subclasses":["BlueprintRecord"],"parameters":[{"name":"build_mode","order":4,"description":"If `normal`, blueprint will not be built if any one thing can't be built. If `forced`, anything that can be built is built and obstructing nature entities will be deconstructed. If `superforced`, all obstructions will be deconstructed and the blueprint will be built.","type":"defines.build_mode","optional":true},{"name":"by_player","order":6,"description":"The player to use if any. If provided [defines.events.on_built_entity](runtime:defines.events.on_built_entity) will also be fired on successful entity creation.","type":"PlayerIdentification","optional":true},{"name":"direction","order":3,"description":"The direction to use when building","type":"defines.direction","optional":true},{"name":"force","order":1,"description":"Force to use for the building","type":"ForceID","optional":false},{"name":"position","order":2,"description":"The position to build at","type":"MapPosition","optional":false},{"name":"raise_built","order":7,"description":"If true; [defines.events.script_raised_built](runtime:defines.events.script_raised_built) will be fired on successful entity creation. Note: this is ignored if by_player is provided.","type":"boolean","optional":true},{"name":"skip_fog_of_war","order":5,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to build on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Array of created ghosts","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"cancel_deconstruct_area","order":18,"description":"Cancel deconstruct the given area with this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for canceling deconstruction","type":"ForceID","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":5,"description":"If the cancel deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to cancel deconstruct on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clear_blueprint","order":0,"description":"Clears this blueprint.","subclasses":["BlueprintRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_deconstruction_data","order":19,"description":"Clears all settings/filters on this deconstruction planner, resetting it to default values.","subclasses":["DeconstructionRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_upgrade_data","order":20,"description":"Clears all settings/filters on this upgrade planner, resetting it to default values.","subclasses":["UpgradeRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_blueprint","order":3,"description":"Sets up this blueprint using the found blueprintable entities/tiles on the surface.","subclasses":["BlueprintRecord"],"parameters":[{"name":"always_include_tiles","order":3,"description":"When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.","type":"boolean","optional":true},{"name":"area","order":2,"description":"The bounding box","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"Force to use for the creation","type":"ForceID","optional":false},{"name":"include_entities","order":4,"description":"When true, entities are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_fuel","order":8,"description":"When true, train fuel is included in the blueprint, Defaults to true.","type":"boolean","optional":true},{"name":"include_modules","order":5,"description":"When true, modules are included in the blueprint. Defaults to true.","type":"boolean","optional":true},{"name":"include_station_names","order":6,"description":"When true, station names are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"include_trains","order":7,"description":"When true, trains are included in the blueprint. Defaults to false.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to create from","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The blueprint entity index to source entity mapping.","type":{"complex_type":"dictionary","key":"uint","value":"LuaEntity"},"optional":false}]},{"name":"deconstruct_area","order":17,"description":"Deconstruct the given area with this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"area","order":2,"description":"The area to deconstruct","type":"BoundingBox","optional":false},{"name":"by_player","order":4,"description":"The player to use if any.","type":"PlayerIdentification","optional":true},{"name":"force","order":1,"description":"Force to use for the deconstruction","type":"ForceID","optional":false},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":5,"description":"If the deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true},{"name":"surface","order":0,"description":"Surface to deconstruct on","type":"SurfaceIdentification","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"get_blueprint_entities","order":8,"description":"The entities in this blueprint.","subclasses":["BlueprintRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":true}]},{"name":"get_blueprint_entity_count","order":12,"description":"Gets the number of entities in this blueprint blueprint.","subclasses":["BlueprintRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_blueprint_entity_tag","order":6,"description":"Gets the given tag on the given blueprint entity index in this blueprint blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to get.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":true}]},{"name":"get_blueprint_entity_tags","order":4,"description":"Gets the tags for the given blueprint entity index in this blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Tags","optional":false}]},{"name":"get_blueprint_tiles","order":10,"description":"A list of the tiles in this blueprint.","subclasses":["BlueprintRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"Tile"},"optional":true}]},{"name":"get_entity_filter","order":13,"description":"Gets the entity filter at the given index for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"get_mapper","order":21,"description":"Gets the filter at the given index for this upgrade item.\n\nIn contrast to [LuaRecord::set_mapper](runtime:LuaRecord::set_mapper), indices past the upgrade item's current size are considered to be out of bounds.","subclasses":["UpgradeRecord"],"parameters":[{"name":"index","order":0,"description":"The index of the mapper to read.","type":"uint","optional":false},{"name":"type","order":1,"description":"`\"from\"` or `\"to\"`.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"union","options":["UpgradeMapperSource","UpgradeMapperDestination"],"full_format":false},"optional":false}]},{"name":"get_tile_filter","order":15,"description":"Gets the tile filter at the given index for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":true}]},{"name":"is_blueprint_setup","order":1,"description":"Is this blueprint setup? I.e. is it a non-empty blueprint?","subclasses":["BlueprintRecord"],"parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"set_blueprint_entities","order":9,"description":"Set new entities to be a part of this blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"entities","order":0,"description":"The new blueprint entities.","type":{"complex_type":"array","value":"BlueprintEntity"},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_entity_tag","order":7,"description":"Sets the given tag on the given blueprint entity index in this blueprint blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"index","order":0,"description":"The entity index.","type":"uint","optional":false},{"name":"tag","order":1,"description":"The tag to set.","type":"string","optional":false},{"name":"value","order":2,"description":"The tag value to set or `nil` to clear the tag.","type":"AnyBasic","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_entity_tags","order":5,"description":"Sets the tags on the given blueprint entity index in this blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"index","order":0,"description":"The entity index","type":"uint","optional":false},{"name":"tags","order":1,"description":"","type":"Tags","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_blueprint_tiles","order":11,"description":"Set specific tiles in this blueprint.","subclasses":["BlueprintRecord"],"parameters":[{"name":"tiles","order":0,"description":"Tiles to be a part of the blueprint.","type":{"complex_type":"array","value":"Tile"},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_entity_filter","order":14,"description":"Sets the entity filter at the given index for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"filter","order":1,"description":"Writing `nil` removes the filter.","type":{"complex_type":"union","options":["string","LuaEntityPrototype","LuaEntity","nil"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the new filter was successfully set (ie. was valid).","type":"boolean","optional":false}]},{"name":"set_mapper","order":22,"description":"Sets the module filter at the given index for this upgrade item.\n\nIn contrast to [LuaRecord::get_mapper](runtime:LuaRecord::get_mapper), indices past the upgrade item's current size are valid and expand the list of mappings accordingly, if within reasonable bounds.","subclasses":["UpgradeRecord"],"parameters":[{"name":"index","order":0,"description":"The index of the mapper to set.","type":"uint","optional":false},{"name":"mapper","order":2,"description":"The mapper to set or `nil`","type":{"complex_type":"union","options":["UpgradeMapperSource","UpgradeMapperDestination"],"full_format":false},"optional":false},{"name":"type","order":1,"description":"`\"from\"` or `\"to\"`.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_tile_filter","order":16,"description":"Sets the tile filter at the given index for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"parameters":[{"name":"filter","order":1,"description":"Setting to nil erases the filter.","type":{"complex_type":"union","options":["string","LuaTilePrototype","LuaTile"],"full_format":false},"optional":false},{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the new filter was successfully set (ie. was valid).","type":"boolean","optional":false}]}],"attributes":[{"name":"blueprint_absolute_snapping","order":5,"description":"If absolute snapping is enabled on this blueprint.","subclasses":["BlueprintRecord"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"blueprint_position_relative_to_grid","order":4,"description":"The offset from the absolute grid. `nil` if absolute snapping is not enabled.","subclasses":["BlueprintRecord"],"read_type":"TilePosition","write_type":"TilePosition","optional":true},{"name":"blueprint_snap_to_grid","order":3,"description":"The snapping grid size in this blueprint. `nil` if snapping is not enabled.","subclasses":["BlueprintRecord"],"read_type":"TilePosition","write_type":"TilePosition","optional":true},{"name":"contents","order":8,"description":"The contents of this BlueprintBookRecord.","subclasses":["BlueprintBookRecord"],"read_type":{"complex_type":"array","value":"LuaRecord"},"optional":false},{"name":"cost_to_build","order":6,"description":"List of raw materials required to build this blueprint.","subclasses":["BlueprintRecord"],"read_type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false},{"name":"default_icons","order":7,"description":"The default icons for a blueprint blueprint.","subclasses":["BlueprintRecord"],"read_type":{"complex_type":"array","value":"BlueprintSignalIcon"},"optional":false},{"name":"entity_filter_count","order":15,"description":"The number of entity filters this deconstruction planner supports.","subclasses":["DeconstructionRecord"],"read_type":"uint","optional":false},{"name":"entity_filter_mode","order":11,"description":"The blacklist/whitelist entity filter mode for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"read_type":"defines.deconstruction_item.entity_filter_mode","write_type":"defines.deconstruction_item.entity_filter_mode","optional":false},{"name":"entity_filters","order":9,"description":"The entity filters for this deconstruction planner. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be entity prototype names that don't have the `\"not-deconstructable\"` flag set and are either a `cliff` or marked as `minable`.","subclasses":["DeconstructionRecord"],"read_type":{"complex_type":"array","value":"string"},"write_type":{"complex_type":"array","value":"string"},"optional":false},{"name":"is_blueprint_preview","order":2,"description":"Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read.","subclasses":["BlueprintRecord"],"read_type":"boolean","optional":false},{"name":"mapper_count","order":17,"description":"The current count of mappers in the upgrade item.","subclasses":["UpgradeRecord"],"read_type":"uint","optional":false},{"name":"object_name","order":19,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"tile_filter_count","order":16,"description":"The number of tile filters this deconstruction planner supports.","subclasses":["DeconstructionRecord"],"read_type":"uint","optional":false},{"name":"tile_filter_mode","order":12,"description":"The blacklist/whitelist tile filter mode for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"read_type":"defines.deconstruction_item.tile_filter_mode","write_type":"defines.deconstruction_item.tile_filter_mode","optional":false},{"name":"tile_filters","order":10,"description":"The tile filters for this deconstruction planner,. The attribute is a sparse array with the keys representing the index of the filter. Reading filters always returns an array of strings which are the tile prototype names.","subclasses":["DeconstructionRecord"],"read_type":{"complex_type":"array","value":"TileID"},"write_type":{"complex_type":"array","value":"TileID"},"optional":false},{"name":"tile_selection_mode","order":13,"description":"The tile selection mode for this deconstruction planner,.","subclasses":["DeconstructionRecord"],"read_type":"defines.deconstruction_item.tile_selection_mode","write_type":"defines.deconstruction_item.tile_selection_mode","optional":false},{"name":"trees_and_rocks_only","order":14,"description":"If this deconstruction planner, is set to allow trees and rocks only.","subclasses":["DeconstructionRecord"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"type","order":1,"description":"The type of this blueprint record.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"blueprint"},{"complex_type":"literal","value":"blueprint-book"},{"complex_type":"literal","value":"deconstruction-planner"},{"complex_type":"literal","value":"upgrade-planner"}],"full_format":false},"optional":false},{"name":"valid","order":18,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"valid_for_write","order":0,"description":"Is this record valid for writing? A record is invalid for write if it is a BlueprintRecord preview or if it is in the \"My blueprints\" shelf.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRemote","order":103,"description":"Registry of interfaces between scripts. An interface is simply a dictionary mapping names to functions. A script or mod can then register an interface with [LuaRemote](runtime:LuaRemote), after that any script can call the registered functions, provided it knows the interface name and the desired function name. An instance of LuaRemote is available through the global object named `remote`.","examples":["```\n-- Will register a remote interface containing two functions. Later, it will call these functions through `remote`.\nremote.add_interface(\"human interactor\",\n  {\n    hello = function() game.player.print(\"Hi!\") end,\n    bye = function(name) game.player.print(\"Bye \" .. name) end\n  })\n-- Some time later, possibly in a different mod...\nremote.call(\"human interactor\", \"hello\")\nremote.call(\"human interactor\", \"bye\", \"dear reader\")\n```"],"abstract":false,"methods":[{"name":"add_interface","order":0,"description":"Add a remote interface.","parameters":[{"name":"functions","order":1,"description":"List of functions that are members of the new interface.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"function","parameters":[]}},"optional":false},{"name":"name","order":0,"description":"Name of the interface. If the name matches any existing interface, an error is thrown.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"call","order":2,"description":"Call a function of an interface.\n\nProviding an unknown interface or function name will result in a script error.","parameters":[{"name":"function","order":1,"description":"Function name that belongs to the `interface`.","type":"string","optional":false},{"name":"interface","order":0,"description":"Interface to look up `function` in.","type":"string","optional":false}],"variadic_parameter":{"description":"Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.","type":"Any"},"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Any","optional":true}]},{"name":"remove_interface","order":1,"description":"Removes an interface with the given name.","parameters":[{"name":"name","order":0,"description":"Name of the interface.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the interface was removed. `false` if the interface didn't exist.","type":"boolean","optional":false}]}],"attributes":[{"name":"interfaces","order":1,"description":"List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.","examples":["```\n-- Assuming the \"human interactor\" interface is registered as above\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"hello\"]))        -- prints true\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"nonexistent\"]))  -- prints nil\n```"],"read_type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}}},"optional":false},{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaRenderObject","order":104,"description":"Reference to a single LuaRendering object.","abstract":false,"methods":[{"name":"bring_to_front","order":1,"description":"Reorder this object so that it is drawn in front of the already existing objects.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"destroy","order":0,"description":"Destroys this object. Does not error when the object is invalid.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"move_to_back","order":2,"description":"Reorder this object so that it is drawn in the back of the already existing objects.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"set_corners","order":4,"description":"Set the corners of the rectangle with this id.","subclasses":["Rectangle"],"parameters":[{"name":"left_top","order":0,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"right_bottom","order":1,"description":"","type":"ScriptRenderTarget","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_dashes","order":3,"description":"Set the length of the dashes and the length of the gaps in this line.","subclasses":["Line"],"parameters":[{"name":"dash_length","order":0,"description":"","type":"double","optional":false},{"name":"gap_length","order":1,"description":"","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"alignment","order":21,"description":"Alignment of this text.","subclasses":["Text"],"read_type":"TextAlign","write_type":"TextAlign","optional":false},{"name":"angle","order":32,"description":"Angle of this arc. Angle in radian.","subclasses":["Arc"],"read_type":"float","write_type":"float","optional":false},{"name":"animation","order":43,"description":"Animation prototype name of this animation.","subclasses":["Animation"],"read_type":"string","write_type":"string","optional":false},{"name":"animation_offset","order":45,"description":"Animation offset of this animation. Animation offset in frames.","subclasses":["Animation"],"read_type":"double","write_type":"double","optional":false},{"name":"animation_speed","order":44,"description":"Animation speed of this animation. Animation speed in frames per tick.","subclasses":["Animation"],"read_type":"double","write_type":"double","optional":false},{"name":"color","order":10,"description":"Color or tint of the object.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon","Sprite","Light","Animation"],"read_type":"Color","write_type":"Color","optional":false},{"name":"dash_length","order":14,"description":"Dash length of this line.","subclasses":["Line"],"read_type":"double","write_type":"double","optional":false},{"name":"draw_on_ground","order":7,"description":"If this object is being drawn on the ground, under most entities and sprites.","subclasses":["Text","Line","Circle","Rectangle","Arc","Polygon"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"filled","order":25,"description":"If this circle or rectangle is filled.","subclasses":["Circle","Rectangle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"font","order":20,"description":"Font of this text.","subclasses":["Text"],"read_type":"string","write_type":"string","optional":false},{"name":"forces","order":4,"description":"Forces for which this object is rendered or `nil` if visible to all forces. Writing nil or empty array will make object to be visible to all forces.","read_type":{"complex_type":"union","options":[{"complex_type":"array","value":"LuaForce"},"ForceSet"],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"array","value":"LuaForce"},"ForceSet"],"full_format":false},"optional":true},{"name":"from","order":12,"description":"Where this line is drawn from.","subclasses":["Line"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":false},{"name":"gap_length","order":15,"description":"Length of the gaps in this line.","subclasses":["Line"],"read_type":"double","write_type":"double","optional":false},{"name":"id","order":0,"description":"Unique identifier of this render object.","read_type":"uint64","optional":false},{"name":"intensity","order":40,"description":"Intensity of this light.","subclasses":["Light"],"read_type":"float","write_type":"float","optional":false},{"name":"left_top","order":27,"description":"Where top left corner of this rectangle is drawn.","subclasses":["Rectangle"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":false},{"name":"max_radius","order":29,"description":"Radius of the outer edge of this arc.","subclasses":["Arc"],"read_type":"double","write_type":"double","optional":false},{"name":"min_radius","order":30,"description":"Radius of the inner edge of this arc.","subclasses":["Arc"],"read_type":"double","write_type":"double","optional":false},{"name":"minimum_darkness","order":41,"description":"Minimum darkness at which this light is rendered.","subclasses":["Light"],"read_type":"float","write_type":"float","optional":false},{"name":"object_name","order":47,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"only_in_alt_mode","order":8,"description":"If this object is only rendered in alt-mode.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"orientation","order":17,"description":"Orientation of this object.\n\nPolygon vertices that are set to an entity will ignore this.","subclasses":["Text","Polygon","Sprite","Light","Animation"],"read_type":"RealOrientation","write_type":"RealOrientation","optional":false},{"name":"orientation_target","order":38,"description":"Target to which this object rotates so that it faces the target. Note that `orientation` is still applied to the object. Writing `nil` will clear the orientation_target. `nil` if no target.\n\nPolygon vertices that are set to an entity will ignore this.","subclasses":["Polygon","Sprite","Animation"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":true},{"name":"oriented","order":42,"description":"If this light is rendered with the same orientation as the target entity. Note that `orientation` is still applied to the sprite.","subclasses":["Light"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"oriented_offset","order":39,"description":"Offsets the center of the sprite or animation if `orientation_target` is given. This offset will rotate together with the sprite or animation.","subclasses":["Sprite","Animation"],"read_type":"Vector","write_type":"Vector","optional":false},{"name":"players","order":5,"description":"Players for which this object is visible or `nil` if visible to all players.","read_type":{"complex_type":"union","options":[{"complex_type":"array","value":"LuaPlayer"},{"complex_type":"array","value":"PlayerIdentification"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"array","value":"LuaPlayer"},{"complex_type":"array","value":"PlayerIdentification"}],"full_format":false},"optional":true},{"name":"radius","order":26,"description":"Radius of this circle.","subclasses":["Circle"],"read_type":"double","write_type":"double","optional":false},{"name":"render_layer","order":37,"description":"Render layer of this sprite or animation.","subclasses":["Sprite","Animation"],"read_type":"RenderLayer","write_type":"RenderLayer","optional":false},{"name":"right_bottom","order":28,"description":"Where bottom right corner of this rectangle is drawn.","subclasses":["Rectangle"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":false},{"name":"scale","order":18,"description":"Scale of the text or light.","subclasses":["Text","Light"],"read_type":"double","write_type":"double","optional":false},{"name":"scale_with_zoom","order":23,"description":"If this text scales with player zoom.","subclasses":["Text"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"sprite","order":34,"description":"Sprite of the sprite or light.","subclasses":["Sprite","Light"],"read_type":"SpritePath","write_type":"SpritePath","optional":false},{"name":"start_angle","order":31,"description":"Where this arc starts. Angle in radian.","subclasses":["Arc"],"read_type":"float","write_type":"float","optional":false},{"name":"surface","order":2,"description":"Surface this object is rendered on.","read_type":"LuaSurface","optional":false},{"name":"target","order":16,"description":"Where this object is drawn.\n\nPolygon vertices that are set to an entity will ignore this.","subclasses":["Text","Circle","Arc","Polygon","Sprite","Light","Animation"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":false},{"name":"text","order":19,"description":"Text that is displayed by this text object.","subclasses":["Text"],"read_type":"LocalisedString","write_type":"LocalisedString","optional":false},{"name":"time_to_live","order":3,"description":"Time to live of this object. This will be 0 if the object does not expire.","read_type":"uint","write_type":"uint","optional":false},{"name":"to","order":13,"description":"Where this line is drawn to.","subclasses":["Line"],"read_type":"ScriptRenderTarget","write_type":"ScriptRenderTarget","optional":false},{"name":"type","order":1,"description":"Type of this object.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"text"},{"complex_type":"literal","value":"line"},{"complex_type":"literal","value":"circle"},{"complex_type":"literal","value":"rectangle"},{"complex_type":"literal","value":"arc"},{"complex_type":"literal","value":"polygon"},{"complex_type":"literal","value":"sprite"},{"complex_type":"literal","value":"light"},{"complex_type":"literal","value":"animation"}],"full_format":false},"optional":false},{"name":"use_rich_text","order":24,"description":"If this text parses rich text tags.","subclasses":["Text"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"use_target_orientation","order":9,"description":"If this object uses the target orientation.","subclasses":["Sprite","Polygon","Animation"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":46,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vertical_alignment","order":22,"description":"Vertical alignment of this text.","subclasses":["Text"],"read_type":"VerticalTextAlign","write_type":"VerticalTextAlign","optional":false},{"name":"vertices","order":33,"description":"Vertices of this polygon.","subclasses":["Polygon"],"read_type":{"complex_type":"array","value":"ScriptRenderTarget"},"write_type":{"complex_type":"array","value":"ScriptRenderTarget"},"optional":false},{"name":"visible","order":6,"description":"If this object is rendered to anyone at all.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"width","order":11,"description":"Width of the object. Value is in pixels (32 per tile).","subclasses":["Line","Circle","Rectangle"],"read_type":"float","write_type":"float","optional":false},{"name":"x_scale","order":35,"description":"Horizontal scale of this sprite or animation.","subclasses":["Sprite","Animation"],"read_type":"double","write_type":"double","optional":false},{"name":"y_scale","order":36,"description":"Vertical scale of this sprite or animation.","subclasses":["Sprite","Animation"],"read_type":"double","write_type":"double","optional":false}],"operators":[]},{"name":"LuaRendering","order":105,"description":"Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. Each render object is identified by an id that is universally unique for the lifetime of a whole game.\n\nIf an entity target of an object is destroyed or changes surface, then the object is also destroyed.","abstract":false,"methods":[{"name":"clear","order":10,"description":"Destroys all render objects.","parameters":[{"name":"mod_name","order":0,"description":"If provided, only the render objects created by this mod are destroyed. An empty string (`\"\"`) refers to all objects not belonging to a mod, such as those created using console commands.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"draw_animation","order":8,"description":"Create an animation.","parameters":[{"name":"animation","order":0,"description":"Name of an [AnimationPrototype](prototype:AnimationPrototype).","type":"string","optional":false},{"name":"animation_offset","order":7,"description":"Offset of the animation in frames. Default is 0.","type":"double","optional":true},{"name":"animation_speed","order":6,"description":"How many frames the animation goes forward per tick. Default is 1.","type":"double","optional":true},{"name":"forces","order":14,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"only_in_alt_mode","order":17,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the animation. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":8,"description":"If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation.","type":"ScriptRenderTarget","optional":true},{"name":"oriented_offset","order":10,"description":"Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.","type":"Vector","optional":true},{"name":"players","order":15,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"render_layer","order":5,"description":"Render layer of the animation. Defaults to `\"arrow\"`.","type":"RenderLayer","optional":true},{"name":"surface","order":12,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":11,"description":"Center of the animation.","type":"ScriptRenderTarget","optional":false},{"name":"time_to_live","order":13,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"tint","order":4,"description":"","type":"Color","optional":true},{"name":"use_target_orientation","order":9,"description":"Only used if `orientation_target` is a LuaEntity.","type":"boolean","optional":true},{"name":"visible","order":16,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"x_scale","order":2,"description":"Horizontal scale of the animation. Default is 1.","type":"double","optional":true},{"name":"y_scale","order":3,"description":"Vertical scale of the animation. Default is 1.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_arc","order":4,"description":"Create an arc.","parameters":[{"name":"angle","order":4,"description":"The angle of the arc, in radian.","type":"float","optional":false},{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":11,"description":"If this should be drawn below sprites and entities. Defaults to false.","type":"boolean","optional":true},{"name":"forces","order":8,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"max_radius","order":1,"description":"The radius of the outer edge of the arc, in tiles.","type":"double","optional":false},{"name":"min_radius","order":2,"description":"The radius of the inner edge of the arc, in tiles.","type":"double","optional":false},{"name":"only_in_alt_mode","order":12,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":9,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"start_angle","order":3,"description":"Where the arc starts, in radian.","type":"float","optional":false},{"name":"surface","order":6,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":5,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"time_to_live","order":7,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":10,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_circle","order":2,"description":"Create a circle.","parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":10,"description":"If this should be drawn below sprites and entities. Defaults to false.","type":"boolean","optional":true},{"name":"filled","order":3,"description":"If the circle should be filled. Defaults to false.","type":"boolean","optional":true},{"name":"forces","order":7,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"only_in_alt_mode","order":11,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":8,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"radius","order":1,"description":"In tiles.","type":"double","optional":false},{"name":"surface","order":5,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":4,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"time_to_live","order":6,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":9,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":2,"description":"Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.","type":"float","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_light","order":7,"description":"Create a light.\n\nThe base game uses the utility sprites `light_medium` and `light_small` for lights.","parameters":[{"name":"color","order":6,"description":"Defaults to white (no tint).","type":"Color","optional":true},{"name":"forces","order":10,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"intensity","order":3,"description":"Default is 1.","type":"float","optional":true},{"name":"minimum_darkness","order":4,"description":"The minimum darkness at which this light is rendered. Default is 0.","type":"float","optional":true},{"name":"only_in_alt_mode","order":13,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the light. Default is 0.","type":"RealOrientation","optional":true},{"name":"oriented","order":5,"description":"If this light has the same orientation as the entity target, default is false. Note that `orientation` is still applied to the sprite.","type":"boolean","optional":true},{"name":"players","order":11,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"scale","order":2,"description":"Default is 1.","type":"float","optional":true},{"name":"sprite","order":0,"description":"","type":"SpritePath","optional":false},{"name":"surface","order":8,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":7,"description":"Center of the light.","type":"ScriptRenderTarget","optional":false},{"name":"time_to_live","order":9,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":12,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_line","order":0,"description":"Create a line.","examples":["```\n-- Draw a white and 2 pixel wide line from {0, 0} to {2, 2}.\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2}\n```","```\n-- Draw a red and 3 pixel wide line from {0, 0} to {0, 5}. The line has 1 tile long dashes and gaps.\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {0, 5}, color = {r = 1}, width = 3, gap_length = 1, dash_length = 1}\n```"],"parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"dash_length","order":3,"description":"Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.","type":"double","optional":true},{"name":"dash_offset","order":4,"description":"Starting offset to apply to dashes. Cannot be greater than dash_length + gap_length. Default is 0.","type":"double","optional":true},{"name":"draw_on_ground","order":12,"description":"If this should be drawn below sprites and entities. Defaults to false.","type":"boolean","optional":true},{"name":"forces","order":9,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"from","order":5,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"gap_length","order":2,"description":"Length of the gaps that this line has, in tiles. Default is 0.","type":"double","optional":true},{"name":"only_in_alt_mode","order":13,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":10,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"surface","order":7,"description":"","type":"SurfaceIdentification","optional":false},{"name":"time_to_live","order":8,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"to","order":6,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"visible","order":11,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":1,"description":"In pixels (32 per tile).","type":"float","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_polygon","order":5,"description":"Create a triangle mesh defined by a triangle strip.","parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":11,"description":"If this should be drawn below sprites and entities. Defaults to false.","type":"boolean","optional":true},{"name":"forces","order":8,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"only_in_alt_mode","order":12,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":3,"description":"The orientation applied to all vertices. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":4,"description":"If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that `orientation` is still applied.","type":"ScriptRenderTarget","optional":true},{"name":"players","order":9,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"surface","order":6,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":2,"description":"Acts like an offset applied to all vertices that are not set to an entity.","type":"ScriptRenderTarget","optional":true},{"name":"time_to_live","order":7,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"use_target_orientation","order":5,"description":"Only used if `orientation_target` is a LuaEntity.","type":"boolean","optional":true},{"name":"vertices","order":1,"description":"","type":{"complex_type":"array","value":"ScriptRenderTarget"},"optional":false},{"name":"visible","order":10,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_rectangle","order":3,"description":"Create a rectangle.","examples":["```\n-- Draw a white and 1 pixel wide square outline with the corners {0, 0} and {2, 2}.\nrendering.draw_rectangle{surface = game.player.surface, left_top = {0, 0}, right_bottom = {2, 2}, color = {1, 1, 1}}\n```"],"parameters":[{"name":"color","order":0,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":10,"description":"If this should be drawn below sprites and entities. Defaults to false.","type":"boolean","optional":true},{"name":"filled","order":2,"description":"If the rectangle should be filled. Defaults to false.","type":"boolean","optional":true},{"name":"forces","order":7,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"left_top","order":3,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"only_in_alt_mode","order":11,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"players","order":8,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"right_bottom","order":4,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"surface","order":5,"description":"","type":"SurfaceIdentification","optional":false},{"name":"time_to_live","order":6,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"visible","order":9,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"width","order":1,"description":"Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.","type":"float","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_sprite","order":6,"description":"Create a sprite.","examples":["```\n-- This will draw an iron plate icon at the character's feet. The sprite will move together with the character.\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = game.player.character, surface = game.player.surface}\n```","```\n-- This will draw an iron plate icon at the character's head. The sprite will move together with the character.\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}\n```"],"parameters":[{"name":"forces","order":12,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"only_in_alt_mode","order":15,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":1,"description":"The orientation of the sprite. Default is 0.","type":"RealOrientation","optional":true},{"name":"orientation_target","order":6,"description":"If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite.","type":"ScriptRenderTarget","optional":true},{"name":"oriented_offset","order":8,"description":"Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.","type":"Vector","optional":true},{"name":"players","order":13,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"render_layer","order":5,"description":"Render layer of the sprite. Defaults to `\"arrow\"`.","type":"RenderLayer","optional":true},{"name":"sprite","order":0,"description":"","type":"SpritePath","optional":false},{"name":"surface","order":10,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":9,"description":"Center of the sprite.","type":"ScriptRenderTarget","optional":false},{"name":"time_to_live","order":11,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"tint","order":4,"description":"","type":"Color","optional":true},{"name":"use_target_orientation","order":7,"description":"Only used if `orientation_target` is a LuaEntity.","type":"boolean","optional":true},{"name":"visible","order":14,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true},{"name":"x_scale","order":2,"description":"Horizontal scale of the sprite. Default is 1.","type":"double","optional":true},{"name":"y_scale","order":3,"description":"Vertical scale of the sprite. Default is 1.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"draw_text","order":1,"description":"Create a text.\n\nNot all fonts support scaling.","parameters":[{"name":"alignment","order":12,"description":"Defaults to \"left\".","type":"TextAlign","optional":true},{"name":"color","order":3,"description":"","type":"Color","optional":false},{"name":"draw_on_ground","order":10,"description":"If this should be drawn below sprites and entities. Rich text does not support this option. Defaults to false.","type":"boolean","optional":true},{"name":"font","order":5,"description":"Name of font to use. Defaults to the same font as flying-text.","type":"string","optional":true},{"name":"forces","order":7,"description":"The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.","type":"ForceSet","optional":true},{"name":"only_in_alt_mode","order":15,"description":"If this should only be rendered in alt mode. Defaults to false.","type":"boolean","optional":true},{"name":"orientation","order":11,"description":"The orientation of the text. Default is 0.","type":"RealOrientation","optional":true},{"name":"players","order":8,"description":"The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.","type":{"complex_type":"array","value":"PlayerIdentification"},"optional":true},{"name":"scale","order":4,"description":"","type":"double","optional":true},{"name":"scale_with_zoom","order":14,"description":"Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.","type":"boolean","optional":true},{"name":"surface","order":1,"description":"","type":"SurfaceIdentification","optional":false},{"name":"target","order":2,"description":"","type":"ScriptRenderTarget","optional":false},{"name":"text","order":0,"description":"The text to display.","type":"LocalisedString","optional":false},{"name":"time_to_live","order":6,"description":"In ticks. Defaults to living forever.","type":"uint","optional":true},{"name":"use_rich_text","order":16,"description":"If rich text rendering is enabled. Defaults to false.","type":"boolean","optional":true},{"name":"vertical_alignment","order":13,"description":"Defaults to \"top\".","type":"VerticalTextAlign","optional":true},{"name":"visible","order":9,"description":"If this is rendered to anyone at all. Defaults to true.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":false}]},{"name":"get_all_objects","order":9,"description":"Gets an array of all valid objects.","parameters":[{"name":"mod_name","order":0,"description":"If provided, get only the render objects created by this mod. An empty string (`\"\"`) refers to all objects not belonging to a mod, such as those created using console commands.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaRenderObject"},"optional":false}]},{"name":"get_object_by_id","order":11,"description":"Gives LuaRenderObject for given object ID. May return nil if object does not exist or is invalid.","parameters":[{"name":"object_id","order":0,"description":"","type":"uint64","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRenderObject","optional":true}]}],"attributes":[{"name":"object_name","order":0,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false}],"operators":[]},{"name":"LuaResourceCategoryPrototype","order":106,"description":"Prototype of a resource category.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRoboportControlBehavior","order":107,"description":"Control behavior for roboports.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"available_construction_output_signal","order":5,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"available_logistic_output_signal","order":3,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_items_mode","order":0,"description":"Selects contents that are to be read from the roboport","read_type":"defines.control_behavior.roboport.read_items_mode","write_type":"defines.control_behavior.roboport.read_items_mode","optional":false},{"name":"read_logistics","order":1,"description":"Legacy field, please use LuaRoboportControlBehavior::read_items_mode instead. `true` if the roboport should report the logistics network content to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_robot_stats","order":2,"description":"`true` if the roboport should report the robot statistics to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"roboport_count_output_signal","order":7,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"total_construction_output_signal","order":6,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"total_logistic_output_signal","order":4,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaRocketSiloControlBehavior","order":108,"description":"Control behavior for rocket silos.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_mode","order":0,"description":"The items read mode for the rocket silo.","read_type":"defines.control_behavior.rocket_silo.read_mode","write_type":"defines.control_behavior.rocket_silo.read_mode","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSelectorCombinatorControlBehavior","order":109,"description":"Control behavior for selector combinators.","parent":"LuaCombinatorControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"parameters","order":0,"description":"The selector combinator parameters. `parameters` may be `nil` in order to clear the parameters.","read_type":"SelectorCombinatorParameters","write_type":"SelectorCombinatorParameters","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSettings","order":110,"description":"Object containing mod settings of three distinct types: `startup`, `global`, and `player`. An instance of LuaSettings is available through the global object named `settings`.","abstract":false,"methods":[{"name":"get_player_settings","order":0,"description":"Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as [LuaPlayer::mod_settings](runtime:LuaPlayer::mod_settings). This table becomes invalid if its associated player does.\n\nEven though this attribute is a getter, individual settings can be changed by overwriting their [ModSetting](runtime:ModSetting) table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.","examples":["```\n-- Change the value of the \"active_lifestyle\" setting\nsettings.get_player_settings(player_index)[\"active_lifestyle\"] = {value = true}\n```"],"parameters":[{"name":"player","order":0,"description":"","type":"PlayerIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false}]}],"attributes":[{"name":"global","order":1,"description":"The current global mod settings, indexed by prototype name.\n\nEven though this attribute is marked as read-only, individual settings can be changed by overwriting their [ModSetting](runtime:ModSetting) table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false},{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player_default","order":2,"description":"The **default** player mod settings for this map, indexed by prototype name. Changing these settings only affects the default settings for future players joining the game.\n\nIndividual settings can be changed by overwriting their [ModSetting](runtime:ModSetting) table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false},{"name":"startup","order":0,"description":"The startup mod settings, indexed by prototype name.","read_type":{"complex_type":"LuaCustomTable","key":"string","value":"ModSetting"},"optional":false}],"operators":[]},{"name":"LuaShortcutPrototype","order":111,"description":"Prototype of a shortcut.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"action","order":0,"description":"","read_type":"string","optional":false},{"name":"associated_control_input","order":4,"description":"The control input that is associated with this shortcut, if any.","read_type":"string","optional":true},{"name":"item_to_spawn","order":1,"description":"The item to create when this shortcut is used, if any.","read_type":"LuaItemPrototype","optional":true},{"name":"object_name","order":6,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"technology_to_unlock","order":2,"description":"The technology that needs to be researched once (in any save) for this shortcut to be unlocked (in all saves).","read_type":"LuaTechnologyPrototype","optional":true},{"name":"toggleable","order":3,"description":"","read_type":"boolean","optional":false},{"name":"valid","order":5,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSimulation","order":112,"description":"Functions for use during simulations. This object cannot be saved, and cannot be used outside of a simulation.\n\nThe simulation object instance can be obtained from [LuaGameScript::simulation](runtime:LuaGameScript::simulation).","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSpaceConnectionPrototype","order":113,"description":"Prototype of a space connection.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"asteroid_spawn_definitions","order":3,"description":"","read_type":{"complex_type":"array","value":"SpaceConnectionAsteroidSpawnDefinition"},"optional":true},{"name":"from","order":0,"description":"","read_type":"LuaSpaceLocationPrototype","optional":false},{"name":"length","order":2,"description":"","read_type":"uint","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"to","order":1,"description":"","read_type":"LuaSpaceLocationPrototype","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSpaceLocationPrototype","order":114,"description":"Prototype of a space location, such as a planet.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"asteroid_spawn_definitions","order":3,"description":"","read_type":{"complex_type":"array","value":"SpaceLocationAsteroidSpawnDefinition"},"optional":true},{"name":"asteroid_spawn_influence","order":2,"description":"","read_type":"double","optional":false},{"name":"entities_require_heating","order":6,"description":"","subclasses":["Planet"],"read_type":"boolean","optional":true},{"name":"map_gen_settings","order":5,"description":"","subclasses":["Planet"],"read_type":"MapGenSettings","optional":true},{"name":"map_seed_offset","order":4,"description":"","subclasses":["Planet"],"read_type":"uint","optional":true},{"name":"object_name","order":12,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player_effects","order":8,"description":"","subclasses":["Planet"],"read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"pollutant_type","order":7,"description":"","subclasses":["Planet"],"read_type":"LuaAirbornePollutantPrototype","optional":true},{"name":"position","order":0,"description":"","read_type":"MapPosition","optional":false},{"name":"solar_power_in_space","order":1,"description":"","read_type":"double","optional":false},{"name":"surface_properties","order":10,"description":"A mapping of the surface property name to the value.","subclasses":["Planet"],"read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":true},{"name":"ticks_between_player_effects","order":9,"description":"","subclasses":["Planet"],"read_type":"uint","optional":true},{"name":"valid","order":11,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSpacePlatform","order":115,"description":"A space platform.","abstract":false,"methods":[{"name":"apply_starter_pack","order":2,"description":"Applies the starter pack for this platform if it hasn't already been applied.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The platform hub.","type":"LuaEntity","optional":true}]},{"name":"cancel_deletion","order":1,"description":"Cancels deletion of this space platform if it was scheduled for deletion.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_asteroid_chunks","order":6,"description":"Creates the given asteroid chunks on this platform.","parameters":[{"name":"asteroid_chunks","order":0,"description":"","type":{"complex_type":"array","value":"AsteroidChunk"},"optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"damage_tile","order":3,"description":"Damages the given tile if it exists, the chunk is generated, and it is a platform foundation tile.","parameters":[{"name":"cause","order":2,"description":"","type":"LuaEntity","optional":true},{"name":"damage","order":1,"description":"","type":"float","optional":false},{"name":"position","order":0,"description":"","type":"TilePosition","optional":false}],"format":{"takes_table":true,"table_optional":true},"return_values":[]},{"name":"destroy","order":0,"description":"Schedules this space platform for deletion.","parameters":[{"name":"ticks","order":0,"description":"The number of ticks from now when this platform will be deleted.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"destroy_asteroid_chunks","order":5,"description":"Destroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"invert","order":4,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":3,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["AsteroidChunkID",{"complex_type":"array","value":"AsteroidChunkID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"MapPosition","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"find_asteroid_chunks_filtered","order":7,"description":"Find asteroid chunks of a given name in a given area.\n\nIf no filters are given, returns all asteroid chunks in the search area. If multiple filters are specified, returns only asteroid chunks matching every given filter. If no area and no position are given, the entire surface is searched.","examples":["```\ngame.surfaces[1].find_asteroid_chunks_filtered{area = {{-10, -10}, {10, 10}}, name = \"carbonic-asteroid\"} -- gets all asteroids with the given name in the rectangle\ngame.surfaces[1].find_asteroid_chunks_filtered{area = {{-10, -10}, {10, 10}}, limit = 5}  -- gets the first 5 asteroid chunks in the rectangle\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"invert","order":4,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":3,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["AsteroidChunkID",{"complex_type":"array","value":"AsteroidChunkID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"MapPosition","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"AsteroidChunk"},"optional":false}]},{"name":"repair_tile","order":4,"description":"Repairs the given tile if it's damaged.","parameters":[{"name":"amount","order":1,"description":"","type":"float","optional":true},{"name":"position","order":0,"description":"","type":"TilePosition","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"damaged_tiles","order":12,"description":"The damaged tiles on this platform.","read_type":{"complex_type":"array","value":{"complex_type":"table","parameters":[{"name":"damage","order":1,"description":"","type":"float","optional":false},{"name":"position","order":0,"description":"","type":"TilePosition","optional":false}]}},"optional":false},{"name":"force","order":0,"description":"The force of this space platform.","read_type":"LuaForce","optional":false},{"name":"hub","order":7,"description":"The hub on this platform. `nil` if the platform has not had the starter pack applied or hub was destroyed but the platform not yet deleted.\n\nIf the hub is destroyed the platform will be deleted at the end of the tick but is otherwise valid to use until that point.","read_type":"LuaEntity","optional":true},{"name":"index","order":2,"description":"The unique index of this space platform.","read_type":"uint","optional":false},{"name":"name","order":1,"description":"The name of this space platform.","read_type":"string","optional":false},{"name":"object_name","order":14,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"schedule","order":8,"description":"This platform's current schedule, if any. Set to `nil` to clear.\n\nThe schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.","read_type":"PlatformSchedule","write_type":"PlatformSchedule","optional":true},{"name":"scheduled_for_deletion","order":10,"description":"If this platform is scheduled for deletion.\n\nReturns how many ticks are left before the platform will be deleted. 0 if not scheduled for deletion.","read_type":"uint","optional":false},{"name":"space_location","order":3,"description":"The space location this space platform is stopped at or `nil`.","read_type":"LuaSpaceLocationPrototype","optional":false},{"name":"speed","order":9,"description":"","read_type":"double","write_type":"double","optional":false},{"name":"starter_pack","order":5,"description":"The starter pack used to create this space platform.","read_type":"LuaItemPrototype","optional":false},{"name":"state","order":4,"description":"The current state of this space platform.","read_type":"defines.space_platform_state","optional":false},{"name":"surface","order":6,"description":"The surface that belongs to this platform (if it has been created yet).","read_type":"LuaSurface","optional":false},{"name":"valid","order":13,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"weight","order":11,"description":"The total weight of the platform.","read_type":"uint","optional":false}],"operators":[]},{"name":"LuaSpacePlatformHubControlBehavior","order":116,"description":"Control behavior for space platform hubs","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"damage_taken_signal","order":7,"description":"Signal to be transmitted with platform's damage taken value.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"object_name","order":9,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_contents","order":0,"description":"`true` if this hub is sending its content to a circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_damage_taken","order":6,"description":"Whether damage taken by the space platform is sent to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_moving_from","order":2,"description":"Whether current connection \"from\" end is sent to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_moving_to","order":3,"description":"Whether current connection \"to\" end is sent to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_speed","order":4,"description":"Whether current speed of space platform is sent to circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"send_to_platform","order":1,"description":"Whether the signals are used for circuit conditions in the platform's schedule","read_type":"boolean","write_type":"boolean","optional":false},{"name":"speed_signal","order":5,"description":"Signal to be transmitted with platform's current speed.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"valid","order":8,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaStorageTankControlBehavior","order":117,"description":"Control behavior for storage tanks.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_contents","order":0,"description":"If the storage tank content is sent to circuit network","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaStyle","order":118,"description":"Style of a GUI element. All of the attributes listed here may be `nil` if not available for a particular GUI element.","abstract":false,"methods":[],"attributes":[{"name":"badge_font","order":57,"description":"","subclasses":["TabStyle"],"read_type":"string","write_type":"string","optional":false},{"name":"badge_horizontal_spacing","order":58,"description":"","subclasses":["TabStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"bar_width","order":42,"description":"","subclasses":["LuaProgressBarStyle"],"read_type":"uint","write_type":"uint","optional":false},{"name":"bottom_cell_padding","order":22,"description":"Space between the table cell contents bottom and border.","subclasses":["LuaTableStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"bottom_margin","order":14,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"bottom_padding","order":10,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"cell_padding","order":67,"description":"Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.","subclasses":["LuaTableStyle"],"write_type":"int","optional":false},{"name":"clicked_font_color","order":30,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"clicked_vertical_offset","order":33,"description":"","subclasses":["LuaButtonStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"color","order":43,"description":"","subclasses":["LuaProgressBarStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"column_alignments","order":44,"description":"Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:","examples":["```\ntable_element.style.column_alignments[1] = \"center\"\n```"],"read_type":{"complex_type":"LuaCustomTable","key":"uint","value":"Alignment"},"optional":false},{"name":"default_badge_font_color","order":59,"description":"","subclasses":["TabStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"disabled_badge_font_color","order":61,"description":"","subclasses":["TabStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"disabled_font_color","order":31,"description":"","subclasses":["LuaButtonStyle","LuaTabStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"draw_grayscale_picture","order":38,"description":"","subclasses":["LuaButtonStyle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"extra_bottom_margin_when_activated","order":51,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_bottom_padding_when_activated","order":47,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_left_margin_when_activated","order":52,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_left_padding_when_activated","order":48,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_margin_when_activated","order":55,"description":"Sets `extra_top/right/bottom/left_margin_when_activated` to this value.\n\nAn array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.","write_type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false},{"name":"extra_padding_when_activated","order":54,"description":"Sets `extra_top/right/bottom/left_padding_when_activated` to this value.\n\nAn array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.","write_type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false},{"name":"extra_right_margin_when_activated","order":53,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_right_padding_when_activated","order":49,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_top_margin_when_activated","order":50,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"extra_top_padding_when_activated","order":46,"description":"","subclasses":["ScrollPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"font","order":19,"description":"","read_type":"string","write_type":"string","optional":false},{"name":"font_color","order":18,"description":"","read_type":"Color","write_type":"Color","optional":false},{"name":"gui","order":0,"description":"Gui of the [LuaGuiElement](runtime:LuaGuiElement) of this style.","read_type":"LuaGui","optional":false},{"name":"height","order":63,"description":"Sets both minimal and maximal height to the given value.","write_type":"int","optional":false},{"name":"horizontal_align","order":16,"description":"Horizontal align of the inner content of the widget, if any.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"center"},{"complex_type":"literal","value":"right"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left"},{"complex_type":"literal","value":"center"},{"complex_type":"literal","value":"right"}],"full_format":false},"optional":true},{"name":"horizontal_spacing","order":39,"description":"Horizontal space between individual cells.","subclasses":["LuaTableStyle","LuaFlowStyle","LuaHorizontalFlowStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"horizontally_squashable","order":26,"description":"Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing.\n\nThis is mainly meant to be used for scroll-pane. The default value is false.","read_type":"boolean","write_type":"boolean","optional":true},{"name":"horizontally_stretchable","order":24,"description":"Whether the GUI element stretches its size horizontally to other elements. `nil` if this element does not support stretching.","read_type":"boolean","write_type":"boolean","optional":true},{"name":"hovered_font_color","order":29,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"left_cell_padding","order":23,"description":"Space between the table cell contents left and border.","subclasses":["LuaTableStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"left_margin","order":15,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"left_padding","order":11,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"margin","order":66,"description":"Sets top/right/bottom/left margins to this value.\n\nAn array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.","write_type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false},{"name":"maximal_height","order":5,"description":"Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.","read_type":"int","write_type":"int","optional":false},{"name":"maximal_width","order":3,"description":"Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.","read_type":"int","write_type":"int","optional":false},{"name":"minimal_height","order":4,"description":"Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.","read_type":"int","write_type":"int","optional":false},{"name":"minimal_width","order":2,"description":"Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.","read_type":"int","write_type":"int","optional":false},{"name":"name","order":1,"description":"Name of this style.","read_type":"string","optional":false},{"name":"natural_height","order":7,"description":"Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.","read_type":"int","write_type":"int","optional":false},{"name":"natural_width","order":6,"description":"Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.","read_type":"int","write_type":"int","optional":false},{"name":"object_name","order":69,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"padding","order":65,"description":"Sets top/right/bottom/left paddings to this value.\n\nAn array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.","write_type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false},{"name":"pie_progress_color","order":32,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"rich_text_setting","order":28,"description":"How this GUI element handles rich text.","subclasses":["LuaLabelStyle","LuaTextBoxStyle","LuaTextFieldStyle"],"read_type":"defines.rich_text_setting","write_type":"defines.rich_text_setting","optional":false},{"name":"right_cell_padding","order":21,"description":"Space between the table cell contents right and border.","subclasses":["LuaTableStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"right_margin","order":13,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"right_padding","order":9,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"selected_badge_font_color","order":60,"description":"","subclasses":["TabStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"selected_clicked_font_color","order":36,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"selected_font_color","order":34,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"selected_hovered_font_color","order":35,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"single_line","order":45,"description":"","subclasses":["LabelStyle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"size","order":64,"description":"Sets both width and height to the given value. Also accepts an array with two values, setting width to the first and height to the second one.","write_type":{"complex_type":"union","options":["int",{"complex_type":"array","value":"int"}],"full_format":false},"optional":false},{"name":"stretch_image_to_widget_size","order":56,"description":"","subclasses":["ImageStyle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"strikethrough_color","order":37,"description":"","subclasses":["LuaButtonStyle"],"read_type":"Color","write_type":"Color","optional":false},{"name":"top_cell_padding","order":20,"description":"Space between the table cell contents top and border.","subclasses":["LuaTableStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"top_margin","order":12,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"top_padding","order":8,"description":"","read_type":"int","write_type":"int","optional":false},{"name":"use_header_filler","order":41,"description":"","subclasses":["LuaFrameStyle"],"read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":68,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vertical_align","order":17,"description":"Vertical align of the inner content of the widget, if any.","read_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"top"},{"complex_type":"literal","value":"center"},{"complex_type":"literal","value":"bottom"}],"full_format":false},"write_type":{"complex_type":"union","options":[{"complex_type":"literal","value":"top"},{"complex_type":"literal","value":"center"},{"complex_type":"literal","value":"bottom"}],"full_format":false},"optional":true},{"name":"vertical_spacing","order":40,"description":"Vertical space between individual cells.","subclasses":["LuaTableStyle","LuaFlowStyle","LuaVerticalFlowStyle","LuaTabbedPaneStyle"],"read_type":"int","write_type":"int","optional":false},{"name":"vertically_squashable","order":27,"description":"Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing.\n\nThis is mainly meant to be used for scroll-pane. The default (parent) value for scroll pane is true, false otherwise.","read_type":"boolean","write_type":"boolean","optional":true},{"name":"vertically_stretchable","order":25,"description":"Whether the GUI element stretches its size vertically to other elements. `nil` if this element does not support stretching.","read_type":"boolean","write_type":"boolean","optional":true},{"name":"width","order":62,"description":"Sets both minimal and maximal width to the given value.","write_type":"int","optional":false}],"operators":[]},{"name":"LuaSurface","order":119,"description":"A \"domain\" of the world. Surfaces can only be created and deleted through the API. Surfaces are uniquely identified by their name. Every game contains at least the surface \"nauvis\".","abstract":false,"methods":[{"name":"add_script_area","order":61,"description":"Adds the given script area.","parameters":[{"name":"area","order":0,"description":"","type":"ScriptArea","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The id of the created area.","type":"uint","optional":false}]},{"name":"add_script_position","order":66,"description":"Adds the given script position.","parameters":[{"name":"position","order":0,"description":"","type":"ScriptPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The id of the created position.","type":"uint","optional":false}]},{"name":"build_checkerboard","order":76,"description":"Sets the given area to the checkerboard lab tiles.","parameters":[{"name":"area","order":0,"description":"The tile area.","type":"BoundingBox","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"build_enemy_base","order":21,"description":"Send a group to build a new base.\n\nThe specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`.","parameters":[{"name":"force","order":2,"description":"Force the new base will belong to. Defaults to enemy.","type":"ForceID","optional":true},{"name":"position","order":0,"description":"Location of the new base.","type":"MapPosition","optional":false},{"name":"unit_count","order":1,"description":"Number of biters to send for the base-building task.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"calculate_tile_properties","order":74,"description":"Calculate values for a list of tile properties at a list of positions. Requests for unrecognized properties will be ignored, so this can also be used to test whether those properties exist.","parameters":[{"name":"positions","order":1,"description":"Positions for which to calculate property values.","type":{"complex_type":"array","value":"MapPosition"},"optional":false},{"name":"property_names","order":0,"description":"Names of properties (`\"elevation\"`, etc) to calculate.","type":{"complex_type":"array","value":"string"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Table of property value lists, keyed by property name.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"array","value":"double"}},"optional":false}]},{"name":"can_fast_replace","order":2,"description":"If there exists an entity at the given location that can be fast-replaced with the given entity parameters.","parameters":[{"name":"direction","order":2,"description":"Direction the entity would be placed. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"force","order":3,"description":"The force that would place the entity. Defaults to the `\"neutral\"` force.","type":"ForceID","optional":true},{"name":"name","order":0,"description":"Name of the entity to check.","type":"string","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_place_entity","order":1,"description":"Check for collisions with terrain or other entities.","parameters":[{"name":"build_check_type","order":4,"description":"Which type of check should be carried out. Defaults to `ghost_revive`.","type":"defines.build_check_type","optional":true},{"name":"direction","order":2,"description":"Direction of the placed entity. Defaults to `north`.","type":"defines.direction","optional":true},{"name":"force","order":3,"description":"The force that would place the entity. Defaults to the `\"neutral\"` force.","type":"ForceID","optional":true},{"name":"forced","order":5,"description":"If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`. Defaults to `false`.","type":"boolean","optional":true},{"name":"inner_name","order":6,"description":"The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.","type":"string","optional":true},{"name":"name","order":0,"description":"Name of the entity prototype to check.","type":"string","optional":false},{"name":"position","order":1,"description":"Where the entity would be placed.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"cancel_deconstruct_area","order":34,"description":"Cancel a deconstruction order.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised for every entity whose deconstruction has been successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to cancel deconstruction orders in.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose deconstruction orders to cancel.","type":"ForceID","optional":false},{"name":"item","order":4,"description":"The deconstruction item to use if any.","type":"LuaItemStack","optional":true},{"name":"item_index","order":5,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.","type":"uint","optional":true},{"name":"player","order":2,"description":"The player to set the last_user to, if any.  Also the player whose undo queue this action should be added to.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":6,"description":"If the cancel deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"cancel_upgrade_area","order":36,"description":"Cancel a upgrade order.","raises":[{"name":"on_cancelled_upgrade","order":0,"description":"Raised for every entity whose upgrade has been successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to cancel upgrade orders in.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose upgrade orders to cancel.","type":"ForceID","optional":false},{"name":"item","order":4,"description":"The upgrade item to use.","type":"LuaItemStack","optional":false},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clear","order":56,"description":"Clears this surface deleting all entities and chunks on it.","raises":[{"name":"on_pre_surface_cleared","order":0,"description":"","timeframe":"future_tick","optional":false},{"name":"on_surface_cleared","order":1,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"ignore_characters","order":0,"description":"Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed). Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"clear_hidden_tiles","order":82,"description":"Completly removes hidden and double hidden tiles data on this surface.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_pollution","order":49,"description":"Clears all pollution on this surface.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clone_area","order":53,"description":"Clones the given area.\n\nEntities are cloned in an order such that they can always be created, eg rails before trains.","raises":[{"name":"on_area_cloned","order":1,"description":"Raised after the individual `on_entity_cloned` events.","timeframe":"instantly","optional":false},{"name":"on_entity_cloned","order":0,"description":"Raised for every entity that was cloned.","timeframe":"instantly","optional":false}],"parameters":[{"name":"clear_destination_decoratives","order":8,"description":"If the destination decoratives should be cleared","type":"boolean","optional":true},{"name":"clear_destination_entities","order":7,"description":"If the destination entities should be cleared","type":"boolean","optional":true},{"name":"clone_decoratives","order":6,"description":"If decoratives should be cloned","type":"boolean","optional":true},{"name":"clone_entities","order":5,"description":"If entities should be cloned","type":"boolean","optional":true},{"name":"clone_tiles","order":4,"description":"If tiles should be cloned","type":"boolean","optional":true},{"name":"create_build_effect_smoke","order":10,"description":"If true, the building effect smoke will be shown around the new entities. Defaults to `false`.","type":"boolean","optional":true},{"name":"destination_area","order":1,"description":"","type":"BoundingBox","optional":false},{"name":"destination_force","order":3,"description":"","type":"ForceID","optional":true},{"name":"destination_surface","order":2,"description":"","type":"SurfaceIdentification","optional":true},{"name":"expand_map","order":9,"description":"If the destination surface should be expanded when destination_area is outside current bounds. Defaults to `false`.","type":"boolean","optional":true},{"name":"source_area","order":0,"description":"","type":"BoundingBox","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clone_brush","order":54,"description":"Clones the given area.\n\n[defines.events.on_entity_cloned](runtime:defines.events.on_entity_cloned) is raised for each entity, and then [defines.events.on_area_cloned](runtime:defines.events.on_area_cloned) is raised.\n\nEntities are cloned in an order such that they can always be created, eg rails before trains.","parameters":[{"name":"clear_destination_decoratives","order":9,"description":"If the destination decoratives should be cleared","type":"boolean","optional":true},{"name":"clear_destination_entities","order":8,"description":"If the destination entities should be cleared","type":"boolean","optional":true},{"name":"clone_decoratives","order":7,"description":"If decoratives should be cloned","type":"boolean","optional":true},{"name":"clone_entities","order":6,"description":"If entities should be cloned","type":"boolean","optional":true},{"name":"clone_tiles","order":5,"description":"If tiles should be cloned","type":"boolean","optional":true},{"name":"create_build_effect_smoke","order":12,"description":"If true, the building effect smoke will be shown around the new entities.","type":"boolean","optional":true},{"name":"destination_force","order":4,"description":"","type":{"complex_type":"union","options":["LuaForce","string"],"full_format":false},"optional":true},{"name":"destination_offset","order":1,"description":"","type":"TilePosition","optional":false},{"name":"destination_surface","order":3,"description":"","type":"SurfaceIdentification","optional":true},{"name":"expand_map","order":10,"description":"If the destination surface should be expanded when destination_area is outside current bounds. Defaults to `false`.","type":"boolean","optional":true},{"name":"manual_collision_mode","order":11,"description":"If manual-style collision checks should be done.","type":"boolean","optional":true},{"name":"source_offset","order":0,"description":"","type":"TilePosition","optional":false},{"name":"source_positions","order":2,"description":"","type":{"complex_type":"array","value":"TilePosition"},"optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"clone_entities","order":55,"description":"Clones the given entities.\n\nEntities are cloned in an order such that they can always be created, eg rails before trains.","raises":[{"name":"on_entity_cloned","order":0,"description":"Raised for every entity that was cloned.","timeframe":"instantly","optional":false}],"parameters":[{"name":"create_build_effect_smoke","order":5,"description":"If true, the building effect smoke will be shown around the new entities.","type":"boolean","optional":true},{"name":"destination_force","order":3,"description":"","type":"ForceID","optional":true},{"name":"destination_offset","order":1,"description":"","type":"Vector","optional":false},{"name":"destination_surface","order":2,"description":"","type":"SurfaceIdentification","optional":true},{"name":"entities","order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"snap_to_grid","order":4,"description":"","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"count_entities_filtered","order":7,"description":"Count entities of given type or name in a given area. Works just like [LuaSurface::find_entities_filtered](runtime:LuaSurface::find_entities_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.\n\n- If no `area` or `position` are given, the entire surface is searched.\n\n- If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).\n\n- If `position` and `radius` are given, this returns entities in the radius of the position.\n\n- If `area` is specified, this returns entities colliding with that area.","parameters":[{"name":"filter","order":0,"description":"","type":"EntitySearchFilters","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"count_tiles_filtered","order":8,"description":"Count tiles of a given name in a given area. Works just like [LuaSurface::find_tiles_filtered](runtime:LuaSurface::find_tiles_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.\n\nIf no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.","parameters":[{"name":"filter","order":0,"description":"","type":"TileSearchFilters","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"create_decoratives","order":47,"description":"Adds the given decoratives to the surface.\n\nThis will merge decoratives of the same type that already exist effectively increasing the \"amount\" field.","parameters":[{"name":"check_collision","order":0,"description":"If collision should be checked against entities/tiles.","type":"boolean","optional":true},{"name":"decoratives","order":1,"description":"","type":{"complex_type":"array","value":"Decorative"},"optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"create_entity","order":17,"description":"Create an entity on this surface.","examples":["```\nlocal asm = game.surfaces[1].create_entity{name = \"assembling-machine-1\", position = {15, 3}, force = game.forces.player, recipe = \"iron-stick\"}\n```","```\n-- Creates a filter inserter with circuit conditions and a filter\ngame.surfaces[1].create_entity{\n  name = \"filter-inserter\", position = {20, 15}, force = game.player.force,\n  conditions =\n  {\n    red = {name = \"wood\", count = 3, operator = \">\"},\n    green = {name = \"iron-ore\", count = 1, operator = \"<\"},\n    logistics = {name = \"wood\", count = 3, operator = \"=\"}\n  },\n  filters = {{index = 1, name = \"iron-ore\"}}\n}\n```","```\n-- Creates a requester chest already set to request 128 iron plates.\ngame.surfaces[1].create_entity{\n  name = \"requester-chest\", position = {game.player.position.x+3, game.player.position.y},\n  force = game.player.force, request_filters = {{index = 1, name = \"iron-plate\", count = 128}}\n}\n```","```\ngame.surfaces[1].create_entity{name = \"big-biter\", position = {15, 3}, force = game.forces.player} -- Friendly biter\ngame.surfaces[1].create_entity{name = \"medium-biter\", position = {15, 3}, force = game.forces.enemy} -- Enemy biter\n```","```\n-- Creates a basic inserter at the player's location facing north\ngame.surfaces[1].create_entity{name = \"inserter\", position = game.player.position, direction = defines.direction.north}\n```"],"raises":[{"name":"script_raised_built","order":0,"description":"Raised if the `raise_built` flag was set and the entity was successfully created.","timeframe":"instantly","optional":true}],"parameters":[{"name":"cause","order":7,"description":"Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against.","type":{"complex_type":"union","options":["LuaEntity","ForceID"],"full_format":false},"optional":true},{"name":"character","order":12,"description":"If fast_replace is true simulate fast replace using this character.","type":"LuaEntity","optional":true},{"name":"create_build_effect_smoke","order":15,"description":"If false, the building effect smoke will not be shown around the new entity. Defaults to `true`.","type":"boolean","optional":true},{"name":"direction","order":2,"description":"Desired orientation of the entity after creation.","type":"defines.direction","optional":true},{"name":"fast_replace","order":9,"description":"If true, building will attempt to simulate fast-replace building. Defaults to `false`.","type":"boolean","optional":true},{"name":"force","order":4,"description":"Force of the entity, default is enemy.","type":"ForceID","optional":true},{"name":"item","order":18,"description":"If provided, the entity will attempt to pull stored values from this item (for example; creating a spidertron from a previously named and mined spidertron)","type":"LuaItemStack","optional":true},{"name":"item_index","order":10,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.","type":"uint","optional":true},{"name":"move_stuck_players","order":17,"description":"If true, any characters that are in the way of the entity are teleported out of the way.","type":"boolean","optional":true},{"name":"name","order":0,"description":"The entity prototype name to create.","type":"EntityID","optional":false},{"name":"player","order":11,"description":"If given set the last_user to this player. If fast_replace is true simulate fast replace using this player. Also the player whose undo queue this action should be added to.","type":"PlayerIdentification","optional":true},{"name":"position","order":1,"description":"Where to create the entity.","type":"MapPosition","optional":false},{"name":"preserve_ghosts_and_corpses","order":19,"description":"If true, colliding ghosts and corpses will not be removed by the creation of some entity types. Defaults to `false`.","type":"boolean","optional":true},{"name":"quality","order":3,"description":"Quality of the entity to be created. Defaults to `normal`.","type":"QualityID","optional":true},{"name":"raise_built","order":14,"description":"If true; [defines.events.script_raised_built](runtime:defines.events.script_raised_built) will be fired on successful entity creation. Defaults to `false`.","type":"boolean","optional":true},{"name":"snap_to_grid","order":8,"description":"If false the exact position given is used to instead of snapping to the normal entity grid. This only applies if the entity normally snaps to the grid.","type":"boolean","optional":true},{"name":"source","order":6,"description":"Source entity. Used for beams, projectiles, and highlight-boxes.","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":true},{"name":"spawn_decorations","order":16,"description":"If true, entity types that have [spawn_decoration](runtime:LuaEntityPrototype::spawn_decorations) property will apply triggers defined in the property. Defaults to `false`.","type":"boolean","optional":true},{"name":"spill","order":13,"description":"If false while fast_replace is true and player is nil any items from fast-replacing will be deleted instead of dropped on the ground. Defaults to `true`.","type":"boolean","optional":true},{"name":"target","order":5,"description":"Entity with health for the new entity to target.","type":{"complex_type":"union","options":["LuaEntity","MapPosition"],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"artillery-flare","order":16,"description":"","parameters":[{"name":"frame_speed","order":3,"description":"","type":"float","optional":false},{"name":"height","order":1,"description":"","type":"float","optional":false},{"name":"movement","order":0,"description":"","type":"Vector","optional":false},{"name":"vertical_speed","order":2,"description":"","type":"float","optional":false}]},{"name":"artillery-projectile","order":18,"description":"","parameters":[{"name":"speed","order":0,"description":"Defaults to 1.","type":"double","optional":true}]},{"name":"assembling-machine","order":0,"description":"","parameters":[{"name":"recipe","order":0,"description":"","type":"string","optional":true}]},{"name":"beam","order":1,"description":"","parameters":[{"name":"duration","order":3,"description":"If set, beam will be destroyed after this value of ticks.","type":"uint","optional":true},{"name":"max_length","order":2,"description":"If set, beam will be destroyed when distance between source and target is greater than this value.","type":"uint","optional":true},{"name":"source_offset","order":4,"description":"Source position will be offset by this value when rendering the beam.","type":"Vector","optional":true},{"name":"source_position","order":1,"description":"Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true},{"name":"target_position","order":0,"description":"Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true}]},{"name":"character-corpse","order":24,"description":"","parameters":[{"name":"inventory_size","order":0,"description":"","type":"uint","optional":true},{"name":"player_index","order":1,"description":"","type":"uint","optional":true}]},{"name":"cliff","order":4,"description":"","parameters":[{"name":"cliff_orientation","order":0,"description":"If not specified, `direction` will be used instead.","type":"CliffOrientation","optional":true}]},{"name":"container","order":3,"description":"","parameters":[{"name":"bar","order":0,"description":"Inventory index where the red limiting bar should be set.","type":"uint","optional":true}]},{"name":"electric-pole","order":29,"description":"","parameters":[{"name":"auto_connect","order":0,"description":"True by default. If set to false, created electric pole will not auto connect to neighbour electric poles.","type":"boolean","optional":true}]},{"name":"entity-ghost","order":5,"description":"","parameters":[{"name":"inner_name","order":0,"description":"The prototype name of the entity contained in the ghost.","type":"string","optional":false},{"name":"tags","order":1,"description":"The [LuaEntity::tags](runtime:LuaEntity::tags) associated with this entity ghost.","type":"Tags","optional":true}]},{"name":"fire","order":7,"description":"","parameters":[{"name":"initial_ground_flame_count","order":0,"description":"With how many small flames should the fire on ground be created. Defaults to the initial flame count of the prototype.","type":"uint8","optional":true}]},{"name":"highlight-box","order":25,"description":"","parameters":[{"name":"blink_interval","order":3,"description":"The blink interval for this highlight box. Makes it be shown every `blink_interval` ticks. Defaults to `0` (constantly shown).","type":"uint","optional":true},{"name":"bounding_box","order":0,"description":"The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.","type":"BoundingBox","optional":true},{"name":"box_type","order":1,"description":"Specifies the graphical appearance (color) of the highlight box. Defaults to `\"electricity\"`.","type":"CursorBoxRenderType","optional":true},{"name":"render_player_index","order":2,"description":"The player to render the highlight box for. If not provided, it will be rendered for all players.","type":"uint","optional":true},{"name":"time_to_live","order":4,"description":"The amount of time in ticks that the highlight box will exist for. Defaults to existing forever.","type":"uint","optional":true}]},{"name":"inserter","order":9,"description":"","parameters":[{"name":"conditions","order":0,"description":"","type":"InserterCircuitConditions","optional":false},{"name":"filters","order":1,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":false}]},{"name":"item-entity","order":10,"description":"","parameters":[{"name":"stack","order":0,"description":"The stack of items to create.","type":"SimpleItemStack","optional":false}]},{"name":"item-request-proxy","order":11,"description":"","parameters":[{"name":"modules","order":1,"description":"The stacks of items to be delivered to target entity from logistic network.","type":{"complex_type":"array","value":"BlueprintInsertPlan"},"optional":false},{"name":"target","order":0,"description":"The target items are to be delivered to.","type":"LuaEntity","optional":false}]},{"name":"lamp","order":30,"description":"","parameters":[{"name":"always_on","order":1,"description":"Defaults to false.","type":"boolean","optional":true},{"name":"color","order":0,"description":"Defaults to white.","type":"Color","optional":true}]},{"name":"loader","order":21,"description":"","parameters":[{"name":"filters","order":1,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":true},{"name":"type","order":0,"description":"Defaults to `\"input\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"output"},{"complex_type":"literal","value":"input"}],"full_format":false},"optional":true}]},{"name":"loader-1x1","order":22,"description":"","parameters":[{"name":"filters","order":1,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":true},{"name":"type","order":0,"description":"Defaults to `\"input\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"output"},{"complex_type":"literal","value":"input"}],"full_format":false},"optional":true}]},{"name":"locomotive","order":13,"description":"","parameters":[{"name":"snap_to_train_stop","order":0,"description":"Whether the locomotive should snap to an adjacent train stop. Defaults to true.","type":"boolean","optional":true}]},{"name":"logistic-container","order":14,"description":"","parameters":[{"name":"request_filters","order":0,"description":"","type":{"complex_type":"array","value":"InventoryFilter"},"optional":true}]},{"name":"particle","order":15,"description":"","parameters":[{"name":"frame_speed","order":3,"description":"","type":"float","optional":false},{"name":"height","order":1,"description":"","type":"float","optional":false},{"name":"movement","order":0,"description":"","type":"Vector","optional":false},{"name":"vertical_speed","order":2,"description":"","type":"float","optional":false}]},{"name":"plant","order":8,"description":"","parameters":[{"name":"tick_grown","order":0,"description":"The tick the plant will be fully grown. If not specified, the plants normal growth time is used.","type":"uint","optional":true}]},{"name":"programmable-speaker","order":23,"description":"","parameters":[{"name":"alert_parameters","order":1,"description":"","type":"ProgrammableSpeakerAlertParameters","optional":true},{"name":"parameters","order":0,"description":"","type":"ProgrammableSpeakerParameters","optional":true}]},{"name":"projectile","order":17,"description":"","parameters":[{"name":"max_range","order":1,"description":"Defaults to 1000.","type":"double","optional":true},{"name":"speed","order":0,"description":"Defaults to 0.","type":"double","optional":true}]},{"name":"resource","order":19,"description":"","parameters":[{"name":"amount","order":0,"description":"","type":"uint","optional":false},{"name":"enable_cliff_removal","order":2,"description":"If colliding cliffs are removed. Default is true.","type":"boolean","optional":true},{"name":"enable_tree_removal","order":1,"description":"If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true.","type":"boolean","optional":true},{"name":"snap_to_tile_center","order":3,"description":"If true, the resource entity will be placed to center of a tile as map generator would place it, otherwise standard non-resource grid alignment rules will apply. Default is true.","type":"boolean","optional":true}]},{"name":"rolling-stock","order":12,"description":"","parameters":[{"name":"color","order":1,"description":"The color of this rolling stock, if it supports colors.","type":"Color","optional":true},{"name":"orientation","order":0,"description":"The orientation of this rolling stock.","type":"RealOrientation","optional":true}]},{"name":"simple-entity-with-force","order":28,"description":"","parameters":[{"name":"render_player_index","order":0,"description":"","type":"uint","optional":true}]},{"name":"simple-entity-with-owner","order":27,"description":"","parameters":[{"name":"render_player_index","order":0,"description":"","type":"uint","optional":true}]},{"name":"speech-bubble","order":26,"description":"","parameters":[{"name":"lifetime","order":1,"description":"","type":"uint","optional":true},{"name":"text","order":0,"description":"","type":"LocalisedString","optional":false}]},{"name":"stream","order":2,"description":"","parameters":[{"name":"source_position","order":1,"description":"Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true},{"name":"target_position","order":0,"description":"Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).","type":"MapPosition","optional":true}]},{"name":"tile-ghost","order":6,"description":"","parameters":[{"name":"inner_name","order":0,"description":"The prototype name of the tile contained in the ghost.","type":"string","optional":false}]},{"name":"underground-belt","order":20,"description":"","parameters":[{"name":"type","order":0,"description":"Defaults to `\"input\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"output"},{"complex_type":"literal","value":"input"}],"full_format":false},"optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on the type of entity:","format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The created entity or `nil` if the creation failed.","type":"LuaEntity","optional":true}]},{"name":"create_global_electric_network","order":79,"description":"Creates a global electric network for this surface, if one doesn't exist already.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"create_particle","order":19,"description":"Creates a particle at the given location","parameters":[{"name":"frame_speed","order":5,"description":"","type":"float","optional":false},{"name":"height","order":3,"description":"","type":"float","optional":false},{"name":"movement","order":2,"description":"","type":"Vector","optional":false},{"name":"name","order":0,"description":"The particle name.","type":"ParticleID","optional":false},{"name":"position","order":1,"description":"Where to create the particle.","type":"MapPosition","optional":false},{"name":"vertical_speed","order":4,"description":"","type":"float","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"create_trivial_smoke","order":18,"description":"","parameters":[{"name":"name","order":0,"description":"The smoke prototype name to create.","type":"TrivialSmokeID","optional":false},{"name":"position","order":1,"description":"Where to create the smoke.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"create_unit_group","order":20,"description":"Create a new unit group at a given position.","raises":[{"name":"on_unit_group_created","order":0,"description":"","timeframe":"instantly","optional":false}],"parameters":[{"name":"force","order":1,"description":"Force of the new unit group. Defaults to `\"enemy\"`.","type":"ForceID","optional":true},{"name":"position","order":0,"description":"Initial position of the new unit group.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":"LuaCommandable","optional":false}]},{"name":"deconstruct_area","order":33,"description":"Place a deconstruction request.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised for every entity that has been successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to mark for deconstruction.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose bots should perform the deconstruction.","type":"ForceID","optional":false},{"name":"item","order":4,"description":"The deconstruction item to use if any.","type":"LuaItemStack","optional":true},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped. Defaults to `false`.","type":"boolean","optional":true},{"name":"super_forced","order":5,"description":"If the deconstruction is super-forced. Defaults to `false`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"decorative_prototype_collides","order":73,"description":"Whether the given decorative prototype collides at the given position and direction.","parameters":[{"name":"position","order":1,"description":"The position to check.","type":"MapPosition","optional":false},{"name":"prototype","order":0,"description":"The decorative prototype to check.","type":"DecorativeID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"delete_chunk","order":42,"description":"","raises":[{"name":"on_chunk_deleted","order":1,"description":"","timeframe":"future_tick","optional":false},{"name":"on_pre_chunk_deleted","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"position","order":0,"description":"The chunk position to delete","type":"ChunkPosition","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"destroy_decoratives","order":46,"description":"Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":3,"description":"","type":{"complex_type":"union","options":["CollisionLayerID",{"complex_type":"array","value":"CollisionLayerID"},{"complex_type":"dictionary","key":"CollisionLayerID","value":{"complex_type":"literal","value":true}}],"full_format":false},"optional":true},{"name":"exclude_soft","order":6,"description":"Soft decoratives can be drawn over rails.","type":"boolean","optional":true},{"name":"from_layer","order":4,"description":"","type":"string","optional":true},{"name":"invert","order":8,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":7,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["DecorativeID",{"complex_type":"array","value":"DecorativeID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"TilePosition","optional":true},{"name":"to_layer","order":5,"description":"","type":"string","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"destroy_global_electric_network","order":80,"description":"Destroys the global electric network for this surface, if it exists.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"edit_script_area","order":60,"description":"Sets the given script area to the new values.","parameters":[{"name":"area","order":1,"description":"","type":"ScriptArea","optional":false},{"name":"id","order":0,"description":"The area to edit.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"edit_script_position","order":65,"description":"Sets the given script position to the new values.","parameters":[{"name":"id","order":0,"description":"The position to edit.","type":"uint","optional":false},{"name":"position","order":1,"description":"","type":"ScriptPosition","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"entity_prototype_collides","order":72,"description":"Whether the given entity prototype collides at the given position and direction.","parameters":[{"name":"direction","order":3,"description":"","type":"defines.direction","optional":true},{"name":"position","order":1,"description":"The position to check.","type":"MapPosition","optional":false},{"name":"prototype","order":0,"description":"The entity prototype to check.","type":"EntityID","optional":false},{"name":"use_map_generation_bounding_box","order":2,"description":"If the map generation bounding box should be used instead of the collision bounding box.","type":"boolean","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"execute_lightning","order":81,"description":"Creates lightning. If other entities which can be lightning targets are nearby, the final position will be adjusted.","parameters":[{"name":"name","order":0,"description":"","type":"EntityID","optional":false},{"name":"position","order":1,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"find_closest_logistic_network_by_position","order":31,"description":"Find the logistic network with a cell closest to a given position.","parameters":[{"name":"force","order":1,"description":"Force the logistic network should belong to.","type":"ForceID","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The found network or `nil` if no such network was found.","type":"LuaLogisticNetwork","optional":true}]},{"name":"find_decoratives_filtered","order":48,"description":"Find decoratives of a given name in a given area.\n\nIf no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.","examples":["```\ngame.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, name = \"sand-decal\"} -- gets all sand-decals in the rectangle\ngame.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, limit = 5}  -- gets the first 5 decoratives in the rectangle\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":3,"description":"","type":{"complex_type":"union","options":["CollisionLayerID",{"complex_type":"array","value":"CollisionLayerID"},{"complex_type":"dictionary","key":"CollisionLayerID","value":{"complex_type":"literal","value":true}}],"full_format":false},"optional":true},{"name":"exclude_soft","order":6,"description":"Soft decoratives can be drawn over rails.","type":"boolean","optional":true},{"name":"from_layer","order":4,"description":"","type":"string","optional":true},{"name":"invert","order":8,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":7,"description":"","type":"uint","optional":true},{"name":"name","order":2,"description":"","type":{"complex_type":"union","options":["DecorativeID",{"complex_type":"array","value":"DecorativeID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"","type":"TilePosition","optional":true},{"name":"to_layer","order":5,"description":"","type":"string","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"DecorativeResult"},"optional":false}]},{"name":"find_enemy_units","order":12,"description":"Find enemy units (entities with type \"unit\") of a given force within an area.\n\nThis is more efficient than [LuaSurface::find_entities](runtime:LuaSurface::find_entities).","examples":["```\n-- Find all units who would be interested to attack the player, within 100-tile area.\nlocal enemies = game.player.surface.find_enemy_units(game.player.position, 100)\n```"],"parameters":[{"name":"center","order":0,"description":"Center of the search area","type":"MapPosition","optional":false},{"name":"force","order":2,"description":"Force to find enemies of. If not given, uses the player force.","type":"ForceID","optional":true},{"name":"radius","order":1,"description":"Radius of the circular search area","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entities","order":4,"description":"Find entities in a given area.\n\nIf no area is given all entities on the surface are returned.","examples":["```\n-- Will evaluate to a list of all entities within given area.\ngame.surfaces[\"nauvis\"].find_entities({{-10, -10}, {10, 10}})\n```"],"parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entities_filtered","order":5,"description":"Find all entities of the given type or name in the given area.\n\nIf no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned.\n\n- If no `area` or `position` are given, the entire surface is searched.\n\n- If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).\n\n- If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities.\n\n- If `area` is specified, this returns the entities colliding with that area.","examples":["```\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, type = \"resource\"} -- gets all resources in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = \"iron-ore\"} -- gets all iron ores in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = {\"iron-ore\", \"copper-ore\"}} -- gets all iron ore and copper ore in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, force = \"player\"}  -- gets player owned entities in the rectangle\ngame.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, limit = 5}  -- gets the first 5 entities in the rectangle\ngame.surfaces[1].find_entities_filtered{position = {0, 0}, radius = 10}  -- gets all entities within 10 tiles of the position [0,0].\n```"],"parameters":[{"name":"filter","order":0,"description":"","type":"EntitySearchFilters","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"find_entity","order":3,"description":"Find an entity of the given name at the given position. This checks both the exact position and the bounding box of the entity.","examples":["```\ngame.player.selected.surface.find_entity('filter-inserter', {0,0})\n```"],"parameters":[{"name":"entity","order":0,"description":"Name of the entity to look for.","type":"EntityWithQualityID","optional":false},{"name":"position","order":1,"description":"Coordinates to look at.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if no such entity is found.","type":"LuaEntity","optional":true}]},{"name":"find_logistic_network_by_position","order":30,"description":"Find the logistic network that covers a given position.","parameters":[{"name":"force","order":1,"description":"Force the logistic network should belong to.","type":"ForceID","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The found network or `nil` if no such network was found.","type":"LuaLogisticNetwork","optional":true}]},{"name":"find_logistic_networks_by_construction_area","order":32,"description":"Finds all of the logistics networks whose construction area intersects with the given position.","parameters":[{"name":"force","order":1,"description":"Force the logistic networks should belong to.","type":"ForceID","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaLogisticNetwork"},"optional":false}]},{"name":"find_nearest_enemy","order":14,"description":"Find the enemy military target ([military entity](https://wiki.factorio.com/Military_units_and_structures)) closest to the given position.","parameters":[{"name":"force","order":2,"description":"The force the result will be an enemy of. Uses the player force if not specified.","type":"ForceID","optional":true},{"name":"max_distance","order":1,"description":"Radius of the circular search area.","type":"double","optional":false},{"name":"position","order":0,"description":"Center of the search area.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The nearest enemy military target or `nil` if no enemy could be found within the given area.","type":"LuaEntity","optional":true}]},{"name":"find_nearest_enemy_entity_with_owner","order":15,"description":"Find the enemy entity-with-owner closest to the given position.","parameters":[{"name":"force","order":2,"description":"The force the result will be an enemy of. Uses the player force if not specified.","type":"ForceID","optional":true},{"name":"max_distance","order":1,"description":"Radius of the circular search area.","type":"double","optional":false},{"name":"position","order":0,"description":"Center of the search area.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The nearest enemy entity-with-owner or `nil` if no enemy could be found within the given area.","type":"LuaEntity","optional":false}]},{"name":"find_non_colliding_position","order":9,"description":"Find a non-colliding position within a given radius.\n\nSpecial care needs to be taken when using a radius of `0`. The game will not stop searching until it finds a suitable position, so it is important to make sure such a position exists. One particular case where it would not be able to find a solution is running it before any chunks have been generated.","parameters":[{"name":"center","order":1,"description":"Center of the search area.","type":"MapPosition","optional":false},{"name":"force_to_tile_center","order":4,"description":"Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Defaults to `false`.","type":"boolean","optional":true},{"name":"name","order":0,"description":"Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)","type":"EntityID","optional":false},{"name":"precision","order":3,"description":"The step length from the given position as it searches, in tiles. Minimum value is `0.01`.","type":"double","optional":false},{"name":"radius","order":2,"description":"Max distance from `center` to search in. A radius of `0` means an infinitely-large search area.","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The non-colliding position. May be `nil` if no suitable position was found.","type":"MapPosition","optional":true}]},{"name":"find_non_colliding_position_in_box","order":10,"description":"Find a non-colliding position within a given rectangle.","parameters":[{"name":"force_to_tile_center","order":3,"description":"Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Defaults to `false`.","type":"boolean","optional":true},{"name":"name","order":0,"description":"Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)","type":"EntityID","optional":false},{"name":"precision","order":2,"description":"The step length from the given position as it searches, in tiles. Minimum value is 0.01.","type":"double","optional":false},{"name":"search_space","order":1,"description":"The rectangle to search inside.","type":"BoundingBox","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The non-colliding position. May be `nil` if no suitable position was found.","type":"MapPosition","optional":true}]},{"name":"find_tiles_filtered","order":6,"description":"Find all tiles of the given name in the given area.\n\nIf no filters are given, this returns all tiles in the search area.\n\nIf no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.","parameters":[{"name":"filter","order":0,"description":"","type":"TileSearchFilters","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"find_units","order":13,"description":"Find units (entities with type \"unit\") of a given force and force condition within a given area.\n\nThis is more efficient than [LuaSurface::find_entities](runtime:LuaSurface::find_entities).","examples":["```\n-- Find friendly units to \"player\" force\nlocal friendly_units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"friend\")\n```","```\n-- Find units of \"player\" force\nlocal units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"same\"})\n```"],"parameters":[{"name":"area","order":0,"description":"Box to find units within.","type":"BoundingBox","optional":false},{"name":"condition","order":2,"description":"Only forces which meet the condition will be included in the search.","type":"ForceCondition","optional":false},{"name":"force","order":1,"description":"Force performing the search.","type":"ForceID","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"force_generate_chunk_requests","order":28,"description":"Blocks and generates all chunks that have been requested using all available threads.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_chunks","order":25,"description":"Get an iterator going over every chunk on this surface.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaChunkIterator","optional":false}]},{"name":"get_closest","order":70,"description":"Gets the closest entity in the list to this position.","parameters":[{"name":"entities","order":1,"description":"The Entities to check.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaEntity","optional":true}]},{"name":"get_connected_tiles","order":41,"description":"Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position.\n\nThis won't find tiles in non-generated chunks.","parameters":[{"name":"area","order":3,"description":"The area to find connected tiles in. If provided the start position must be in this area.","type":"BoundingBox","optional":true},{"name":"include_diagonal","order":2,"description":"Include tiles that are connected diagonally.","type":"boolean","optional":true},{"name":"position","order":0,"description":"The tile position to start at.","type":"TilePosition","optional":false},{"name":"tiles","order":1,"description":"The tiles to search for.","type":{"complex_type":"array","value":"TileID"},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The resulting set of tiles.","type":{"complex_type":"array","value":"TilePosition"},"optional":false}]},{"name":"get_double_hidden_tile","order":38,"description":"The double hidden tile name or `nil` if there isn't one for the given position.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_entities_with_force","order":75,"description":"Returns all the military targets (entities with force) on this chunk for the given force.","parameters":[{"name":"force","order":1,"description":"Entities of this force will be returned.","type":"ForceID","optional":false},{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_hidden_tile","order":37,"description":"The hidden tile name.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"`nil` if there isn't one for the given position.","type":"string","optional":true}]},{"name":"get_map_exchange_string","order":68,"description":"Gets the map exchange string for the current map generation settings of this surface.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"string","optional":false}]},{"name":"get_pollution","order":0,"description":"Get the pollution for a given position.\n\nPollution is stored per chunk, so this will return the same value for all positions in one chunk.","examples":["```\ngame.surfaces[1].get_pollution({1,2})\n```"],"parameters":[{"name":"position","order":0,"description":"The position to poll the chunk's pollution","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_property","order":77,"description":"Gets the value of surface property on this surface.","parameters":[{"name":"property","order":0,"description":"Property to read.","type":"SurfacePropertyID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Value of the property.","type":"double","optional":false}]},{"name":"get_random_chunk","order":52,"description":"Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"ChunkPosition","optional":false}]},{"name":"get_resource_counts","order":51,"description":"Gets the resource amount of all resources on this surface","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false}]},{"name":"get_script_area","order":59,"description":"Gets the first script area by name or id.","parameters":[{"name":"key","order":0,"description":"The name or id of the area to get.","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"ScriptArea","optional":true}]},{"name":"get_script_areas","order":58,"description":"Gets the script areas that match the given name or if no name is given all areas are returned.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"ScriptArea"},"optional":false}]},{"name":"get_script_position","order":64,"description":"Gets the first script position by name or id.","parameters":[{"name":"key","order":0,"description":"The name or id of the position to get.","type":{"complex_type":"union","options":["string","uint"],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"ScriptPosition","optional":true}]},{"name":"get_script_positions","order":63,"description":"Gets the script positions that match the given name or if no name is given all positions are returned.","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"ScriptPosition"},"optional":false}]},{"name":"get_starting_area_radius","order":69,"description":"Gets the starting area radius of this surface.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_tile","order":22,"description":"Get the tile at a given position. An alternative call signature for this method is passing it a single [TilePosition](runtime:TilePosition).\n\nNon-integer values will result in them being rounded down.","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaTile","optional":false}]},{"name":"get_total_pollution","order":71,"description":"Gets the total amount of pollution on the surface by iterating over all the chunks containing pollution.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"is_chunk_generated","order":26,"description":"Is a given chunk generated?","parameters":[{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"play_sound","order":50,"description":"Play a sound for every player on this surface.\n\nThe sound is not played if its location is not [charted](runtime:LuaForce::chart) for that player.","parameters":[{"name":"override_sound_type","order":3,"description":"The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.","type":"SoundType","optional":true},{"name":"path","order":0,"description":"The sound to play.","type":"SoundPath","optional":false},{"name":"position","order":1,"description":"Where the sound should be played. If not given, it's played at the current position of each player.","type":"MapPosition","optional":true},{"name":"volume_modifier","order":2,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive.","type":"double","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]},{"name":"pollute","order":24,"description":"Spawn pollution at the given position.","parameters":[{"name":"amount","order":1,"description":"How much pollution to add.","type":"double","optional":false},{"name":"source","order":0,"description":"Where to spawn the pollution.","type":"MapPosition","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"print","order":45,"description":"Print text to the chat console of all players on this surface.\n\nBy default, messages that are identical to a message sent in the last 60 ticks are not printed again.","parameters":[{"name":"message","order":0,"description":"","type":"LocalisedString","optional":false},{"name":"print_settings","order":1,"description":"","type":"PrintSettings","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"regenerate_decorative","order":44,"description":"Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives.\n\nAll specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.","parameters":[{"name":"chunks","order":1,"description":"The chunk positions to regenerate the decoratives on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":true},{"name":"decoratives","order":0,"description":"Prototype names of decorative or decoratives to autoplace. When `nil` all decoratives with an autoplace are used.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"regenerate_entity","order":43,"description":"Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities.\n\nAll specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.","parameters":[{"name":"chunks","order":1,"description":"The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":true},{"name":"entities","order":0,"description":"Prototype names of entity or entities to autoplace. When `nil` all entities with an autoplace are used.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_script_area","order":62,"description":"Removes the given script area.","parameters":[{"name":"id","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the area was actually removed. False when it didn't exist.","type":"boolean","optional":false}]},{"name":"remove_script_position","order":67,"description":"Removes the given script position.","parameters":[{"name":"id","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the position was actually removed. False when it didn't exist.","type":"boolean","optional":false}]},{"name":"request_path","order":57,"description":"Generates a path with the specified constraints (as an array of [PathfinderWaypoints](runtime:PathfinderWaypoint)) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use [LuaEntity::set_command](runtime:LuaEntity::set_command) instead.\n\nThe resulting path is ultimately returned asynchronously via [on_script_path_request_finished](runtime:on_script_path_request_finished).","raises":[{"name":"on_script_path_request_finished","order":0,"description":"","timeframe":"future_tick","optional":false}],"parameters":[{"name":"bounding_box","order":0,"description":"The dimensions of the object that's supposed to travel the path.","type":"BoundingBox","optional":false},{"name":"can_open_gates","order":7,"description":"Whether the path request can open gates. Defaults to `false`.","type":"boolean","optional":true},{"name":"collision_mask","order":1,"description":"The collision mask the `bounding_box` collides with.","type":"CollisionMask","optional":false},{"name":"entity_to_ignore","order":11,"description":"Makes the pathfinder ignore collisions with this entity if it is given.","type":"LuaEntity","optional":true},{"name":"force","order":4,"description":"The force for which to generate the path, determining which gates can be opened for example.","type":"ForceID","optional":false},{"name":"goal","order":3,"description":"The position to find a path to.","type":"MapPosition","optional":false},{"name":"max_attack_distance","order":10,"description":"Defines the maximum allowed distance between the last traversable path waypoint and an obstacle entity to be destroyed. Only used when finding a discontiguous path, i.e. when `max_gap_size` > 0. This field filters out paths that are blocked by obstacles that are outside the entity's attack range. Allowed values are `0` or greater. Defaults to `max_gap_size`.","type":"double","optional":true},{"name":"max_gap_size","order":9,"description":"Defines the maximum allowed distance between path waypoints. 0 means that paths must be contiguous (as they are for biters). Values greater than 0 will produce paths with \"gaps\" that are suitable for spiders. Allowed values are from `0` to `31`. Defaults to `0`.","type":"int","optional":true},{"name":"path_resolution_modifier","order":8,"description":"Defines how coarse the pathfinder's grid is, where smaller values mean a coarser grid. Defaults to `0`, which equals a resolution of `1x1` tiles, centered on tile centers. Values range from `-8` to `8` inclusive, where each integer increment doubles/halves the resolution. So, a resolution of `-8` equals a grid of `256x256` tiles, and a resolution of `8` equals `1/256` of a tile.","type":"int","optional":true},{"name":"pathfind_flags","order":6,"description":"Flags that affect pathfinder behavior.","type":"PathfinderFlags","optional":true},{"name":"radius","order":5,"description":"How close the pathfinder needs to get to its `goal` (in tiles). Defaults to `1`.","type":"double","optional":true},{"name":"start","order":2,"description":"The position from which to start pathfinding.","type":"MapPosition","optional":false}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"A unique handle to identify this call when [on_script_path_request_finished](runtime:on_script_path_request_finished) fires.","type":"uint","optional":false}]},{"name":"request_to_generate_chunks","order":27,"description":"Request that the game's map generator generate chunks at the given position for the given radius on this surface. If the radius is `0`, then only the chunk at the given position is generated.","parameters":[{"name":"position","order":0,"description":"Where to generate the new chunks.","type":"MapPosition","optional":false},{"name":"radius","order":1,"description":"The chunk radius from `position` to generate new chunks in. Defaults to `0`.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_chunk_generated_status","order":29,"description":"Set generated status of a chunk. Useful when copying chunks.","parameters":[{"name":"position","order":0,"description":"The chunk's position.","type":"ChunkPosition","optional":false},{"name":"status","order":1,"description":"The chunk's new status.","type":"defines.chunk_generated_status","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_double_hidden_tile","order":40,"description":"Set double hidden tile for the specified position. During normal gameplay, only [non-mineable](runtime:LuaTilePrototype::mineable_properties) tiles can become double hidden.\n\nDoes nothing if hidden tile at specified position does not exist.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false},{"name":"tile","order":1,"description":"The new double hidden tile or `nil` to clear the double hidden tile.","type":"TileID","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_hidden_tile","order":39,"description":"Set the hidden tile for the specified position. While during normal gameplay only [non-mineable](runtime:LuaTilePrototype::mineable_properties) or [foundation](runtime:LuaTilePrototype::is_foundation) tiles can become hidden, this method allows any kind of tile to be set as the hidden one.","parameters":[{"name":"position","order":0,"description":"The tile position.","type":"TilePosition","optional":false},{"name":"tile","order":1,"description":"The new hidden tile or `nil` to clear the hidden tile.","type":"TileID","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"set_multi_command","order":16,"description":"Give a command to multiple units. This will automatically select suitable units for the task.","parameters":[{"name":"command","order":0,"description":"","type":"Command","optional":false},{"name":"force","order":2,"description":"Force of the units this command is to be given to. If not specified, uses the enemy force.","type":"ForceID","optional":true},{"name":"unit_count","order":1,"description":"Number of units to give the command to.","type":"uint","optional":false},{"name":"unit_search_distance","order":3,"description":"Radius to search for units. The search area is centered on the destination of the command. If not specified uses default value of 150.","type":"uint","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"Number of units actually sent. May be less than `count` if not enough units were available.","type":"uint","optional":false}]},{"name":"set_property","order":78,"description":"Sets the value of surface property on this surface.","parameters":[{"name":"property","order":0,"description":"Property to change.","type":"SurfacePropertyID","optional":false},{"name":"value","order":1,"description":"The wanted value of the property.","type":"double","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_tiles","order":23,"description":"Set tiles at specified locations. Can automatically correct the edges around modified tiles.\n\nPlacing a [mineable](runtime:LuaTilePrototype::mineable_properties) tile on top of a non-mineable or [foundation](runtime:LuaTilePrototype::is_foundation) one will turn the latter into the [LuaTile::hidden_tile](runtime:LuaTile::hidden_tile) for that tile. Placing a mineable tile on a mineable one or a non-mineable tile on a non-mineable one or a foundation tile on a foundation one will not modify the hidden tile. This restriction can however be circumvented by using [LuaSurface::set_hidden_tile](runtime:LuaSurface::set_hidden_tile). Placing a non-foundation tile on top of a foundation one when there already exists a hidden tile will push hidden tile to [double hidden](runtime:LuaTile::double_hidden_tile), and foundation tile will turn into hidden.\n\nIt is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.","raises":[{"name":"script_raised_set_tiles","order":0,"description":"Raised if the `raise_event` flag was set.","timeframe":"instantly","optional":true}],"parameters":[{"name":"correct_tiles","order":1,"description":"If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.","type":"boolean","optional":true},{"name":"player","order":5,"description":"The player whose undo queue to add these actions to.","type":"PlayerIdentification","optional":true},{"name":"raise_event","order":4,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"remove_colliding_decoratives","order":3,"description":"Defaults to `true`.","type":"boolean","optional":true},{"name":"remove_colliding_entities","order":2,"description":"Defaults to `true`.","type":{"complex_type":"union","options":["boolean",{"complex_type":"literal","value":"abort_on_collision"}],"full_format":false},"optional":true},{"name":"tiles","order":0,"description":"","type":{"complex_type":"array","value":"Tile"},"optional":false},{"name":"undo_index","order":6,"description":"The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.","type":"uint","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"spill_item_stack","order":11,"description":"Spill items on the ground centered at a given location.","parameters":[{"name":"allow_belts","order":4,"description":"Whether items can be spilled onto belts. Defaults to `true`.","type":"boolean","optional":true},{"name":"enable_looted","order":2,"description":"When true, each created item will be flagged with the [LuaEntity::to_be_looted](runtime:LuaEntity::to_be_looted) flag. Defaults to `false`.","type":"boolean","optional":true},{"name":"force","order":3,"description":"When provided (and not `nil`) the items will be marked for deconstruction by this force.","type":"ForceID","optional":true},{"name":"max_radius","order":5,"description":"Max radius from the specified `position` to spill items.","type":"double","optional":true},{"name":"position","order":0,"description":"Center of the spillage","type":"MapPosition","optional":false},{"name":"stack","order":1,"description":"Stack of items to spill","type":"ItemStackIdentification","optional":false},{"name":"use_start_position_on_failure","order":6,"description":"Allow spilling items at `position` if no non-colliding position is found. Note: Setting to false might cause some items not to be spilled. Defaults to `true`.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The created item-on-ground entities.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"upgrade_area","order":35,"description":"Place an upgrade request.","raises":[{"name":"on_marked_for_upgrade","order":0,"description":"Raised for every entity that has been successfully marked for upgrade.","timeframe":"instantly","optional":true}],"parameters":[{"name":"area","order":0,"description":"The area to mark for upgrade.","type":"BoundingBox","optional":false},{"name":"force","order":1,"description":"The force whose bots should perform the upgrade.","type":"ForceID","optional":false},{"name":"item","order":4,"description":"The upgrade item to use.","type":"LuaItemStack","optional":false},{"name":"player","order":2,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true},{"name":"skip_fog_of_war","order":3,"description":"If chunks covered by fog-of-war are skipped.","type":"boolean","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[]}],"attributes":[{"name":"always_day","order":4,"description":"When set to true, the sun will always shine.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"brightness_visual_weights","order":20,"description":"Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT).\n\nThe LUT is multiplied by `((1 - weight) + brightness * weight)` and result is clamped to range `[0, 1]`.\n\nDefault is `{0, 0, 0}`, which means no influence.","examples":["```\n-- Makes night on the surface pitch black, LuaSurface::min_brightness is set to default value 0.15.\ngame.surfaces[1].brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 }\n```"],"read_type":"ColorModifier","write_type":"ColorModifier","optional":false},{"name":"darkness","order":6,"description":"Amount of darkness at the current time, as a number in range `[0, 1]`.","read_type":"float","optional":false},{"name":"dawn","order":15,"description":"The daytime when dawn starts.","read_type":"double","write_type":"double","optional":false},{"name":"daytime","order":5,"description":"Current time of day, as a number in range `[0, 1)`.","read_type":"double","write_type":"double","optional":false},{"name":"deletable","order":25,"description":"If this surface can be deleted.","read_type":"boolean","optional":false},{"name":"dusk","order":14,"description":"The daytime when dusk starts.","read_type":"double","write_type":"double","optional":false},{"name":"evening","order":16,"description":"The daytime when evening starts.","read_type":"double","write_type":"double","optional":false},{"name":"freeze_daytime","order":12,"description":"True if daytime is currently frozen.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"generate_with_lab_tiles","order":3,"description":"When set to true, new chunks will be generated with lab tiles, instead of using the surface's map generation settings.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"global_effect","order":26,"description":"Surface-wide effects applied to entities with effect receivers. May be `nil` if surface is not using surface-wide effect source.","read_type":"ModuleEffects","write_type":"ModuleEffects","optional":true},{"name":"has_global_electric_network","order":22,"description":"Whether this surface currently has a global electric network.","read_type":"boolean","optional":false},{"name":"index","order":1,"description":"This surface's index in [LuaGameScript::surfaces](runtime:LuaGameScript::surfaces) (unique ID). It is assigned when a surface is created, and remains so until it is [deleted](runtime:on_surface_deleted). Indexes of deleted surfaces can be reused.","read_type":"uint","optional":false},{"name":"localised_name","order":28,"description":"Localised name of this surface. When set, will replace the internal surface name in places where a player sees surface name.\n\nValue may be ignored if a surface has a SpacePlatform or Planet object attached to it, which take the precedence.","read_type":"LocalisedString","write_type":"LocalisedString","optional":true},{"name":"map_gen_settings","order":2,"description":"The generation settings for this surface. These can be modified after surface generation, but note that this will not retroactively update the surface. To manually regenerate it, [LuaSurface::regenerate_entity](runtime:LuaSurface::regenerate_entity), [LuaSurface::regenerate_decorative](runtime:LuaSurface::regenerate_decorative), and [LuaSurface::delete_chunk](runtime:LuaSurface::delete_chunk) can be used.","read_type":"MapGenSettings","write_type":"MapGenSettings","optional":false},{"name":"min_brightness","order":19,"description":"The minimal brightness during the night. Defaults to `0.15`. This has an effect on both rendering and game mechanics such as biter spawns and solar power.","read_type":"double","write_type":"double","optional":false},{"name":"morning","order":17,"description":"The daytime when morning starts.","read_type":"double","write_type":"double","optional":false},{"name":"name","order":0,"description":"The name of this surface. Names are unique among surfaces.\n\nThe default surface can't be renamed.","raises":[{"name":"on_surface_renamed","order":0,"description":"","timeframe":"instantly","optional":false}],"read_type":"string","write_type":"string","optional":false},{"name":"no_enemies_mode","order":11,"description":"Is no-enemies mode enabled on this surface?","read_type":"boolean","write_type":"boolean","optional":false},{"name":"object_name","order":30,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"peaceful_mode","order":10,"description":"Is peaceful mode enabled on this surface?","read_type":"boolean","write_type":"boolean","optional":false},{"name":"planet","order":24,"description":"The planet associated with this surface, if there is one.\n\nUse [LuaPlanet::associate_surface](runtime:LuaPlanet::associate_surface) to create a new association with a planet.","read_type":"LuaPlanet","optional":true},{"name":"platform","order":23,"description":"","read_type":"LuaSpacePlatform","optional":true},{"name":"pollutant_type","order":27,"description":"The type of pollutant enabled on the surface, or `nil` if no pollutant is enabled.","read_type":"LuaAirbornePollutantPrototype","optional":true},{"name":"show_clouds","order":21,"description":"If clouds are shown on this surface. If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"solar_power_multiplier","order":18,"description":"The multiplier of solar power on this surface. Cannot be less than 0.","read_type":"double","write_type":"double","optional":false},{"name":"ticks_per_day","order":13,"description":"The number of ticks per day for this surface.","read_type":"uint","write_type":"uint","optional":false},{"name":"valid","order":29,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"wind_orientation","order":8,"description":"Current wind direction.","read_type":"RealOrientation","write_type":"RealOrientation","optional":false},{"name":"wind_orientation_change","order":9,"description":"Change in wind orientation per tick.","read_type":"double","write_type":"double","optional":false},{"name":"wind_speed","order":7,"description":"Current wind speed in tiles per tick.","read_type":"double","write_type":"double","optional":false}],"operators":[]},{"name":"LuaSurfacePropertyPrototype","order":120,"description":"Prototype of a surface property.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"default_value","order":1,"description":"","read_type":"double","optional":false},{"name":"is_time","order":2,"description":"","read_type":"boolean","optional":false},{"name":"localised_unit_key","order":0,"description":"","read_type":"string","optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaSurfacePrototype","order":121,"description":"Prototype of a surface.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"surface_properties","order":0,"description":"","read_type":{"complex_type":"dictionary","key":"SurfacePropertyID","value":"double"},"optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTechnology","order":122,"description":"One research item.","abstract":false,"methods":[{"name":"reload","order":0,"description":"Reload this technology from its prototype.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"research_recursive","order":1,"description":"Research this technology and all of its prerequisities recursively","parameters":[],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"enabled","order":5,"description":"Can this technology be researched?","read_type":"boolean","write_type":"boolean","optional":false},{"name":"force","order":0,"description":"The force this technology belongs to.","read_type":"LuaForce","optional":false},{"name":"level","order":15,"description":"The current level of this technology. For level-based technology writing to this is the same as researching the technology to the previous level. Writing the level will set [LuaTechnology::enabled](runtime:LuaTechnology::enabled) to `true`.","read_type":"uint","write_type":"uint","optional":false},{"name":"localised_description","order":3,"description":"","read_type":"LocalisedString","optional":false},{"name":"localised_name","order":2,"description":"Localised name of this technology.","read_type":"LocalisedString","optional":false},{"name":"name","order":1,"description":"Name of this technology.","read_type":"string","optional":false},{"name":"object_name","order":19,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"order","order":14,"description":"The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.","read_type":"string","optional":false},{"name":"prerequisites","order":9,"description":"Prerequisites of this technology. The result maps technology name to the [LuaTechnology](runtime:LuaTechnology) object.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaTechnology"},"optional":false},{"name":"prototype","order":4,"description":"The prototype of this technology.","read_type":"LuaTechnologyPrototype","optional":false},{"name":"research_unit_count","order":12,"description":"The number of research units required for this technology.\n\nThis is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](runtime:LuaTechnologyPrototype::ignore_tech_cost_multiplier) is `true`.","read_type":"uint","optional":false},{"name":"research_unit_count_formula","order":16,"description":"The count formula, if this research has any. See [TechnologyUnit::count_formula](prototype:TechnologyUnit::count_formula) for details.","read_type":"MathExpression","optional":true},{"name":"research_unit_energy","order":13,"description":"Amount of energy required to finish a unit of research.","read_type":"double","optional":false},{"name":"research_unit_ingredients","order":11,"description":"The types of ingredients that labs will require to research this technology.","read_type":{"complex_type":"array","value":"Ingredient"},"optional":false},{"name":"researched","order":8,"description":"Has this technology been researched? Switching from `false` to `true` will trigger the technology advancement perks; switching from `true` to `false` will reverse them.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"saved_progress","order":17,"description":"Saved technology progress fraction as a value in range `[0, 1)`. 0 means there is no saved progress.","read_type":"double","write_type":"double","optional":false},{"name":"successors","order":10,"description":"Successors of this technology, i.e. technologies which have this technology as a prerequisite.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaTechnology"},"optional":false},{"name":"upgrade","order":7,"description":"Is this an upgrade-type research?","read_type":"boolean","optional":false},{"name":"valid","order":18,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"visible_when_disabled","order":6,"description":"If this technology will be visible in the research GUI even though it is disabled.","read_type":"boolean","write_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTechnologyPrototype","order":123,"description":"A Technology prototype.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"allows_productivity","order":15,"description":"","read_type":"boolean","optional":false},{"name":"effects","order":8,"description":"Effects applied when this technology is researched.","read_type":{"complex_type":"array","value":"TechnologyModifier"},"optional":false},{"name":"enabled","order":0,"description":"If this technology prototype is enabled by default (enabled at the beginning of a game).","read_type":"boolean","optional":false},{"name":"essential","order":1,"description":"If this technology prototype is essential, meaning it is shown in the condensed technology graph.","read_type":"boolean","optional":false},{"name":"ignore_tech_cost_multiplier","order":3,"description":"If this technology ignores the technology cost multiplier setting.\n\n[LuaTechnologyPrototype::research_unit_count](runtime:LuaTechnologyPrototype::research_unit_count) will already take this setting into account.","read_type":"boolean","optional":false},{"name":"level","order":11,"description":"The level of this research.","read_type":"uint","optional":false},{"name":"max_level","order":12,"description":"The max level of this research.","read_type":"uint","optional":false},{"name":"object_name","order":17,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"prerequisites","order":5,"description":"Prerequisites of this technology. The result maps technology name to the [LuaTechnologyPrototype](runtime:LuaTechnologyPrototype) object.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaTechnologyPrototype"},"optional":false},{"name":"research_trigger","order":14,"description":"The trigger that will research this technology if any.","read_type":"ResearchTrigger","optional":true},{"name":"research_unit_count","order":9,"description":"The number of research units required for this technology.\n\nThis is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](runtime:LuaTechnologyPrototype::ignore_tech_cost_multiplier) is `true`.","read_type":"uint","optional":false},{"name":"research_unit_count_formula","order":13,"description":"The count formula, if this research has any. See [TechnologyUnit::count_formula](prototype:TechnologyUnit::count_formula) for details.","read_type":"MathExpression","optional":true},{"name":"research_unit_energy","order":10,"description":"Amount of energy required to finish a unit of research.","read_type":"double","optional":false},{"name":"research_unit_ingredients","order":7,"description":"The types of ingredients that labs will require to research this technology.","read_type":{"complex_type":"array","value":"ResearchIngredient"},"optional":false},{"name":"successors","order":6,"description":"Successors of this technology, i.e. technologies which have this technology as a prerequisite.","read_type":{"complex_type":"dictionary","key":"string","value":"LuaTechnologyPrototype"},"optional":false},{"name":"upgrade","order":4,"description":"If the is technology prototype is an upgrade to some other technology.","read_type":"boolean","optional":false},{"name":"valid","order":16,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"visible_when_disabled","order":2,"description":"If this technology will be visible in the research GUI even though it is disabled.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTile","order":124,"description":"A single \"square\" on the map.","abstract":false,"methods":[{"name":"cancel_deconstruction","order":3,"description":"Cancels deconstruction if it is scheduled, does nothing otherwise.","raises":[{"name":"on_cancelled_deconstruction","order":0,"description":"Raised if the tile's deconstruction was successfully cancelled.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force who did the deconstruction order.","type":"ForceID","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[]},{"name":"collides_with","order":0,"description":"What type of things can collide with this tile?","examples":["```\n-- Check if the character would collide with a tile\ngame.player.print(tostring(game.player.surface.get_tile(1, 1).collides_with(\"player\")))\n```"],"parameters":[{"name":"layer","order":0,"description":"","type":"CollisionLayerID","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"get_tile_ghosts","order":5,"description":"Gets all tile ghosts on this tile.","parameters":[{"name":"force","order":0,"description":"Get tile ghosts of this force.","type":"ForceID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The tile ghosts.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"has_tile_ghost","order":4,"description":"Does this tile have any tile ghosts on it.","parameters":[{"name":"force","order":0,"description":"Check for tile ghosts of this force.","type":"ForceID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"order_deconstruction","order":2,"description":"Orders deconstruction of this tile by the given force.","raises":[{"name":"on_marked_for_deconstruction","order":0,"description":"Raised if the tile was successfully marked for deconstruction.","timeframe":"instantly","optional":true}],"parameters":[{"name":"force","order":0,"description":"The force whose robots are supposed to do the deconstruction.","type":"ForceID","optional":false},{"name":"player","order":1,"description":"The player to set the last_user to if any.","type":"PlayerIdentification","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The deconstructible tile proxy created, if any.","type":"LuaEntity","optional":true}]},{"name":"to_be_deconstructed","order":1,"description":"Is this tile marked for deconstruction?","parameters":[{"name":"force","order":0,"description":"The force whose robots are supposed to do the deconstruction. If not given, checks if to be deconstructed by any force.","type":"ForceID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"double_hidden_tile","order":4,"description":"The name of the [LuaTilePrototype](runtime:LuaTilePrototype) double hidden under this tile or `nil` if there is no double hidden tile.\n\nDuring normal gameplay, only [non-mineable](runtime:LuaTilePrototype::mineable_properties) tiles can become double hidden. This can however be circumvented with [LuaSurface::set_double_hidden_tile](runtime:LuaSurface::set_double_hidden_tile).","read_type":"string","optional":true},{"name":"hidden_tile","order":3,"description":"The name of the [LuaTilePrototype](runtime:LuaTilePrototype) hidden under this tile, if any.\n\nDuring normal gameplay, only [non-mineable](runtime:LuaTilePrototype::mineable_properties) or [foundation](runtime:LuaTilePrototype::is_foundation) tiles can become hidden. This can however be circumvented with [LuaSurface::set_hidden_tile](runtime:LuaSurface::set_hidden_tile).","read_type":"string","optional":true},{"name":"name","order":0,"description":"Prototype name of this tile. E.g. `\"sand-3\"` or `\"grass-2\"`.","read_type":"string","optional":false},{"name":"object_name","order":7,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"position","order":2,"description":"The position this tile references.","read_type":"TilePosition","optional":false},{"name":"prototype","order":1,"description":"","read_type":"LuaTilePrototype","optional":false},{"name":"surface","order":5,"description":"The surface this tile is on.","read_type":"LuaSurface","optional":false},{"name":"valid","order":6,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTilePrototype","order":125,"description":"Prototype of a tile.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"absorptions_per_second","order":15,"description":"A table of pollution emissions per second this tile will absorb, indexed by the name of each absorbed pollution type.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"allowed_neighbors","order":8,"description":"","read_type":{"complex_type":"dictionary","key":"string","value":"LuaTilePrototype"},"optional":false},{"name":"allows_being_covered","order":17,"description":"True if this tile can be [hidden](runtime:LuaTile::hidden_tile) or replaced by another tile through player actions.","read_type":"boolean","optional":false},{"name":"ambient_sounds_group","order":30,"description":"","read_type":"LuaTilePrototype","optional":true},{"name":"automatic_neighbors","order":7,"description":"","read_type":"boolean","optional":false},{"name":"autoplace_specification","order":2,"description":"Autoplace specification for this prototype, if any.","read_type":"AutoplaceSpecification","optional":true},{"name":"bound_decoratives","order":29,"description":"","read_type":{"complex_type":"array","value":"LuaDecorativePrototype"},"optional":true},{"name":"can_be_part_of_blueprint","order":14,"description":"False if this tile is not allowed in blueprints regardless of the ability to build it.","read_type":"boolean","optional":false},{"name":"check_collision_with_entities","order":18,"description":"True if building this tile should check for colliding entities above and prevent building if such are found. Also during mining tiles above this tile checks for entities colliding with this tile and prevents mining if such are found.","read_type":"boolean","optional":false},{"name":"collision_mask","order":0,"description":"The collision mask this tile uses","read_type":"CollisionMask","optional":false},{"name":"decorative_removal_probability","order":6,"description":"The probability that decorative entities will be removed from on top of this tile when this tile is generated.","read_type":"float","optional":false},{"name":"default_cover_tile","order":22,"description":"","read_type":"LuaTilePrototype","optional":true},{"name":"default_destroyed_dropped_item_trigger","order":26,"description":"","read_type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"destroys_dropped_items","order":19,"description":"","read_type":"boolean","optional":true},{"name":"fluid","order":11,"description":"The fluid offshore pump produces on this tile, if any.","read_type":"LuaFluidPrototype","optional":true},{"name":"frozen_variant","order":23,"description":"","read_type":"LuaTilePrototype","optional":true},{"name":"is_foundation","order":16,"description":"True if this tile can be used as a foundation for other tiles, false otherwise. Foundation tiles can be [hidden](runtime:LuaTile::hidden_tile).","read_type":"boolean","optional":false},{"name":"items_to_place_this","order":13,"description":"Items that when placed will produce this tile, if any. Construction bots will choose the first item in the list to build this tile.","read_type":{"complex_type":"array","value":"ItemStackDefinition"},"optional":true},{"name":"layer","order":1,"description":"","read_type":"uint","optional":false},{"name":"map_color","order":5,"description":"","read_type":"Color","optional":false},{"name":"max_health","order":20,"description":"","read_type":"float","optional":true},{"name":"mineable_properties","order":10,"description":"","read_type":{"complex_type":"table","parameters":[{"name":"minable","order":0,"description":"Is this tile mineable at all?","type":"boolean","optional":false},{"name":"mining_particle","order":2,"description":"Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.","type":"string","optional":true},{"name":"mining_time","order":1,"description":"Energy required to mine a tile.","type":"double","optional":false},{"name":"products","order":3,"description":"Products obtained by mining this tile.","type":{"complex_type":"array","value":"Product"},"optional":false}]},"optional":false},{"name":"needs_correction","order":9,"description":"If this tile needs correction logic applied when it's generated in the world.","read_type":"boolean","optional":false},{"name":"next_direction","order":12,"description":"The next direction of this tile, if any. Used when a tile has multiple directions (such as hazard concrete)","read_type":"LuaTilePrototype","optional":true},{"name":"object_name","order":32,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"placeable_by","order":28,"description":"","read_type":{"complex_type":"array","value":"SimpleItemStack"},"optional":true},{"name":"scorch_mark_color","order":27,"description":"","read_type":"Color","optional":true},{"name":"thawed_variant","order":24,"description":"","read_type":"LuaTilePrototype","optional":true},{"name":"trigger_effect","order":25,"description":"","read_type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":true},{"name":"valid","order":31,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"vehicle_friction_modifier","order":4,"description":"","read_type":"float","optional":false},{"name":"walking_speed_modifier","order":3,"description":"","read_type":"float","optional":false},{"name":"weight","order":21,"description":"","read_type":"double","optional":true}],"operators":[]},{"name":"LuaTrain","order":126,"description":"A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons.","abstract":false,"methods":[{"name":"clear_fluids_inside","order":10,"description":"Clears all fluids in this train.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"clear_items_inside","order":4,"description":"Clear all items in this train.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_contents","order":1,"description":"Get a mapping of the train's inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"List of all items in the train.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"get_fluid_contents","order":7,"description":"Gets a mapping of the train's fluid inventory.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The counts, indexed by fluid names.","type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false}]},{"name":"get_fluid_count","order":6,"description":"Get the amount of a particular fluid stored in the train.","parameters":[{"name":"fluid","order":0,"description":"Fluid name to count. If not given, counts all fluids.","type":"string","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"double","optional":false}]},{"name":"get_item_count","order":0,"description":"Get the amount of a particular item stored in the train.","parameters":[{"name":"item","order":0,"description":"Item name to count. If not given, counts all items.","type":"ItemID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_rail_end","order":13,"description":"Gets a LuaRailEnd object pointing away from the train at specified end of the train","parameters":[{"name":"direction","order":0,"description":"","type":"defines.rail_direction","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"LuaRailEnd","optional":false}]},{"name":"get_rails","order":12,"description":"Gets all rails under the train.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"go_to_station","order":11,"description":"Go to the station specified by the index in the train's schedule.","parameters":[{"name":"index","order":0,"description":"","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"insert","order":3,"description":"Insert a stack into the train.","parameters":[{"name":"stack","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"insert_fluid","order":9,"description":"Inserts the given fluid into the first available location in this train.","parameters":[{"name":"fluid","order":0,"description":"","type":"Fluid","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The amount inserted.","type":"double","optional":false}]},{"name":"recalculate_path","order":5,"description":"Checks if the path is invalid and tries to re-path if it isn't.","parameters":[{"name":"force","order":0,"description":"Forces the train to re-path regardless of the current path being valid or not.","type":"boolean","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"If the train has a path after the repath attempt.","type":"boolean","optional":false}]},{"name":"remove_fluid","order":8,"description":"Remove some fluid from the train.","parameters":[{"name":"fluid","order":0,"description":"","type":"Fluid","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"The amount of fluid actually removed.","type":"double","optional":false}]},{"name":"remove_item","order":2,"description":"Remove some items from the train.","parameters":[{"name":"stack","order":0,"description":"The amount and type of items to remove","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]}],"attributes":[{"name":"back_end","order":26,"description":"Back end of the train: Rail and direction on that rail where the train will go when moving backward","read_type":"LuaRailEnd","optional":false},{"name":"back_stock","order":12,"description":"The back stock of this train, if any. The back of the train is at the opposite end of the [front](runtime:LuaTrain::front_stock).","read_type":"LuaEntity","optional":true},{"name":"cargo_wagons","order":7,"description":"The cargo carriages the train contains.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"carriages","order":5,"description":"The rolling stocks this train is composed of, with the numbering starting at the [front](runtime:LuaTrain::front_stock) of the train.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"fluid_wagons","order":8,"description":"The fluid carriages the train contains.","read_type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"front_end","order":25,"description":"Front end of the train: Rail and direction on that rail where the train will go when moving forward","read_type":"LuaRailEnd","optional":false},{"name":"front_stock","order":11,"description":"The front stock of this train, if any. The front of the train is in the direction that a majority of locomotives are pointing in. If it's a tie, the North and West directions take precedence.","read_type":"LuaEntity","optional":true},{"name":"group","order":24,"description":"The group this train belongs to.\n\nSetting the group will apply the schedule of the group to this train.","read_type":"string","write_type":"string","optional":false},{"name":"has_path","order":14,"description":"If this train has a path.","read_type":"boolean","optional":false},{"name":"id","order":17,"description":"The unique train ID.","read_type":"uint","optional":false},{"name":"kill_count","order":21,"description":"The total number of kills by this train.","read_type":"uint","optional":false},{"name":"killed_players","order":20,"description":"The players killed by this train.\n\nThe keys are the player indices, the values are how often this train killed that player.","read_type":{"complex_type":"dictionary","key":"uint","value":"uint"},"optional":false},{"name":"locomotives","order":6,"description":"Locomotives of the train.","examples":["```\n-- called on a LuaTrain with 3 locomotives, it returns 3 LuaEntities:\ntrain.locomotives -- => {front_movers = {loco1, loco2}, back_movers = {loco3}}\n```"],"read_type":{"complex_type":"table","parameters":[{"name":"back_movers","order":1,"description":"Array of locomotives.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"front_movers","order":0,"description":"Array of locomotives.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},"optional":false},{"name":"manual_mode","order":0,"description":"When `true`, the train is explicitly controlled by the player or script. When `false`, the train moves autonomously according to its schedule.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"max_backward_speed","order":3,"description":"Current max speed when moving backwards, depends on locomotive prototype and fuel.","read_type":"double","optional":false},{"name":"max_forward_speed","order":2,"description":"Current max speed when moving forward, depends on locomotive prototype and fuel.","read_type":"double","optional":false},{"name":"object_name","order":28,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"passengers","order":18,"description":"The player passengers on the train\n\nThis does *not* index using player index. See [LuaPlayer::index](runtime:LuaPlayer::index) on each player instance for the player index.","read_type":{"complex_type":"array","value":"LuaPlayer"},"optional":false},{"name":"path","order":22,"description":"The path this train is using, if any.","read_type":"LuaRailPath","optional":true},{"name":"path_end_rail","order":15,"description":"The destination rail this train is currently pathing to, if any.","read_type":"LuaEntity","optional":true},{"name":"path_end_stop","order":16,"description":"The destination train stop this train is currently pathing to, if any.","read_type":"LuaEntity","optional":true},{"name":"riding_state","order":19,"description":"The riding state of this train.","read_type":"RidingState","optional":false},{"name":"schedule","order":9,"description":"This train's current schedule, if any. Set to `nil` to clear.\n\nThe schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.","read_type":"TrainSchedule","write_type":"TrainSchedule","optional":true},{"name":"signal","order":23,"description":"The signal this train is arriving or waiting at, if any.","read_type":"LuaEntity","optional":true},{"name":"speed","order":1,"description":"Current speed.\n\nChanging the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc.","read_type":"double","write_type":"double","optional":false},{"name":"state","order":10,"description":"This train's current state.","read_type":"defines.train_state","optional":false},{"name":"station","order":13,"description":"The train stop this train is stopped at, if any.","read_type":"LuaEntity","optional":true},{"name":"valid","order":27,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"weight","order":4,"description":"The weight of this train.","read_type":"double","optional":false}],"operators":[]},{"name":"LuaTrainManager","order":127,"description":"The train manager manages all the train in the game. LuaTrainManager allows to perform some direct queries to the train manager.\n\nThere is always exactly one train manager instance in a game, it can be obtained from [LuaGameScript::train_manager](runtime:LuaGameScript::train_manager). This object is always valid and is equal to any other instance of LuaTrainManager from this game.","abstract":false,"methods":[{"name":"get_train_by_id","order":0,"description":"Searches for a train with given ID.","parameters":[{"name":"train_id","order":0,"description":"Train ID to search","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Train if found","type":"LuaTrain","optional":true}]},{"name":"get_train_stops","order":2,"description":"Gets all train stops that pass given filter","parameters":[{"name":"filter","order":0,"description":"Filters the train stop must pass in order to be returned here","type":"TrainStopFilter","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaEntity"},"optional":false}]},{"name":"get_trains","order":1,"description":"Gets all trains that pass given filter","parameters":[{"name":"filter","order":0,"description":"Filters the train must pass in order to be returned here","type":"TrainFilter","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"LuaTrain"},"optional":false}]},{"name":"request_train_path","order":3,"description":"Direct access to train pathfinder. Allows to search rail paths or querying which stops are accessible","parameters":[{"name":"goals","order":2,"description":"","type":{"complex_type":"array","value":"TrainPathFinderGoal"},"optional":false},{"name":"in_chain_signal_section","order":6,"description":"Defaults to `false`. If set to true, pathfinder will not return a path that cannot have its start immediately reserved. A path that cannot have its start immediately reserved could cause a train to stop inside of an intersection.","type":"boolean","optional":true},{"name":"return_path","order":3,"description":"Only relevant if request type is `\"path\"`. Returning a full path is expensive due to multiple LuaEntity created. In order for path to be returned, true must be provided here. Defaults to false in which case a path will not be provided.","type":"boolean","optional":true},{"name":"search_direction","order":5,"description":"Only relevant if `starts` was not provided in which case 2 starts (front and back) are deduced from the train. Selects which train ends should be considered as starts. Defaults to `\"any-direction-with-locomotives\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"respect-movement-direction"},{"complex_type":"literal","value":"any-direction-with-locomotives"}],"full_format":false},"optional":true},{"name":"shortest_path","order":8,"description":"Defaults to `false`. If set to true, only length of rails is added to penalties causing search to look for shortest path (not smallest penalty)","type":"boolean","optional":true},{"name":"starts","order":4,"description":"Manually provided starting positions.","type":{"complex_type":"array","value":"RailEndStart"},"optional":true},{"name":"steps_limit","order":7,"description":"Maximum amount of steps pathfinder is allowed to perform.","type":"uint","optional":true},{"name":"train","order":1,"description":"Mandatory if `starts` is not provided, optional otherwise. Selects a context for the pathfinder to decide which train to exclude from penalties and which signals are considered possible to reacquire. If `starts` is not provided, then it is also used to collect front and back ends for the search","type":"LuaTrain","optional":true},{"name":"type","order":0,"description":"Request type. Determines the return type of the method. Defaults to `\"path\"`.","type":"TrainPathRequestType","optional":true}],"format":{"takes_table":true,"table_optional":false},"return_values":[{"order":0,"description":"The type of the returned value depends on `type`.","type":{"complex_type":"union","options":["TrainPathFinderOneGoalResult","TrainPathAllGoalsResult"],"full_format":false},"optional":false}]}],"attributes":[{"name":"object_name","order":1,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"valid","order":0,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTrainStopControlBehavior","order":128,"description":"Control behavior for train stops.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":11,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"priority_signal","order":9,"description":"The signal to be used by set-priority change priority of the train stop","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"read_from_train","order":1,"description":"`true` if the train stop should send the train contents to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_stopped_train","order":2,"description":"`true` if the train stop should send the stopped train id to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_trains_count","order":4,"description":"`true` if the train stop should send amount of incoming trains to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"send_to_train","order":0,"description":"`true` if the train stop should send the circuit network contents to the train to use.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"set_priority","order":8,"description":"`true` if the priority_signal is used to set a priority of the train stop.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"set_trains_limit","order":3,"description":"`true` if the trains_limit_signal is used to set a limit of trains incoming for train stop.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"stopped_train_signal","order":5,"description":"The signal that will be sent when using the send-train-id option.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"trains_count_signal","order":6,"description":"The signal that will be sent when using the read-trains-count option.","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"trains_limit_signal","order":7,"description":"The signal to be used by set-trains-limit to limit amount of incoming trains","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"valid","order":10,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTransportBeltControlBehavior","order":129,"description":"Control behavior for transport belts.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":3,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_contents","order":0,"description":"If the belt will read the contents and send them to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"read_contents_mode","order":1,"description":"The read mode for the belt.","read_type":"defines.control_behavior.transport_belt.content_read_mode","write_type":"defines.control_behavior.transport_belt.content_read_mode","optional":false},{"name":"valid","order":2,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTransportLine","order":130,"description":"One line on a transport belt.","abstract":false,"methods":[{"name":"can_insert_at","order":3,"description":"Can an item be inserted at a given position?","parameters":[{"name":"position","order":0,"description":"Where to insert an item.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"can_insert_at_back","order":4,"description":"Can an item be inserted at the back of this line?","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"clear","order":0,"description":"Remove all items from this transport line.","parameters":[],"format":{"takes_table":false},"return_values":[]},{"name":"get_contents","order":7,"description":"Get counts of all items on this line, similar to how [LuaInventory::get_contents](runtime:LuaInventory::get_contents) does.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"List of all items on this line.","type":{"complex_type":"array","value":"ItemCountWithQuality"},"optional":false}]},{"name":"get_detailed_contents","order":8,"description":"Get detailed information of items on this line, such as their position.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"DetailedItemOnLine"},"optional":false}]},{"name":"get_item_count","order":1,"description":"Count some or all items on this line, similar to how [LuaInventory::get_item_count](runtime:LuaInventory::get_item_count) does.","parameters":[{"name":"item","order":0,"description":"Prototype name of the item to count. If not specified, count all items.","type":"ItemID","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_line_item_position","order":10,"description":"Get a map position related to a position on a transport line.","parameters":[{"name":"position","order":0,"description":"Linear position along the transport line. Clamped to the transport line range.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"MapPosition","optional":false}]},{"name":"insert_at","order":5,"description":"Insert items at a given position.","parameters":[{"name":"belt_stack_size","order":2,"description":"Maximum size of stack created on belt","type":"uint8","optional":true},{"name":"items","order":1,"description":"Items to insert.","type":"ItemStackIdentification","optional":false},{"name":"position","order":0,"description":"Where on the line to insert the items.","type":"float","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Were the items inserted successfully?","type":"boolean","optional":false}]},{"name":"insert_at_back","order":6,"description":"Insert items at the back of this line.","parameters":[{"name":"belt_stack_size","order":1,"description":"Maximum size of stack created on belt","type":"uint8","optional":true},{"name":"items","order":0,"description":"","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Were the items inserted successfully?","type":"boolean","optional":false}]},{"name":"line_equals","order":9,"description":"Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.\n\nThis can return true even when the [LuaTransportLine::owner](runtime:LuaTransportLine::owner)s are different (so `this == other` is false), because the internal transport lines can span multiple tiles.","parameters":[{"name":"other","order":0,"description":"","type":"LuaTransportLine","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"remove_item","order":2,"description":"Remove some items from this line.","parameters":[{"name":"items","order":0,"description":"Items to remove.","type":"ItemStackIdentification","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Number of items actually removed.","type":"uint","optional":false}]}],"attributes":[{"name":"input_lines","order":2,"description":"The transport lines that this transport line is fed by or an empty table if none.","read_type":{"complex_type":"array","value":"LuaTransportLine"},"optional":false},{"name":"line_length","order":3,"description":"Length of the transport line. Items can be inserted at line position from 0 up to returned value","read_type":"float","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"output_lines","order":1,"description":"The transport lines that this transport line outputs items to or an empty table if none.","read_type":{"complex_type":"array","value":"LuaTransportLine"},"optional":false},{"name":"owner","order":0,"description":"The entity this transport line belongs to.","read_type":"LuaEntity","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[{"name":"index","order":0,"description":"The indexing operator.","read_type":"LuaItemStack","optional":false},{"name":"length","order":1,"description":"Get the number of items on this transport line.","read_type":"uint","optional":false}]},{"name":"LuaTrivialSmokePrototype","order":131,"description":"Prototype of a trivial smoke.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"affected_by_wind","order":10,"description":"","read_type":"boolean","optional":false},{"name":"color","order":0,"description":"","read_type":"Color","optional":false},{"name":"cyclic","order":9,"description":"","read_type":"boolean","optional":false},{"name":"duration","order":4,"description":"","read_type":"uint","optional":false},{"name":"end_scale","order":2,"description":"","read_type":"double","optional":false},{"name":"fade_away_duration","order":6,"description":"","read_type":"uint","optional":false},{"name":"fade_in_duration","order":7,"description":"","read_type":"uint","optional":false},{"name":"glow_animation","order":12,"description":"","read_type":"boolean","optional":false},{"name":"glow_fade_away_duration","order":8,"description":"","read_type":"uint","optional":false},{"name":"movement_slow_down_factor","order":3,"description":"","read_type":"double","optional":false},{"name":"object_name","order":15,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_layer","order":13,"description":"","read_type":"RenderLayer","optional":false},{"name":"show_when_smoke_off","order":11,"description":"","read_type":"boolean","optional":false},{"name":"spread_duration","order":5,"description":"","read_type":"uint","optional":false},{"name":"start_scale","order":1,"description":"","read_type":"double","optional":false},{"name":"valid","order":14,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaTurretControlBehavior","order":132,"description":"Control behavior for turrets.","parent":"LuaGenericOnOffControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"ignore_unlisted_targets_condition","order":2,"description":"The condition under which the turret will ignore targets not on its priority list.","read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"read_ammo","order":3,"description":"`true` if the turret will send the ammunition or fluid it contains to the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"set_ignore_unlisted_targets","order":1,"description":"`true` if the turret will ignore targets not on its priority list if a circuit condition is met.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"set_priority_list","order":0,"description":"`true` if the turret's target priority list will be determined from the signals on the circuit network.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaUndoRedoStack","order":133,"description":"The undo queue for a player. The term `item_index` refers to the index of an undo item in the queue, while `action_index` refers to the index of one of the individual actions that make up an undo item.","abstract":false,"methods":[{"name":"get_redo_item","order":4,"description":"Gets an undo item from the redo stack.","parameters":[{"name":"index","order":0,"description":"The index of the item to get, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"UndoRedoAction"},"optional":false}]},{"name":"get_redo_item_count","order":5,"description":"The number of undo items in the redo stack.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_redo_tag","order":13,"description":"Gets the tag with the given name from a specific redo item action, or `nil` if it doesn't exist.","parameters":[{"name":"action_index","order":1,"description":"The index of the redo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the redo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag_name","order":2,"description":"The name of the tag to get.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":false}]},{"name":"get_redo_tags","order":12,"description":"Gets all tags for the given redo action.","parameters":[{"name":"action_index","order":1,"description":"The index of the redo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the redo item, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Tags","optional":false}]},{"name":"get_undo_item","order":0,"description":"Gets an undo item from the undo stack.","parameters":[{"name":"index","order":0,"description":"The index of the undo item to get, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":{"complex_type":"array","value":"UndoRedoAction"},"optional":false}]},{"name":"get_undo_item_count","order":1,"description":"The number undo items in the undo stack.","parameters":[],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]},{"name":"get_undo_tag","order":9,"description":"Gets the tag with the given name from a specific undo item action, or `nil` if it doesn't exist.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag_name","order":2,"description":"The name of the tag to get.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"AnyBasic","optional":false}]},{"name":"get_undo_tags","order":8,"description":"Gets all tags for the given undo action.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"Tags","optional":false}]},{"name":"remove_redo_action","order":7,"description":"Removes an undo action from the specified undo item on the redo stack.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action to remove.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item to change, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_redo_item","order":6,"description":"Removes an undo item from the redo stack.","parameters":[{"name":"index","order":0,"description":"The index of the undo item to remove, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_redo_tag","order":15,"description":"Removes a tag with the given name from the specified redo item.","parameters":[{"name":"action_index","order":1,"description":"The index of the redo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the redo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag","order":2,"description":"The name of the tag to remove.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the tag existed and was successfully removed.","type":"boolean","optional":false}]},{"name":"remove_undo_action","order":3,"description":"Removes an undo action from the specified undo item on the undo stack.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action to remove.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item to change, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_undo_item","order":2,"description":"Removes an undo item from the undo stack.","parameters":[{"name":"index","order":0,"description":"The index of the undo item to remove, ordered from most recent to oldest.","type":"uint","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"remove_undo_tag","order":11,"description":"Removes a tag with the given name from the specified undo item.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag","order":2,"description":"The name of the tag to remove.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether the tag existed and was successfully removed.","type":"boolean","optional":false}]},{"name":"set_redo_tag","order":14,"description":"Sets a new tag with the given name and value on the specified redo item action.","parameters":[{"name":"action_index","order":1,"description":"The index of the redo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the redo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag","order":3,"description":"The contents of the new tag.","type":"AnyBasic","optional":false},{"name":"tag_name","order":2,"description":"The name of the tag to set.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"set_undo_tag","order":10,"description":"Sets a new tag with the given name and value on the specified undo item action.","parameters":[{"name":"action_index","order":1,"description":"The index of the undo action.","type":"uint","optional":false},{"name":"item_index","order":0,"description":"The index of the undo item, ordered from most recent to oldest.","type":"uint","optional":false},{"name":"tag","order":3,"description":"The contents of the new tag.","type":"AnyBasic","optional":false},{"name":"tag_name","order":2,"description":"The name of the tag to set.","type":"string","optional":false}],"format":{"takes_table":false},"return_values":[]}],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"player_index","order":0,"description":"The index of the player to whom this stack belongs to.","read_type":"uint","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaVirtualSignalPrototype","order":134,"description":"Prototype of a virtual signal.","parent":"LuaPrototypeBase","abstract":false,"methods":[],"attributes":[{"name":"object_name","order":2,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"special","order":0,"description":"Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.","read_type":"boolean","optional":false},{"name":"valid","order":1,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaVoidEnergySourcePrototype","order":135,"description":"Prototype of a void energy source.","abstract":false,"methods":[],"attributes":[{"name":"emissions_per_joule","order":0,"description":"The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.","read_type":{"complex_type":"dictionary","key":"string","value":"double"},"optional":false},{"name":"object_name","order":4,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"render_no_network_icon","order":1,"description":"","read_type":"boolean","optional":false},{"name":"render_no_power_icon","order":2,"description":"","read_type":"boolean","optional":false},{"name":"valid","order":3,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaWallControlBehavior","order":136,"description":"Control behavior for walls.","parent":"LuaControlBehavior","abstract":false,"methods":[],"attributes":[{"name":"circuit_condition","order":0,"description":"The circuit condition.","read_type":"CircuitConditionDefinition","write_type":"CircuitConditionDefinition","optional":false},{"name":"object_name","order":5,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"open_gate","order":1,"description":"","read_type":"boolean","write_type":"boolean","optional":false},{"name":"output_signal","order":3,"description":"","read_type":"SignalID","write_type":"SignalID","optional":true},{"name":"read_sensor","order":2,"description":"","read_type":"boolean","write_type":"boolean","optional":false},{"name":"valid","order":4,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false}],"operators":[]},{"name":"LuaWireConnector","order":137,"description":"A wire connector of a given entity. Allows to find wires, add or remove wires and do some basic operations specific to those connectors.","abstract":false,"methods":[{"name":"can_wire_reach","order":4,"description":"Checks if a wire can reach from this connector to the other connector.","parameters":[{"name":"other_connector","order":0,"description":"Target to which a wire reach is to be checked.","type":{"complex_type":"union","options":["LuaWireConnector","LuaEntity"],"full_format":false},"optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"connect_to","order":1,"description":"Connects this connector to other wire connector.","parameters":[{"name":"origin","order":2,"description":"Origin of the wire. Defaults to `defines.wire_origin.player`.","type":"defines.wire_origin","optional":true},{"name":"reach_check","order":1,"description":"True by default. For wires out of reach or on different surfaces, `false` must be provided.","type":"boolean","optional":true},{"name":"target","order":0,"description":"Other connector to which a wire should be added.","type":"LuaWireConnector","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether a connection was made.","type":"boolean","optional":false}]},{"name":"disconnect_all","order":3,"description":"Removes all wires going out of this wire connector.","parameters":[{"name":"origin","order":0,"description":"Origin of the wires to remove. Defaults to `defines.wire_origin.player`.","type":"defines.wire_origin","optional":true}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"True if any wire was removed.","type":"boolean","optional":false}]},{"name":"disconnect_from","order":2,"description":"Disconnects this connector from other wire connector.","parameters":[{"name":"origin","order":1,"description":"Origin of the wire. Defaults to `defines.wire_origin.player`.","type":"defines.wire_origin","optional":true},{"name":"target","order":0,"description":"Other connector to which wire to be removed should be removed.","type":"LuaWireConnector","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"Whether a connection was removed.","type":"boolean","optional":false}]},{"name":"have_common_neighbour","order":5,"description":"Checks if this and other wire connector have a common neighbour.","parameters":[{"name":"ignore_ghost_neighbours","order":1,"description":"","type":"boolean","optional":true},{"name":"other_connector","order":0,"description":"Other connector to check for common neighbour.","type":"LuaWireConnector","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]},{"name":"is_connected_to","order":0,"description":"Checks if this connector has any wire going to the other connector.","parameters":[{"name":"origin","order":1,"description":"Origin of the wire. Defaults to `defines.wire_origin.player`.","type":"defines.wire_origin","optional":true},{"name":"target","order":0,"description":"Other connector to check for a connection to.","type":"LuaWireConnector","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"boolean","optional":false}]}],"attributes":[{"name":"connection_count","order":4,"description":"Amount of wires going out of this connector. It includes all wires (ghost wires and real wires).","read_type":"uint","optional":false},{"name":"connections","order":5,"description":"All wire connectors this connector is connected to.","read_type":{"complex_type":"array","value":"WireConnection"},"optional":false},{"name":"is_ghost","order":3,"description":"If this connector is owned by an entity inside of a ghost. If any of 2 ends of a wire attaches to a ghost connector, then a wire is considered to be a ghost.","read_type":"boolean","optional":false},{"name":"network_id","order":8,"description":"Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. Returns 0 if there is no network associated with this wire connector right now. CircuitNetwork indexes are independent of indexes of ElectricSubNetwork so they may collide with each other","read_type":"uint","optional":false},{"name":"object_name","order":10,"description":"The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.","read_type":"string","optional":false},{"name":"owner","order":0,"description":"The entity this wire connector belongs to. May return entity ghost instead if this wire connector belongs to inner entity.","read_type":"LuaEntity","optional":false},{"name":"real_connection_count","order":6,"description":"Amount of real wires going out of this connector. It only includes wires for which both wire connectors are real.","read_type":"uint","optional":false},{"name":"real_connections","order":7,"description":"All wire connectors this connector is connected to with real wires.","read_type":{"complex_type":"array","value":"WireConnection"},"optional":false},{"name":"valid","order":9,"description":"Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.","read_type":"boolean","optional":false},{"name":"wire_connector_id","order":2,"description":"Identifier of this connector in the entity this connector belongs to.","read_type":"defines.wire_connector_id","optional":false},{"name":"wire_type","order":1,"description":"The type of wires that can be connected to this connector.","read_type":"defines.wire_type","optional":false}],"operators":[]}],"events":[{"name":"CustomInputEvent","order":0,"description":"Called when a [CustomInputPrototype](prototype:CustomInputPrototype) is activated.","examples":["```\n-- This will be raised when a custom input with the name \"my-potato-control\" and action \"lua\" is pressed\nscript.on_event(\"my-potato-control\", function(event)\n  game.print(\"Keyboard shortcut pressed on tick: \" ..tostring(event.tick))\nend)\n```"],"data":[{"name":"cursor_display_location","order":3,"description":"The mouse cursor display location when the custom input was activated.","type":"GuiLocation","optional":false},{"name":"cursor_position","order":2,"description":"The mouse cursor position when the custom input was activated.","type":"MapPosition","optional":false},{"name":"input_name","order":1,"description":"The prototype name of the custom input that was activated.","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that activated the custom input.","type":"uint","optional":false},{"name":"selected_prototype","order":4,"description":"Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.","type":"SelectedPrototypeData","optional":true},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_achievement_gained","order":1,"description":"Called when an achievement is gained.","data":[{"name":"achievement","order":1,"description":"","type":"LuaAchievementPrototype","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who gained the achievement.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_ai_command_completed","order":2,"description":"Called when a unit/group completes a command.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"result","order":1,"description":"","type":"defines.behavior_result","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit_number","order":0,"description":"unit_number/group_number of the unit/group which just completed a command.","type":"uint","optional":false},{"name":"was_distracted","order":2,"description":"Was this command generated by a distraction.","type":"boolean","optional":false}]},{"name":"on_area_cloned","order":3,"description":"Called when an area of the map is cloned.","data":[{"name":"clear_destination_decoratives","order":9,"description":"","type":"boolean","optional":false},{"name":"clear_destination_entities","order":8,"description":"","type":"boolean","optional":false},{"name":"clone_decoratives","order":7,"description":"","type":"boolean","optional":false},{"name":"clone_entities","order":6,"description":"","type":"boolean","optional":false},{"name":"clone_tiles","order":5,"description":"","type":"boolean","optional":false},{"name":"destination_area","order":3,"description":"","type":"BoundingBox","optional":false},{"name":"destination_force","order":4,"description":"","type":"LuaForce","optional":true},{"name":"destination_surface","order":2,"description":"","type":"LuaSurface","optional":false},{"name":"name","order":10,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_area","order":1,"description":"","type":"BoundingBox","optional":false},{"name":"source_surface","order":0,"description":"","type":"LuaSurface","optional":false},{"name":"tick","order":11,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_biter_base_built","order":4,"description":"Called when a biter migration builds a base.\n\nThis will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.","data":[{"name":"entity","order":0,"description":"The entity that was built.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_brush_cloned","order":5,"description":"Called when a set of positions on the map is cloned.","data":[{"name":"clear_destination_decoratives","order":10,"description":"","type":"boolean","optional":false},{"name":"clear_destination_entities","order":9,"description":"","type":"boolean","optional":false},{"name":"clone_decoratives","order":8,"description":"","type":"boolean","optional":false},{"name":"clone_entities","order":7,"description":"","type":"boolean","optional":false},{"name":"clone_tiles","order":6,"description":"","type":"boolean","optional":false},{"name":"destination_force","order":5,"description":"","type":"LuaForce","optional":true},{"name":"destination_offset","order":1,"description":"","type":"TilePosition","optional":false},{"name":"destination_surface","order":4,"description":"","type":"LuaSurface","optional":false},{"name":"name","order":11,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_offset","order":0,"description":"","type":"TilePosition","optional":false},{"name":"source_positions","order":3,"description":"","type":{"complex_type":"array","value":"TilePosition"},"optional":false},{"name":"source_surface","order":2,"description":"","type":"LuaSurface","optional":false},{"name":"tick","order":12,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_build_base_arrived","order":6,"description":"Called when a [defines.command.build_base](runtime:defines.command.build_base) command reaches its destination, and before building starts.","data":[{"name":"group","order":1,"description":"The unit group the command was assigned to.","type":"LuaCommandable","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"The unit the command was assigned to.","type":"LuaEntity","optional":true}]},{"name":"on_built_entity","order":7,"description":"Called when player builds something.","data":[{"name":"consumed_items","order":2,"description":"","type":"LuaInventory","optional":false},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tags","order":3,"description":"The tags associated with this entity if any.","type":"Tags","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPlayerBuiltEntityEventFilter"},{"name":"on_cancelled_deconstruction","order":8,"description":"Called when the deconstruction of an entity is canceled.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityDeconstructionCancelledEventFilter"},{"name":"on_cancelled_upgrade","order":9,"description":"Called when the upgrade of an entity is canceled.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"quality","order":3,"description":"","type":"LuaQualityPrototype","optional":false},{"name":"target","order":2,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaUpgradeCancelledEventFilter"},{"name":"on_character_corpse_expired","order":10,"description":"Called when a character corpse expires due to timeout or all of the items being removed from it.\n\nthis is not called if the corpse is mined. See [defines.events.on_pre_player_mined_item](runtime:defines.events.on_pre_player_mined_item) to detect that.","data":[{"name":"corpse","order":0,"description":"The corpse.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_added","order":11,"description":"Called when a chart tag is created.","data":[{"name":"force","order":1,"description":"","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_modified","order":12,"description":"Called when a chart tag is modified by a player.","data":[{"name":"force","order":2,"description":"","type":"LuaForce","optional":false},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_icon","order":4,"description":"","type":"SignalID","optional":false},{"name":"old_player_index","order":7,"description":"","type":"uint","optional":true},{"name":"old_position","order":5,"description":"","type":"MapPosition","optional":false},{"name":"old_surface","order":6,"description":"","type":"LuaSurface","optional":false},{"name":"old_text","order":3,"description":"","type":"string","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chart_tag_removed","order":13,"description":"Called just before a chart tag is deleted.","data":[{"name":"force","order":1,"description":"","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":true},{"name":"tag","order":0,"description":"","type":"LuaCustomChartTag","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_charted","order":14,"description":"Called when a chunk is charted or re-charted.","data":[{"name":"area","order":2,"description":"Area of the chunk.","type":"BoundingBox","optional":false},{"name":"force","order":3,"description":"","type":"LuaForce","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":1,"description":"","type":"ChunkPosition","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_deleted","order":15,"description":"Called when one or more chunks are deleted using [LuaSurface::delete_chunk](runtime:LuaSurface::delete_chunk).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"positions","order":1,"description":"The chunks deleted.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_chunk_generated","order":16,"description":"Called when a chunk is generated.","data":[{"name":"area","order":0,"description":"Area of the chunk.","type":"BoundingBox","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":1,"description":"Position of the chunk.","type":"ChunkPosition","optional":false},{"name":"surface","order":2,"description":"The surface the chunk is on.","type":"LuaSurface","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_combat_robot_expired","order":17,"description":"Called when a combat robot expires through a lack of energy, or timeout.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"owner","order":1,"description":"The entity that owns the robot if any.","type":"LuaEntity","optional":true},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_console_chat","order":18,"description":"Called when a message is sent to the in-game console, either by a player or through the server interface.\n\nThis event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).","data":[{"name":"message","order":1,"description":"The chat message that was sent.","type":"string","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the chatting, if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_console_command","order":19,"description":"Called when someone enters a command-like message regardless of it being a valid command.","data":[{"name":"command","order":1,"description":"The command as typed without the preceding forward slash ('/').","type":"string","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"parameters","order":2,"description":"The parameters provided if any.","type":"string","optional":false},{"name":"player_index","order":0,"description":"The player if any.","type":"uint","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_cancelled","order":20,"description":"Called when a cutscene is cancelled by the player or by script.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player the cutscene was shown to.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_finished","order":21,"description":"Called when a cutscene finishes naturally (was not cancelled).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player the cutscene was shown to.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_started","order":22,"description":"Called when a cutscene starts.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player the cutscene is being shown to.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_cutscene_waypoint_reached","order":23,"description":"Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.\n\nThis refers to an index in the table previously passed to set_controller which started the cutscene.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player index of the player viewing the cutscene.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"waypoint_index","order":1,"description":"The index of the waypoint we just completed.","type":"uint","optional":false}]},{"name":"on_entity_cloned","order":24,"description":"Called when an entity is cloned. The filter applies to the source entity.","data":[{"name":"destination","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityClonedEventFilter"},{"name":"on_entity_color_changed","order":25,"description":"Called after an entity has been recolored either by the player or through script.\n\nAutomatic recoloring due to [LuaPlayer::color](runtime:LuaPlayer::color) will not raise events, as that is a separate mechanism.","data":[{"name":"entity","order":0,"description":"The entity that was recolored.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_damaged","order":26,"description":"Called when an entity is damaged. This is not called when an entities health is set directly by another mod.","data":[{"name":"cause","order":5,"description":"The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).","type":"LuaEntity","optional":true},{"name":"damage_type","order":1,"description":"","type":"LuaDamagePrototype","optional":false},{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"final_damage_amount","order":3,"description":"The damage amount after resistances.","type":"float","optional":false},{"name":"final_health","order":4,"description":"The health of the entity after the damage was applied.","type":"float","optional":false},{"name":"force","order":7,"description":"The force that did the attacking if any.","type":"LuaForce","optional":true},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"original_damage_amount","order":2,"description":"The damage amount before resistances.","type":"float","optional":false},{"name":"source","order":6,"description":"The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).","type":"LuaEntity","optional":true},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityDamagedEventFilter"},{"name":"on_entity_died","order":27,"description":"Called when an entity dies.","data":[{"name":"cause","order":1,"description":"The entity that did the killing if available.","type":"LuaEntity","optional":true},{"name":"damage_type","order":4,"description":"The damage type if any.","type":"LuaDamagePrototype","optional":true},{"name":"entity","order":0,"description":"The entity that died.","type":"LuaEntity","optional":false},{"name":"force","order":3,"description":"The force that did the killing if any.","type":"LuaForce","optional":true},{"name":"loot","order":2,"description":"The loot generated by this entity if any.","type":"LuaInventory","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityDiedEventFilter"},{"name":"on_entity_logistic_slot_changed","order":28,"description":"Called when one of an entity's logistic slots changes.","data":[{"name":"entity","order":1,"description":"The entity for whom a logistic slot was changed.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed the slot, or `nil` if changed by script.","type":"uint","optional":true},{"name":"section","order":2,"description":"The section changed.","type":"LuaLogisticSection","optional":false},{"name":"slot_index","order":3,"description":"The slot index that was changed.","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_renamed","order":29,"description":"Called after an entity has been renamed either by the player or through script.","data":[{"name":"by_script","order":1,"description":"","type":"boolean","optional":false},{"name":"entity","order":2,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_name","order":3,"description":"","type":"string","optional":false},{"name":"player_index","order":0,"description":"If by_script is true this will not be included.","type":"uint","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_settings_pasted","order":30,"description":"Called after entity copy-paste is done.","data":[{"name":"destination","order":2,"description":"The destination entity settings were copied to.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"source","order":1,"description":"The source entity settings were copied from.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_entity_spawned","order":31,"description":"Called when an entity is spawned by a EnemySpawner","data":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"spawner","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_equipment_inserted","order":32,"description":"Called after equipment is inserted into an equipment grid.","data":[{"name":"equipment","order":1,"description":"The equipment inserted.","type":"LuaEquipment","optional":false},{"name":"grid","order":0,"description":"The equipment grid inserted into.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_equipment_removed","order":33,"description":"Called after equipment is removed from an equipment grid.","data":[{"name":"count","order":3,"description":"The count of equipment removed.","type":"uint","optional":false},{"name":"equipment","order":1,"description":"The equipment removed.","type":"string","optional":false},{"name":"grid","order":0,"description":"The equipment grid removed from.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"quality","order":2,"description":"The equipment quality.","type":"string","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_cease_fire_changed","order":34,"description":"Called when the a forces cease fire values change.","data":[{"name":"added","order":2,"description":"If the other force was added or removed.","type":"boolean","optional":false},{"name":"force","order":0,"description":"The force who's cease fire changed.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_force","order":1,"description":"Which force was added or removed.","type":"LuaForce","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_created","order":35,"description":"Called when a new force is created using `game.create_force()`\n\nThis is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.","data":[{"name":"force","order":0,"description":"The newly created force.","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_friends_changed","order":36,"description":"Called when the a forces friends change.","data":[{"name":"added","order":2,"description":"If the other force was added or removed.","type":"boolean","optional":false},{"name":"force","order":0,"description":"The force who's friends changed.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_force","order":1,"description":"Which force was added or removed.","type":"LuaForce","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_force_reset","order":37,"description":"Called when [LuaForce::reset](runtime:LuaForce::reset) is finished.","data":[{"name":"force","order":0,"description":"","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_forces_merged","order":38,"description":"Called after two forces have been merged using `game.merge_forces()`.\n\nThe source force is invalidated before this event is called and the name can be re-used in this event if desired.","data":[{"name":"destination","order":2,"description":"The force entities where reassigned to.","type":"LuaForce","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_index","order":1,"description":"The index of the destroyed force.","type":"uint","optional":false},{"name":"source_name","order":0,"description":"The force destroyed.","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_forces_merging","order":39,"description":"Called when two forces are about to be merged using `game.merge_forces()`.","data":[{"name":"destination","order":1,"description":"The force to reassign entities to.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":0,"description":"The force to be destroyed","type":"LuaForce","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_game_created_from_scenario","order":40,"description":"Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, [LuaBootstrap::on_init](runtime:LuaBootstrap::on_init) is not fired.\n\nThis event is not fired when the scenario is loaded via the map editor.","data":[{"name":"name","order":0,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_checked_state_changed","order":41,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) checked state is changed (related to checkboxes and radio buttons).","data":[{"name":"element","order":0,"description":"The element whose checked state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_click","order":42,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) is clicked.","data":[{"name":"alt","order":4,"description":"If alt was pressed.","type":"boolean","optional":false},{"name":"button","order":2,"description":"The mouse button used if any.","type":"defines.mouse_button_type","optional":false},{"name":"control","order":5,"description":"If control was pressed.","type":"boolean","optional":false},{"name":"cursor_display_location","order":3,"description":"The display location of the player's cursor.","type":"GuiLocation","optional":false},{"name":"element","order":0,"description":"The clicked element.","type":"LuaGuiElement","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the clicking.","type":"uint","optional":false},{"name":"shift","order":6,"description":"If shift was pressed.","type":"boolean","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_closed","order":43,"description":"Called when the player closes the GUI they have open.\n\nThis can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.\n\nIt's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.","data":[{"name":"element","order":6,"description":"The custom GUI element that was open","type":"LuaGuiElement","optional":true},{"name":"entity","order":2,"description":"The entity that was open","type":"LuaEntity","optional":true},{"name":"equipment","order":4,"description":"The equipment that was open","type":"LuaEquipment","optional":true},{"name":"gui_type","order":1,"description":"The GUI type that was open.","type":"defines.gui_type","optional":false},{"name":"inventory","order":9,"description":"The script inventory that was open","type":"LuaInventory","optional":true},{"name":"item","order":3,"description":"The item that was open","type":"LuaItemStack","optional":true},{"name":"name","order":10,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_player","order":5,"description":"The other player that was open","type":"LuaPlayer","optional":true},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"technology","order":7,"description":"The technology that was automatically selected when opening the research GUI","type":"LuaTechnology","optional":true},{"name":"tick","order":11,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile_position","order":8,"description":"The tile position that was open","type":"TilePosition","optional":true}]},{"name":"on_gui_confirmed","order":44,"description":"Called when a [LuaGuiElement](runtime:LuaGuiElement) is confirmed, for example by pressing Enter in a textfield.","data":[{"name":"alt","order":2,"description":"If alt was pressed.","type":"boolean","optional":false},{"name":"control","order":3,"description":"If control was pressed.","type":"boolean","optional":false},{"name":"element","order":0,"description":"The confirmed element.","type":"LuaGuiElement","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the confirming.","type":"uint","optional":false},{"name":"shift","order":4,"description":"If shift was pressed.","type":"boolean","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_elem_changed","order":45,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) element value is changed (related to choose element buttons).","data":[{"name":"element","order":0,"description":"The element whose element value changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_hover","order":46,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) is hovered by the mouse.","data":[{"name":"element","order":0,"description":"The element that is being hovered over.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player whose cursor is hovering.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_leave","order":47,"description":"Called when the player's cursor leaves a [LuaGuiElement](runtime:LuaGuiElement) that was previously hovered.","data":[{"name":"element","order":0,"description":"The element that was being hovered.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player whose cursor was hovering.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_location_changed","order":48,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) element location is changed (related to frames in `player.gui.screen`).","data":[{"name":"element","order":0,"description":"The element whose location changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_opened","order":49,"description":"Called when the player opens a GUI.","data":[{"name":"element","order":6,"description":"The custom GUI element that was opened","type":"LuaGuiElement","optional":true},{"name":"entity","order":2,"description":"The entity that was opened","type":"LuaEntity","optional":true},{"name":"equipment","order":4,"description":"The equipment that was opened","type":"LuaEquipment","optional":true},{"name":"gui_type","order":1,"description":"The GUI type that was opened.","type":"defines.gui_type","optional":false},{"name":"inventory","order":7,"description":"The script inventory that was opened","type":"LuaInventory","optional":true},{"name":"item","order":3,"description":"The item that was opened","type":"LuaItemStack","optional":true},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"other_player","order":5,"description":"The other player that was opened","type":"LuaPlayer","optional":true},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_selected_tab_changed","order":50,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) selected tab is changed (related to tabbed-panes).","data":[{"name":"element","order":0,"description":"The tabbed pane whose selected tab changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_selection_state_changed","order":51,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) selection state is changed (related to drop-downs and listboxes).","data":[{"name":"element","order":0,"description":"The element whose selection state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_switch_state_changed","order":52,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) switch state is changed (related to switches).","data":[{"name":"element","order":0,"description":"The switch whose switch state changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_text_changed","order":53,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) text is changed by the player.","data":[{"name":"element","order":0,"description":"The edited element.","type":"LuaGuiElement","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the edit.","type":"uint","optional":false},{"name":"text","order":2,"description":"The new text in the element.","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_gui_value_changed","order":54,"description":"Called when [LuaGuiElement](runtime:LuaGuiElement) slider value is changed (related to the slider element).","data":[{"name":"element","order":0,"description":"The element whose value changed.","type":"LuaGuiElement","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who did the change.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_land_mine_armed","order":55,"description":"Called when a land mine is armed.","data":[{"name":"mine","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_lua_shortcut","order":56,"description":"Called when a custom [Lua shortcut](prototype:ShortcutPrototype) is pressed.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"prototype_name","order":1,"description":"Shortcut prototype name of the shortcut that was clicked.","type":"string","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_marked_for_deconstruction","order":57,"description":"Called when an entity is marked for deconstruction with the Deconstruction planner or via script.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityMarkedForDeconstructionEventFilter"},{"name":"on_marked_for_upgrade","order":58,"description":"Called when an entity is marked for upgrade with the Upgrade planner or via script.","data":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":true},{"name":"quality","order":3,"description":"","type":"LuaQualityPrototype","optional":false},{"name":"target","order":2,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaEntityMarkedForUpgradeEventFilter"},{"name":"on_market_item_purchased","order":59,"description":"Called after a player purchases some offer from a `market` entity.","data":[{"name":"count","order":3,"description":"The amount of offers purchased.","type":"uint","optional":false},{"name":"market","order":1,"description":"The market entity.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"offer_index","order":2,"description":"The index of the offer purchased.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player who did the purchasing.","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_mod_item_opened","order":60,"description":"Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag","data":[{"name":"item","order":1,"description":"The item clicked on.","type":"LuaItemPrototype","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"quality","order":2,"description":"The item quality clicked on.","type":"LuaQualityPrototype","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_object_destroyed","order":61,"description":"Called after an object is destroyed that has been registered with [LuaBootstrap::register_on_object_destroyed](runtime:LuaBootstrap::register_on_object_destroyed).\n\nDepending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"registration_number","order":0,"description":"The number returned by [register_on_object_destroyed](runtime:LuaBootstrap::register_on_object_destroyed) to uniquely identify this object during this event.","type":"uint64","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"type","order":2,"description":"Type of the object that was destroyed. Same as third value returned by [LuaBootstrap::register_on_object_destroyed](runtime:LuaBootstrap::register_on_object_destroyed)","type":"defines.target_type","optional":false},{"name":"useful_id","order":1,"description":"Useful identifier of the object. Same as second value returned by [LuaBootstrap::register_on_object_destroyed](runtime:LuaBootstrap::register_on_object_destroyed)","type":"uint64","optional":false}]},{"name":"on_permission_group_added","order":62,"description":"Called directly after a permission group is added.","data":[{"name":"group","order":1,"description":"The group added.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that added the group or `nil` if by a mod.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_permission_group_deleted","order":63,"description":"Called directly after a permission group is deleted.","data":[{"name":"group_name","order":1,"description":"The group that was deleted.","type":"string","optional":false},{"name":"id","order":2,"description":"The group id that was deleted.","type":"uint","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the deletion or `nil` if by a mod.","type":"uint","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_permission_group_edited","order":64,"description":"Called directly after a permission group is edited in some way.","data":[{"name":"action","order":3,"description":"The action when the `type` is `\"add-permission\"` or `\"remove-permission\"`.","type":"defines.input_action","optional":false},{"name":"group","order":1,"description":"The group being edited.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_name","order":6,"description":"The new group name when the `type` is `\"rename\"`.","type":"string","optional":false},{"name":"old_name","order":5,"description":"The old group name when the `type` is `\"rename\"`.","type":"string","optional":false},{"name":"other_player_index","order":4,"description":"The other player when the `type` is `\"add-player\"` or `\"remove-player\"`.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"The player that did the editing or `nil` if by a mod.","type":"uint","optional":true},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"type","order":2,"description":"The edit type.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"add-permission"},{"complex_type":"literal","value":"remove-permission"},{"complex_type":"literal","value":"enable-all"},{"complex_type":"literal","value":"disable-all"},{"complex_type":"literal","value":"add-player"},{"complex_type":"literal","value":"remove-player"},{"complex_type":"literal","value":"rename"}],"full_format":false},"optional":false}]},{"name":"on_permission_string_imported","order":65,"description":"Called directly after a permission string is imported.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that imported the string.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_picked_up_item","order":66,"description":"Called when a player picks up an item.","data":[{"name":"item_stack","order":0,"description":"","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_alt_reverse_selected_area","order":67,"description":"Called after a player alt-reverse-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_alt_selected_area","order":68,"description":"Called after a player alt-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":5,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"quality","order":4,"description":"The item quality used to select the area.","type":"string","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":6,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_ammo_inventory_changed","order":69,"description":"Called after a players ammo inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_armor_inventory_changed","order":70,"description":"Called after a players armor inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_banned","order":71,"description":"Called when a player is banned.","data":[{"name":"by_player","order":2,"description":"The player that did the banning if any.","type":"uint","optional":true},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player banned.","type":"uint","optional":true},{"name":"player_name","order":1,"description":"The banned player name.","type":"string","optional":false},{"name":"reason","order":3,"description":"The reason given if any.","type":"string","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_built_tile","order":72,"description":"Called after a player builds tiles.","data":[{"name":"inventory","order":6,"description":"The inventory containing the items used to build the tiles.","type":"LuaInventory","optional":true},{"name":"item","order":4,"description":"The item type used to build the tiles","type":"LuaItemPrototype","optional":true},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"quality","order":5,"description":"The quality of the item used to build the tiles","type":"LuaQualityPrototype","optional":true},{"name":"surface_index","order":1,"description":"The surface the tile(s) were built on.","type":"uint","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile","order":3,"description":"The tile prototype that was placed.","type":"LuaTilePrototype","optional":false},{"name":"tiles","order":2,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_player_cancelled_crafting","order":73,"description":"Called when a player cancels crafting.","data":[{"name":"cancel_count","order":3,"description":"The number of crafts that have been cancelled.","type":"uint","optional":false},{"name":"items","order":1,"description":"The crafting items returned to the player's inventory.","type":"LuaInventory","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe that has been cancelled.","type":"LuaRecipe","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_force","order":74,"description":"Called after a player changes forces.","data":[{"name":"force","order":1,"description":"The old force.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed forces.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_position","order":75,"description":"Called when the tile position a player is located at changes.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_changed_surface","order":76,"description":"Called after a player changes surfaces.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who changed surfaces.","type":"uint","optional":false},{"name":"surface_index","order":1,"description":"The surface index the player was on - may be `nil` if the surface no longer exists.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cheat_mode_disabled","order":77,"description":"Called when cheat mode is disabled on a player.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cheat_mode_enabled","order":78,"description":"Called when cheat mode is enabled on a player.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_clicked_gps_tag","order":79,"description":"Called when a player clicks a gps tag","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"Index of the player","type":"uint","optional":false},{"name":"position","order":1,"description":"Map position contained in gps tag","type":"MapPosition","optional":false},{"name":"surface","order":2,"description":"Surface name contained in gps tag, even when such surface does not exists","type":"string","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_configured_blueprint","order":80,"description":"Called when a player clicks the \"confirm\" button in the configure Blueprint GUI.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_controller_changed","order":81,"description":"Called after a player changes controller types.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_type","order":1,"description":"The old controller type.","type":"defines.controllers","optional":false},{"name":"player_index","order":0,"description":"The player who changed controllers.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_crafted_item","order":82,"description":"Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see [on_pre_player_crafted_item](runtime:on_pre_player_crafted_item)).","data":[{"name":"item_stack","order":0,"description":"The item that has been crafted.","type":"LuaItemStack","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"recipe","order":2,"description":"The recipe used to craft this item.","type":"LuaRecipe","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_created","order":83,"description":"Called after the player was created.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_cursor_stack_changed","order":84,"description":"Called after a player's [cursor stack](runtime:LuaControl::cursor_stack) changed in some way.\n\nThis is fired in the same tick that the change happens, but not instantly.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_deconstructed_area","order":85,"description":"Called when a player selects an area with a deconstruction planner.","data":[{"name":"alt","order":6,"description":"If normal selection or alt selection was used.","type":"boolean","optional":false},{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"quality","order":5,"description":"The item quality used to select the area.","type":"string","optional":false},{"name":"stack","order":4,"description":"The item stack used to select the area.","type":"LuaItemStack","optional":true},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_demoted","order":86,"description":"Called when a player is demoted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_died","order":87,"description":"Called after a player dies.","data":[{"name":"cause","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_display_density_scale_changed","order":88,"description":"Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_scale","order":1,"description":"The old display scale","type":"double","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_display_resolution_changed","order":89,"description":"Called when the display resolution changes for a given player.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_resolution","order":1,"description":"The old display resolution","type":"DisplayResolution","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_display_scale_changed","order":90,"description":"Called when the display scale changes for a given player.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_scale","order":1,"description":"The old display scale","type":"double","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_driving_changed_state","order":91,"description":"Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.\n\nThis event is not raised when the player is ejected from a vehicle due to it being destroyed.","data":[{"name":"entity","order":1,"description":"The vehicle if any.","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_dropped_item","order":92,"description":"Called when a player drops an item on the ground.","data":[{"name":"entity","order":1,"description":"The item-on-ground entity.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_fast_transferred","order":93,"description":"Called when a player fast-transfers something to or from an entity.","data":[{"name":"entity","order":1,"description":"The entity transferred from or to.","type":"LuaEntity","optional":false},{"name":"from_player","order":2,"description":"Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.","type":"boolean","optional":false},{"name":"is_split","order":3,"description":"Whether the transfer was a split action (half stack).","type":"boolean","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player transferred from or to.","type":"uint","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_flipped_entity","order":94,"description":"Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring -- pressing the flip keys on an entity that can't be flipped won't fire this event.","data":[{"name":"entity","order":0,"description":"The flipped entity.","type":"LuaEntity","optional":false},{"name":"horizontal","order":1,"description":"The enacted flip. true = Horizontal, false = Vertical","type":"boolean","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_flushed_fluid","order":95,"description":"Called after player flushed fluid","data":[{"name":"amount","order":2,"description":"Amount of fluid that was removed","type":"double","optional":false},{"name":"entity","order":3,"description":"Entity from which flush was performed","type":"LuaEntity","optional":false},{"name":"fluid","order":1,"description":"Name of a fluid that was flushed","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"only_this_entity","order":4,"description":"True if flush was requested only on this entity","type":"boolean","optional":false},{"name":"player_index","order":0,"description":"Index of the player","type":"uint","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_gun_inventory_changed","order":96,"description":"Called after a players gun inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_input_method_changed","order":97,"description":"Called when a player's input method changes. See [LuaPlayer::input_method](runtime:LuaPlayer::input_method).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player whose input method changed.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_joined_game","order":98,"description":"Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_kicked","order":99,"description":"Called when a player is kicked.","data":[{"name":"by_player","order":1,"description":"The player that did the kicking if any.","type":"uint","optional":true},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player kicked.","type":"uint","optional":false},{"name":"reason","order":2,"description":"The reason given if any.","type":"string","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_left_game","order":100,"description":"Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"reason","order":1,"description":"","type":"defines.disconnect_reason","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_locale_changed","order":101,"description":"Called when a player's active locale changes. See [LuaPlayer::locale](runtime:LuaPlayer::locale).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_locale","order":1,"description":"The previously active locale.","type":"string","optional":false},{"name":"player_index","order":0,"description":"The player whose locale was changed.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_main_inventory_changed","order":102,"description":"Called after a players main inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_mined_entity","order":103,"description":"Called after the results of an entity being mined are collected just before the entity is destroyed.\n\nAfter this event any items in the buffer will be transferred into the player as if they came from mining the entity.\n\nThe buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.","data":[{"name":"buffer","order":2,"description":"The temporary inventory that holds the result of mining the entity.","type":"LuaInventory","optional":false},{"name":"entity","order":1,"description":"The entity that has been mined.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The index of the player doing the mining.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPlayerMinedEntityEventFilter"},{"name":"on_player_mined_item","order":104,"description":"Called when the player mines something.","data":[{"name":"item_stack","order":0,"description":"The item given to the player","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_mined_tile","order":105,"description":"Called after a player mines tiles.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"surface_index","order":1,"description":"The surface the tile(s) were mined from.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":2,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_player_muted","order":106,"description":"Called when a player is muted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_pipette","order":107,"description":"Called when a player invokes the \"smart pipette\" over an entity.","data":[{"name":"item","order":1,"description":"The item put in the cursor","type":"LuaItemPrototype","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player","type":"uint","optional":false},{"name":"quality","order":2,"description":"The item quality put in the cursor","type":"LuaQualityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"used_cheat_mode","order":3,"description":"If cheat mode was used to give a free stack of the item.","type":"boolean","optional":false}]},{"name":"on_player_placed_equipment","order":108,"description":"Called after the player puts equipment in an equipment grid","data":[{"name":"equipment","order":1,"description":"The equipment put in the equipment grid.","type":"LuaEquipment","optional":false},{"name":"grid","order":2,"description":"The equipment grid the equipment was put in.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_promoted","order":109,"description":"Called when a player is promoted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_removed","order":110,"description":"Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily [leaving](runtime:on_player_left_game) the game, and instead behaves like the player never existed in the save file.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The index of the removed player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_removed_equipment","order":111,"description":"Called after the player removes equipment from an equipment grid","data":[{"name":"count","order":4,"description":"The count of equipment removed.","type":"uint","optional":false},{"name":"equipment","order":2,"description":"The equipment removed.","type":"string","optional":false},{"name":"grid","order":1,"description":"The equipment grid removed from.","type":"LuaEquipmentGrid","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"quality","order":3,"description":"The equipment quality.","type":"string","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_repaired_entity","order":112,"description":"Called when a player repairs an entity.","data":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPlayerRepairedEntityEventFilter"},{"name":"on_player_respawned","order":113,"description":"Called after a player respawns.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"player_port","order":1,"description":"The player port used to respawn if one was used.","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_reverse_selected_area","order":114,"description":"Called after a player reverse-selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":4,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":5,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_rotated_entity","order":115,"description":"Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.\n\nEntities being flipped will not fire this event, even if the flip involves rotating. See [on_player_flipped_entity](runtime:on_player_flipped_entity).","data":[{"name":"entity","order":0,"description":"The rotated entity.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"","type":"uint","optional":false},{"name":"previous_direction","order":1,"description":"The previous direction","type":"defines.direction","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_selected_area","order":116,"description":"Called after a player selects an area with a selection-tool item.","data":[{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"entities","order":5,"description":"The entities selected.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"quality","order":4,"description":"The item quality used to select the area.","type":"string","optional":false},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":6,"description":"The tiles selected.","type":{"complex_type":"array","value":"LuaTile"},"optional":false}]},{"name":"on_player_set_quick_bar_slot","order":117,"description":"Called when a player sets a quickbar slot to anything (new value, or set to empty).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_setup_blueprint","order":118,"description":"Called when a player selects an area with a blueprint.","data":[{"name":"alt","order":6,"description":"If normal selection or alt selection was used.","type":"boolean","optional":false},{"name":"area","order":2,"description":"The area selected.","type":"BoundingBox","optional":false},{"name":"item","order":3,"description":"The item used to select the area.","type":"string","optional":false},{"name":"mapping","order":7,"description":"The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect.","type":{"complex_type":"LuaLazyLoadedValue","value":{"complex_type":"dictionary","key":"uint","value":"LuaEntity"}},"optional":false},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the selection.","type":"uint","optional":false},{"name":"quality","order":5,"description":"The item quality used to select the area.","type":"string","optional":false},{"name":"stack","order":4,"description":"The item stack used to select the area.","type":"LuaItemStack","optional":true},{"name":"surface","order":1,"description":"The surface selected.","type":"LuaSurface","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_toggled_alt_mode","order":119,"description":"Called when a player toggles alt mode, also known as \"show entity info\".","data":[{"name":"alt_mode","order":1,"description":"The new alt mode value. This value is a shortcut for accessing [GameViewSettings::show_entity_info](runtime:GameViewSettings::show_entity_info) on the player.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_toggled_map_editor","order":120,"description":"Called when a player toggles the map editor on or off.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_trash_inventory_changed","order":121,"description":"Called after a players trash inventory changed in some way.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_unbanned","order":122,"description":"Called when a player is un-banned.","data":[{"name":"by_player","order":2,"description":"The player that did the un-banning if any.","type":"uint","optional":true},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player un-banned.","type":"uint","optional":true},{"name":"player_name","order":1,"description":"The player name un-banned.","type":"string","optional":false},{"name":"reason","order":3,"description":"The reason the player was banned if any.","type":"string","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_unmuted","order":123,"description":"Called when a player is unmuted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_used_capsule","order":124,"description":"Called when a player uses a capsule that results in some game action.","data":[{"name":"item","order":1,"description":"The capsule item used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player.","type":"uint","optional":false},{"name":"position","order":3,"description":"The position the capsule was used.","type":"MapPosition","optional":false},{"name":"quality","order":2,"description":"The quality of the capsule item used.","type":"LuaQualityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_player_used_spidertron_remote","order":125,"description":"Called when a player uses spidertron remote to send all selected units to a given position","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that used the remote.","type":"uint","optional":false},{"name":"position","order":1,"description":"Goal position to which spidertron was sent to.","type":"MapPosition","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_post_entity_died","order":126,"description":"Called after an entity dies.","data":[{"name":"corpses","order":6,"description":"The corpses created by the entity dying if any.","type":{"complex_type":"array","value":"LuaEntity"},"optional":false},{"name":"damage_type","order":5,"description":"The damage type if any.","type":"LuaDamagePrototype","optional":true},{"name":"force","order":1,"description":"The force that did the killing if any.","type":"LuaForce","optional":true},{"name":"ghost","order":0,"description":"The ghost created by the entity dying if any.","type":"LuaEntity","optional":true},{"name":"name","order":9,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"position","order":2,"description":"Position where the entity died.","type":"MapPosition","optional":false},{"name":"prototype","order":3,"description":"The entity prototype of the entity that died.","type":"LuaEntityPrototype","optional":false},{"name":"quality","order":4,"description":"The quality of the entity that died.","type":"LuaQualityPrototype","optional":false},{"name":"surface_index","order":7,"description":"The surface the entity was on.","type":"uint","optional":false},{"name":"tick","order":10,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit_number","order":8,"description":"The unit number the entity had if any.","type":"uint","optional":true}],"filter":"LuaPostEntityDiedEventFilter"},{"name":"on_pre_build","order":127,"description":"Called when players uses an item to build something. Called before [on_built_entity](runtime:on_built_entity).","data":[{"name":"build_mode","order":2,"description":"Build mode the item was placed with.","type":"defines.build_mode","optional":false},{"name":"created_by_moving","order":7,"description":"Whether the item was placed while moving.","type":"boolean","optional":false},{"name":"direction","order":3,"description":"The direction the item was facing when placed.","type":"defines.direction","optional":false},{"name":"flip_horizontal","order":5,"description":"Whether the blueprint was flipped horizontally. `nil` if not built by a blueprint.","type":"boolean","optional":false},{"name":"flip_vertical","order":6,"description":"Whether the blueprint was flipped vertically. `nil` if not built by a blueprint.","type":"boolean","optional":false},{"name":"mirror","order":4,"description":"If the item is mirrored (only crafting machines support this)","type":"boolean","optional":false},{"name":"name","order":8,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who did the placing.","type":"uint","optional":false},{"name":"position","order":1,"description":"Where the item was placed.","type":"MapPosition","optional":false},{"name":"tick","order":9,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_chunk_deleted","order":128,"description":"Called before one or more chunks are deleted using [LuaSurface::delete_chunk](runtime:LuaSurface::delete_chunk).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"positions","order":1,"description":"The chunks to be deleted.","type":{"complex_type":"array","value":"ChunkPosition"},"optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_entity_settings_pasted","order":129,"description":"Called before entity copy-paste is done.","data":[{"name":"destination","order":2,"description":"The destination entity settings will be copied to.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"source","order":1,"description":"The source entity settings will be copied from.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_ghost_deconstructed","order":130,"description":"Called before a ghost entity is destroyed as a result of being marked for deconstruction.\n\nAlso called for item request proxies before they are destroyed as a result of being marked for deconstruction.","data":[{"name":"ghost","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the deconstruction if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPreGhostDeconstructedEventFilter"},{"name":"on_pre_ghost_upgraded","order":131,"description":"Called before a ghost entity is upgraded.","data":[{"name":"ghost","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player that did the upgrade if any.","type":"uint","optional":true},{"name":"quality","order":3,"description":"","type":"LuaQualityPrototype","optional":false},{"name":"target","order":2,"description":"","type":"LuaEntityPrototype","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPreGhostUpgradedEventFilter"},{"name":"on_pre_permission_group_deleted","order":132,"description":"Called directly before a permission group is deleted.","data":[{"name":"group","order":1,"description":"The group to be deleted.","type":"LuaPermissionGroup","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the deletion or `nil` if by a mod.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_permission_string_imported","order":133,"description":"Called directly before a permission string is imported.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player importing the string.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_crafted_item","order":134,"description":"Called when a player queues something to be crafted.","data":[{"name":"items","order":2,"description":"The items removed from the players inventory to do the crafting.","type":"LuaInventory","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player doing the crafting.","type":"uint","optional":false},{"name":"queued_count","order":3,"description":"The number of times the recipe is being queued.","type":"uint","optional":false},{"name":"recipe","order":1,"description":"The recipe being queued.","type":"LuaRecipe","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_died","order":135,"description":"Called before a players dies.","data":[{"name":"cause","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_left_game","order":136,"description":"Called before a player leaves the game.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"reason","order":1,"description":"","type":"defines.disconnect_reason","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_mined_item","order":137,"description":"Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.","data":[{"name":"entity","order":0,"description":"The entity being mined","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPrePlayerMinedEntityEventFilter"},{"name":"on_pre_player_removed","order":138,"description":"Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily [leaving](runtime:on_player_left_game) the game, and instead behaves like the player never existed in the save file.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The index of the removed player.","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_player_toggled_map_editor","order":139,"description":"Called before a player toggles the map editor on or off.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_robot_exploded_cliff","order":140,"description":"Called directly before a robot explodes cliffs.","data":[{"name":"cliff","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"item","order":2,"description":"The cliff explosive used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"quality","order":3,"description":"The quality of the cliff explosive used.","type":"LuaQualityPrototype","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_scenario_finished","order":141,"description":"Called just before the scenario finishes.","data":[{"name":"name","order":0,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_script_inventory_resized","order":142,"description":"Called just before a script inventory is resized.","data":[{"name":"inventory","order":2,"description":"","type":"LuaInventory","optional":false},{"name":"mod","order":1,"description":"The mod that did the resizing. This will be `\"core\"` if done by console command or scenario script.","type":"string","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_size","order":4,"description":"The new inventory size.","type":"uint","optional":false},{"name":"old_size","order":3,"description":"The old inventory size.","type":"uint","optional":false},{"name":"player_index","order":0,"description":"If done by console command; the player who ran the command.","type":"uint","optional":true},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_surface_cleared","order":143,"description":"Called just before a surface is cleared (all entities removed and all chunks deleted).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_pre_surface_deleted","order":144,"description":"Called just before a surface is deleted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_redo_applied","order":145,"description":"Called when the player triggers \"redo\".","data":[{"name":"actions","order":1,"description":"The context of the redo action.","type":{"complex_type":"array","value":"UndoRedoAction"},"optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who triggered the redo action.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_cancelled","order":146,"description":"Called when research is cancelled.","data":[{"name":"force","order":1,"description":"The force whose research was cancelled.","type":"LuaForce","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"A mapping of technology name to how many times it was cancelled.","type":{"complex_type":"dictionary","key":"string","value":"uint"},"optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_finished","order":147,"description":"Called when a research finishes.","data":[{"name":"by_script","order":1,"description":"If the technology was researched by script.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The researched technology","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_moved","order":148,"description":"Called when research is moved forwards or backwards in the research queue.","data":[{"name":"force","order":0,"description":"The force whose research was re-arranged.","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_reversed","order":149,"description":"Called when a research is reversed (unresearched).","data":[{"name":"by_script","order":1,"description":"If the technology was un-researched by script.","type":"boolean","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The technology un-researched","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_research_started","order":150,"description":"Called when a technology research starts.","data":[{"name":"last_research","order":1,"description":"","type":"LuaTechnology","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"research","order":0,"description":"The technology being researched","type":"LuaTechnology","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_resource_depleted","order":151,"description":"Called when a resource entity reaches 0 or its minimum yield for infinite resources.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_built_entity","order":152,"description":"Called when a construction robot builds an entity.","data":[{"name":"entity","order":1,"description":"The entity built.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that did the building.","type":"LuaEntity","optional":false},{"name":"stack","order":2,"description":"The item used to do the building.","type":"LuaItemStack","optional":false},{"name":"tags","order":3,"description":"The tags associated with this entity if any.","type":"Tags","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaRobotBuiltEntityEventFilter"},{"name":"on_robot_built_tile","order":153,"description":"Called after a robot builds tiles.","data":[{"name":"inventory","order":5,"description":"The inventory containing the stacks used to build the tiles.","type":"LuaInventory","optional":false},{"name":"item","order":3,"description":"The item type used to build the tiles.","type":"LuaItemPrototype","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"quality","order":4,"description":"The quality the item used to build the tiles.","type":"LuaQualityPrototype","optional":false},{"name":"robot","order":0,"description":"The robot.","type":"LuaEntity","optional":false},{"name":"surface_index","order":6,"description":"The surface the tile(s) are build on.","type":"uint","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile","order":2,"description":"The tile prototype that was placed.","type":"LuaTilePrototype","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_robot_exploded_cliff","order":154,"description":"Called directly after a robot explodes cliffs.","data":[{"name":"item","order":1,"description":"The cliff explosive used.","type":"LuaItemPrototype","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"quality","order":2,"description":"The quality of the cliff explosive used.","type":"LuaQualityPrototype","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_mined","order":155,"description":"Called when a robot mines an entity.","data":[{"name":"item_stack","order":1,"description":"The entity the robot just picked up.","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that did the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_robot_mined_entity","order":156,"description":"Called after the results of an entity being mined are collected just before the entity is destroyed.\n\nAfter this event any items in the buffer will be transferred into the robot as if they came from mining the entity.\n\nThe buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.","data":[{"name":"buffer","order":2,"description":"The temporary inventory that holds the result of mining the entity.","type":"LuaInventory","optional":false},{"name":"entity","order":1,"description":"The entity that has been mined.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot doing the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaRobotMinedEntityEventFilter"},{"name":"on_robot_mined_tile","order":157,"description":"Called after a robot mines tiles.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot.","type":"LuaEntity","optional":false},{"name":"surface_index","order":2,"description":"The surface the tile(s) were mined on.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_robot_pre_mined","order":158,"description":"Called before a robot mines an entity.","data":[{"name":"entity","order":1,"description":"The entity which is about to be mined.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"The robot that's about to do the mining.","type":"LuaEntity","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPreRobotMinedEntityEventFilter"},{"name":"on_rocket_launch_ordered","order":159,"description":"Called when a rocket silo is ordered to be launched.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"The player that is riding the rocket, if any.","type":"uint","optional":true},{"name":"rocket","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"rocket_silo","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_rocket_launched","order":160,"description":"Called when the rocket is launched.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":2,"description":"The player that is riding the rocket, if any.","type":"uint","optional":true},{"name":"rocket","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"rocket_silo","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_runtime_mod_setting_changed","order":161,"description":"Called when a runtime mod setting is changed by a player.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"If the `setting_type` is `\"global\"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `\"runtime-per-user\"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.","type":"uint","optional":true},{"name":"setting","order":1,"description":"The prototype name of the setting that was changed.","type":"string","optional":false},{"name":"setting_type","order":2,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"runtime-global"},{"complex_type":"literal","value":"runtime-per-user"}],"full_format":false},"optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_script_inventory_resized","order":162,"description":"Called just after a script inventory is resized.","data":[{"name":"inventory","order":2,"description":"","type":"LuaInventory","optional":false},{"name":"mod","order":1,"description":"The mod that did the resizing. This will be `\"core\"` if done by console command or scenario script.","type":"string","optional":false},{"name":"name","order":6,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_size","order":4,"description":"The new inventory size.","type":"uint","optional":false},{"name":"old_size","order":3,"description":"The old inventory size.","type":"uint","optional":false},{"name":"overflow_inventory","order":5,"description":"Any items which didn't fit into the new inventory size.","type":"LuaInventory","optional":false},{"name":"player_index","order":0,"description":"If done by console command; the player who ran the command.","type":"uint","optional":true},{"name":"tick","order":7,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_script_path_request_finished","order":163,"description":"Called when a [LuaSurface::request_path](runtime:LuaSurface::request_path) call completes.","data":[{"name":"id","order":1,"description":"Handle to associate the callback with a particular call to [LuaSurface::request_path](runtime:LuaSurface::request_path).","type":"uint","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"path","order":0,"description":"The actual path that the pathfinder has determined. `nil` if pathfinding failed.","type":{"complex_type":"array","value":"PathfinderWaypoint"},"optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"try_again_later","order":2,"description":"Indicates that the pathfinder failed because it is too busy, and that you can retry later.","type":"boolean","optional":false}]},{"name":"on_script_trigger_effect","order":164,"description":"Called when a script trigger effect is triggered.","data":[{"name":"cause_entity","order":6,"description":"The entity that originally caused the sequence of triggers","type":"LuaEntity","optional":true},{"name":"effect_id","order":0,"description":"The effect_id specified in the trigger effect.","type":"string","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source_entity","order":3,"description":"","type":"LuaEntity","optional":true},{"name":"source_position","order":2,"description":"","type":"MapPosition","optional":true},{"name":"surface_index","order":1,"description":"The surface the effect happened on.","type":"uint","optional":false},{"name":"target_entity","order":5,"description":"","type":"LuaEntity","optional":true},{"name":"target_position","order":4,"description":"","type":"MapPosition","optional":true},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_sector_scanned","order":165,"description":"Called when an entity of type `radar` finishes scanning a sector.","data":[{"name":"area","order":2,"description":"Area of the scanned chunk.","type":"BoundingBox","optional":false},{"name":"chunk_position","order":1,"description":"The chunk scanned.","type":"ChunkPosition","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"radar","order":0,"description":"The radar that did the scanning.","type":"LuaEntity","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaSectorScannedEventFilter"},{"name":"on_segment_entity_created","order":166,"description":"Called when an individual segment of a SegmentedUnit is created.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_selected_entity_changed","order":167,"description":"Called after the selected entity changes for a given player.","data":[{"name":"last_entity","order":1,"description":"The last selected entity if it still exists and there was one.","type":"LuaEntity","optional":true},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player whose selected entity changed.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_space_platform_built_entity","order":168,"description":"Called when a space platform builds an entity.","data":[{"name":"entity","order":1,"description":"The entity built.","type":"LuaEntity","optional":false},{"name":"name","order":4,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform that did the building.","type":"LuaSpacePlatform","optional":false},{"name":"stack","order":2,"description":"The item used to do the building.","type":"LuaItemStack","optional":false},{"name":"tags","order":3,"description":"The tags associated with this entity if any.","type":"Tags","optional":true},{"name":"tick","order":5,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPlatformBuiltEntityEventFilter"},{"name":"on_space_platform_built_tile","order":169,"description":"Called after a space platform builds tiles.","data":[{"name":"inventory","order":5,"description":"The inventory containing the stacks used to build the tiles.","type":"LuaInventory","optional":false},{"name":"item","order":3,"description":"The item type used to build the tiles.","type":"LuaItemPrototype","optional":false},{"name":"name","order":7,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform.","type":"LuaSpacePlatform","optional":false},{"name":"quality","order":4,"description":"The quality the item used to build the tiles.","type":"LuaQualityPrototype","optional":false},{"name":"surface_index","order":6,"description":"The surface the tile(s) are build on.","type":"uint","optional":false},{"name":"tick","order":8,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tile","order":2,"description":"The tile prototype that was placed.","type":"LuaTilePrototype","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_space_platform_changed_state","order":170,"description":"Called when a space platform changes state","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_state","order":1,"description":"","type":"defines.space_platform_state","optional":false},{"name":"platform","order":0,"description":"","type":"LuaSpacePlatform","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_space_platform_mined_entity","order":171,"description":"Called after the results of an entity being mined are collected just before the entity is destroyed.\n\nAfter this event any items in the buffer will be transferred into the platform as if they came from mining the entity.\n\nThe buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.","data":[{"name":"buffer","order":2,"description":"The temporary inventory that holds the result of mining the entity.","type":"LuaInventory","optional":false},{"name":"entity","order":1,"description":"The entity that has been mined.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform doing the mining.","type":"LuaSpacePlatform","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPlatformMinedEntityEventFilter"},{"name":"on_space_platform_mined_item","order":172,"description":"Called when a platform mines an entity.","data":[{"name":"item_stack","order":1,"description":"The entity the platform just picked up.","type":"SimpleItemStack","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform that did the mining.","type":"LuaSpacePlatform","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_space_platform_mined_tile","order":173,"description":"Called after a platform mines tiles.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform.","type":"LuaSpacePlatform","optional":false},{"name":"surface_index","order":2,"description":"The surface the tile(s) were mined on.","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The position data.","type":{"complex_type":"array","value":"OldTileAndPosition"},"optional":false}]},{"name":"on_space_platform_pre_mined","order":174,"description":"Called before a platform mines an entity.","data":[{"name":"entity","order":1,"description":"The entity which is about to be mined.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"platform","order":0,"description":"The platform that's about to do the mining.","type":"LuaSpacePlatform","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaPrePlatformMinedEntityEventFilter"},{"name":"on_spider_command_completed","order":175,"description":"Called when a spider finishes moving to its autopilot position.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"vehicle","order":0,"description":"Spider vehicle which was requested to move.","type":"LuaEntity","optional":false}]},{"name":"on_string_translated","order":176,"description":"Called when a translation request generated through [LuaPlayer::request_translation](runtime:LuaPlayer::request_translation) or [LuaPlayer::request_translations](runtime:LuaPlayer::request_translations) has been completed.","data":[{"name":"id","order":3,"description":"The unique id for this translation request.","type":"uint","optional":false},{"name":"localised_string","order":1,"description":"The localised string being translated.","type":"LocalisedString","optional":false},{"name":"name","order":5,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player whose locale was used for the translation.","type":"uint","optional":false},{"name":"result","order":2,"description":"The translated `localised_string`.","type":"string","optional":false},{"name":"tick","order":6,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"translated","order":4,"description":"Whether the requested localised string was valid and could be translated.","type":"boolean","optional":false}]},{"name":"on_surface_cleared","order":177,"description":"Called just after a surface is cleared (all entities removed and all chunks deleted).","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_created","order":178,"description":"Called when a surface is created.\n\nThis is not called when the default surface is created as it will always exist.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_deleted","order":179,"description":"Called after a surface is deleted.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_imported","order":180,"description":"Called after a surface is imported via the map editor.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"original_name","order":1,"description":"The original surface name.","type":"string","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_surface_renamed","order":181,"description":"Called when a surface is renamed.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"new_name","order":2,"description":"","type":"string","optional":false},{"name":"old_name","order":1,"description":"","type":"string","optional":false},{"name":"surface_index","order":0,"description":"","type":"uint","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_technology_effects_reset","order":182,"description":"Called when [LuaForce::reset_technology_effects](runtime:LuaForce::reset_technology_effects) is finished.","data":[{"name":"force","order":0,"description":"","type":"LuaForce","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_tick","order":183,"description":"It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.","data":[{"name":"name","order":0,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_train_changed_state","order":184,"description":"Called when a train changes state (started to stopped and vice versa)","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_state","order":1,"description":"","type":"defines.train_state","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_train_created","order":185,"description":"Called when a new train is created either through disconnecting/connecting an existing one or building a new one.","data":[{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_train_id_1","order":1,"description":"The first old train id when splitting/merging trains.","type":"uint","optional":true},{"name":"old_train_id_2","order":2,"description":"The second old train id when splitting/merging trains.","type":"uint","optional":true},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_train_schedule_changed","order":186,"description":"Called when a trains schedule is changed either by the player or through script.","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":1,"description":"The player who made the change if any.","type":"uint","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"train","order":0,"description":"","type":"LuaTrain","optional":false}]},{"name":"on_trigger_created_entity","order":187,"description":"Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_trigger_fired_artillery","order":188,"description":"Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.","data":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"source","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_undo_applied","order":189,"description":"Called when the player triggers \"undo\".","data":[{"name":"actions","order":1,"description":"The context of the undo action.","type":{"complex_type":"array","value":"UndoRedoAction"},"optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"player_index","order":0,"description":"The player who triggered the undo action.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_added_to_group","order":190,"description":"Called when a unit is added to a unit group.","data":[{"name":"group","order":1,"description":"","type":"LuaCommandable","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"on_unit_group_created","order":191,"description":"Called when a new unit group is created, before any members are added to it.","data":[{"name":"group","order":0,"description":"","type":"LuaCommandable","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_group_finished_gathering","order":192,"description":"Called when a unit group finishes gathering and starts executing its command.","data":[{"name":"group","order":0,"description":"","type":"LuaCommandable","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"on_unit_removed_from_group","order":193,"description":"Called when a unit is removed from a unit group.","data":[{"name":"group","order":1,"description":"","type":"LuaCommandable","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"unit","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"on_worker_robot_expired","order":194,"description":"Called when a worker (construction or logistic) robot expires through a lack of energy.","data":[{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"robot","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}]},{"name":"script_raised_built","order":195,"description":"A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_built](runtime:LuaBootstrap::raise_script_built), or when `raise_built` is passed to [LuaSurface::create_entity](runtime:LuaSurface::create_entity).","data":[{"name":"entity","order":0,"description":"The entity that has been built.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaScriptRaisedBuiltEventFilter"},{"name":"script_raised_destroy","order":196,"description":"A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_destroy](runtime:LuaBootstrap::raise_script_destroy), or when `raise_destroy` is passed to [LuaEntity::destroy](runtime:LuaEntity::destroy).","data":[{"name":"entity","order":0,"description":"The entity that was destroyed.","type":"LuaEntity","optional":false},{"name":"name","order":1,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tick","order":2,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaScriptRaisedDestroyEventFilter"},{"name":"script_raised_revive","order":197,"description":"A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_revive](runtime:LuaBootstrap::raise_script_revive), or when `raise_revive` is passed to [LuaEntity::revive](runtime:LuaEntity::revive).","data":[{"name":"entity","order":0,"description":"The entity that was revived.","type":"LuaEntity","optional":false},{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"tags","order":1,"description":"The tags associated with this entity, if any.","type":"Tags","optional":true},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaScriptRaisedReviveEventFilter"},{"name":"script_raised_set_tiles","order":198,"description":"A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_set_tiles](runtime:LuaBootstrap::raise_script_set_tiles), or when `raise_event` is passed to [LuaSurface::set_tiles](runtime:LuaSurface::set_tiles).","data":[{"name":"name","order":2,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"surface_index","order":0,"description":"The surface whose tiles were changed.","type":"uint","optional":false},{"name":"tick","order":3,"description":"Tick the event was generated.","type":"uint","optional":false},{"name":"tiles","order":1,"description":"The tiles that were changed.","type":{"complex_type":"array","value":"Tile"},"optional":false}]},{"name":"script_raised_teleported","order":199,"description":"A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event) or [LuaBootstrap::raise_script_teleported](runtime:LuaBootstrap::raise_script_teleported), or when `raise_teleported` is passed to [LuaControl::teleport](runtime:LuaControl::teleport).","data":[{"name":"entity","order":0,"description":"The entity that was teleported.","type":"LuaEntity","optional":false},{"name":"name","order":3,"description":"Identifier of the event","type":"defines.events","optional":false},{"name":"old_position","order":2,"description":"The entity's position before the teleportation.","type":"MapPosition","optional":false},{"name":"old_surface_index","order":1,"description":"The entity's surface before the teleportation.","type":"uint8","optional":false},{"name":"tick","order":4,"description":"Tick the event was generated.","type":"uint","optional":false}],"filter":"LuaScriptRaisedTeleportedEventFilter"}],"concepts":[{"name":"AchievementPrototypeFilter","order":286,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"allowed-without-fight"},{"complex_type":"literal","value":"type"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"AdvancedMapGenSettings","order":196,"description":"","type":{"complex_type":"table","parameters":[{"name":"difficulty_settings","order":3,"description":"","type":"DifficultySettings","optional":false},{"name":"enemy_evolution","order":1,"description":"","type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","type":"EnemyExpansionMapSettings","optional":false},{"name":"pollution","order":0,"description":"","type":"PollutionMapSettings","optional":false}]}},{"name":"Alert","order":169,"description":"","type":{"complex_type":"table","parameters":[{"name":"icon","order":4,"description":"The SignalID used for a custom alert. Only present for custom alerts.","type":"SignalID","optional":true},{"name":"message","order":5,"description":"The message for a custom alert. Only present for custom alerts.","type":"LocalisedString","optional":true},{"name":"position","order":3,"description":"","type":"MapPosition","optional":true},{"name":"prototype","order":2,"description":"","type":"LuaEntityPrototype","optional":true},{"name":"target","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"tick","order":0,"description":"The tick this alert was created.","type":"uint","optional":false}]}},{"name":"Alignment","order":251,"description":"A [string](runtime:string) that specifies where a GUI element should be.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"top-left","description":""},{"complex_type":"literal","value":"middle-left","description":""},{"complex_type":"literal","value":"left","description":"The same as `\"middle-left\"`"},{"complex_type":"literal","value":"bottom-left","description":""},{"complex_type":"literal","value":"top-center","description":""},{"complex_type":"literal","value":"middle-center","description":""},{"complex_type":"literal","value":"center","description":"The same as `\"middle-center\"`"},{"complex_type":"literal","value":"bottom-center","description":""},{"complex_type":"literal","value":"top-right","description":""},{"complex_type":"literal","value":"right","description":"The same as `\"middle-right\"`"},{"complex_type":"literal","value":"bottom-right","description":""}],"full_format":true}},{"name":"AmmoType","order":31,"description":"","type":{"complex_type":"table","parameters":[{"name":"action","order":0,"description":"","type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"clamp_position","order":2,"description":"When `true`, the gun will be able to shoot even when the target is out of range. Only applies when `target_type` is `position`. The gun will fire at the maximum range in the direction of the target position. Defaults to `false`.","type":"boolean","optional":true},{"name":"consumption_modifier","order":6,"description":"","type":"float","optional":true},{"name":"cooldown_modifier","order":5,"description":"","type":"double","optional":true},{"name":"energy_consumption","order":3,"description":"Energy consumption of a single shot, if applicable. Defaults to `0`.","type":"double","optional":true},{"name":"range_modifier","order":4,"description":"","type":"double","optional":true},{"name":"target_type","order":1,"description":"","type":"TargetType","optional":false}]}},{"name":"Any","order":246,"description":"Any basic type (string, number, boolean), table, or LuaObject.","type":{"complex_type":"union","options":["string","boolean","number","table","LuaObject"],"full_format":false}},{"name":"AnyBasic","order":245,"description":"Any basic type (string, number, boolean) or table.","type":{"complex_type":"union","options":["string","boolean","number","table"],"full_format":false}},{"name":"ArithmeticCombinatorParameters","order":208,"description":"","type":{"complex_type":"table","parameters":[{"name":"first_constant","order":2,"description":"Constant to use as the first argument of the operation. Has no effect when `first_signal` is set. Defaults to `0`.","type":"int","optional":true},{"name":"first_signal","order":0,"description":"First signal to use in an operation. If not specified, the second argument will be the value of `first_constant`.","type":"SignalID","optional":true},{"name":"operation","order":4,"description":"When not specified, defaults to `\"*\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"*"},{"complex_type":"literal","value":"/"},{"complex_type":"literal","value":"+"},{"complex_type":"literal","value":"-"},{"complex_type":"literal","value":"%"},{"complex_type":"literal","value":"^"},{"complex_type":"literal","value":"<<"},{"complex_type":"literal","value":">>"},{"complex_type":"literal","value":"AND"},{"complex_type":"literal","value":"OR"},{"complex_type":"literal","value":"XOR"}],"full_format":false},"optional":true},{"name":"output_signal","order":5,"description":"Specifies the signal to output.","type":"SignalID","optional":true},{"name":"second_constant","order":3,"description":"Constant to use as the second argument of the operation. Has no effect when `second_signal` is set. Defaults to `0`.","type":"int","optional":true},{"name":"second_signal","order":1,"description":"Second signal to use in an operation. If not specified, the second argument will be the value of `second_constant`.","type":"SignalID","optional":true}]}},{"name":"AsteroidChunk","order":178,"description":"","type":{"complex_type":"table","parameters":[{"name":"movement","order":2,"description":"","type":"Vector","optional":false},{"name":"name","order":0,"description":"The name of the asteroid chunk prototype.","type":"string","optional":false},{"name":"position","order":1,"description":"","type":"MapPosition","optional":false}]}},{"name":"AsteroidChunkID","order":92,"description":"An asteroid chunk prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaAsteroidChunkPrototype","description":"The asteroid chunk prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"AsteroidChunkPrototypeFilter","order":288,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"minable"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"AsteroidMapSettings","order":117,"description":"","type":{"complex_type":"table","parameters":[{"name":"max_ray_portals_expanded_per_tick","order":1,"description":"","type":"uint","optional":false},{"name":"spawning_rate","order":0,"description":"","type":"double","optional":false}]}},{"name":"AttackParameterFluid","order":238,"description":"","type":{"complex_type":"table","parameters":[{"name":"damage_modifier","order":1,"description":"Multiplier applied to the damage of an attack.","type":"double","optional":false},{"name":"type","order":0,"description":"Name of the [LuaFluidPrototype](runtime:LuaFluidPrototype).","type":"string","optional":false}]}},{"name":"AttackParameters","order":239,"description":"","type":{"complex_type":"table","parameters":[{"name":"ammo_categories","order":16,"description":"List of the names of compatible [LuaAmmoCategoryPrototypes](runtime:LuaAmmoCategoryPrototype).","type":{"complex_type":"array","value":"string"},"optional":true},{"name":"ammo_consumption_modifier","order":10,"description":"Multiplier applied to the ammo consumption of an attack.","type":"float","optional":false},{"name":"ammo_type","order":15,"description":"","type":"AmmoType","optional":true},{"name":"cooldown","order":11,"description":"Minimum amount of ticks between shots. If this is less than `1`, multiple shots can be performed per tick.","type":"float","optional":false},{"name":"damage_modifier","order":9,"description":"Multiplier applied to the damage of an attack.","type":"float","optional":false},{"name":"fire_penalty","order":4,"description":"When searching for the nearest enemy to attack, `fire_penalty` is added to the enemy's distance if they are on fire.","type":"float","optional":false},{"name":"health_penalty","order":6,"description":"When searching for an enemy to attack, a higher `health_penalty` will discourage targeting enemies with high health. A negative penalty will do the opposite.","type":"float","optional":false},{"name":"min_attack_distance","order":7,"description":"If less than `range`, the entity will choose a random distance between `range` and `min_attack_distance` and attack from that distance. Used for spitters.","type":"float","optional":false},{"name":"min_range","order":2,"description":"Minimum range of attack. Used with flamethrower turrets to prevent self-immolation.","type":"float","optional":false},{"name":"movement_slow_down_cooldown","order":14,"description":"","type":"float","optional":false},{"name":"movement_slow_down_factor","order":13,"description":"","type":"double","optional":false},{"name":"range","order":1,"description":"Maximum range of attack.","type":"float","optional":false},{"name":"range_mode","order":3,"description":"Defines how the range is determined.","type":"RangeMode","optional":false},{"name":"rotate_penalty","order":5,"description":"When searching for an enemy to attack, a higher `rotate_penalty` will discourage targeting enemies that would take longer to turn to face.","type":"float","optional":false},{"name":"turn_range","order":8,"description":"The arc that the entity can attack in as a fraction of a circle. A value of `1` means the full 360 degrees.","type":"float","optional":false},{"name":"type","order":0,"description":"The type of AttackParameter.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"projectile"},{"complex_type":"literal","value":"stream"},{"complex_type":"literal","value":"beam"}],"full_format":false},"optional":false},{"name":"warmup","order":12,"description":"Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so.","type":"uint","optional":false}],"variant_parameter_groups":[{"name":"projectile","order":0,"description":"","parameters":[{"name":"projectile_center","order":0,"description":"","type":"Vector","optional":false},{"name":"projectile_creation_distance","order":1,"description":"","type":"float","optional":false},{"name":"projectile_creation_parameters","order":4,"description":"","type":{"complex_type":"array","value":"CircularProjectileCreationSpecification"},"optional":true},{"name":"projectile_orientation_offset","order":2,"description":"","type":"float","optional":false},{"name":"shell_particle","order":3,"description":"","type":"CircularParticleCreationSpecification","optional":true}]},{"name":"stream","order":1,"description":"","parameters":[{"name":"fluid_consumption","order":2,"description":"","type":"float","optional":false},{"name":"fluids","order":3,"description":"","type":{"complex_type":"array","value":"AttackParameterFluid"},"optional":true},{"name":"gun_barrel_length","order":0,"description":"","type":"float","optional":false},{"name":"gun_center_shift","order":1,"description":"","type":"GunShift4Way","optional":false},{"name":"projectile_creation_parameters","order":4,"description":"","type":{"complex_type":"array","value":"CircularProjectileCreationSpecification"},"optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"AutoplaceControl","order":194,"description":"","type":{"complex_type":"table","parameters":[{"name":"frequency","order":0,"description":"For things that are placed as spots such as ores and enemy bases, frequency is generally proportional to number of spots placed per unit area. For continuous features such as forests, frequency is how compressed the probability function is over distance, i.e. the inverse of 'scale'. When the [LuaAutoplaceControlPrototype](runtime:LuaAutoplaceControlPrototype) is of the category `\"terrain\"`, then scale is shown in the map generator GUI instead of frequency.","type":"MapGenSize","optional":false},{"name":"richness","order":2,"description":"Has different effects for different things, but generally affects the 'health' or density of a thing that is placed without affecting where it is placed. For trees, richness affects tree health.  For ores, richness multiplies the amount of ore at any given tile in a patch. Metadata about autoplace controls (such as whether or not 'richness' does anything for them) can be found in the [LuaAutoplaceControlPrototype](runtime:LuaAutoplaceControlPrototype) by looking up `prototypes.autoplace_control[(control prototype name)]`, e.g. `prototypes.autoplace_control[\"enemy-base\"].richness` is false, because enemy base autoplacement doesn't use richness.","type":"MapGenSize","optional":false},{"name":"size","order":1,"description":"For things that are placed as spots, size is proportional to the area of each spot. For continuous features, size affects how much of the map is covered with the thing, and is called 'coverage' in the GUI.","type":"MapGenSize","optional":false}]}},{"name":"AutoplaceSettings","order":114,"description":"","type":{"complex_type":"table","parameters":[{"name":"settings","order":1,"description":"Always defined when reading autoplace settings.","type":{"complex_type":"dictionary","key":"string","value":"AutoplaceControl"},"optional":true},{"name":"treat_missing_as_default","order":0,"description":"Whether missing autoplace names for this type should be default enabled. Always defined when reading autoplace settings.","type":"boolean","optional":true}]}},{"name":"AutoplaceSpecification","order":112,"description":"Specifies how probability and richness are calculated when placing something on the map.","type":{"complex_type":"table","parameters":[{"name":"control","order":0,"description":"Control prototype name.","type":"string","optional":true},{"name":"default_enabled","order":1,"description":"","type":"boolean","optional":false},{"name":"force","order":2,"description":"","type":"string","optional":false},{"name":"order","order":3,"description":"","type":"string","optional":false},{"name":"placement_density","order":4,"description":"","type":"uint","optional":false},{"name":"probability_expression","order":6,"description":"","type":"NoiseExpression","optional":false},{"name":"richness_expression","order":7,"description":"","type":"NoiseExpression","optional":true},{"name":"tile_restriction","order":5,"description":"","type":{"complex_type":"array","value":"AutoplaceSpecificationRestriction"},"optional":true}]}},{"name":"AutoplaceSpecificationRestriction","order":191,"description":"","type":{"complex_type":"table","parameters":[{"name":"first","order":0,"description":"Tile prototype name","type":"string","optional":true},{"name":"second","order":1,"description":"Second prototype name","type":"string","optional":true}]}},{"name":"BeamTarget","order":233,"description":"","type":{"complex_type":"table","parameters":[{"name":"entity","order":0,"description":"The target entity.","type":"LuaEntity","optional":true},{"name":"position","order":1,"description":"The target position.","type":"MapPosition","optional":true}]}},{"name":"BlueprintEntity","order":102,"description":"The representation of an entity inside of a blueprint. It has at least these fields, but can contain additional ones depending on the kind of entity.","type":{"complex_type":"table","parameters":[{"name":"control_behavior","order":6,"description":"The control behavior of the entity, if it has one. The format of the control behavior depends on the entity's type. Only relevant for entities that support control behaviors.","type":"BlueprintControlBehavior","optional":true},{"name":"direction","order":3,"description":"The direction the entity is facing. Only present for entities that can face in different directions and when the entity is not facing north.","type":"defines.direction","optional":true},{"name":"entity_number","order":0,"description":"The entity's unique identifier in the blueprint.","type":"uint","optional":false},{"name":"items","order":7,"description":"The items that the entity will request when revived, if any.","type":{"complex_type":"array","value":"BlueprintInsertPlan"},"optional":true},{"name":"mirror","order":4,"description":"Whether this entity is mirrored.","type":"boolean","optional":true},{"name":"name","order":1,"description":"The prototype name of the entity.","type":"string","optional":false},{"name":"position","order":2,"description":"The position of the entity.","type":"MapPosition","optional":false},{"name":"quality","order":5,"description":"The prototype name of the entity's quality.","type":"string","optional":true},{"name":"schedule","order":9,"description":"The schedule of the entity, if it has one. Only relevant for locomotives.","type":"BlueprintSchedule","optional":true},{"name":"tags","order":8,"description":"The entity tags of the entity, if there are any.","type":"Tags","optional":true},{"name":"wires","order":10,"description":"Wires connected to this entity in the blueprint.","type":{"complex_type":"array","value":"BlueprintWire"},"optional":true}]}},{"name":"BlueprintInsertPlan","order":54,"description":"Defines an item type that a blueprint entity will request.","type":{"complex_type":"table","parameters":[{"name":"id","order":0,"description":"The prototype name and quality of the item to request.","type":"ItemIDAndQualityIDPair","optional":false},{"name":"items","order":1,"description":"Describes the inventories to insert these items into.","type":"ItemInventoryPositions","optional":false}]}},{"name":"BlueprintLogisticFilter","order":111,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":4,"description":"The comparator for quality. `nil` if any quality.","type":"ComparatorString","optional":true},{"name":"count","order":5,"description":"","type":"int","optional":false},{"name":"import_from","order":8,"description":"","type":"string","optional":true},{"name":"index","order":0,"description":"","type":"LogisticFilterIndex","optional":false},{"name":"max_count","order":6,"description":"","type":"ItemCountType","optional":true},{"name":"minimum_delivery_count","order":7,"description":"Defaults to 0.","type":"ItemCountType","optional":true},{"name":"name","order":2,"description":"Name of the logistic filter.","type":"string","optional":true},{"name":"quality","order":3,"description":"The prototype name of the quality. `nil` for any quality.","type":"string","optional":true},{"name":"type","order":1,"description":"The type of the logistic filter.","type":"SignalIDType","optional":true}]}},{"name":"BlueprintSchedule","order":131,"description":"","type":{"complex_type":"table","parameters":[{"name":"group","order":1,"description":"","type":"string","optional":true},{"name":"interrupts","order":2,"description":"","type":{"complex_type":"array","value":"BlueprintScheduleInterrupt"},"optional":true},{"name":"records","order":0,"description":"","type":{"complex_type":"array","value":"BlueprintScheduleRecord"},"optional":true}]}},{"name":"BlueprintScheduleInterrupt","order":130,"description":"","type":{"complex_type":"table","parameters":[{"name":"conditions","order":1,"description":"","type":{"complex_type":"array","value":"WaitCondition"},"optional":true},{"name":"inside_interrupt","order":3,"description":"","type":"boolean","optional":false},{"name":"name","order":0,"description":"","type":"string","optional":true},{"name":"targets","order":2,"description":"","type":{"complex_type":"array","value":"BlueprintScheduleRecord"},"optional":true}]}},{"name":"BlueprintScheduleRecord","order":129,"description":"","type":{"complex_type":"table","parameters":[{"name":"allows_unloading","order":4,"description":"","type":"boolean","optional":true},{"name":"created_by_interrupt","order":3,"description":"","type":"boolean","optional":true},{"name":"station","order":0,"description":"Name of the station.","type":"string","optional":true},{"name":"temporary","order":2,"description":"Only present when the station is temporary, the value is then always `true`.","type":"boolean","optional":true},{"name":"wait_conditions","order":1,"description":"","type":{"complex_type":"array","value":"WaitCondition"},"optional":true}]}},{"name":"BlueprintSignalIcon","order":183,"description":"","type":{"complex_type":"table","parameters":[{"name":"index","order":1,"description":"Index of the icon in the blueprint icons slots. An integer in the range [1, 4].","type":"uint","optional":false},{"name":"signal","order":0,"description":"The icon to use.","type":"SignalID","optional":false}]}},{"name":"BlueprintWire","order":185,"description":"Describes a single wire in the blueprint. The members of the tuple are, in order:\n\n- `source_entity_number`\n\n- `source_wire_connector_id`\n\n- `target_entity_number`\n\n- `target_wire_connector_id`","type":{"complex_type":"tuple","values":["uint","defines.wire_connector_id","uint","defines.wire_connector_id"]}},{"name":"BlueprintWireEnd","order":27,"description":"","type":{"complex_type":"table","parameters":[{"name":"connector","order":1,"description":"","type":"defines.wire_connector_id","optional":false},{"name":"entity","order":0,"description":"","type":"BlueprintEntity","optional":false}]}},{"name":"BoundingBox","order":88,"description":"Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with [MapPosition](runtime:MapPosition), the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero.","examples":["```\n-- Explicit definition\n{left_top = {x = -2, y = -3}, right_bottom = {x = 5, y = 8}}\n```","```\n-- Shorthand\n{{-2, -3}, {5, 8}}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"left_top","order":0,"description":"","type":"MapPosition","optional":false},{"name":"orientation","order":2,"description":"","type":"RealOrientation","optional":true},{"name":"right_bottom","order":1,"description":"","type":"MapPosition","optional":false}]},{"complex_type":"tuple","values":["MapPosition","MapPosition"]}],"full_format":false}},{"name":"BurnerUsageID","order":137,"description":"The name of a [LuaBurnerUsagePrototype](runtime:LuaBurnerUsagePrototype).","examples":["```\n\"fuel\"\n```"],"type":"string"},{"name":"CapsuleAction","order":241,"description":"","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"throw"},{"complex_type":"literal","value":"equipment-remote"},{"complex_type":"literal","value":"use-on-self"},{"complex_type":"literal","value":"artillery-remote"},{"complex_type":"literal","value":"destroy-cliffs"}],"full_format":false},"optional":false}],"variant_parameter_groups":[{"name":"artillery-remote","order":3,"description":"","parameters":[{"name":"flare","order":0,"description":"Name of the [flare prototype](runtime:LuaEntityPrototype).","type":"string","optional":false}]},{"name":"destroy-cliffs","order":4,"description":"","parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false},{"name":"radius","order":1,"description":"","type":"float","optional":false},{"name":"timeout","order":2,"description":"","type":"uint","optional":false}]},{"name":"equipment-remote","order":1,"description":"","parameters":[{"name":"equipment","order":0,"description":"Name of the [LuaEquipmentPrototype](runtime:LuaEquipmentPrototype).","type":"string","optional":false}]},{"name":"throw","order":0,"description":"","parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false},{"name":"uses_stack","order":1,"description":"Whether using the capsule consumes an item from the stack.","type":"boolean","optional":false}]},{"name":"use-on-self","order":2,"description":"","parameters":[{"name":"attack_parameters","order":0,"description":"","type":"AttackParameters","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"ChartTagSpec","order":180,"description":"Either `icon`, `text`, or both must be provided.","type":{"complex_type":"table","parameters":[{"name":"icon","order":1,"description":"","type":"SignalID","optional":true},{"name":"last_user","order":3,"description":"","type":"PlayerIdentification","optional":true},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"text","order":2,"description":"","type":"string","optional":true}]}},{"name":"ChunkPosition","order":151,"description":"Coordinates of a chunk in a [LuaSurface](runtime:LuaSurface) where each integer `x`/`y` represents a different chunk. This uses the same format as [MapPosition](runtime:MapPosition), meaning it can be specified either with or without explicit keys. A [MapPosition](runtime:MapPosition) can be translated to a ChunkPosition by dividing the `x`/`y` values by 32.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","values":["int","int"]}],"full_format":false}},{"name":"ChunkPositionAndArea","order":155,"description":"A [ChunkPosition](runtime:ChunkPosition) with an added bounding box for the area of the chunk.","type":{"complex_type":"table","parameters":[{"name":"area","order":2,"description":"","type":"BoundingBox","optional":false},{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]}},{"name":"CircuitCondition","order":216,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":0,"description":"Specifies how the inputs should be compared. If not specified, defaults to `\"<\"`.","type":"ComparatorString","optional":true},{"name":"constant","order":3,"description":"Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`.","type":"int","optional":true},{"name":"first_signal","order":1,"description":"Defaults to blank","type":"SignalID","optional":true},{"name":"second_signal","order":2,"description":"What to compare `first_signal` to. If not specified, `first_signal` will be compared to `constant`.","type":"SignalID","optional":true}]}},{"name":"CircuitConditionDefinition","order":217,"description":"","type":{"complex_type":"table","parameters":[{"name":"condition","order":0,"description":"TODOC CircuitConditionDefinition now extends CircuitCondition, all fields of CircuitCondition should be pasted here directly","type":"CircuitCondition","optional":false},{"name":"fulfilled","order":1,"description":"Whether the condition is currently fulfilled","type":"boolean","optional":true}]}},{"name":"CircuitNetworkSelection","order":214,"description":"","type":"table"},{"name":"CircularParticleCreationSpecification","order":236,"description":"","type":{"complex_type":"table","parameters":[{"name":"center","order":11,"description":"","type":"Vector","optional":false},{"name":"creation_distance","order":12,"description":"","type":"double","optional":false},{"name":"creation_distance_orientation","order":13,"description":"","type":"double","optional":false},{"name":"direction","order":1,"description":"","type":"float","optional":false},{"name":"direction_deviation","order":2,"description":"","type":"float","optional":false},{"name":"height","order":7,"description":"","type":"float","optional":false},{"name":"height_deviation","order":8,"description":"","type":"float","optional":false},{"name":"name","order":0,"description":"Name of the [LuaEntityPrototype](runtime:LuaEntityPrototype).","type":"string","optional":false},{"name":"speed","order":3,"description":"","type":"float","optional":false},{"name":"speed_deviation","order":4,"description":"","type":"float","optional":false},{"name":"starting_frame_speed","order":5,"description":"","type":"float","optional":false},{"name":"starting_frame_speed_deviation","order":6,"description":"","type":"float","optional":false},{"name":"use_source_position","order":14,"description":"","type":"boolean","optional":false},{"name":"vertical_speed","order":9,"description":"","type":"float","optional":false},{"name":"vertical_speed_deviation","order":10,"description":"","type":"float","optional":false}]}},{"name":"CircularProjectileCreationSpecification","order":237,"description":"","type":{"complex_type":"tuple","values":["RealOrientation","Vector"]}},{"name":"CliffOrientation","order":53,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"west-to-east","description":""},{"complex_type":"literal","value":"north-to-south","description":""},{"complex_type":"literal","value":"east-to-west","description":""},{"complex_type":"literal","value":"south-to-north","description":""},{"complex_type":"literal","value":"west-to-north","description":""},{"complex_type":"literal","value":"north-to-east","description":""},{"complex_type":"literal","value":"east-to-south","description":""},{"complex_type":"literal","value":"south-to-west","description":""},{"complex_type":"literal","value":"west-to-south","description":""},{"complex_type":"literal","value":"north-to-west","description":""},{"complex_type":"literal","value":"east-to-north","description":""},{"complex_type":"literal","value":"south-to-east","description":""},{"complex_type":"literal","value":"west-to-none","description":""},{"complex_type":"literal","value":"none-to-east","description":""},{"complex_type":"literal","value":"east-to-none","description":""},{"complex_type":"literal","value":"none-to-west","description":""},{"complex_type":"literal","value":"north-to-none","description":""},{"complex_type":"literal","value":"none-to-south","description":""},{"complex_type":"literal","value":"south-to-none","description":""},{"complex_type":"literal","value":"none-to-north","description":""}],"full_format":true}},{"name":"CliffPlacementSettings","order":113,"description":"","type":{"complex_type":"table","parameters":[{"name":"cliff_elevation_0","order":2,"description":"Elevation at which the first row of cliffs is placed. The default is `10`, and this cannot be set from the map generation GUI.","type":"float","optional":false},{"name":"cliff_elevation_interval","order":3,"description":"Elevation difference between successive rows of cliffs. This is inversely proportional to 'frequency' in the map generation GUI. Specifically, when set from the GUI the value is `40 / frequency`.","type":"float","optional":false},{"name":"cliff_smoothing","order":4,"description":"Smoothing makes cliffs straighter on rough elevation but makes placement inaccurate. 0 is no smoothing, 1 is full smoothing. Values outside of 0-1 are possible for specific effects but not recommended.","type":"float","optional":false},{"name":"control","order":1,"description":"Name of the autoplace control prototype.","type":"string","optional":false},{"name":"name","order":0,"description":"Name of the cliff prototype.","type":"string","optional":false},{"name":"richness","order":5,"description":"Corresponds to 'continuity' in the GUI. This value is not used directly, but is used by the 'cliffiness' noise expression, which in combination with elevation and the two cliff elevation properties drives cliff placement (cliffs are placed when elevation crosses the elevation contours defined by `cliff_elevation_0` and `cliff_elevation_interval` when 'cliffiness' is greater than `0.5`). The default 'cliffiness' expression interprets this value such that larger values result in longer unbroken walls of cliffs, and smaller values (between `0` and `1`) result in larger gaps in cliff walls.","type":"MapGenSize","optional":false}]}},{"name":"CollisionLayerID","order":36,"description":"The name of a [LuaCollisionLayerPrototype](runtime:LuaCollisionLayerPrototype).","examples":["```\n\"is_lower_object\"\n```"],"type":"string"},{"name":"CollisionMask","order":5,"description":"","examples":["```\n-- Most common collision mask of buildings:\ncollision_mask = {layers = {item = true, meltable = true, object = true, player = true, water_tile = true, is_object = true, is_lower_object = true}}\n```"],"type":{"complex_type":"table","parameters":[{"name":"colliding_with_tiles_only","order":3,"description":"Any prototype with this collision option will only be checked for collision with other prototype's collision masks if they are a tile. Defaults to `false`.","type":"boolean","optional":true},{"name":"consider_tile_transitions","order":2,"description":"Uses the prototypes position rather than its collision box when doing collision checks with tile prototypes. Allows the prototype to overlap colliding tiles up until its center point. This is only respected for character movement and cars driven by players. Defaults to `false`.","type":"boolean","optional":true},{"name":"layers","order":0,"description":"Every key in the dictionary is the name of one [layer](runtime:LuaCollisionLayerPrototype) the object collides with. The value is meaningless and always `true`. An empty table means that no layers are set.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":false},{"name":"not_colliding_with_itself","order":1,"description":"Any two entities that both have this option enabled on their prototype and have an identical collision mask layers list will not collide. Other collision mask options are not included in the identical layer list check. This does mean that two different prototypes with the same collision mask layers and this option enabled will not collide. Defaults to `false`.","type":"boolean","optional":true}]}},{"name":"Color","order":166,"description":"Red, green, blue and alpha values, all in range [0, 1] or all in range [0, 255] if any value is > 1. All values here are optional. Color channels default to `0`, the alpha channel defaults to `1`.\n\nSimilar to [MapPosition](runtime:MapPosition), Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers. The game usually expects colors to be in pre-multiplied form (color channels are pre-multiplied by alpha).","examples":["```\nred1 = {r = 0.5, g = 0, b = 0, a = 0.5}  -- Half-opacity red\nred2 = {r = 0.5, a = 0.5}                -- Same color as red1\nblack = {}                               -- All channels omitted: black\nred1_short = {0.5, 0, 0, 0.5}            -- Same color as red1 in short-hand notation\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]},{"complex_type":"tuple","values":["float","float","float","float"]}],"full_format":false}},{"name":"ColorModifier","order":167,"description":"Same as [Color](runtime:Color), but red, green, blue and alpha values can be any floating point number, without any special handling of the range [1, 255].","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"a","order":3,"description":"","type":"float","optional":true},{"name":"b","order":2,"description":"","type":"float","optional":true},{"name":"g","order":1,"description":"","type":"float","optional":true},{"name":"r","order":0,"description":"","type":"float","optional":true}]},{"complex_type":"tuple","values":["float","float","float","float"]}],"full_format":false}},{"name":"Command","order":223,"description":"Commands can be given to enemies and unit groups.","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Type of command. The remaining fields depend on the value of this field.","type":"defines.command","optional":false}],"variant_parameter_groups":[{"name":"defines.command.attack","order":0,"description":"","parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"target","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"defines.command.attack_area","order":4,"description":"","parameters":[{"name":"destination","order":0,"description":"Center of the attack area.","type":"MapPosition","optional":false},{"name":"distraction","order":2,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"radius","order":1,"description":"Radius of the attack area.","type":"double","optional":false}]},{"name":"defines.command.build_base","order":8,"description":"","parameters":[{"name":"destination","order":0,"description":"Where to build the base.","type":"MapPosition","optional":false},{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"ignore_planner","order":2,"description":"Whether the units should ignore expansion candidate chunks. When `false`, they will obey and not build a base in a non-candidate chunk. Defaults to `false`.","type":"boolean","optional":true}]},{"name":"defines.command.compound","order":2,"description":"","parameters":[{"name":"commands","order":1,"description":"The sub-commands.","type":{"complex_type":"array","value":"Command"},"optional":false},{"name":"structure_type","order":0,"description":"How the commands should be chained together.","type":"defines.compound_command","optional":false}]},{"name":"defines.command.flee","order":7,"description":"","parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"from","order":0,"description":"The entity to flee from","type":"LuaEntity","optional":false}]},{"name":"defines.command.go_to_location","order":1,"description":"","parameters":[{"name":"destination","order":0,"description":"The position to path to. Either this or `destination_entity` need to be specified. If both are, `destination_entity` is used.","type":"MapPosition","optional":true},{"name":"destination_entity","order":1,"description":"The entity to path to. Either this or `destination` need to be specified. If both are, `destination_entity` is used.","type":"LuaEntity","optional":true},{"name":"distraction","order":2,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"pathfind_flags","order":3,"description":"Flags that affect pathfinder behavior.","type":"PathfinderFlags","optional":true},{"name":"radius","order":4,"description":"How close the pathfinder needs to get to its destination (in tiles). Defaults to `3`.","type":"double","optional":true}]},{"name":"defines.command.group","order":3,"description":"","parameters":[{"name":"distraction","order":1,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"group","order":0,"description":"The group whose command to follow.","type":"LuaCommandable","optional":false},{"name":"use_group_distraction","order":2,"description":"Whether the unit will use the group distraction or the commands distraction. Defaults to true.","type":"boolean","optional":true}]},{"name":"defines.command.stop","order":6,"description":"","parameters":[{"name":"distraction","order":0,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"ticks_to_wait","order":1,"description":"Ticks to wander before successfully completing the command. Default is max uint, which means stop forever.","type":"uint","optional":true}]},{"name":"defines.command.wander","order":5,"description":"","parameters":[{"name":"distraction","order":0,"description":"Defaults to `defines.distraction.by_enemy`.","type":"defines.distraction","optional":true},{"name":"radius","order":1,"description":"Defaults to 10. Does not apply when `wander_in_group` is `true`.","type":"double","optional":true},{"name":"ticks_to_wait","order":3,"description":"Ticks to wander before successfully completing the command. Default is max uint, which means wander forever.","type":"uint","optional":true},{"name":"wander_in_group","order":2,"description":"When commanding a group, defines how the group will wander. When `true`, the units in the group will wander around inside the group's radius, just like gathering biters. When `false`, the units will wander as a group, ie they will all walk together in the same random direction. Default is true for groups. Passing true for a single unit is an error.","type":"boolean","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"ComparatorString","order":3,"description":"A string that specifies how the inputs should be compared.\n\nWhile the API accepts both versions for `\"less/greater than or equal to\"` and `\"not equal\"`, it'll always return `\"\u2265\"`, `\"\u2264\"` or `\"\u2260\"` respectively when reading them back.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"=","description":"\"equal to\""},{"complex_type":"literal","value":">","description":"\"greater than\""},{"complex_type":"literal","value":"<","description":"\"lesser than\""},{"complex_type":"literal","value":"\u2265","description":"\"greater than or equal to\""},{"complex_type":"literal","value":">=","description":"\"greater than or equal to\""},{"complex_type":"literal","value":"\u2264","description":"\"lesser than or equal to\""},{"complex_type":"literal","value":"<=","description":"\"lesser than or equal to\""},{"complex_type":"literal","value":"\u2260","description":"\"not equal to\""},{"complex_type":"literal","value":"!=","description":"\"not equal to\""}],"full_format":true}},{"name":"CompiledLogisticFilter","order":109,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":4,"description":"The comparator for quality. `nil` if any quality.","type":"ComparatorString","optional":true},{"name":"count","order":5,"description":"","type":"int","optional":false},{"name":"index","order":0,"description":"","type":"LogisticFilterIndex","optional":false},{"name":"max_count","order":6,"description":"","type":"ItemCountType","optional":true},{"name":"minimum_delivery_count","order":7,"description":"Defaults to 0.","type":"ItemCountType","optional":true},{"name":"name","order":2,"description":"Name of the logistic filter.","type":"string","optional":true},{"name":"quality","order":3,"description":"The prototype name of the quality. `nil` for any quality.","type":"string","optional":true},{"name":"type","order":1,"description":"The type of the logistic filter.","type":"SignalIDType","optional":true}]}},{"name":"ConfigurationChangedData","order":255,"description":"","type":{"complex_type":"table","parameters":[{"name":"migration_applied","order":4,"description":"`true` when mod prototype migrations have been applied since the last time this save was loaded.","type":"boolean","optional":false},{"name":"mod_changes","order":2,"description":"Dictionary of mod changes. It is indexed by mod name.","type":{"complex_type":"dictionary","key":"string","value":"ModChangeData"},"optional":false},{"name":"mod_startup_settings_changed","order":3,"description":"`true` when mod startup settings have changed since the last time this save was loaded.","type":"boolean","optional":false},{"name":"new_version","order":1,"description":"New version of the map. Present only when loading map version other than the current version.","type":"string","optional":true},{"name":"old_version","order":0,"description":"Old version of the map. Present only when loading map version other than the current version.","type":"string","optional":true}]}},{"name":"ConstantCombinatorParameters","order":209,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"Value of the signal to emit.","type":"int","optional":false},{"name":"index","order":2,"description":"Index of the constant combinator's slot to set this signal to.","type":"uint","optional":false},{"name":"signal","order":0,"description":"Signal to emit.","type":"SignalID","optional":false}]}},{"name":"CraftingQueueItem","order":168,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":2,"description":"The amount of items being crafted.","type":"uint","optional":false},{"name":"index","order":0,"description":"The index of the item in the crafting queue.","type":"uint","optional":false},{"name":"prerequisite","order":3,"description":"The item is a prerequisite for another item in the queue.","type":"boolean","optional":false},{"name":"recipe","order":1,"description":"The recipe being crafted.","type":"string","optional":false}]}},{"name":"CursorBoxRenderType","order":134,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"entity","description":"The normal entity selection box. Yellow by default."},{"complex_type":"literal","value":"multiplayer-entity","description":"The multiplayer entity selection box which gets tinted using [LuaPlayer::chat_color](runtime:LuaPlayer::chat_color). White by default."},{"complex_type":"literal","value":"electricity","description":"The selection box used to specify electric poles an entity is connected to. Light blue by default."},{"complex_type":"literal","value":"copy","description":"The selection box used when doing entity copy-paste. Green by default."},{"complex_type":"literal","value":"not-allowed","description":"The selection box used when specifying colliding entities. Red by default."},{"complex_type":"literal","value":"pair","description":"Light blue by default."},{"complex_type":"literal","value":"logistics","description":"Light blue by default."},{"complex_type":"literal","value":"train-visualization","description":"White by default."},{"complex_type":"literal","value":"blueprint-snap-rectangle","description":"Green by default."},{"complex_type":"literal","value":"spidertron-remote-selected","description":""},{"complex_type":"literal","value":"spidertron-remote-to-be-selected","description":""}],"full_format":true}},{"name":"CustomCommandData","order":256,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"The name of the command.","type":"string","optional":false},{"name":"parameter","order":3,"description":"The parameter passed after the command, if there is one.","type":"string","optional":true},{"name":"player_index","order":2,"description":"The player who issued the command, or `nil` if it was issued from the server console.","type":"uint","optional":true},{"name":"tick","order":1,"description":"The tick the command was used in.","type":"uint","optional":false}]}},{"name":"CustomEntityStatus","order":48,"description":"","type":{"complex_type":"table","parameters":[{"name":"diode","order":0,"description":"","type":"defines.entity_status_diode","optional":false},{"name":"label","order":1,"description":"","type":"LocalisedString","optional":false}]}},{"name":"CutsceneWaypoint","order":171,"description":"","type":{"complex_type":"table","parameters":[{"name":"position","order":0,"description":"Position to pan the camera to.","type":"MapPosition","optional":true},{"name":"target","order":1,"description":"Entity or unit group to pan the camera to.","type":{"complex_type":"union","options":["LuaEntity","LuaCommandable"],"full_format":false},"optional":true},{"name":"time_to_wait","order":3,"description":"Time in ticks to wait before moving to the next waypoint.","type":"uint","optional":false},{"name":"transition_time","order":2,"description":"How many ticks it will take to reach this waypoint from the previous one.","type":"uint","optional":false},{"name":"zoom","order":4,"description":"Zoom level to be set when the waypoint is reached. When not specified, the previous waypoint's zoom is used.","type":"double","optional":true}]}},{"name":"DamageTypeFilters","order":146,"description":"","type":{"complex_type":"table","parameters":[{"name":"types","order":1,"description":"The damage types to filter for. The value in the dictionary is meaningless and exists just to allow for easy lookup.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}},"optional":false},{"name":"whitelist","order":0,"description":"Whether this is a whitelist or a blacklist of damage types. `true` means whitelist.","type":"boolean","optional":false}]}},{"name":"DamageTypeID","order":77,"description":"A damage type prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaDamagePrototype","description":"The damage type prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"DeciderCombinatorCondition","order":212,"description":"","type":"table"},{"name":"DeciderCombinatorOutput","order":213,"description":"","type":"table"},{"name":"DeciderCombinatorParameters","order":211,"description":"","type":{"complex_type":"table","parameters":[{"name":"conditions","order":0,"description":"List of conditions.","type":{"complex_type":"array","value":"DeciderCombinatorCondition"},"optional":false},{"name":"outputs","order":1,"description":"List of outputs.","type":{"complex_type":"array","value":"DeciderCombinatorOutput"},"optional":false}]}},{"name":"Decorative","order":172,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"","type":"uint8","optional":false},{"name":"name","order":0,"description":"The name of the decorative prototype.","type":"string","optional":false},{"name":"position","order":1,"description":"","type":"TilePosition","optional":false}]}},{"name":"DecorativeID","order":91,"description":"A decorative prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaDecorativePrototype","description":"The decorative prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"DecorativePrototypeFilter","order":284,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"decal"},{"complex_type":"literal","value":"autoplace"},{"complex_type":"literal","value":"collision-mask"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"collision-mask","order":0,"description":"","parameters":[{"name":"mask","order":0,"description":"Name of one [layer](runtime:LuaCollisionLayerPrototype) or a full collision mask.","type":{"complex_type":"union","options":["CollisionLayerID","CollisionMask"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"How to filter.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"collides"},{"complex_type":"literal","value":"layers-equals"},{"complex_type":"literal","value":"contains-any"},{"complex_type":"literal","value":"contains-all"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"DecorativeResult","order":173,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"","type":"uint","optional":false},{"name":"decorative","order":1,"description":"","type":"LuaDecorativePrototype","optional":false},{"name":"position","order":0,"description":"","type":"TilePosition","optional":false}]}},{"name":"DetailedItemOnLine","order":22,"description":"","type":{"complex_type":"table","parameters":[{"name":"position","order":1,"description":"Linear position of this stack on this line.","type":"float","optional":false},{"name":"stack","order":0,"description":"","type":"LuaItemStack","optional":false},{"name":"unique_id","order":2,"description":"Unique identifier of this item while it is on transport lines.","type":"uint","optional":false}]}},{"name":"DifficultySettings","order":125,"description":"Technology difficulty settings. Updating any of the attributes will immediately take effect in the game engine.","type":{"complex_type":"LuaStruct","attributes":[{"name":"spoil_time_modifier","order":1,"description":"A value in range [0.01, 100].","read_type":"double","write_type":"double","optional":false},{"name":"technology_price_multiplier","order":0,"description":"A value in range [0.001, 1000].","read_type":"double","write_type":"double","optional":false}]}},{"name":"DisplayPanelMessageDefinition","order":40,"description":"","type":{"complex_type":"table","parameters":[{"name":"condition","order":2,"description":"The circuit condition under which to show the message.","type":"CircuitConditionDefinition","optional":false},{"name":"icon","order":1,"description":"The icon to show alongside the message.","type":"SignalID","optional":false},{"name":"text","order":0,"description":"The message to show.","type":"string","optional":false}]}},{"name":"DisplayResolution","order":148,"description":"","type":{"complex_type":"table","parameters":[{"name":"height","order":1,"description":"","type":"uint","optional":false},{"name":"width","order":0,"description":"","type":"uint","optional":false}]}},{"name":"DragTarget","order":218,"description":"","type":{"complex_type":"table","parameters":[{"name":"target_entity","order":0,"description":"","type":"LuaEntity","optional":false},{"name":"wire_connector_id","order":1,"description":"Identifier of the wire connector from which the wire is being dragged.","type":"defines.wire_connector_id","optional":false}]}},{"name":"EffectReceiver","order":63,"description":"","type":{"complex_type":"table","parameters":[{"name":"base_effect","order":0,"description":"","type":"ModuleEffects","optional":false},{"name":"uses_beacon_effects","order":2,"description":"","type":"boolean","optional":false},{"name":"uses_module_effects","order":1,"description":"","type":"boolean","optional":false},{"name":"uses_surface_effects","order":3,"description":"","type":"boolean","optional":false}]}},{"name":"ElemID","order":140,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"Name of a prototype as defined by `type`.","type":"string","optional":false},{"name":"quality","order":2,"description":"Name of a quality prototype if `type` use quality.","type":"string","optional":true},{"name":"type","order":0,"description":"","type":"ElemType","optional":false}]}},{"name":"ElemType","order":138,"description":"A [string](runtime:string) specifying a type for [choose elem buttons](runtime:LuaGuiElement::elem_type). It's also used by [ElemID](runtime:ElemID) for [LuaGuiElement::elem_tooltip](runtime:LuaGuiElement::elem_tooltip).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"achievement","description":""},{"complex_type":"literal","value":"decorative","description":""},{"complex_type":"literal","value":"entity","description":""},{"complex_type":"literal","value":"equipment","description":""},{"complex_type":"literal","value":"fluid","description":""},{"complex_type":"literal","value":"item","description":""},{"complex_type":"literal","value":"item-group","description":""},{"complex_type":"literal","value":"recipe","description":""},{"complex_type":"literal","value":"signal","description":""},{"complex_type":"literal","value":"technology","description":""},{"complex_type":"literal","value":"tile","description":""},{"complex_type":"literal","value":"asteroid-chunk","description":""},{"complex_type":"literal","value":"space-location","description":""},{"complex_type":"literal","value":"item-with-quality","description":""},{"complex_type":"literal","value":"entity-with-quality","description":""},{"complex_type":"literal","value":"recipe-with-quality","description":""},{"complex_type":"literal","value":"equipment-with-quality","description":""}],"full_format":true}},{"name":"EnemyEvolutionMapSettings","order":119,"description":"These values represent a percentual increase in evolution. This means a value of `0.1` would increase evolution by 10%.","type":{"complex_type":"table","parameters":[{"name":"destroy_factor","order":2,"description":"The amount evolution progresses for every destroyed spawner. Defaults to `0.002`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether enemy evolution is enabled at all.","type":"boolean","optional":false},{"name":"pollution_factor","order":3,"description":"The amount evolution progresses for every unit of pollution. Defaults to `0.0000009`.","type":"double","optional":false},{"name":"time_factor","order":1,"description":"The amount evolution naturally progresses by every second. Defaults to `0.000004`.","type":"double","optional":false}]}},{"name":"EnemyExpansionMapSettings","order":120,"description":"Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry).\n\nThe pseudocode algorithm to determine a chunk's score is as follows:\n\n```\nplayer = 0\nfor neighbour in all chunks within enemy_building_influence_radius from chunk:\n  player += number of player buildings on neighbour\n    * building_coefficient\n    * neighbouring_chunk_coefficient^distance(chunk, neighbour)\nbase = 0\nfor neighbour in all chunk within friendly_base_influence_radius from chunk:\n  base += num of enemy bases on neighbour\n    * other_base_coefficient\n    * neighbouring_base_chunk_coefficient^distance(chunk, neighbour)\nscore(chunk) = 1 / (1 + player + base)\n```","type":{"complex_type":"table","parameters":[{"name":"building_coefficient","order":4,"description":"Defaults to `0.1`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether enemy expansion is enabled at all.","type":"boolean","optional":false},{"name":"enemy_building_influence_radius","order":3,"description":"Defaults to `2`.","type":"uint","optional":false},{"name":"friendly_base_influence_radius","order":2,"description":"Defaults to `2`.","type":"uint","optional":false},{"name":"max_colliding_tiles_coefficient","order":8,"description":"A chunk has to have at most this high of a percentage of unbuildable tiles for it to be considered a candidate to avoid chunks full of water as candidates. Defaults to `0.9`, or 90%.","type":"double","optional":false},{"name":"max_expansion_cooldown","order":12,"description":"The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3 600=216 000` ticks.","type":"uint","optional":false},{"name":"max_expansion_distance","order":1,"description":"Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to `7`.","type":"uint","optional":false},{"name":"min_expansion_cooldown","order":11,"description":"The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3 600=14 400` ticks.","type":"uint","optional":false},{"name":"neighbouring_base_chunk_coefficient","order":7,"description":"Defaults to `0.4`.","type":"double","optional":false},{"name":"neighbouring_chunk_coefficient","order":6,"description":"Defaults to `0.5`.","type":"double","optional":false},{"name":"other_base_coefficient","order":5,"description":"Defaults to `2.0`.","type":"double","optional":false},{"name":"settler_group_max_size","order":10,"description":"The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `20`.","type":"uint","optional":false},{"name":"settler_group_min_size","order":9,"description":"The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `5`.","type":"uint","optional":false}]}},{"name":"EntityID","order":73,"description":"An entity prototype may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEntityPrototype","description":"The entity prototype."},{"complex_type":"type","value":"LuaEntity","description":"The entity."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"EntityIDAndQualityIDPair","order":69,"description":"An entity prototype with optional quality specification.","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"Entity prototype.","type":"EntityID","optional":false},{"name":"quality","order":1,"description":"Quality prototype. Normal quality will be used if not specified.","type":"QualityID","optional":true}]}},{"name":"EntityIDFilter","order":38,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":2,"description":"The quality comparison type.","type":"ComparatorString","optional":true},{"name":"name","order":0,"description":"The entity name.","type":"string","optional":false},{"name":"quality","order":1,"description":"The name of the quality.","type":"string","optional":true}]}},{"name":"EntityPrototypeFilter","order":291,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"flying-robot"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"explosion"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"buildable"},{"complex_type":"literal","value":"placable-in-editor"},{"complex_type":"literal","value":"clonable"},{"complex_type":"literal","value":"selectable"},{"complex_type":"literal","value":"hidden"},{"complex_type":"literal","value":"entity-with-health"},{"complex_type":"literal","value":"building"},{"complex_type":"literal","value":"fast-replaceable"},{"complex_type":"literal","value":"uses-direction"},{"complex_type":"literal","value":"minable"},{"complex_type":"literal","value":"circuit-connectable"},{"complex_type":"literal","value":"autoplace"},{"complex_type":"literal","value":"blueprintable"},{"complex_type":"literal","value":"item-to-place"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"collision-mask"},{"complex_type":"literal","value":"flag"},{"complex_type":"literal","value":"build-base-evolution-requirement"},{"complex_type":"literal","value":"selection-priority"},{"complex_type":"literal","value":"emissions-per-second"},{"complex_type":"literal","value":"crafting-category"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"build-base-evolution-requirement","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"collision-mask","order":2,"description":"Usage example:\n\n```\nprototypes.get_entity_filtered({{filter = \"collision-mask\", mask = \"player\", mask_mode = \"collides\"}})\n```","parameters":[{"name":"mask","order":0,"description":"Name of one [layer](runtime:LuaCollisionLayerPrototype) or a full collision mask.","type":{"complex_type":"union","options":["CollisionLayerID","CollisionMask"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"collides"},{"complex_type":"literal","value":"layers-equals"},{"complex_type":"literal","value":"contains-any"},{"complex_type":"literal","value":"contains-all"}],"full_format":false},"optional":false}]},{"name":"crafting-category","order":7,"description":"","parameters":[{"name":"crafting_category","order":0,"description":"Matches if the prototype is for a crafting machine with this [crafting category](runtime:LuaEntityPrototype::crafting_categories).","type":"string","optional":false}]},{"name":"emissions-per-second","order":6,"description":"","parameters":[{"name":"comparison","order":1,"description":"","type":"ComparatorString","optional":false},{"name":"pollutant","order":0,"description":"The name of a pollutant type to check.","type":"string","optional":false},{"name":"value","order":2,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"flag","order":3,"description":"Usage example:\n\n```\nprototypes.get_entity_filtered({{filter = \"flag\", flag = \"placeable-player\"}, {filter = \"flag\", flag = \"placeable-enemy\", mode = \"and\"}})\n```","parameters":[{"name":"flag","order":0,"description":"","type":"EntityPrototypeFlag","optional":false}]},{"name":"name","order":0,"description":"For use within nested filters such as the `place-result` filter of array[[ItemPrototypeFilter](runtime:ItemPrototypeFilter)].\n\nTo get a specific prototype by name, see [LuaGameScript::entity_prototypes](runtime:LuaGameScript::entity_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"selection-priority","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint8","optional":false}]},{"name":"type","order":1,"description":"Usage example: \n```\nprototypes.get_entity_filtered({{filter = \"type\", type = \"unit\"}})\n```","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"EntityPrototypeFlag","order":47,"description":"A [string](runtime:string) specifying an entity prototype flag.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"not-rotatable","description":"Prevents the entity from being rotated before or after placement."},{"complex_type":"literal","value":"placeable-neutral","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-player","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-enemy","description":"Determines the default force when placing entities in the map editor and using the \"AUTO\" option for the force."},{"complex_type":"literal","value":"placeable-off-grid","description":"Determines whether the entity needs to be aligned with the invisible grid within the world. Most entities are confined in this way, with a few exceptions such as trees and land mines."},{"complex_type":"literal","value":"player-creation","description":"Makes it possible to blueprint, deconstruct, and repair the entity (which can be turned off again using the specific flags). Makes it possible for the biter AI to target the entity as a distraction. Enables dust to automatically be created when building the entity. If the entity does not have a `map_color` set, this flag makes the entity appear on the map with the default color specified by the UtilityConstants."},{"complex_type":"literal","value":"building-direction-8-way","description":"Uses 45 degree angle increments when selecting direction."},{"complex_type":"literal","value":"filter-directions","description":"Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default."},{"complex_type":"literal","value":"get-by-unit-number","description":"When set, entity will be possible to obtain by using [LuaGameScript::get_entity_by_unit_number](runtime:LuaGameScript::get_entity_by_unit_number). It also changes input actions sent by a player to be selecting entity by unit number instead of a position which may help players in latency to select moving entities."},{"complex_type":"literal","value":"breaths-air","description":"Used to specify that the entity breathes air, and is thus affected by poison."},{"complex_type":"literal","value":"not-repairable","description":"Used to specify that the entity can not be 'healed' by repair packs."},{"complex_type":"literal","value":"not-on-map","description":"Prevents the entity from being drawn on the map."},{"complex_type":"literal","value":"not-deconstructable","description":"Prevents the entity from being deconstructed."},{"complex_type":"literal","value":"not-blueprintable","description":"Prevents the entity from being part of a blueprint."},{"complex_type":"literal","value":"hide-alt-info","description":"Hides the alt-info of this entity when in alt-mode."},{"complex_type":"literal","value":"no-gap-fill-while-building","description":""},{"complex_type":"literal","value":"not-flammable","description":"Does not apply fire stickers to the entity."},{"complex_type":"literal","value":"no-automated-item-removal","description":"Prevents inserters and loaders from taking items from this entity."},{"complex_type":"literal","value":"no-automated-item-insertion","description":"Prevents inserters and loaders from inserting items into this entity."},{"complex_type":"literal","value":"no-copy-paste","description":"Prevents the entity from being copy-pasted."},{"complex_type":"literal","value":"not-selectable-in-game","description":"Disallows selection of the entity even when a selection box is specified for other reasons. For example, selection boxes are used to determine the size of outlines to be shown when highlighting entities inside electric pole ranges."},{"complex_type":"literal","value":"not-upgradable","description":"Prevents the entity from being selected by the upgrade planner."},{"complex_type":"literal","value":"not-in-kill-statistics","description":"Prevents the entity from being shown in the kill statistics."},{"complex_type":"literal","value":"building-direction-16-way","description":""},{"complex_type":"literal","value":"snap-to-rail-support-spot","description":""},{"complex_type":"literal","value":"not-in-made-in","description":"Prevents the entity from being shown in the \"made in\" list in recipe tooltips."}],"full_format":true}},{"name":"EntityPrototypeFlags","order":46,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nBy default, none of these flags are set.","type":{"complex_type":"dictionary","key":"EntityPrototypeFlag","value":{"complex_type":"literal","value":true}}},{"name":"EntitySearchFilters","order":10,"description":"","type":{"complex_type":"table","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":8,"description":"","type":{"complex_type":"union","options":["CollisionLayerID",{"complex_type":"array","value":"CollisionLayerID"},{"complex_type":"dictionary","key":"CollisionLayerID","value":{"complex_type":"literal","value":true}}],"full_format":false},"optional":true},{"name":"direction","order":7,"description":"","type":{"complex_type":"union","options":["defines.direction",{"complex_type":"array","value":"defines.direction"}],"full_format":false},"optional":true},{"name":"force","order":9,"description":"","type":"ForceSet","optional":true},{"name":"ghost_name","order":5,"description":"An empty array means nothing matches the ghost_name filter.","type":{"complex_type":"union","options":["EntityID",{"complex_type":"array","value":"EntityID"}],"full_format":false},"optional":true},{"name":"ghost_type","order":6,"description":"An empty array means nothing matches the ghost_type filter.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"has_item_inside","order":14,"description":"","type":"ItemWithQualityID","optional":true},{"name":"invert","order":16,"description":"Whether the filters should be inverted.","type":"boolean","optional":true},{"name":"is_military_target","order":13,"description":"","type":"boolean","optional":true},{"name":"limit","order":12,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"An empty array means nothing matches the name filter.","type":{"complex_type":"union","options":["EntityID",{"complex_type":"array","value":"EntityID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"Has precedence over area field.","type":"MapPosition","optional":true},{"name":"quality","order":15,"description":"","type":"QualityCondition","optional":true},{"name":"radius","order":2,"description":"If given with position, will return all entities within the radius of the position.","type":"double","optional":true},{"name":"to_be_deconstructed","order":10,"description":"","type":"boolean","optional":true},{"name":"to_be_upgraded","order":11,"description":"","type":"boolean","optional":true},{"name":"type","order":4,"description":"An empty array means nothing matches the type filter.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true}]}},{"name":"EntityWithQualityID","order":68,"description":"An entity prototype with optional quality specification. Can be specified in one of four ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEntity","description":"The entity. Both prototype and quality of the entity will be used."},{"complex_type":"type","value":"LuaEntityPrototype","description":"The entity prototype. Normal quality will be used."},{"complex_type":"type","value":"string","description":"The prototype name. Normal quality will be used."},{"complex_type":"type","value":"EntityIDAndQualityIDPair","description":"A table of entity prototype and quality."}],"full_format":true}},{"name":"EquipmentID","order":85,"description":"An equipment prototype may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEquipmentPrototype","description":"The equipment prototype."},{"complex_type":"type","value":"LuaEquipment","description":"The equipment."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"EquipmentIDAndQualityIDPair","order":87,"description":"An equipment prototype with optional quality specification.","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"Equipment prototype.","type":"EquipmentID","optional":false},{"name":"quality","order":1,"description":"Quality prototype. Normal quality will be used if not specified.","type":"QualityID","optional":true}]}},{"name":"EquipmentPoint","order":156,"description":"A table used to define a manual shape for a piece of equipment.","type":{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"uint","optional":false},{"name":"y","order":1,"description":"","type":"uint","optional":false}]}},{"name":"EquipmentPosition","order":153,"description":"Position inside an equipment grid. This uses the same format as [MapPosition](runtime:MapPosition), meaning it can be specified either with or without explicit keys.","examples":["```\n-- Explicit definition\n{x = 5, y = 2}\n{y = 2, x = 5}\n```","```\n-- Shorthand\n{1, 2}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","values":["int","int"]}],"full_format":false}},{"name":"EquipmentPrototypeFilter","order":290,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"item-to-place"},{"complex_type":"literal","value":"type"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"EquipmentWithQualityID","order":86,"description":"An equipment prototype with optional quality specification.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaEquipmentPrototype","description":"The equipment prototype. Normal quality will be used."},{"complex_type":"type","value":"LuaEquipment","description":"The equipment. Both prototype and quality of the provided equipment will be used."},{"complex_type":"type","value":"string","description":"The prototype name. Normal quality will be used."},{"complex_type":"type","value":"EquipmentIDAndQualityIDPair","description":"A table of equipment prototype and quality."}],"full_format":true}},{"name":"EventData","order":252,"description":"Information about the event that has been raised. The table can also contain other fields depending on the type of event. See [the list of Factorio events](runtime:events) for more information on these.","type":{"complex_type":"table","parameters":[{"name":"mod_name","order":2,"description":"The name of the mod that raised the event if it was raised using [LuaBootstrap::raise_event](runtime:LuaBootstrap::raise_event).","type":"string","optional":true},{"name":"name","order":0,"description":"The identifier of the event this handler was registered to.","type":"defines.events","optional":false},{"name":"tick","order":1,"description":"The tick during which the event happened.","type":"uint","optional":false}]}},{"name":"EventFilter","order":25,"description":"Used to filter out irrelevant event callbacks in a performant way.\n\nFilters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed.","type":{"complex_type":"array","value":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaPrePlatformMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaRobotMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaEntityMarkedForUpgradeEventFilter","description":""},{"complex_type":"type","value":"LuaPreGhostUpgradedEventFilter","description":""},{"complex_type":"type","value":"LuaPlatformMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedDestroyEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerBuiltEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPlatformBuiltEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPreGhostDeconstructedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityClonedEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedTeleportedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDeconstructionCancelledEventFilter","description":""},{"complex_type":"type","value":"LuaRobotBuiltEntityEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedBuiltEventFilter","description":""},{"complex_type":"type","value":"LuaPrePlayerMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerRepairedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaUpgradeCancelledEventFilter","description":""},{"complex_type":"type","value":"LuaSectorScannedEventFilter","description":""},{"complex_type":"type","value":"LuaPostEntityDiedEventFilter","description":""},{"complex_type":"type","value":"LuaEntityMarkedForDeconstructionEventFilter","description":""},{"complex_type":"type","value":"LuaPlayerMinedEntityEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDamagedEventFilter","description":""},{"complex_type":"type","value":"LuaScriptRaisedReviveEventFilter","description":""},{"complex_type":"type","value":"LuaEntityDiedEventFilter","description":""},{"complex_type":"type","value":"LuaPreRobotMinedEntityEventFilter","description":""}],"full_format":true}}},{"name":"Fluid","order":84,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":1,"description":"Amount of the fluid.","type":"double","optional":false},{"name":"name","order":0,"description":"Fluid prototype name of the fluid.","type":"string","optional":false},{"name":"temperature","order":2,"description":"The temperature. When reading from [LuaFluidBox](runtime:LuaFluidBox), this field will always be present. It is not necessary to specify it when writing, however. When not specified, the fluid will be set to the fluid's default temperature as specified in the fluid's prototype.","type":"float","optional":true}]}},{"name":"FluidBoxConnectionRecord","order":24,"description":"","type":{"complex_type":"table","parameters":[{"name":"other_entity","order":1,"description":"","type":"LuaEntity","optional":false},{"name":"other_linked_connection_id","order":2,"description":"","type":"uint","optional":false},{"name":"this_linked_connection_id","order":0,"description":"","type":"uint","optional":false}]}},{"name":"FluidBoxFilter","order":204,"description":"","type":{"complex_type":"table","parameters":[{"name":"maximum_temperature","order":2,"description":"The maximum temperature allowed into the fluidbox.","type":"float","optional":false},{"name":"minimum_temperature","order":1,"description":"The minimum temperature allowed into the fluidbox.","type":"float","optional":false},{"name":"name","order":0,"description":"Fluid prototype name of the filtered fluid.","type":"string","optional":false}]}},{"name":"FluidBoxFilterSpec","order":205,"description":"","type":{"complex_type":"table","parameters":[{"name":"force","order":3,"description":"Force the filter to be set, regardless of current fluid content.","type":"boolean","optional":true},{"name":"maximum_temperature","order":2,"description":"The maximum temperature allowed into the fluidbox.","type":"float","optional":true},{"name":"minimum_temperature","order":1,"description":"The minimum temperature allowed into the fluidbox.","type":"float","optional":true},{"name":"name","order":0,"description":"Fluid prototype name of the filtered fluid.","type":"string","optional":false}]}},{"name":"FluidID","order":67,"description":"A fluid may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The fluid name."},{"complex_type":"type","value":"LuaFluidPrototype","description":"The fluid prototype."},{"complex_type":"type","value":"Fluid","description":"The fluid."}],"full_format":true}},{"name":"FluidProduct","order":106,"description":"","examples":["```\n-- Products of the \"advanced-oil-processing\" recipe\n{{type=\"fluid\", name=\"heavy-oil\", amount=1},\n  {type=\"fluid\", name=\"light-oil\", amount=4.5},\n  {type=\"fluid\", name=\"petroleum-gas\", amount=5.5}}\n```"],"type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"Amount of the fluid to give. If not returned, `amount_min` and `amount_max` will be present instead.","type":"double","optional":true},{"name":"amount_max","order":4,"description":"Maximum amount of the fluid to give. Not returned if `amount` is returned.","type":"double","optional":true},{"name":"amount_min","order":3,"description":"Minimal amount of the fluid to give. Not returned if `amount` is returned.","type":"double","optional":true},{"name":"fluidbox_index","order":9,"description":"","type":"uint","optional":true},{"name":"ignored_by_productivity","order":7,"description":"How much of this product is ignored by productivity.","type":"double","optional":true},{"name":"ignored_by_stats","order":6,"description":"How much of this product is ignored by statistics.","type":"double","optional":true},{"name":"name","order":1,"description":"Prototype name of the result.","type":"string","optional":false},{"name":"probability","order":5,"description":"A value in range `[0, 1]`. Fluid is only given with this probability; otherwise no product is produced.","type":"double","optional":false},{"name":"temperature","order":8,"description":"The fluid temperature of this product.","type":"float","optional":true},{"name":"type","order":0,"description":"","type":{"complex_type":"literal","value":"fluid"},"optional":false}]}},{"name":"FluidPrototypeFilter","order":293,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"hidden"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"subgroup"},{"complex_type":"literal","value":"default-temperature"},{"complex_type":"literal","value":"max-temperature"},{"complex_type":"literal","value":"heat-capacity"},{"complex_type":"literal","value":"fuel-value"},{"complex_type":"literal","value":"emissions-multiplier"},{"complex_type":"literal","value":"gas-temperature"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"default-temperature","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"emissions-multiplier","order":6,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-value","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"gas-temperature","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"heat-capacity","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"max-temperature","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"name","order":0,"description":"For use within nested filters such as the `has-product-fluid` filter of array[[RecipePrototypeFilter](runtime:RecipePrototypeFilter)].\n\nTo get a specific prototype by name, see [LuaGameScript::fluid_prototypes](runtime:LuaGameScript::fluid_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"subgroup","order":1,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](runtime:LuaGroup) (subgroup) name","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ForceCondition","order":259,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"all","description":"All forces pass."},{"complex_type":"literal","value":"enemy","description":"Forces which will attack pass."},{"complex_type":"literal","value":"ally","description":"Forces which won't attack pass."},{"complex_type":"literal","value":"friend","description":"Forces which are friends pass."},{"complex_type":"literal","value":"not-friend","description":"Forces which are not friends pass."},{"complex_type":"literal","value":"same","description":"The same force pass."},{"complex_type":"literal","value":"not-same","description":"The non-same forces pass."}],"full_format":true}},{"name":"ForceID","order":66,"description":"A force may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"Name of the force, same as [LuaForce::name](runtime:LuaForce::name)."},{"complex_type":"type","value":"uint8","description":"Index of the force, same as [LuaForce::index](runtime:LuaForce::index)."},{"complex_type":"type","value":"LuaForce","description":"A reference to [LuaForce](runtime:LuaForce) may be passed directly."}],"full_format":true}},{"name":"ForceSet","order":90,"description":"Set of forces. Can be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":{"complex_type":"array","value":"ForceID"},"description":"Array of many forces."},{"complex_type":"type","value":"ForceID","description":"A single force."}],"full_format":true}},{"name":"GameViewSettings","order":181,"description":"Parameters that affect the look and control of the game. Updating any of the member attributes here will immediately take effect in the game engine.","type":{"complex_type":"LuaStruct","attributes":[{"name":"show_alert_gui","order":4,"description":"Show the flashing alert icons next to the player's toolbar.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_controller_gui","order":0,"description":"Show the controller GUI elements. This includes the toolbar, the selected tool slot, the armour slot, and the gun and ammunition slots.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_crafting_queue","order":12,"description":"Shows or hides the crafting queue.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_entity_info","order":3,"description":"Show overlay icons on entities. Also known as \"alt-mode\".","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_entity_tooltip","order":9,"description":"Shows or hides the tooltip that is displayed when selecting an entity.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_hotkey_suggestions","order":14,"description":"hows or hides the mouse and keyboard/controller button hints in the bottom left corner if they are enabled in the interface settings.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_map_view_options","order":8,"description":"Shows or hides the view options when map is opened.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_minimap","order":1,"description":"Show the chart in the upper right-hand corner of the screen.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_quickbar","order":10,"description":"Shows or hides quickbar of shortcuts.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_rail_block_visualisation","order":6,"description":"When `true` (`false` is default), the rails will always show the rail block visualisation.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_research_info","order":2,"description":"Show research progress and name in the upper right-hand corner of the screen.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_shortcut_bar","order":11,"description":"Shows or hides the shortcut bar.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_side_menu","order":7,"description":"Shows or hides the buttons row.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"show_tool_bar","order":13,"description":"Shows or hides the tool window with the weapons and armor.","read_type":"boolean","write_type":"boolean","optional":false},{"name":"update_entity_selection","order":5,"description":"When `true` (the default), mousing over an entity will select it. Otherwise, moving the mouse won't update entity selection.","read_type":"boolean","write_type":"boolean","optional":false}]}},{"name":"GuiAnchor","order":157,"description":"","type":{"complex_type":"table","parameters":[{"name":"gui","order":0,"description":"","type":"defines.relative_gui_type","optional":false},{"name":"name","order":3,"description":"If provided, only anchors the GUI element when the opened thing matches the name. `name` takes precedence over `names`.","type":"string","optional":true},{"name":"names","order":4,"description":"If provided, only anchors the GUI element when the opened thing matches one of the names. When reading an anchor, `names` is always populated.","type":{"complex_type":"array","value":"string"},"optional":true},{"name":"position","order":1,"description":"","type":"defines.relative_gui_position","optional":false},{"name":"type","order":2,"description":"If provided, only anchors the GUI element when the opened things type matches the type.","type":"string","optional":true}]}},{"name":"GuiArrowSpecification","order":59,"description":"Used for specifying where a GUI arrow should point to.","type":{"complex_type":"table","parameters":[{"name":"margin","order":0,"description":"","type":"uint","optional":false},{"name":"type","order":1,"description":"This determines which of the following fields will be required.","type":"GuiArrowType","optional":false}],"variant_parameter_groups":[{"name":"crafting_queue","order":2,"description":"","parameters":[{"name":"crafting_queueindex","order":0,"description":"Index in the crafting queue to point to.","type":"uint","optional":false}]},{"name":"entity","order":0,"description":"","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":false}]},{"name":"item_stack","order":3,"description":"","parameters":[{"name":"inventory_index","order":0,"description":"Which inventory the stack is in.","type":"defines.inventory","optional":false},{"name":"item_stack_index","order":1,"description":"Which stack to point to.","type":"uint","optional":false},{"name":"source","order":2,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"player"},{"complex_type":"literal","value":"target"},{"complex_type":"literal","value":"player-quickbar"}],"full_format":false},"optional":false}]},{"name":"position","order":1,"description":"","parameters":[{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"GuiArrowType","order":263,"description":"Used by [GuiArrowSpecification](runtime:GuiArrowSpecification).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"nowhere","description":"Will remove the arrow entirely."},{"complex_type":"literal","value":"goal","description":"Will point to the current goal."},{"complex_type":"literal","value":"entity_info","description":""},{"complex_type":"literal","value":"active_window","description":""},{"complex_type":"literal","value":"entity","description":""},{"complex_type":"literal","value":"position","description":""},{"complex_type":"literal","value":"crafting_queue","description":""},{"complex_type":"literal","value":"item_stack","description":"Will point to a given item stack in an inventory."}],"full_format":true}},{"name":"GuiDirection","order":264,"description":"Direction of a [LuaGuiElement's](runtime:LuaGuiElement::direction) layout.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"horizontal","description":""},{"complex_type":"literal","value":"vertical","description":""}],"full_format":true}},{"name":"GuiElementType","order":262,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"button","description":"A clickable element. Relevant event: [on_gui_click](runtime:on_gui_click)"},{"complex_type":"literal","value":"sprite-button","description":"A `button` that displays a sprite rather than text. Relevant event: [on_gui_click](runtime:on_gui_click)"},{"complex_type":"literal","value":"checkbox","description":"A clickable element with a check mark that can be turned off or on. Relevant event: [on_gui_checked_state_changed](runtime:on_gui_checked_state_changed)"},{"complex_type":"literal","value":"flow","description":"An invisible container that lays out its children either horizontally or vertically."},{"complex_type":"literal","value":"frame","description":"A non-transparent box that contains other elements. It can have a title (set via the `caption` attribute). Just like a `flow`, it lays out its children either horizontally or vertically. Relevant event: [on_gui_location_changed](runtime:on_gui_location_changed)"},{"complex_type":"literal","value":"label","description":"A piece of text."},{"complex_type":"literal","value":"line","description":"A horizontal or vertical separation line."},{"complex_type":"literal","value":"progressbar","description":"A partially filled bar that can be used to indicate progress."},{"complex_type":"literal","value":"table","description":"An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains."},{"complex_type":"literal","value":"textfield","description":"A single-line box the user can type into. Relevant events: [on_gui_text_changed](runtime:on_gui_text_changed), [on_gui_confirmed](runtime:on_gui_confirmed)"},{"complex_type":"literal","value":"radiobutton","description":"An element that is similar to a `checkbox`, but with a circular appearance. Clicking a selected radio button will not unselect it. Radio buttons are not linked to each other in any way. Relevant event: [on_gui_checked_state_changed](runtime:on_gui_checked_state_changed)"},{"complex_type":"literal","value":"sprite","description":"An element that shows an image."},{"complex_type":"literal","value":"scroll-pane","description":"An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars."},{"complex_type":"literal","value":"drop-down","description":"A drop-down containing strings of text. Relevant event: [on_gui_selection_state_changed](runtime:on_gui_selection_state_changed)"},{"complex_type":"literal","value":"list-box","description":"A list of strings, only one of which can be selected at a time. Shows a scroll bar if necessary. Relevant event: [on_gui_selection_state_changed](runtime:on_gui_selection_state_changed)"},{"complex_type":"literal","value":"camera","description":"A camera that shows the game at the given position on the given surface. It can visually track an [entity](runtime:LuaGuiElement::entity) that is set after the element has been created."},{"complex_type":"literal","value":"choose-elem-button","description":"A button that lets the player pick from a certain kind of prototype, with optional filtering. Relevant event: [on_gui_elem_changed](runtime:on_gui_elem_changed)"},{"complex_type":"literal","value":"text-box","description":"A multi-line `textfield`. Relevant event: [on_gui_text_changed](runtime:on_gui_text_changed)"},{"complex_type":"literal","value":"slider","description":"A horizontal number line which can be used to choose a number. Relevant event: [on_gui_value_changed](runtime:on_gui_value_changed)"},{"complex_type":"literal","value":"minimap","description":"A minimap preview, similar to the normal player minimap. It can visually track an [entity](runtime:LuaGuiElement::entity) that is set after the element has been created."},{"complex_type":"literal","value":"entity-preview","description":"A preview of an entity. The [entity](runtime:LuaGuiElement::entity) has to be set after the element has been created."},{"complex_type":"literal","value":"empty-widget","description":"An empty element that just exists. The root GUI elements `screen` and `relative` are `empty-widget`s."},{"complex_type":"literal","value":"tabbed-pane","description":"A collection of `tab`s and their contents. Relevant event: [on_gui_selected_tab_changed](runtime:on_gui_selected_tab_changed)"},{"complex_type":"literal","value":"tab","description":"A tab for use in a `tabbed-pane`."},{"complex_type":"literal","value":"switch","description":"A switch with three possible states. Can have labels attached to either side. Relevant event: [on_gui_switch_state_changed](runtime:on_gui_switch_state_changed)"}],"full_format":true}},{"name":"GuiLocation","order":154,"description":"Screen coordinates of a GUI element in a [LuaGui](runtime:LuaGui). This uses the same format as [TilePosition](runtime:TilePosition), meaning it can be specified either with or without explicit keys.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","values":["int","int"]}],"full_format":false}},{"name":"GunShift4Way","order":240,"description":"","type":{"complex_type":"table","parameters":[{"name":"east","order":1,"description":"","type":"Vector","optional":false},{"name":"north","order":0,"description":"","type":"Vector","optional":false},{"name":"south","order":2,"description":"","type":"Vector","optional":false},{"name":"west","order":3,"description":"","type":"Vector","optional":false}]}},{"name":"HeatConnection","order":207,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"","type":"defines.direction","optional":false},{"name":"position","order":0,"description":"","type":"Vector","optional":false}]}},{"name":"HeatSetting","order":206,"description":"The settings used by a heat-interface type entity.","type":{"complex_type":"table","parameters":[{"name":"mode","order":1,"description":"Defaults to `\"at-least\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"at-least"},{"complex_type":"literal","value":"at-most"},{"complex_type":"literal","value":"exactly"},{"complex_type":"literal","value":"add"},{"complex_type":"literal","value":"remove"}],"full_format":false},"optional":true},{"name":"temperature","order":0,"description":"The target temperature. Defaults to the minimum temperature of the heat buffer.","type":"double","optional":true}]}},{"name":"InfinityInventoryFilter","order":202,"description":"A single filter used by an infinity-filters instance.","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"The count of the filter.","type":"uint","optional":true},{"name":"index","order":3,"description":"The index of this filter in the filters list. Not required when writing a filter.","type":"uint","optional":false},{"name":"mode","order":2,"description":"Defaults to `\"at-least\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"at-least"},{"complex_type":"literal","value":"at-most"},{"complex_type":"literal","value":"exactly"}],"full_format":false},"optional":true},{"name":"name","order":0,"description":"Name of the item.","type":"string","optional":false}]}},{"name":"InfinityPipeFilter","order":203,"description":"A single filter used by an infinity-pipe type entity.","type":{"complex_type":"table","parameters":[{"name":"mode","order":3,"description":"Defaults to `\"at-least\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"at-least"},{"complex_type":"literal","value":"at-most"},{"complex_type":"literal","value":"exactly"},{"complex_type":"literal","value":"add"},{"complex_type":"literal","value":"remove"}],"full_format":false},"optional":true},{"name":"name","order":0,"description":"Name of the fluid.","type":"string","optional":false},{"name":"percentage","order":1,"description":"The fill percentage the pipe (for example `0.5` for 50%). Can't be negative.","type":"double","optional":true},{"name":"temperature","order":2,"description":"The temperature of the fluid. Defaults to the default/minimum temperature of the fluid.","type":"double","optional":true}]}},{"name":"Ingredient","order":187,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"Amount of the item or fluid.","type":"double","optional":false},{"name":"ignored_by_stats","order":3,"description":"How much of this ingredient is ignored by statistics.","type":{"complex_type":"union","options":["uint","double"],"full_format":false},"optional":true},{"name":"name","order":1,"description":"Prototype name of the required item or fluid.","type":"string","optional":false},{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"item"},{"complex_type":"literal","value":"fluid"}],"full_format":false},"optional":false}],"variant_parameter_groups":[{"name":"fluid","order":0,"description":"","parameters":[{"name":"maximum_temperature","order":1,"description":"The maximum fluid temperature allowed.","type":"float","optional":true},{"name":"minimum_temperature","order":0,"description":"The minimum fluid temperature required.","type":"float","optional":true}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"InserterCircuitConditions","order":215,"description":"","type":{"complex_type":"table","parameters":[{"name":"circuit","order":0,"description":"","type":"CircuitCondition","optional":true},{"name":"logistics","order":1,"description":"","type":"CircuitCondition","optional":true}]}},{"name":"InventoryFilter","order":219,"description":"","type":{"complex_type":"table","parameters":[{"name":"index","order":0,"description":"Position of the corresponding filter slot.","type":"uint","optional":false},{"name":"name","order":1,"description":"Item prototype name of the item to filter.","type":"string","optional":false}]}},{"name":"InventoryPosition","order":50,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":2,"description":"How many items to insert. Defaults to `1`.","type":"ItemCountType","optional":true},{"name":"inventory","order":0,"description":"The ID of the inventory to insert into.","type":"defines.inventory","optional":false},{"name":"stack","order":1,"description":"The stack index of the inventory to insert into.","type":"ItemStackIndex","optional":false}]}},{"name":"ItemCountType","order":8,"description":"","type":"uint"},{"name":"ItemCountWithQuality","order":222,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"The number of items.","type":"uint","optional":false},{"name":"name","order":0,"description":"The name of the item prototype.","type":"string","optional":false},{"name":"quality","order":2,"description":"The quality level of the items.","type":"QualityID","optional":false}]}},{"name":"ItemFilter","order":57,"description":"An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"comparator","order":2,"description":"The quality comparison type.","type":"ComparatorString","optional":true},{"name":"name","order":0,"description":"The item.","type":"ItemID","optional":true},{"name":"quality","order":1,"description":"The quality.","type":"QualityID","optional":true}]},"string"],"full_format":false}},{"name":"ItemID","order":72,"description":"An item prototype may be specified in one of four ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaItemPrototype","description":"Item prototype."},{"complex_type":"type","value":"LuaItemStack","description":"Non empty item stack."},{"complex_type":"type","value":"LuaItem","description":"The item."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"ItemIDAndQualityIDPair","order":71,"description":"An item prototype with optional quality specification.","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"Item prototype.","type":"ItemID","optional":false},{"name":"quality","order":1,"description":"Quality prototype. Normal quality will be used if not specified.","type":"QualityID","optional":true}]}},{"name":"ItemIDFilter","order":37,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":2,"description":"The quality comparison type.","type":"ComparatorString","optional":true},{"name":"name","order":0,"description":"The item name.","type":"string","optional":false},{"name":"quality","order":1,"description":"The name of the quality.","type":"string","optional":true}]}},{"name":"ItemInventoryPositions","order":49,"description":"","type":{"complex_type":"table","parameters":[{"name":"grid_count","order":1,"description":"Defaults to `0`. Number of items to request for the equipment grid. When the items arrive they will be used to revive the first matching ghost equipment.","type":"ItemCountType","optional":true},{"name":"in_inventory","order":0,"description":"A list of stacks into which items should be inserted.","type":{"complex_type":"array","value":"InventoryPosition"},"optional":true}]}},{"name":"ItemLocationData","order":184,"description":"","type":{"complex_type":"table","parameters":[{"name":"entity","order":1,"description":"","type":"LuaEntity","optional":true},{"name":"force","order":4,"description":"","type":"LuaForce","optional":false},{"name":"player","order":2,"description":"","type":"LuaPlayer","optional":true},{"name":"position","order":3,"description":"","type":"MapPosition","optional":false},{"name":"surface","order":0,"description":"","type":"LuaSurface","optional":false}]}},{"name":"ItemProduct","order":105,"description":"","examples":["```\n-- Products of the \"steel-chest\" recipe (an array of Product)\n{{type=\"item\", name=\"steel-chest\", amount=1}}\n```","```\n-- What a custom recipe would look like that had a probability of 0.5 to return a\n-- minimum amount of 1 and a maximum amount of 5\n{{type=\"item\", name=\"custom-item\", probability=0.5, amount_min=1, amount_max=5}}\n```"],"type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"Amount of the item to give. If not returned, `amount_min` and `amount_max` will be present instead.","type":"uint16","optional":true},{"name":"amount_max","order":4,"description":"Maximum amount of the item to give. Not returned if `amount` is returned.","type":"uint16","optional":true},{"name":"amount_min","order":3,"description":"Minimal amount of the item to give. Not returned if `amount` is returned.","type":"uint16","optional":true},{"name":"extra_count_fraction","order":8,"description":"","type":"float","optional":true},{"name":"ignored_by_productivity","order":7,"description":"How much of this product is ignored by productivity.","type":"uint16","optional":true},{"name":"ignored_by_stats","order":6,"description":"How much of this product is ignored by statistics.","type":"uint16","optional":true},{"name":"name","order":1,"description":"Prototype name of the result.","type":"string","optional":false},{"name":"percent_spoiled","order":9,"description":"","type":"float","optional":true},{"name":"probability","order":5,"description":"A value in range `[0, 1]`. Item is only given with this probability; otherwise no product is produced.","type":"double","optional":false},{"name":"type","order":0,"description":"","type":{"complex_type":"literal","value":"item"},"optional":false}]}},{"name":"ItemPrototypeFilter","order":289,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"tool"},{"complex_type":"literal","value":"mergeable"},{"complex_type":"literal","value":"hidden"},{"complex_type":"literal","value":"hidden-in-factoriopedia"},{"complex_type":"literal","value":"is-parameter"},{"complex_type":"literal","value":"item-with-inventory"},{"complex_type":"literal","value":"selection-tool"},{"complex_type":"literal","value":"item-with-label"},{"complex_type":"literal","value":"has-rocket-launch-products"},{"complex_type":"literal","value":"fuel"},{"complex_type":"literal","value":"place-result"},{"complex_type":"literal","value":"burnt-result"},{"complex_type":"literal","value":"place-as-tile"},{"complex_type":"literal","value":"placed-as-equipment-result"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"flag"},{"complex_type":"literal","value":"subgroup"},{"complex_type":"literal","value":"fuel-category"},{"complex_type":"literal","value":"stack-size"},{"complex_type":"literal","value":"fuel-value"},{"complex_type":"literal","value":"fuel-acceleration-multiplier"},{"complex_type":"literal","value":"fuel-top-speed-multiplier"},{"complex_type":"literal","value":"fuel-emissions-multiplier"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"burnt-result","order":1,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the burnt result.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"flag","order":6,"description":"","parameters":[{"name":"flag","order":0,"description":"","type":"ItemPrototypeFlag","optional":false}]},{"name":"fuel-acceleration-multiplier","order":11,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-category","order":8,"description":"","parameters":[{"name":"fuel-category","order":0,"description":"A [LuaFuelCategoryPrototype](runtime:LuaFuelCategoryPrototype) name","type":"string","optional":false}]},{"name":"fuel-emissions-multiplier","order":13,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-top-speed-multiplier","order":12,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"fuel-value","order":10,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"name","order":4,"description":"For use within nested filters such as the `has-product-item` filter of array[[RecipePrototypeFilter](runtime:RecipePrototypeFilter)].\n\nTo get a specific prototype by name, see [LuaGameScript::item_prototypes](runtime:LuaGameScript::item_prototypes).","parameters":[{"name":"name","order":0,"description":"The prototype name, or list of acceptable names.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]},{"name":"place-as-tile","order":2,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the placed tile.","type":{"complex_type":"array","value":"TilePrototypeFilter"},"optional":true}]},{"name":"place-result","order":0,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the place result.","type":{"complex_type":"array","value":"EntityPrototypeFilter"},"optional":true}]},{"name":"placed-as-equipment-result","order":3,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Filters for the placed equipment.","type":{"complex_type":"array","value":"EquipmentPrototypeFilter"},"optional":true}]},{"name":"stack-size","order":9,"description":"Usage example:\n\n```\nprototypes.get_item_filtered({{filter = \"stack-size\", comparison = \">\", value = 20}, {filter = \"stack-size\", comparison = \"<\", value = 100, mode = \"and\"}})\n```","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"subgroup","order":7,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](runtime:LuaGroup) (subgroup) name","type":"string","optional":false}]},{"name":"type","order":5,"description":"Usage example: \n```\nprototypes.get_item_filtered({{filter = \"type\", type = \"armor\"}})\n```","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ItemPrototypeFlag","order":33,"description":"A [string](runtime:string) specifying an item prototype flag.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"draw-logistic-overlay","description":"Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default."},{"complex_type":"literal","value":"excluded-from-trash-unrequested","description":"If this item is skipped by the trash-unrequested logic."},{"complex_type":"literal","value":"always-show","description":"Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked."},{"complex_type":"literal","value":"hide-from-bonus-gui","description":"Hides the item from the bonus GUI."},{"complex_type":"literal","value":"hide-from-fuel-tooltip","description":"Hides the item from the tooltip that's shown when hovering over a burner inventory."},{"complex_type":"literal","value":"not-stackable","description":"Prevents the item from being stacked. It also prevents the item from stacking in assembling machine input slots, which can otherwise exceed the item stack size if required by the recipe. Additionally, the item does not show an item count when in the cursor."},{"complex_type":"literal","value":"primary-place-result","description":"Makes construction bots prefer this item when building the entity specified by its `place_result`."},{"complex_type":"literal","value":"mod-openable","description":"Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items."},{"complex_type":"literal","value":"only-in-cursor","description":"Makes it so the item is deleted when clearing the cursor, instead of being put into the player's inventory. The copy-paste tools use this by default, for example."},{"complex_type":"literal","value":"spawnable","description":"Allows the item to be spawned by a quickbar shortcut or custom input."},{"complex_type":"literal","value":"spoil-result","description":""},{"complex_type":"literal","value":"ignore-spoil-time-modifier","description":"Controls whether the spoil time ignores the spoil time modifier in the [DifficultySettings](runtime:DifficultySettings)."}],"full_format":true}},{"name":"ItemPrototypeFlags","order":32,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nBy default, none of these flags are set.","type":{"complex_type":"dictionary","key":"ItemPrototypeFlag","value":{"complex_type":"literal","value":true}}},{"name":"ItemStackDefinition","order":29,"description":"","type":{"complex_type":"table","parameters":[{"name":"ammo","order":5,"description":"Amount of ammo in the ammo items in the stack.","type":"float","optional":true},{"name":"count","order":1,"description":"Number of items the stack holds. Defaults to `1`.","type":"ItemCountType","optional":true},{"name":"custom_description","order":7,"description":"Description of the items with tags in the stack.","type":"LocalisedString","optional":true},{"name":"durability","order":4,"description":"Durability of the tool items in the stack.","type":"double","optional":true},{"name":"health","order":3,"description":"Health of the items in the stack. Defaults to `1.0`.","type":"float","optional":true},{"name":"name","order":0,"description":"Prototype name of the item the stack holds.","type":"string","optional":false},{"name":"quality","order":2,"description":"Quality of the item the stack holds. Defaults to `\"normal\"`.","type":"string","optional":true},{"name":"spoil_percent","order":8,"description":"The spoil percent for this item if the item can spoil. Defaults to `0`.","type":"double","optional":true},{"name":"tags","order":6,"description":"Tags of the items with tags in the stack.","type":{"complex_type":"array","value":"string"},"optional":true}]}},{"name":"ItemStackIdentification","order":231,"description":"An item may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"SimpleItemStack","description":""},{"complex_type":"type","value":"LuaItemStack","description":""}],"full_format":true}},{"name":"ItemStackIndex","order":6,"description":"","type":"uint16"},{"name":"ItemStackLocation","order":260,"description":"","type":{"complex_type":"table","parameters":[{"name":"inventory","order":0,"description":"","type":"defines.inventory","optional":false},{"name":"slot","order":1,"description":"","type":"uint","optional":false}]}},{"name":"ItemWithQualityID","order":70,"description":"An item prototype with optional quality specification. Can be specified in one of four ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaItemStack","description":"The item stack. Both prototype and quality of the item stack will be used."},{"complex_type":"type","value":"LuaItemPrototype","description":"The item prototype. Normal quality will be used."},{"complex_type":"type","value":"string","description":"The prototype name. Normal quality will be used."},{"complex_type":"type","value":"ItemIDAndQualityIDPair","description":"A table of entity prototype and quality."}],"full_format":true}},{"name":"LinkedGameControl","order":42,"description":"The internal name of a game control (key binding).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"move-up","description":""},{"complex_type":"literal","value":"move-down","description":""},{"complex_type":"literal","value":"move-left","description":""},{"complex_type":"literal","value":"move-right","description":""},{"complex_type":"literal","value":"open-character-gui","description":""},{"complex_type":"literal","value":"open-gui","description":""},{"complex_type":"literal","value":"confirm-gui","description":""},{"complex_type":"literal","value":"toggle-free-cursor","description":""},{"complex_type":"literal","value":"mine","description":""},{"complex_type":"literal","value":"build","description":""},{"complex_type":"literal","value":"build-ghost","description":""},{"complex_type":"literal","value":"super-forced-build","description":""},{"complex_type":"literal","value":"clear-cursor","description":""},{"complex_type":"literal","value":"pipette","description":""},{"complex_type":"literal","value":"rotate","description":""},{"complex_type":"literal","value":"reverse-rotate","description":""},{"complex_type":"literal","value":"flip-horizontal","description":""},{"complex_type":"literal","value":"flip-vertical","description":""},{"complex_type":"literal","value":"pick-items","description":""},{"complex_type":"literal","value":"drop-cursor","description":""},{"complex_type":"literal","value":"show-info","description":""},{"complex_type":"literal","value":"shoot-enemy","description":""},{"complex_type":"literal","value":"shoot-selected","description":""},{"complex_type":"literal","value":"next-weapon","description":""},{"complex_type":"literal","value":"toggle-driving","description":""},{"complex_type":"literal","value":"zoom-in","description":""},{"complex_type":"literal","value":"zoom-out","description":""},{"complex_type":"literal","value":"use-item","description":""},{"complex_type":"literal","value":"alternative-use-item","description":""},{"complex_type":"literal","value":"toggle-console","description":""},{"complex_type":"literal","value":"copy-entity-settings","description":""},{"complex_type":"literal","value":"paste-entity-settings","description":""},{"complex_type":"literal","value":"controller-gui-logistics-tab","description":""},{"complex_type":"literal","value":"controller-gui-character-tab","description":""},{"complex_type":"literal","value":"controller-gui-crafting-tab","description":""},{"complex_type":"literal","value":"toggle-rail-layer","description":""},{"complex_type":"literal","value":"select-for-blueprint","description":""},{"complex_type":"literal","value":"select-for-cancel-deconstruct","description":""},{"complex_type":"literal","value":"select-for-super-forced-deconstruct","description":""},{"complex_type":"literal","value":"reverse-select","description":""},{"complex_type":"literal","value":"alt-reverse-select","description":""},{"complex_type":"literal","value":"deselect","description":""},{"complex_type":"literal","value":"cycle-blueprint-forwards","description":""},{"complex_type":"literal","value":"cycle-blueprint-backwards","description":""},{"complex_type":"literal","value":"focus-search","description":""},{"complex_type":"literal","value":"larger-terrain-building-area","description":""},{"complex_type":"literal","value":"smaller-terrain-building-area","description":""},{"complex_type":"literal","value":"remove-pole-cables","description":""},{"complex_type":"literal","value":"build-with-obstacle-avoidance","description":""},{"complex_type":"literal","value":"add-station","description":""},{"complex_type":"literal","value":"add-temporary-station","description":""},{"complex_type":"literal","value":"rename-all","description":""},{"complex_type":"literal","value":"fast-wait-condition","description":""},{"complex_type":"literal","value":"drag-map","description":""},{"complex_type":"literal","value":"move-tag","description":""},{"complex_type":"literal","value":"place-in-chat","description":""},{"complex_type":"literal","value":"place-ping","description":""},{"complex_type":"literal","value":"pin","description":""},{"complex_type":"literal","value":"activate-tooltip","description":""},{"complex_type":"literal","value":"next-surface","description":""},{"complex_type":"literal","value":"previous-surface","description":""},{"complex_type":"literal","value":"cycle-quality-up","description":""},{"complex_type":"literal","value":"cycle-quality-down","description":""},{"complex_type":"literal","value":"craft","description":""},{"complex_type":"literal","value":"craft-5","description":""},{"complex_type":"literal","value":"craft-all","description":""},{"complex_type":"literal","value":"cancel-craft","description":""},{"complex_type":"literal","value":"cancel-craft-5","description":""},{"complex_type":"literal","value":"cancel-craft-all","description":""},{"complex_type":"literal","value":"pick-item","description":""},{"complex_type":"literal","value":"stack-transfer","description":""},{"complex_type":"literal","value":"inventory-transfer","description":""},{"complex_type":"literal","value":"fast-entity-transfer","description":""},{"complex_type":"literal","value":"cursor-split","description":""},{"complex_type":"literal","value":"stack-split","description":""},{"complex_type":"literal","value":"inventory-split","description":""},{"complex_type":"literal","value":"fast-entity-split","description":""},{"complex_type":"literal","value":"toggle-filter","description":""},{"complex_type":"literal","value":"open-item","description":""},{"complex_type":"literal","value":"copy-inventory-filter","description":""},{"complex_type":"literal","value":"paste-inventory-filter","description":""},{"complex_type":"literal","value":"show-quick-panel","description":""},{"complex_type":"literal","value":"next-quick-panel-page","description":""},{"complex_type":"literal","value":"previous-quick-panel-page","description":""},{"complex_type":"literal","value":"next-quick-panel-tab","description":""},{"complex_type":"literal","value":"previous-quick-panel-tab","description":""},{"complex_type":"literal","value":"rotate-active-quick-bars","description":""},{"complex_type":"literal","value":"next-active-quick-bar","description":""},{"complex_type":"literal","value":"previous-active-quick-bar","description":""},{"complex_type":"literal","value":"quick-bar-button-1","description":""},{"complex_type":"literal","value":"quick-bar-button-2","description":""},{"complex_type":"literal","value":"quick-bar-button-3","description":""},{"complex_type":"literal","value":"quick-bar-button-4","description":""},{"complex_type":"literal","value":"quick-bar-button-5","description":""},{"complex_type":"literal","value":"quick-bar-button-6","description":""},{"complex_type":"literal","value":"quick-bar-button-7","description":""},{"complex_type":"literal","value":"quick-bar-button-8","description":""},{"complex_type":"literal","value":"quick-bar-button-9","description":""},{"complex_type":"literal","value":"quick-bar-button-10","description":""},{"complex_type":"literal","value":"quick-bar-button-1-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-2-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-3-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-4-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-5-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-6-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-7-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-8-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-9-secondary","description":""},{"complex_type":"literal","value":"quick-bar-button-10-secondary","description":""},{"complex_type":"literal","value":"action-bar-select-page-1","description":""},{"complex_type":"literal","value":"action-bar-select-page-2","description":""},{"complex_type":"literal","value":"action-bar-select-page-3","description":""},{"complex_type":"literal","value":"action-bar-select-page-4","description":""},{"complex_type":"literal","value":"action-bar-select-page-5","description":""},{"complex_type":"literal","value":"action-bar-select-page-6","description":""},{"complex_type":"literal","value":"action-bar-select-page-7","description":""},{"complex_type":"literal","value":"action-bar-select-page-8","description":""},{"complex_type":"literal","value":"action-bar-select-page-9","description":""},{"complex_type":"literal","value":"action-bar-select-page-10","description":""},{"complex_type":"literal","value":"copy","description":""},{"complex_type":"literal","value":"cut","description":""},{"complex_type":"literal","value":"paste","description":""},{"complex_type":"literal","value":"cycle-clipboard-forwards","description":""},{"complex_type":"literal","value":"cycle-clipboard-backwards","description":""},{"complex_type":"literal","value":"undo","description":""},{"complex_type":"literal","value":"redo","description":""},{"complex_type":"literal","value":"toggle-menu","description":""},{"complex_type":"literal","value":"toggle-map","description":""},{"complex_type":"literal","value":"close-menu","description":""},{"complex_type":"literal","value":"open-technology-gui","description":""},{"complex_type":"literal","value":"production-statistics","description":""},{"complex_type":"literal","value":"logistic-networks","description":""},{"complex_type":"literal","value":"toggle-blueprint-library","description":""},{"complex_type":"literal","value":"open-trains-gui","description":""},{"complex_type":"literal","value":"open-factoriopedia","description":""},{"complex_type":"literal","value":"back","description":""},{"complex_type":"literal","value":"forward","description":""},{"complex_type":"literal","value":"pause-game","description":""},{"complex_type":"literal","value":"confirm-message","description":""},{"complex_type":"literal","value":"previous-technology","description":""},{"complex_type":"literal","value":"previous-mod","description":""},{"complex_type":"literal","value":"connect-train","description":""},{"complex_type":"literal","value":"disconnect-train","description":""},{"complex_type":"literal","value":"submit-feedback","description":""},{"complex_type":"literal","value":"editor-next-variation","description":""},{"complex_type":"literal","value":"editor-previous-variation","description":""},{"complex_type":"literal","value":"editor-clone-item","description":""},{"complex_type":"literal","value":"editor-delete-item","description":""},{"complex_type":"literal","value":"editor-toggle-pause","description":""},{"complex_type":"literal","value":"editor-tick-once","description":""},{"complex_type":"literal","value":"editor-speed-up","description":""},{"complex_type":"literal","value":"editor-speed-down","description":""},{"complex_type":"literal","value":"editor-reset-speed","description":""},{"complex_type":"literal","value":"editor-set-clone-brush-source","description":""},{"complex_type":"literal","value":"editor-set-clone-brush-destination","description":""},{"complex_type":"literal","value":"editor-switch-to-surface","description":""},{"complex_type":"literal","value":"editor-remove-scripting-object","description":""},{"complex_type":"literal","value":"debug-toggle-atlas-gui","description":""},{"complex_type":"literal","value":"debug-toggle-gui-visibility","description":""},{"complex_type":"literal","value":"debug-toggle-debug-settings","description":""},{"complex_type":"literal","value":"debug-toggle-basic","description":""},{"complex_type":"literal","value":"debug-reset-zoom","description":""},{"complex_type":"literal","value":"debug-reset-zoom-2x","description":""},{"complex_type":"literal","value":"toggle-gui-debug","description":""},{"complex_type":"literal","value":"toggle-gui-style-view","description":""},{"complex_type":"literal","value":"toggle-gui-shadows","description":""},{"complex_type":"literal","value":"toggle-gui-glows","description":""},{"complex_type":"literal","value":"open-prototypes-gui","description":""},{"complex_type":"literal","value":"open-prototype-explorer-gui","description":""},{"complex_type":"literal","value":"increase-ui-scale","description":""},{"complex_type":"literal","value":"decrease-ui-scale","description":""},{"complex_type":"literal","value":"reset-ui-scale","description":""},{"complex_type":"literal","value":"slash-editor","description":""},{"complex_type":"literal","value":"toggle-entity","description":""},{"complex_type":"literal","value":"next-player-in-replay","description":""},{"complex_type":"literal","value":"move-blueprint-absolute-grid-up","description":""},{"complex_type":"literal","value":"move-blueprint-absolute-grid-down","description":""},{"complex_type":"literal","value":"move-blueprint-absolute-grid-left","description":""},{"complex_type":"literal","value":"move-blueprint-absolute-grid-right","description":""},{"complex_type":"literal","value":"move-blueprint-entities-up","description":""},{"complex_type":"literal","value":"move-blueprint-entities-down","description":""},{"complex_type":"literal","value":"move-blueprint-entities-left","description":""},{"complex_type":"literal","value":"move-blueprint-entities-right","description":""},{"complex_type":"literal","value":"play-next-track","description":""},{"complex_type":"literal","value":"play-previous-track","description":""},{"complex_type":"literal","value":"pause-resume-music","description":""}],"full_format":true}},{"name":"LocalisedString","order":147,"description":"Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.\n\nThe key identifies the string template. For example, `\"gui-alert-tooltip.attack\"` (for the template `\"__1__ objects are being damaged\"`; see the file `data/core/locale/en.cfg`).\n\nThe template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters.\n\nThere are two special flags for the localised string, indicated by the key being a particular string. First, if the key is the empty string (`\"\"`), then all parameters will be concatenated (after processing, if any are localised strings themselves). Second, if the key is a question mark (`\"?\"`), then the first valid parameter will be used. A parameter can be invalid if its name doesn't match any string template. If no parameters are valid, the last one is returned. This is useful to implement a fallback for missing locale templates.\n\nFurthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number, boolean or `nil`, which will be converted to their textual representation.","examples":["```\n-- In the English translation, this will print \"No ammo\"; in the Czech translation, it will print \"Bez munice\":\ngame.player.print({\"description.no-ammo\"})\n-- The 'description.no-ammo' template contains no placeholders, so no further parameters are necessary.\n```","```\n-- In the English translation, this will print \"Durability: 5/9\"; in the Japanese one, it will print \"\u8010\u4e45\u5ea6: 5/9\":\ngame.player.print({\"description.durability\", 5, 9})\n```","```\n-- This will print \"hello\" in all translations:\ngame.player.print({\"\", \"hello\"})\n```","```\n-- This will print \"Iron plate: 60\" in the English translation and \"Eisenplatte: 60\" in the German translation.\ngame.print({\"\", {\"item-name.iron-plate\"}, \": \", 60})\n```","```\n-- As an example of a localised string with fallback, consider this:\n{\"?\", {\"\", {\"entity-description.furnace\"}, \"\\n\"}, {\"item-description.furnace\"}, \"optional fallback\"}\n-- If 'entity-description.furnace' exists, it is concatenated with \"\\n\" and returned. Otherwise, if 'item-description.furnace'\n--  exists, it is returned as-is. Otherwise, \"optional fallback\" is returned. If this value wasn't specified, the\n--  translation result would be \"Unknown key: 'item-description.furnace'\".\n```"],"type":{"complex_type":"union","options":["string","number","boolean","LuaObject","nil",{"complex_type":"array","value":"LocalisedString"}],"full_format":false}},{"name":"LogisticFilter","order":95,"description":"","type":{"complex_type":"table","parameters":[{"name":"import_from","order":4,"description":"The space location to import from.","type":"SpaceLocationID","optional":true},{"name":"max","order":2,"description":"The maximum amount to keep in inventory. `nil` for infinite.","type":"ItemCountType","optional":true},{"name":"min","order":1,"description":"The minimum amount to satisfy.","type":"int","optional":true},{"name":"minimum_delivery_count","order":3,"description":"The minimum count that will be delivered to a space platform. `nil` if unchanged from the default.","type":"ItemCountType","optional":true},{"name":"value","order":0,"description":"The item filter to put into the slot.","type":"SignalFilter","optional":true}]}},{"name":"LogisticFilterIndex","order":7,"description":"","type":"uint16"},{"name":"LogisticSection","order":110,"description":"","type":{"complex_type":"table","parameters":[{"name":"filters","order":1,"description":"","type":{"complex_type":"array","value":"BlueprintLogisticFilter"},"optional":true},{"name":"group","order":2,"description":"","type":"string","optional":true},{"name":"index","order":0,"description":"","type":"uint8","optional":false},{"name":"multiplier","order":3,"description":"Defaults to 1.","type":"float","optional":true}]}},{"name":"LogisticSections","order":108,"description":"","type":{"complex_type":"table","parameters":[{"name":"sections","order":0,"description":"","type":{"complex_type":"array","value":"LogisticSection"},"optional":true},{"name":"trash_not_requested","order":1,"description":"Defaults to false.","type":"boolean","optional":true}]}},{"name":"LogisticsNetworkSupplyCounts","order":242,"description":"","type":{"complex_type":"table","parameters":[{"name":"active-provider","order":3,"description":"Number of available items in the active provider members.","type":"uint","optional":false},{"name":"buffer","order":2,"description":"Number of available items in the buffer members.","type":"uint","optional":false},{"name":"passive-provider","order":1,"description":"Number of available items in the passive provider members.","type":"uint","optional":false},{"name":"storage","order":0,"description":"Number of available items in the storage members.","type":"uint","optional":false}]}},{"name":"LogisticsNetworkSupplyPoints","order":243,"description":"","type":{"complex_type":"table","parameters":[{"name":"active-provider","order":3,"description":"","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"buffer","order":2,"description":"","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"passive-provider","order":1,"description":"","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false},{"name":"storage","order":0,"description":"","type":{"complex_type":"array","value":"LuaLogisticPoint"},"optional":false}]}},{"name":"Loot","order":188,"description":"","type":{"complex_type":"table","parameters":[{"name":"count_max","order":3,"description":"Maximum amount of loot to drop.","type":"double","optional":false},{"name":"count_min","order":2,"description":"Minimum amount of loot to drop.","type":"double","optional":false},{"name":"item","order":0,"description":"Item prototype name of the result.","type":"string","optional":false},{"name":"probability","order":1,"description":"Probability that any loot at all will drop, as a number in range [0, 1].","type":"double","optional":false}]}},{"name":"LuaEntityClonedEventFilter","order":303,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDamagedEventFilter","order":315,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"},{"complex_type":"literal","value":"original-damage-amount"},{"complex_type":"literal","value":"final-damage-amount"},{"complex_type":"literal","value":"damage-type"},{"complex_type":"literal","value":"final-health"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"damage-type","order":6,"description":"","parameters":[{"name":"type","order":0,"description":"A [LuaDamagePrototype](runtime:LuaDamagePrototype) name.","type":"string","optional":false}]},{"name":"final-damage-amount","order":5,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"final-health","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"original-damage-amount","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDeconstructionCancelledEventFilter","order":305,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityDiedEventFilter","order":317,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityMarkedForDeconstructionEventFilter","order":313,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaEntityMarkedForUpgradeEventFilter","order":296,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaObject","order":281,"description":"Any LuaObject listed on the [Classes](runtime:classes) page.","type":{"complex_type":"builtin"}},{"name":"LuaPlatformBuiltEntityEventFilter","order":301,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"},{"complex_type":"literal","value":"force"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"force","order":4,"description":"","parameters":[{"name":"force","order":0,"description":"The entity force","type":"string","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlatformMinedEntityEventFilter","order":298,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerBuiltEntityEventFilter","order":300,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"},{"complex_type":"literal","value":"force"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"force","order":4,"description":"","parameters":[{"name":"force","order":0,"description":"The entity force","type":"string","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerMinedEntityEventFilter","order":314,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPlayerRepairedEntityEventFilter","order":309,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPostEntityDiedEventFilter","order":312,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreGhostDeconstructedEventFilter","order":302,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreGhostUpgradedEventFilter","order":297,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPrePlatformMinedEntityEventFilter","order":294,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPrePlayerMinedEntityEventFilter","order":308,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaPreRobotMinedEntityEventFilter","order":318,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaRobotBuiltEntityEventFilter","order":306,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"},{"complex_type":"literal","value":"force"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"force","order":4,"description":"","parameters":[{"name":"force","order":0,"description":"The entity force","type":"string","optional":false}]},{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaRobotMinedEntityEventFilter","order":295,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedBuiltEventFilter","order":307,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedDestroyEventFilter","order":299,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedReviveEventFilter","order":316,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaScriptRaisedTeleportedEventFilter","order":304,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaSectorScannedEventFilter","order":311,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"LuaUpgradeCancelledEventFilter","order":310,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"ghost"},{"complex_type":"literal","value":"rail"},{"complex_type":"literal","value":"rail-signal"},{"complex_type":"literal","value":"rolling-stock"},{"complex_type":"literal","value":"robot-with-logistics-interface"},{"complex_type":"literal","value":"vehicle"},{"complex_type":"literal","value":"turret"},{"complex_type":"literal","value":"crafting-machine"},{"complex_type":"literal","value":"wall-connectable"},{"complex_type":"literal","value":"transport-belt-connectable"},{"complex_type":"literal","value":"circuit-network-connectable"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"name"},{"complex_type":"literal","value":"ghost_type"},{"complex_type":"literal","value":"ghost_name"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"ghost_name","order":3,"description":"","parameters":[{"name":"name","order":0,"description":"The ghost prototype name.","type":"string","optional":false}]},{"name":"ghost_type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The ghost prototype type.","type":"string","optional":false}]},{"name":"name","order":1,"description":"","parameters":[{"name":"name","order":0,"description":"The prototype name.","type":"string","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"MapAndDifficultySettings","order":127,"description":"A standard table containing all [MapSettings](runtime:MapSettings) attributes plus an additional table that contains all [DifficultySettings](runtime:DifficultySettings) properties.","type":{"complex_type":"table","parameters":[{"name":"asteroids","order":6,"description":"","type":"AsteroidMapSettings","optional":false},{"name":"difficulty_settings","order":8,"description":"","type":"MapDifficultySettings","optional":false},{"name":"enemy_evolution","order":1,"description":"","type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","type":"EnemyExpansionMapSettings","optional":false},{"name":"max_failed_behavior_count","order":7,"description":"If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.","type":"uint","optional":false},{"name":"path_finder","order":5,"description":"","type":"PathFinderMapSettings","optional":false},{"name":"pollution","order":0,"description":"","type":"PollutionMapSettings","optional":false},{"name":"steering","order":4,"description":"","type":"SteeringMapSettings","optional":false},{"name":"unit_group","order":3,"description":"","type":"UnitGroupMapSettings","optional":false}]}},{"name":"MapDifficultySettings","order":126,"description":"","type":{"complex_type":"table","parameters":[{"name":"spoil_time_modifier","order":1,"description":"A value in range [0.01, 100].","type":"double","optional":false},{"name":"technology_price_multiplier","order":0,"description":"A value in range [0.001, 1000].","type":"double","optional":false}]}},{"name":"MapExchangeStringData","order":182,"description":"The data that can be extracted from a map exchange string, as a plain table.","type":{"complex_type":"table","parameters":[{"name":"map_gen_settings","order":1,"description":"","type":"MapGenSettings","optional":false},{"name":"map_settings","order":0,"description":"","type":"MapAndDifficultySettings","optional":false}]}},{"name":"MapGenPreset","order":197,"description":"","type":{"complex_type":"table","parameters":[{"name":"advanced_settings","order":3,"description":"","type":"AdvancedMapGenSettings","optional":true},{"name":"basic_settings","order":2,"description":"","type":"MapGenSettings","optional":true},{"name":"default","order":1,"description":"Whether this is the preset that is selected by default.","type":"boolean","optional":true},{"name":"order","order":0,"description":"The string used to alphabetically sort the presets. It is a simple string that has no additional semantic meaning.","type":"string","optional":false}]}},{"name":"MapGenSettings","order":116,"description":"","examples":["```\n-- Assuming a NamedNoiseExpression with the name \"my-alternate-grass1-probability\" is defined...\nlocal surface = game.player.surface\nlocal mgs = surface.map_gen_settings\nmgs.property_expression_names[\"tile:grass1:probability\"] = \"my-alternate-grass1-probability\"\nsurface.map_gen_settings = mgs\n-- ...would override the probability of grass1 being placed at any given point on the current surface.\n```","```\n-- To make there be no deep water on (newly generated chunks) a surface\nlocal surface = game.player.surface\nlocal mgs = surface.map_gen_settings\nmgs.property_expression_names[\"tile:deepwater:probability\"] = -1000\nsurface.map_gen_settings = mgs\n-- This does not require a NamedNoiseExpression to be defined, since literal numbers (and strings naming literal\n-- numbers, e.g. `\"123\"`) are understood to stand for constant value expressions.\n```"],"type":{"complex_type":"table","parameters":[{"name":"autoplace_controls","order":0,"description":"Indexed by autoplace control prototype name.","type":{"complex_type":"dictionary","key":"string","value":"AutoplaceControl"},"optional":false},{"name":"autoplace_settings","order":2,"description":"Each setting in this dictionary maps the string type to the settings for that type.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"entity"},{"complex_type":"literal","value":"tile"},{"complex_type":"literal","value":"decorative"}],"full_format":false},"value":"AutoplaceSettings"},"optional":false},{"name":"cliff_settings","order":11,"description":"Map generation settings for entities of the type \"cliff\".","type":"CliffPlacementSettings","optional":false},{"name":"default_enable_all_autoplace_controls","order":1,"description":"Whether undefined `autoplace_controls` should fall back to the default controls or not. Defaults to `true`.","type":"boolean","optional":false},{"name":"height","order":5,"description":"Height in tiles. If `0`, the map has 'infinite' height, with the actual limitation being one million tiles in each direction from the center.","type":"uint","optional":false},{"name":"no_enemies_mode","order":9,"description":"Whether enemy creatures will not naturally spawn from spawners, map gen, or trigger effects.","type":"boolean","optional":false},{"name":"peaceful_mode","order":8,"description":"Whether enemy creatures will not attack unless the player first attacks them.","type":"boolean","optional":false},{"name":"property_expression_names","order":10,"description":"Overrides for tile property value generators.","type":"PropertyExpressionNames","optional":false},{"name":"seed","order":3,"description":"The random seed used to generated this map.","type":"uint","optional":false},{"name":"starting_area","order":6,"description":"Size of the starting area.","type":"MapGenSize","optional":false},{"name":"starting_points","order":7,"description":"Positions of the starting areas.","type":{"complex_type":"array","value":"MapPosition"},"optional":false},{"name":"territory_settings","order":12,"description":"","type":"TerritorySettings","optional":false},{"name":"width","order":4,"description":"Width in tiles. If `0`, the map has 'infinite' width, with the actual limitation being one million tiles in each direction from the center.","type":"uint","optional":false}]}},{"name":"MapGenSize","order":193,"description":"A floating point number specifying an amount.\n\nFor backwards compatibility, MapGenSizes can also be specified as a string, which will be converted to a number (when queried, a number will always be returned).\n\nThe map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"float","description":"Specifying a map gen dimension."},{"complex_type":"literal","value":"none","description":"equivalent to `0`."},{"complex_type":"literal","value":"very-low","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"very-small","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"very-poor","description":"equivalent to `1/2`."},{"complex_type":"literal","value":"low","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"small","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"poor","description":"equivalent to `1/sqrt(2)`."},{"complex_type":"literal","value":"normal","description":"equivalent to `1`."},{"complex_type":"literal","value":"medium","description":"equivalent to `1`."},{"complex_type":"literal","value":"regular","description":"equivalent to `1`."},{"complex_type":"literal","value":"high","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"big","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"good","description":"equivalent to `sqrt(2)`."},{"complex_type":"literal","value":"very-high","description":"equivalent to `2`."},{"complex_type":"literal","value":"very-big","description":"equivalent to `2`."},{"complex_type":"literal","value":"very-good","description":"equivalent to `2`."}],"full_format":true}},{"name":"MapPosition","order":150,"description":"Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements.\n\nThe coordinates are saved as a fixed-size 32 bit integer, with 8 bits reserved for decimal precision, meaning the smallest value step is `1/2^8 = 0.00390625` tiles.","examples":["```\n-- Explicit definition\n{x = 5.5, y = 2}\n{y = 2.25, x = 5.125}\n```","```\n-- Shorthand\n{1.625, 2.375}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"double","optional":false},{"name":"y","order":1,"description":"","type":"double","optional":false}]},{"complex_type":"tuple","values":["double","double"]}],"full_format":false}},{"name":"MapSettings","order":128,"description":"Various game-related settings. Updating any of the attributes will immediately take effect in the game engine.","examples":["```\n-- Increase the number of short paths the pathfinder can cache.\ngame.map_settings.path_finder.short_cache_size = 15\n```"],"type":{"complex_type":"LuaStruct","attributes":[{"name":"asteroids","order":6,"description":"","read_type":"AsteroidMapSettings","write_type":"AsteroidMapSettings","optional":false},{"name":"enemy_evolution","order":1,"description":"","read_type":"EnemyEvolutionMapSettings","write_type":"EnemyEvolutionMapSettings","optional":false},{"name":"enemy_expansion","order":2,"description":"","read_type":"EnemyExpansionMapSettings","write_type":"EnemyExpansionMapSettings","optional":false},{"name":"max_failed_behavior_count","order":7,"description":"If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.","read_type":"uint","write_type":"uint","optional":false},{"name":"path_finder","order":5,"description":"","read_type":"PathFinderMapSettings","write_type":"PathFinderMapSettings","optional":false},{"name":"pollution","order":0,"description":"","read_type":"PollutionMapSettings","write_type":"PollutionMapSettings","optional":false},{"name":"steering","order":4,"description":"","read_type":"SteeringMapSetting","write_type":"SteeringMapSetting","optional":false},{"name":"unit_group","order":3,"description":"","read_type":"UnitGroupMapSettings","write_type":"UnitGroupMapSettings","optional":false}]}},{"name":"MapTick","order":0,"description":"`math.huge` represents the maximum possible tick.","type":"uint64"},{"name":"MapViewSettings","order":135,"description":"What is shown in the map view. If a field is not given, that setting will not be changed.","type":{"complex_type":"table","parameters":[{"name":"show-electric-network","order":1,"description":"","type":"boolean","optional":true},{"name":"show-logistic-network","order":0,"description":"","type":"boolean","optional":true},{"name":"show-networkless-logistic-members","order":4,"description":"","type":"boolean","optional":true},{"name":"show-non-standard-map-info","order":12,"description":"","type":"boolean","optional":true},{"name":"show-pipelines","order":11,"description":"","type":"boolean","optional":true},{"name":"show-player-names","order":6,"description":"","type":"boolean","optional":true},{"name":"show-pollution","order":3,"description":"","type":"boolean","optional":true},{"name":"show-rail-signal-states","order":9,"description":"","type":"boolean","optional":true},{"name":"show-recipe-icons","order":10,"description":"","type":"boolean","optional":true},{"name":"show-tags","order":7,"description":"","type":"boolean","optional":true},{"name":"show-train-station-names","order":5,"description":"","type":"boolean","optional":true},{"name":"show-turret-range","order":2,"description":"","type":"boolean","optional":true},{"name":"show-worker-robots","order":8,"description":"","type":"boolean","optional":true}]}},{"name":"MarketIngredient","order":55,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":2,"description":"Count of the item. Cannot be 0.","type":"ItemCountType","optional":false},{"name":"name","order":0,"description":"Prototype name of the required item.","type":"string","optional":false},{"name":"quality","order":1,"description":"Normal quality will be used if not specified.","type":"string","optional":true}]}},{"name":"MathExpression","order":103,"description":"A string that represents a math expression. The expression parser recognizes four basic token types (with their regex):\n\n- Whitespace: `[ \\n\\r\\t]*`\n\n- Number: `(0x[0-9a-f]+|([0-9]+\\.?[0-9]*|\\.[0-9]+)(e-?[0-9]+)?)` (e.g. `3.2`, `100`, `.6`, `4.2e-5`, `0x2a5f`). Supports hexadecimal input and scientific notation for decimal numbers.\n\n- Operator: `+`, `-`, `*`, `/`, `^`, and `()` for brackets, which may be nested.\n\n- Identifier: The functions listed below and any variables listed where the expression is used.\n\nIdentifiers are used to name functions and variables, which result in or represent numbers. The following functions are always available:\n\n- `abs(value)`: Returns absolute value of the given argument; i.e. if the argument is negative, it is inverted.\n\n- `log2(value)`: Returns a binary logarithm of the given value.\n\n- `sign(value)`: Returns `-1` for negative numbers, `0` for zero (regardless of sign), `1` for positive numbers\n\n- `max(value1, value2, ...)`: Returns the greater of the given values. Supports between 2 and 255 arguments.\n\n- `min(value1, value2, ...)`: Returns the smaller of the given values. Supports between 2 and 255 arguments.\n\nThe property where the expression is used may provide variables. For example in [TechnologyUnit::count_formula](prototype:TechnologyUnit::count_formula) `L` and `l` may be used for the technology level.\n\nThe formula is executed following the [BODMAS](https://en.wikipedia.org/wiki/Order_of_operations#Conventional_order) order (also known as PEMDAS).","examples":["```\n\"2500 * (L - 3)\"\n```","```\n\"(4e5 * (abs(speed) + 10.5)) / weight\"\n```"],"type":"string"},{"name":"MineableProperties","order":174,"description":"","type":{"complex_type":"table","parameters":[{"name":"fluid_amount","order":4,"description":"The required fluid amount if any.","type":"double","optional":true},{"name":"minable","order":0,"description":"Is this entity mineable at all?","type":"boolean","optional":false},{"name":"mining_particle","order":2,"description":"Prototype name of the particle produced when mining this entity. Will only be present if this entity produces any particle during mining.","type":"string","optional":true},{"name":"mining_time","order":1,"description":"Energy required to mine an entity.","type":"double","optional":false},{"name":"mining_trigger","order":6,"description":"The mining trigger if any.","type":{"complex_type":"array","value":"TriggerItem"},"optional":true},{"name":"products","order":3,"description":"Products obtained by mining this entity.","type":{"complex_type":"array","value":"Product"},"optional":true},{"name":"required_fluid","order":5,"description":"The prototype name of the required fluid if any.","type":"string","optional":true}]}},{"name":"ModChangeData","order":254,"description":"","type":{"complex_type":"table","parameters":[{"name":"new_version","order":1,"description":"New version of the mod. May be `nil` if the mod is no longer present (i.e. it was just removed).","type":"string","optional":false},{"name":"old_version","order":0,"description":"Old version of the mod. May be `nil` if the mod wasn't previously present (i.e. it was just added).","type":"string","optional":false}]}},{"name":"ModSetting","order":244,"description":"","type":{"complex_type":"table","parameters":[{"name":"value","order":0,"description":"The value of the mod setting. The type depends on the kind of setting.","type":{"complex_type":"union","options":["int","double","boolean","string","Color"],"full_format":false},"optional":false}]}},{"name":"ModSettingPrototypeFilter","order":282,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"mod"},{"complex_type":"literal","value":"setting-type"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"mod","order":1,"description":"","parameters":[{"name":"mod","order":0,"description":"The mod name","type":"string","optional":false}]},{"name":"setting-type","order":2,"description":"","parameters":[{"name":"type","order":0,"description":"The setting scope type.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"startup"},{"complex_type":"literal","value":"runtime-global"},{"complex_type":"literal","value":"runtime-per-user"}],"full_format":false},"optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"ModifierType","order":44,"description":"Used by [TechnologyModifier](runtime:TechnologyModifier).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"inserter-stack-size-bonus","description":""},{"complex_type":"literal","value":"bulk-inserter-capacity-bonus","description":""},{"complex_type":"literal","value":"laboratory-speed","description":""},{"complex_type":"literal","value":"character-logistic-trash-slots","description":""},{"complex_type":"literal","value":"maximum-following-robots-count","description":""},{"complex_type":"literal","value":"worker-robot-speed","description":""},{"complex_type":"literal","value":"worker-robot-storage","description":""},{"complex_type":"literal","value":"turret-attack","description":""},{"complex_type":"literal","value":"ammo-damage","description":""},{"complex_type":"literal","value":"give-item","description":""},{"complex_type":"literal","value":"gun-speed","description":""},{"complex_type":"literal","value":"unlock-recipe","description":""},{"complex_type":"literal","value":"character-crafting-speed","description":""},{"complex_type":"literal","value":"character-mining-speed","description":""},{"complex_type":"literal","value":"character-running-speed","description":""},{"complex_type":"literal","value":"character-build-distance","description":""},{"complex_type":"literal","value":"character-item-drop-distance","description":""},{"complex_type":"literal","value":"character-reach-distance","description":""},{"complex_type":"literal","value":"character-resource-reach-distance","description":""},{"complex_type":"literal","value":"character-item-pickup-distance","description":""},{"complex_type":"literal","value":"character-loot-pickup-distance","description":""},{"complex_type":"literal","value":"character-inventory-slots-bonus","description":""},{"complex_type":"literal","value":"deconstruction-time-to-live","description":""},{"complex_type":"literal","value":"max-failed-attempts-per-tick-per-construction-queue","description":""},{"complex_type":"literal","value":"max-successful-attempts-per-tick-per-construction-queue","description":""},{"complex_type":"literal","value":"character-health-bonus","description":""},{"complex_type":"literal","value":"mining-drill-productivity-bonus","description":""},{"complex_type":"literal","value":"train-braking-force-bonus","description":""},{"complex_type":"literal","value":"worker-robot-battery","description":""},{"complex_type":"literal","value":"laboratory-productivity","description":""},{"complex_type":"literal","value":"follower-robot-lifetime","description":""},{"complex_type":"literal","value":"artillery-range","description":""},{"complex_type":"literal","value":"nothing","description":""},{"complex_type":"literal","value":"character-logistic-requests","description":""},{"complex_type":"literal","value":"unlock-space-location","description":""},{"complex_type":"literal","value":"unlock-quality","description":""},{"complex_type":"literal","value":"unlock-space-platforms","description":""},{"complex_type":"literal","value":"unlock-circuit-network","description":""},{"complex_type":"literal","value":"cargo-landing-pad-count","description":""},{"complex_type":"literal","value":"change-recipe-productivity","description":""},{"complex_type":"literal","value":"cliff-deconstruction-enabled","description":""},{"complex_type":"literal","value":"mining-with-fluid","description":""},{"complex_type":"literal","value":"rail-support-on-deep-oil-ocean","description":""},{"complex_type":"literal","value":"rail-planner-allow-elevated-rails","description":""},{"complex_type":"literal","value":"beacon-distribution","description":""},{"complex_type":"literal","value":"create-ghost-on-entity-death","description":""},{"complex_type":"literal","value":"belt-stack-size-bonus","description":""},{"complex_type":"literal","value":"vehicle-logistics","description":""}],"full_format":true}},{"name":"ModuleEffectValue","order":1,"description":"The percentual increase of the attribute. A value of `0.6` means a 60% increase.","type":"float"},{"name":"ModuleEffects","order":2,"description":"","examples":["```\n-- These are the effects of the vanilla Productivity Module 3 (up to floating point imprecisions)\n{consumption=0.6,\n  speed=-0.15,\n  productivity=0.06,\n  pollution=0.075}\n```"],"type":{"complex_type":"table","parameters":[{"name":"consumption","order":0,"description":"","type":"ModuleEffectValue","optional":true},{"name":"pollution","order":3,"description":"","type":"ModuleEffectValue","optional":true},{"name":"productivity","order":2,"description":"","type":"ModuleEffectValue","optional":true},{"name":"quality","order":4,"description":"","type":"ModuleEffectValue","optional":true},{"name":"speed","order":1,"description":"","type":"ModuleEffectValue","optional":true}]}},{"name":"MouseButtonFlags","order":258,"description":"A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.\n\nTo write to this, use an array[[string](runtime:string)] of the mouse buttons that should be possible to use with on button. The flag `\"left-and-right\"` can also be set, which will set `\"left\"` and `\"right\"` to `true`.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"left","description":""},{"complex_type":"literal","value":"right","description":""},{"complex_type":"literal","value":"middle","description":""},{"complex_type":"literal","value":"button-4","description":""},{"complex_type":"literal","value":"button-5","description":""},{"complex_type":"literal","value":"button-6","description":""},{"complex_type":"literal","value":"button-7","description":""},{"complex_type":"literal","value":"button-8","description":""},{"complex_type":"literal","value":"button-9","description":""}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"NoiseExpression","order":190,"description":"A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation. These can only be meaningfully written/modified during the data load phase. More detailed information is found on the [prototype docs](prototype:NamedNoiseExpression).","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Names the type of the expression and determines what other fields are required.","type":"string","optional":false}]}},{"name":"NthTickEventData","order":253,"description":"","type":{"complex_type":"table","parameters":[{"name":"nth_tick","order":1,"description":"The nth tick this handler was registered to.","type":"uint","optional":false},{"name":"tick","order":0,"description":"The tick during which the event happened.","type":"uint","optional":false}]}},{"name":"Offer","order":56,"description":"A single offer on a market entity.","type":{"complex_type":"table","parameters":[{"name":"offer","order":1,"description":"The action that will take place when a player accepts the offer. Usually a `\"give-item\"` modifier.","type":"TechnologyModifier","optional":false},{"name":"price","order":0,"description":"List of prices.","type":{"complex_type":"array","value":"MarketIngredient"},"optional":true}]}},{"name":"OldTileAndPosition","order":159,"description":"","type":{"complex_type":"table","parameters":[{"name":"old_tile","order":0,"description":"","type":"LuaTilePrototype","optional":false},{"name":"position","order":1,"description":"","type":"TilePosition","optional":false}]}},{"name":"ParticleID","order":76,"description":"A particle prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaParticlePrototype","description":"The particle prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"PathFinderMapSettings","order":124,"description":"","type":{"complex_type":"table","parameters":[{"name":"cache_accept_path_end_distance_ratio","order":12,"description":"When looking for a path from cache, make sure it doesn't end too far from the requested end in relative terms. This is typically more lenient than the start ratio since the end target could be moving. Defaults to `0.15`.","type":"double","optional":false},{"name":"cache_accept_path_start_distance_ratio","order":11,"description":"When looking for a path from cache, make sure it doesn't start too far from the requested start in relative terms. Defaults to `0.2`.","type":"double","optional":false},{"name":"cache_max_connect_to_cache_steps_multiplier","order":10,"description":"When looking for a connection to a cached path, search at most for this number of steps times the original estimate. Defaults to `100`.","type":"uint","optional":false},{"name":"cache_path_end_distance_rating_multiplier","order":16,"description":"When assigning a rating to the best path, this multiplier times end distances is considered. This value is typically higher than the start multiplier as this results in better end path quality. Defaults to `20`.","type":"double","optional":false},{"name":"cache_path_start_distance_rating_multiplier","order":15,"description":"When assigning a rating to the best path, this multiplier times start distances is considered. Defaults to `10`.","type":"double","optional":false},{"name":"direct_distance_to_consider_short_request","order":25,"description":"The maximum direct distance in tiles before a request is no longer considered short. Defaults to `100`.","type":"uint","optional":false},{"name":"enemy_with_different_destination_collision_penalty","order":19,"description":"A penalty that is applied for another unit that is too close and either not moving or has a different goal. Defaults to `30`.","type":"double","optional":false},{"name":"extended_collision_penalty","order":22,"description":"The collision penalty for collisions in the extended bounding box but outside the entity's actual bounding box. Defaults to `3`.","type":"double","optional":false},{"name":"fwd2bwd_ratio","order":0,"description":"The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`.","type":"uint","optional":false},{"name":"general_entity_collision_penalty","order":20,"description":"The general collision penalty with other units. Defaults to `10`.","type":"double","optional":false},{"name":"general_entity_subsequent_collision_penalty","order":21,"description":"The collision penalty for positions that require the destruction of an entity to get to. Defaults to `3`.","type":"double","optional":false},{"name":"goal_pressure_ratio","order":1,"description":"When looking at which node to check next, their heuristic value is multiplied by this ratio. The higher it is, the more the search is directed straight at the goal. Defaults to `2`.","type":"double","optional":false},{"name":"ignore_moving_enemy_collision_distance","order":18,"description":"The distance in tiles after which other moving units are not considered for pathfinding. Defaults to `5`.","type":"double","optional":false},{"name":"long_cache_min_cacheable_distance","order":9,"description":"The minimal distance to the goal in tiles required to be searched in the long path cache. Defaults to `30`.","type":"double","optional":false},{"name":"long_cache_size","order":6,"description":"Number of elements in the long cache. Defaults to `25`.","type":"uint","optional":false},{"name":"max_clients_to_accept_any_new_request","order":23,"description":"The amount of path finder requests accepted per tick regardless of the requested path's length. Defaults to `10`.","type":"uint","optional":false},{"name":"max_clients_to_accept_short_new_request","order":24,"description":"When the `max_clients_to_accept_any_new_request` amount is exhausted, only path finder requests with a short estimate will be accepted until this amount (per tick) is reached. Defaults to `100`.","type":"uint","optional":false},{"name":"max_steps_worked_per_tick","order":3,"description":"The maximum number of nodes that are expanded per tick. Defaults to `1 000`.","type":"double","optional":false},{"name":"max_work_done_per_tick","order":4,"description":"The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8 000`.","type":"uint","optional":false},{"name":"min_steps_to_check_path_find_termination","order":28,"description":"The minimum amount of steps that are guaranteed to be performed for every request. Defaults to `2000`.","type":"uint","optional":false},{"name":"negative_cache_accept_path_end_distance_ratio","order":14,"description":"Same principle as `cache_accept_path_end_distance_ratio`, but used for negative cache queries. Defaults to `0.3`.","type":"double","optional":false},{"name":"negative_cache_accept_path_start_distance_ratio","order":13,"description":"Same principle as `cache_accept_path_start_distance_ratio`, but used for negative cache queries. Defaults to `0.3`.","type":"double","optional":false},{"name":"negative_path_cache_delay_interval","order":32,"description":"The delay in ticks between decrementing the score of all paths in the negative cache by one. Defaults to `20`.","type":"uint","optional":false},{"name":"overload_levels","order":30,"description":"The thresholds of waiting clients after each of which the per-tick work limit will be increased by the corresponding value in `overload_multipliers`. This is to avoid clients having to wait too long. Must have the same number of elements as `overload_multipliers`. Defaults to `{0, 100, 500}`.","type":{"complex_type":"array","value":"uint"},"optional":false},{"name":"overload_multipliers","order":31,"description":"The multipliers to the amount of per-tick work applied after the corresponding thresholds in `overload_levels` have been reached. Must have the same number of elements as `overload_multipliers`. Defaults to `{2, 3, 4}`.","type":{"complex_type":"array","value":"double"},"optional":false},{"name":"short_cache_min_algo_steps_to_cache","order":8,"description":"The minimal number of nodes required to be searched in the short path cache. Defaults to `50`.","type":"uint","optional":false},{"name":"short_cache_min_cacheable_distance","order":7,"description":"The minimal distance to the goal in tiles required to be searched in the short path cache. Defaults to `10`.","type":"double","optional":false},{"name":"short_cache_size","order":5,"description":"Number of elements in the short cache. Defaults to `5`.","type":"uint","optional":false},{"name":"short_request_max_steps","order":26,"description":"The maximum amount of nodes a short request will traverse before being rescheduled as a long request. Defaults to `1000`.","type":"uint","optional":false},{"name":"short_request_ratio","order":27,"description":"The amount of steps that are allocated to short requests each tick, as a percentage of all available steps. Defaults to `0.5`, or 50%.","type":"double","optional":false},{"name":"stale_enemy_with_same_destination_collision_penalty","order":17,"description":"A penalty that is applied for another unit that is on the way to the goal. This is mainly relevant for situations where a group of units has arrived at the target they are supposed to attack, making units further back circle around to reach the target. Defaults to `30`.","type":"double","optional":false},{"name":"start_to_goal_cost_multiplier_to_terminate_path_find","order":29,"description":"If the actual amount of steps is higher than the initial estimate by this factor, pathfinding is terminated. Defaults to `2000.0`.","type":"double","optional":false},{"name":"use_path_cache","order":2,"description":"Whether to cache paths at all. Defaults to `true`.","type":"boolean","optional":false}]}},{"name":"PathfinderFlags","order":224,"description":"","type":{"complex_type":"table","parameters":[{"name":"allow_destroy_friendly_entities","order":0,"description":"Allows pathing through friendly entities. Defaults to `false`.","type":"boolean","optional":true},{"name":"allow_paths_through_own_entities","order":1,"description":"Allows the pathfinder to path through entities of the same force. Defaults to `false`.","type":"boolean","optional":true},{"name":"cache","order":2,"description":"Enables path caching. This can be more efficient, but might fail to respond to changes in the environment. Defaults to `true`.","type":"boolean","optional":true},{"name":"low_priority","order":4,"description":"Sets lower priority on the path request, meaning it might take longer to find a path at the expense of speeding up others. Defaults to `false`.","type":"boolean","optional":true},{"name":"no_break","order":5,"description":"Makes the pathfinder not break in the middle of processing this pathfind, no matter how much work is needed. Defaults to `false`.","type":"boolean","optional":true},{"name":"prefer_straight_paths","order":3,"description":"Makes the pathfinder try to path in straight lines. Defaults to `false`.","type":"boolean","optional":true}]}},{"name":"PathfinderWaypoint","order":170,"description":"","type":{"complex_type":"table","parameters":[{"name":"needs_destroy_to_reach","order":1,"description":"`true` if the path from the previous waypoint to this one goes through an entity that must be destroyed.","type":"boolean","optional":false},{"name":"position","order":0,"description":"The position of the waypoint on its surface.","type":"MapPosition","optional":false}]}},{"name":"PipeConnection","order":23,"description":"A single pipe connection for a given fluidbox.","type":{"complex_type":"table","parameters":[{"name":"connection_type","order":1,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"normal"},{"complex_type":"literal","value":"underground"},{"complex_type":"literal","value":"linked"}],"full_format":false},"optional":false},{"name":"flow_direction","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"},{"complex_type":"literal","value":"input-output"}],"full_format":false},"optional":false},{"name":"position","order":2,"description":"The absolute position of this connection within the entity.","type":"MapPosition","optional":false},{"name":"target","order":4,"description":"The connected fluidbox, if any.","type":"LuaFluidBox","optional":true},{"name":"target_fluidbox_index","order":5,"description":"The index of the target fluidbox, if any.","type":"uint","optional":true},{"name":"target_pipe_connection_index","order":6,"description":"The index of the target fluidbox pipe connection, if any.","type":"uint","optional":true},{"name":"target_position","order":3,"description":"The absolute position of the connection's intended target.","type":"MapPosition","optional":false}]}},{"name":"PipeConnectionDefinition","order":35,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":3,"description":"","type":"defines.direction","optional":false},{"name":"flow_direction","order":2,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"input-output"},{"complex_type":"literal","value":"input"},{"complex_type":"literal","value":"output"}],"full_format":false},"optional":false},{"name":"max_underground_distance","order":1,"description":"The maximum tile distance this underground connection can connect.","type":"uint","optional":true},{"name":"positions","order":0,"description":"The 4 cardinal direction connection points for this pipe.","type":{"complex_type":"array","value":"MapPosition"},"optional":false}]}},{"name":"PlaceAsTileResult","order":220,"description":"","type":{"complex_type":"table","parameters":[{"name":"condition","order":2,"description":"","type":"CollisionMask","optional":false},{"name":"condition_size","order":1,"description":"","type":"uint","optional":false},{"name":"result","order":0,"description":"The tile prototype.","type":"LuaTilePrototype","optional":false}]}},{"name":"PlatformSchedule","order":62,"description":"","type":{"complex_type":"table","parameters":[{"name":"current","order":0,"description":"Index of the currently active record","type":"uint","optional":false},{"name":"records","order":1,"description":"","type":{"complex_type":"array","value":"ScheduleRecord"},"optional":false}]}},{"name":"PlayerIdentification","order":230,"description":"A player may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"uint","description":"The player index."},{"complex_type":"type","value":"string","description":"The player name."},{"complex_type":"type","value":"LuaPlayer","description":"A reference to [LuaPlayer](runtime:LuaPlayer) may be passed directly."}],"full_format":true}},{"name":"PollutionMapSettings","order":118,"description":"These values are for the time frame of one second (60 ticks).","type":{"complex_type":"table","parameters":[{"name":"ageing","order":3,"description":"The amount of pollution eaten by a chunk's tiles as a percentage of 1. Also known as absorption modifier. Defaults to `1`.","type":"double","optional":false},{"name":"diffusion_ratio","order":1,"description":"The amount that is diffused to a neighboring chunk (possibly repeated for other directions as well). Defaults to `0.02`.","type":"double","optional":false},{"name":"enabled","order":0,"description":"Whether pollution is enabled at all.","type":"boolean","optional":false},{"name":"enemy_attack_pollution_consumption_modifier","order":11,"description":"Defaults to `1`.","type":"double","optional":false},{"name":"expected_max_per_chunk","order":4,"description":"Any amount of pollution larger than this value is visualized as this value instead. Defaults to `150`.","type":"double","optional":false},{"name":"max_pollution_to_restore_trees","order":10,"description":"Defaults to `20`.","type":"double","optional":false},{"name":"min_pollution_to_damage_trees","order":6,"description":"Defaults to `60`.","type":"double","optional":false},{"name":"min_to_diffuse","order":2,"description":"The amount of PUs that need to be in a chunk for it to start diffusing. Defaults to `15`.","type":"double","optional":false},{"name":"min_to_show_per_chunk","order":5,"description":"Any amount of pollution smaller than this value (but bigger than zero) is visualized as this value instead. Defaults to `50`.","type":"double","optional":false},{"name":"pollution_per_tree_damage","order":8,"description":"Defaults to `50`.","type":"double","optional":false},{"name":"pollution_restored_per_tree_damage","order":9,"description":"Defaults to `10`.","type":"double","optional":false},{"name":"pollution_with_max_forest_damage","order":7,"description":"Defaults to `150`.","type":"double","optional":false}]}},{"name":"PrintSettings","order":96,"description":"","type":{"complex_type":"table","parameters":[{"name":"color","order":0,"description":"Color of the message to print. Defaults to white.","type":"Color","optional":true},{"name":"game_state","order":5,"description":"If set to false, message will not be part of game state and will disappear from output console after save-load. Defaults to `true`.","type":"boolean","optional":true},{"name":"skip","order":2,"description":"Condition when to skip adding message. Defaults to `defines.print_skip.if_redundant`.","type":"defines.print_skip","optional":true},{"name":"sound","order":1,"description":"If a sound should be emitted for this message. Defaults to `defines.print_sound.use_player_settings`.","type":"defines.print_sound","optional":true},{"name":"sound_path","order":3,"description":"The sound to play. If not given, [UtilitySounds::console_message](prototype:UtilitySounds::console_message) will be used instead.","type":"SoundPath","optional":true},{"name":"volume_modifier","order":4,"description":"The volume of the sound to play. Must be between 0 and 1 inclusive. Defaults to 1.","type":"float","optional":true}]}},{"name":"Product","order":104,"description":"Returns one of the subtypes, depending on the value of `type`.","examples":["```\n-- Products of the \"steel-chest\" recipe (an array of Product)\n{{type=\"item\", name=\"steel-chest\", amount=1}}\n```","```\n-- Products of the \"advanced-oil-processing\" recipe\n{{type=\"fluid\", name=\"heavy-oil\", amount=1},\n  {type=\"fluid\", name=\"light-oil\", amount=4.5},\n  {type=\"fluid\", name=\"petroleum-gas\", amount=5.5}}\n```","```\n-- What a custom recipe would look like that had a probability of 0.5 to return a\n-- minimum amount of 1 and a maximum amount of 5\n{{type=\"item\", name=\"custom-item\", probability=0.5, amount_min=1, amount_max=5}}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"type","value":"ItemProduct","description":"Returned when the `type` is `\"item\"`."},{"complex_type":"type","value":"FluidProduct","description":"Returned when the `type` is `\"fluid\"`."},{"complex_type":"type","value":"ResearchProgressProduct","description":"Returned when the `type` is `\"research-progress\"`."}],"full_format":true}},{"name":"ProgrammableSpeakerAlertParameters","order":248,"description":"","type":{"complex_type":"table","parameters":[{"name":"alert_message","order":3,"description":"","type":"string","optional":false},{"name":"icon_signal_id","order":2,"description":"","type":"SignalID","optional":false},{"name":"show_alert","order":0,"description":"","type":"boolean","optional":false},{"name":"show_on_map","order":1,"description":"","type":"boolean","optional":false}]}},{"name":"ProgrammableSpeakerCircuitParameters","order":249,"description":"","type":{"complex_type":"table","parameters":[{"name":"instrument_id","order":1,"description":"","type":"uint","optional":false},{"name":"note_id","order":2,"description":"","type":"uint","optional":false},{"name":"signal_value_is_pitch","order":0,"description":"","type":"boolean","optional":false}]}},{"name":"ProgrammableSpeakerInstrument","order":250,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"","type":"string","optional":false},{"name":"notes","order":1,"description":"","type":{"complex_type":"array","value":"string"},"optional":false}]}},{"name":"ProgrammableSpeakerParameters","order":247,"description":"","type":{"complex_type":"table","parameters":[{"name":"allow_polyphony","order":2,"description":"","type":"boolean","optional":false},{"name":"playback_mode","order":1,"description":"","type":"ProgrammableSpeakerPlaybackMode","optional":false},{"name":"playback_volume","order":0,"description":"","type":"float","optional":false}]}},{"name":"ProgrammableSpeakerPlaybackMode","order":52,"description":"Specifies from where the programmable speaker's sound will be heard.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"local","description":"The sound can be heard within the audible range around the speaker."},{"complex_type":"literal","value":"surface","description":"The sound can be heard anywhere on the speaker's surface."},{"complex_type":"literal","value":"global","description":"The sound can be heard everywhere."}],"full_format":true}},{"name":"PropertyExpressionNames","order":195,"description":"All other MapGenSettings feed into named noise expressions, and therefore placement can be overridden by including the name of a property in this dictionary. The probability and richness functions for placing specific tiles, entities, and decoratives can be overridden by including an entry named `{tile|entity|decorative}:(prototype name):{probability|richness}`.","lists":["Values either name a NamedNoiseExpression or can be literal numbers, stored as strings (e.g. `5`). All other controls can be overridden by a property expression names. Notable properties:\n\n- `moisture` - a value between 0 and 1 that determines whether a tile becomes sandy (low moisture) or grassy (high moisture).\n- `aux` - a value between 0 and 1 that determines whether low-moisture tiles become sand or red desert.\n- `temperature` - provides a value (vaguely representing degrees Celsius, varying between -20 and 50) that is used (together with moisture and aux) as part of tree and decorative placement.\n- `elevation` - tiles values less than zero become water. Cliffs are placed along certain contours according to [CliffPlacementSettings](runtime:CliffPlacementSettings).\n- `cliffiness` - determines whether (when >0.5) or not (when <0.5) a cliff will be placed at an otherwise suitable (according to [CliffPlacementSettings](runtime:CliffPlacementSettings)) location.\n- `enemy-base-intensity` - a number that is referenced by both `enemy-base-frequency` and `enemy-base-radius`. i.e. if this is overridden, enemy base frequency and size will both be affected and do something reasonable. By default, this expression returns a value proportional to distance from any starting point, clamped at about 7.\n- `enemy-base-frequency` - a number representing average number of enemy bases per tile for a region, by default in terms of `enemy-base-intensity`.\n- `enemy-base-radius` - a number representing the radius of an enemy base, if one were to be placed on the given tile, by default proportional to a constant plus `enemy-base-intensity`.","Climate controls ('Moisture' and 'Terrain type' at the bottom of the Terrain tab in the map generator GUI) don't have their own dedicated structures in MapGenSettings. Instead, their values are stored as property expression overrides with long names:\n\n- `control:moisture:frequency` - frequency (inverse of scale) multiplier for moisture noise.  Default is 1.\n- `control:moisture:bias` - global bias for moisture (which normally varies between 0 and 1). Default is 0.\n- `control:aux:frequency` - frequency (inverse of scale) multiplier for aux (called 'terrain type' in the GUI) noise.  Default is 1.\n- `control:aux:bias` - global bias for aux/terrain type (which normally varies between 0 and 1). Default is 0."],"type":{"complex_type":"dictionary","key":"string","value":"string"}},{"name":"PrototypeFilter","order":39,"description":"Types `\"signal\"` and `\"item-group\"` do not support filters.\n\nFilters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed.","type":{"complex_type":"array","value":{"complex_type":"union","options":[{"complex_type":"type","value":"ModSettingPrototypeFilter","description":""},{"complex_type":"type","value":"TilePrototypeFilter","description":""},{"complex_type":"type","value":"DecorativePrototypeFilter","description":""},{"complex_type":"type","value":"RecipePrototypeFilter","description":""},{"complex_type":"type","value":"AchievementPrototypeFilter","description":""},{"complex_type":"type","value":"TechnologyPrototypeFilter","description":""},{"complex_type":"type","value":"AsteroidChunkPrototypeFilter","description":""},{"complex_type":"type","value":"ItemPrototypeFilter","description":""},{"complex_type":"type","value":"EquipmentPrototypeFilter","description":""},{"complex_type":"type","value":"EntityPrototypeFilter","description":""},{"complex_type":"type","value":"SpaceLocationPrototypeFilter","description":""},{"complex_type":"type","value":"FluidPrototypeFilter","description":""}],"full_format":true}}},{"name":"PrototypeFilterMode","order":34,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"none","description":""},{"complex_type":"literal","value":"whitelist","description":""},{"complex_type":"literal","value":"blacklist","description":""}],"full_format":true}},{"name":"PrototypeHistory","order":179,"description":"","type":{"complex_type":"table","parameters":[{"name":"changed","order":1,"description":"The mods that changed this prototype in the order they changed it.","type":{"complex_type":"array","value":"string"},"optional":false},{"name":"created","order":0,"description":"The mod that created this prototype.","type":"string","optional":false}]}},{"name":"QualityCondition","order":100,"description":"An item filter may be specified in two ways, either as a string which is a quality prototype name or as a table.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"comparator","order":1,"description":"The comparator for quality.","type":"ComparatorString","optional":true},{"name":"quality","order":0,"description":"The prototype name of the quality.","type":"string","optional":true}]},"string"],"full_format":false}},{"name":"QualityID","order":81,"description":"A quality prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaQualityPrototype","description":"The quality prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"RadiusVisualisationSpecification","order":51,"description":"","type":{"complex_type":"table","parameters":[{"name":"distance","order":0,"description":"","type":"double","optional":false},{"name":"draw_in_cursor","order":2,"description":"","type":"boolean","optional":false},{"name":"draw_on_selection","order":3,"description":"","type":"boolean","optional":false},{"name":"offset","order":1,"description":"","type":"Vector","optional":false}]}},{"name":"RailEndGoal","order":18,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"","type":"defines.rail_direction","optional":false},{"name":"priority","order":2,"description":"Goal priority. If not provided, defaults to 50.","type":"uint8","optional":true},{"name":"rail","order":0,"description":"Rail target.","type":"LuaEntity","optional":false}]}},{"name":"RailEndStart","order":19,"description":"","type":{"complex_type":"table","parameters":[{"name":"allow_path_within_segment","order":2,"description":"Defaults to `true`. Providing false will cause the pathfinder to reject a path that starts here and ends in the same segment as the path would be too short to provide correct alignment with a goal.","type":"boolean","optional":true},{"name":"direction","order":1,"description":"","type":"defines.rail_direction","optional":false},{"name":"is_front","order":3,"description":"Defaults to `false`.","type":"boolean","optional":true},{"name":"priority","order":4,"description":"Start priority. Defaults to `50`.","type":"uint8","optional":true},{"name":"rail","order":0,"description":"","type":"LuaEntity","optional":false}]}},{"name":"RailExtensionData","order":12,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":2,"description":"Direction of the entity to be built","type":"defines.direction","optional":false},{"name":"goal","order":3,"description":"Goal where this rail extension will go to","type":"RailLocation","optional":false},{"name":"name","order":0,"description":"Name of the entity prototype to be built","type":"string","optional":false},{"name":"position","order":1,"description":"Position of the entity to be built","type":"MapPosition","optional":false}]}},{"name":"RailLocation","order":266,"description":"","type":{"complex_type":"table","parameters":[{"name":"direction","order":1,"description":"","type":"defines.direction","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"rail_layer","order":2,"description":"","type":"defines.rail_layer","optional":false}]}},{"name":"RaiseEventParameters","order":221,"description":"A table containing the parameters required to raise a given game event. See the event being raised for what parameters are required.","type":"table"},{"name":"RangeMode","order":101,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"center-to-center","description":""},{"complex_type":"literal","value":"bounding-box-to-bounding-box","description":""},{"complex_type":"literal","value":"center-to-bounding-box","description":""}],"full_format":true}},{"name":"RealOrientation","order":149,"description":"The smooth orientation. It is a [float](runtime:float) in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates \"north\", a value of `0.5` indicates \"south\".\n\nFor example then, a value of `0.625` would indicate \"south-west\", and a value of `0.875` would indicate \"north-west\".","type":"float"},{"name":"RecipeID","order":82,"description":"A recipe may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaRecipePrototype","description":"By recipe prototype."},{"complex_type":"type","value":"LuaRecipe","description":"By instance of recipe."},{"complex_type":"type","value":"string","description":"By name of the recipe prototype."}],"full_format":true}},{"name":"RecipeIDAndQualityIDPair","order":64,"description":"A recipe prototype with optional quality specification.","type":{"complex_type":"table","parameters":[{"name":"name","order":0,"description":"Recipe prototype.","type":"RecipeID","optional":false},{"name":"quality","order":1,"description":"Quality prototype.","type":"QualityID","optional":false}]}},{"name":"RecipePrototypeFilter","order":285,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"enabled"},{"complex_type":"literal","value":"hidden"},{"complex_type":"literal","value":"hidden-from-flow-stats"},{"complex_type":"literal","value":"hidden-from-player-crafting"},{"complex_type":"literal","value":"allow-as-intermediate"},{"complex_type":"literal","value":"allow-intermediates"},{"complex_type":"literal","value":"allow-decomposition"},{"complex_type":"literal","value":"always-show-made-in"},{"complex_type":"literal","value":"always-show-products"},{"complex_type":"literal","value":"show-amount-in-title"},{"complex_type":"literal","value":"has-ingredients"},{"complex_type":"literal","value":"has-products"},{"complex_type":"literal","value":"has-ingredient-item"},{"complex_type":"literal","value":"has-ingredient-fluid"},{"complex_type":"literal","value":"has-product-item"},{"complex_type":"literal","value":"has-product-fluid"},{"complex_type":"literal","value":"subgroup"},{"complex_type":"literal","value":"category"},{"complex_type":"literal","value":"energy"},{"complex_type":"literal","value":"emissions-multiplier"},{"complex_type":"literal","value":"request-paste-multiplier"},{"complex_type":"literal","value":"overload-multiplier"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"category","order":5,"description":"","parameters":[{"name":"category","order":0,"description":"A [LuaRecipeCategoryPrototype](runtime:LuaRecipeCategoryPrototype) name","type":"string","optional":false}]},{"name":"emissions-multiplier","order":7,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"energy","order":6,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"has-ingredient-fluid","order":1,"description":"```\n-- selects recipes that consume sulfuric acid\n{{filter = \"has-ingredient-fluid\", elem_filters = {{filter = \"name\", name = \"sulfuric-acid\"}}}}\n```","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 ingredient is a fluid that matches these filters.","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":true}]},{"name":"has-ingredient-item","order":0,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 ingredient is an item that matches these filters.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"has-product-fluid","order":3,"description":"","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 product is a fluid that matches","type":{"complex_type":"array","value":"FluidPrototypeFilter"},"optional":true}]},{"name":"has-product-item","order":2,"description":"Usage example: \n```\n-- selects recipes that produce an item\n{{filter = \"has-product-item\"}}\n-- selects recipes that produce iron plates\n{{filter = \"has-product-item\", elem_filters = {{filter = \"name\", name = \"iron-plate\"}}}}\n-- selects recipes that produce items that place furnaces\n{{filter = \"has-product-item\", elem_filters = {{filter = \"place-result\", elem_filters = {{filter = \"type\", type = \"furnace\"}}}}}}\n```","parameters":[{"name":"elem_filters","order":0,"description":"Matches if at least 1 product is an item that matches these filters.","type":{"complex_type":"array","value":"ItemPrototypeFilter"},"optional":true}]},{"name":"overload-multiplier","order":9,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"request-paste-multiplier","order":8,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"subgroup","order":4,"description":"","parameters":[{"name":"subgroup","order":0,"description":"A [LuaGroup](runtime:LuaGroup) (subgroup) name","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"RenderLayer","order":136,"description":"A number between 0 and 255 inclusive, represented by one of the following named strings or the string version of the number. For example `\"10\"` and `\"decals\"` are both valid. Higher values are rendered above lower values.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"A string of a number"},{"complex_type":"literal","value":"zero","description":"0"},{"complex_type":"literal","value":"background-transitions","description":"1"},{"complex_type":"literal","value":"under-tiles","description":"2"},{"complex_type":"literal","value":"decals","description":"10"},{"complex_type":"literal","value":"above-tiles","description":"11"},{"complex_type":"literal","value":"ground-layer-1","description":"12"},{"complex_type":"literal","value":"ground-layer-2","description":"13"},{"complex_type":"literal","value":"ground-layer-3","description":"14"},{"complex_type":"literal","value":"ground-layer-4","description":"15"},{"complex_type":"literal","value":"ground-layer-5","description":"16"},{"complex_type":"literal","value":"lower-radius-visualization","description":"29"},{"complex_type":"literal","value":"radius-visualization","description":"30"},{"complex_type":"literal","value":"transport-belt-integration","description":"65"},{"complex_type":"literal","value":"resource","description":"66"},{"complex_type":"literal","value":"building-smoke","description":"67"},{"complex_type":"literal","value":"rail-stone-path-lower","description":"68"},{"complex_type":"literal","value":"rail-stone-path","description":"76"},{"complex_type":"literal","value":"rail-tie","description":"84"},{"complex_type":"literal","value":"decorative","description":"92"},{"complex_type":"literal","value":"ground-patch","description":"93"},{"complex_type":"literal","value":"ground-patch-higher","description":"94"},{"complex_type":"literal","value":"ground-patch-higher2","description":"95"},{"complex_type":"literal","value":"rail-chain-signal-metal","description":"96"},{"complex_type":"literal","value":"rail-screw","description":"97"},{"complex_type":"literal","value":"rail-metal","description":"100"},{"complex_type":"literal","value":"remnants","description":"102"},{"complex_type":"literal","value":"floor","description":"103"},{"complex_type":"literal","value":"transport-belt","description":"104"},{"complex_type":"literal","value":"transport-belt-endings","description":"105"},{"complex_type":"literal","value":"floor-mechanics-under-corpse","description":"106"},{"complex_type":"literal","value":"corpse","description":"107"},{"complex_type":"literal","value":"floor-mechanics","description":"108"},{"complex_type":"literal","value":"item","description":"109"},{"complex_type":"literal","value":"transport-belt-reader","description":"117"},{"complex_type":"literal","value":"lower-object","description":"118"},{"complex_type":"literal","value":"transport-belt-circuit-connector","description":"120"},{"complex_type":"literal","value":"lower-object-above-shadow","description":"121"},{"complex_type":"literal","value":"lower-object-overlay","description":"122"},{"complex_type":"literal","value":"object-under","description":"123"},{"complex_type":"literal","value":"object","description":"124"},{"complex_type":"literal","value":"cargo-hatch","description":"125"},{"complex_type":"literal","value":"higher-object-under","description":"126"},{"complex_type":"literal","value":"higher-object-above","description":"127"},{"complex_type":"literal","value":"train-stop-top","description":"128"},{"complex_type":"literal","value":"item-in-inserter-hand","description":"129"},{"complex_type":"literal","value":"above-inserter","description":"130"},{"complex_type":"literal","value":"wires","description":"131"},{"complex_type":"literal","value":"under-elevated","description":"132"},{"complex_type":"literal","value":"elevated-rail-stone-path-lower","description":"133"},{"complex_type":"literal","value":"elevated-rail-stone-path","description":"134"},{"complex_type":"literal","value":"elevated-rail-tie","description":"135"},{"complex_type":"literal","value":"elevated-rail-screw","description":"136"},{"complex_type":"literal","value":"elevated-rail-metal","description":"137"},{"complex_type":"literal","value":"elevated-lower-object","description":"141"},{"complex_type":"literal","value":"elevated-object","description":"142"},{"complex_type":"literal","value":"elevated-higher-object","description":"143"},{"complex_type":"literal","value":"fluid-visualization","description":"149"},{"complex_type":"literal","value":"wires-above","description":"150"},{"complex_type":"literal","value":"entity-info-icon","description":"153"},{"complex_type":"literal","value":"entity-info-icon-above","description":"154"},{"complex_type":"literal","value":"explosion","description":"157"},{"complex_type":"literal","value":"projectile","description":"158"},{"complex_type":"literal","value":"smoke","description":"159"},{"complex_type":"literal","value":"air-object","description":"160"},{"complex_type":"literal","value":"air-entity-info-icon","description":"161"},{"complex_type":"literal","value":"light-effect","description":"162"},{"complex_type":"literal","value":"selection-box","description":"187"},{"complex_type":"literal","value":"higher-selection-box","description":"188"},{"complex_type":"literal","value":"collision-selection-box","description":"189"},{"complex_type":"literal","value":"arrow","description":"190"},{"complex_type":"literal","value":"cursor","description":"226"}],"full_format":true}},{"name":"ResearchIngredient","order":43,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":1,"description":"Amount of items required to research one unit of technology.","type":"uint16","optional":false},{"name":"name","order":0,"description":"Prototype name of the required item.","type":"string","optional":false}]}},{"name":"ResearchProgressProduct","order":107,"description":"","type":{"complex_type":"table","parameters":[{"name":"amount","order":2,"description":"","type":"double","optional":false},{"name":"research_item","order":1,"description":"Prototype name of the research item.","type":"string","optional":false},{"name":"type","order":0,"description":"","type":{"complex_type":"literal","value":"research-progress"},"optional":false}]}},{"name":"ResearchTrigger","order":45,"description":"","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"craft-item"},{"complex_type":"literal","value":"mine-entity"},{"complex_type":"literal","value":"craft-fluid"},{"complex_type":"literal","value":"send-item-to-orbit"},{"complex_type":"literal","value":"capture-spawner"},{"complex_type":"literal","value":"build-entity"},{"complex_type":"literal","value":"create-space-platform"}],"full_format":false},"optional":false}],"variant_parameter_groups":[{"name":"build-entity","order":4,"description":"","parameters":[{"name":"entity","order":0,"description":"","type":"EntityIDFilter","optional":false}]},{"name":"capture-spawner","order":3,"description":"","parameters":[{"name":"entity","order":0,"description":"","type":"string","optional":true}]},{"name":"craft-fluid","order":2,"description":"","parameters":[{"name":"amount","order":1,"description":"","type":"double","optional":false},{"name":"fluid","order":0,"description":"","type":"string","optional":false}]},{"name":"craft-item","order":0,"description":"","parameters":[{"name":"item","order":0,"description":"","type":"string","optional":false},{"name":"item_quality","order":1,"description":"","type":"string","optional":true}]},{"name":"mine-entity","order":1,"description":"","parameters":[{"name":"entity","order":0,"description":"","type":"string","optional":false}]},{"name":"send-item-to-orbit","order":5,"description":"","parameters":[{"name":"item","order":0,"description":"","type":"ItemIDFilter","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"Resistance","order":192,"description":"","type":{"complex_type":"table","parameters":[{"name":"decrease","order":0,"description":"Absolute damage decrease","type":"float","optional":false},{"name":"percent","order":1,"description":"Percentual damage decrease","type":"float","optional":false}]}},{"name":"RidingState","order":234,"description":"","type":{"complex_type":"table","parameters":[{"name":"acceleration","order":0,"description":"","type":"defines.riding.acceleration","optional":false},{"name":"direction","order":1,"description":"","type":"defines.riding.direction","optional":false}]}},{"name":"RollingStockDrawData","order":9,"description":"","type":{"complex_type":"table","parameters":[{"name":"height","order":3,"description":"","type":"float","optional":false},{"name":"orientation","order":1,"description":"","type":"RealOrientation","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false},{"name":"slope","order":2,"description":"","type":"float","optional":false}]}},{"name":"ScheduleRecord","order":58,"description":"","type":{"complex_type":"table","parameters":[{"name":"rail","order":1,"description":"Rail to path to. Ignored if `station` is present.","type":"LuaEntity","optional":true},{"name":"rail_direction","order":2,"description":"When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to [LuaEntity::connected_rail_direction](runtime:LuaEntity::connected_rail_direction) of a TrainStop.","type":"defines.rail_direction","optional":true},{"name":"station","order":0,"description":"Name of the station.","type":"string","optional":true},{"name":"temporary","order":4,"description":"Only present when the station is temporary, the value is then always `true`.","type":"boolean","optional":true},{"name":"wait_conditions","order":3,"description":"","type":{"complex_type":"array","value":"WaitCondition"},"optional":true}]}},{"name":"ScriptArea","order":164,"description":"An area defined using the map editor.","type":{"complex_type":"table","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":false},{"name":"color","order":2,"description":"","type":"Color","optional":false},{"name":"id","order":3,"description":"","type":"uint","optional":false},{"name":"name","order":1,"description":"","type":"string","optional":false}]}},{"name":"ScriptPosition","order":165,"description":"A position defined using the map editor.","type":{"complex_type":"table","parameters":[{"name":"color","order":2,"description":"","type":"Color","optional":false},{"name":"id","order":3,"description":"","type":"uint","optional":false},{"name":"name","order":1,"description":"","type":"string","optional":false},{"name":"position","order":0,"description":"","type":"MapPosition","optional":false}]}},{"name":"ScriptRenderTarget","order":98,"description":"When writing it is possible to give LuaEntity or MapPosition directly. However, reading always returns the full ScriptRenderTargetTable.","type":{"complex_type":"union","options":["LuaEntity","MapPosition","ScriptRenderTargetTable"],"full_format":false}},{"name":"ScriptRenderTargetTable","order":99,"description":"","type":{"complex_type":"table","parameters":[{"name":"entity","order":0,"description":"","type":"LuaEntity","optional":true},{"name":"offset","order":1,"description":"Only used if `entity` was given.","type":"Vector","optional":true},{"name":"position","order":2,"description":"Only used, and mandatory if `entity` is not given.","type":"MapPosition","optional":true}]}},{"name":"ScrollPolicy","order":265,"description":"Scroll policy of a [scroll pane](runtime:LuaGuiElement).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"never","description":""},{"complex_type":"literal","value":"dont-show-but-allow-scrolling","description":""},{"complex_type":"literal","value":"always","description":""},{"complex_type":"literal","value":"auto","description":""},{"complex_type":"literal","value":"auto-and-reserve-space","description":""}],"full_format":true}},{"name":"SelectedPrototypeData","order":257,"description":"","type":{"complex_type":"table","parameters":[{"name":"base_type","order":0,"description":"E.g. `\"entity\"`.","type":"string","optional":false},{"name":"derived_type","order":1,"description":"The `type` of the prototype. E.g. `\"tree\"`.","type":"string","optional":false},{"name":"name","order":2,"description":"The `name` of the prototype. E.g. `\"tree-05\"`.","type":"string","optional":false}]}},{"name":"SelectionModeFlags","order":30,"description":"A set of flags on a selection tool that define how entities and tiles are selected. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.","type":{"complex_type":"dictionary","key":{"complex_type":"union","options":[{"complex_type":"literal","value":"blueprint","description":"Selects entities and tiles as if selecting them for a blueprint."},{"complex_type":"literal","value":"deconstruct","description":"Selects entities and tiles as if selecting them for deconstruction."},{"complex_type":"literal","value":"cancel-deconstruct","description":"Selects entities and tiles as if selecting them for deconstruction cancellation."},{"complex_type":"literal","value":"items","description":"Selects items on the ground."},{"complex_type":"literal","value":"trees","description":"Selects trees."},{"complex_type":"literal","value":"buildable-type","description":"Selects entities which are considered a [building](runtime:LuaEntityPrototype::is_building), plus landmines."},{"complex_type":"literal","value":"nothing","description":"Selects no entities or tiles, but is useful to select an area."},{"complex_type":"literal","value":"items-to-place","description":"Selects entities and tiles that can be [built by an item](runtime:LuaItemPrototype::place_result)."},{"complex_type":"literal","value":"any-entity","description":"Selects all entities."},{"complex_type":"literal","value":"any-tile","description":"Selects all tiles."},{"complex_type":"literal","value":"same-force","description":"Selects entities with the same force as the selecting player."},{"complex_type":"literal","value":"not-same-force","description":"Selects entities with a different force as the selecting player."},{"complex_type":"literal","value":"friend","description":"Selects entities from a [friendly](runtime:LuaForce::is_friend) force."},{"complex_type":"literal","value":"enemy","description":"Selects entities from an [enemy](runtime:LuaForce::is_enemy) force."},{"complex_type":"literal","value":"upgrade","description":"Selects entities as if selecting them for upgrading."},{"complex_type":"literal","value":"cancel-upgrade","description":"Selects entities as if selecting them for upgrade cancellation."},{"complex_type":"literal","value":"downgrade","description":"Selects entities as if selecting them for downgrading."},{"complex_type":"literal","value":"entity-with-health","description":"Selects entities that are [entities with health](runtime:LuaEntity::is_entity_with_health)."},{"complex_type":"literal","value":"is-military-target","description":"Selects entities that are [military targets](runtime:LuaEntity::is_military_target)."},{"complex_type":"literal","value":"entity-with-owner","description":"Selects entities that are [entities with owner](runtime:LuaEntity::is_entity_with_owner)."},{"complex_type":"literal","value":"avoid-rolling-stock","description":"Selects entities that are not `rolling-stock`s."},{"complex_type":"literal","value":"avoid-vehicle","description":""},{"complex_type":"literal","value":"controllable","description":""},{"complex_type":"literal","value":"controllable-add","description":""},{"complex_type":"literal","value":"controllable-remove","description":""},{"complex_type":"literal","value":"entity-ghost","description":"Selects entities that are `entity-ghost`s."},{"complex_type":"literal","value":"tile-ghost","description":"Selects entities that are `tile-ghost`s."}],"full_format":true},"value":{"complex_type":"literal","value":true}}},{"name":"SelectorCombinatorParameters","order":210,"description":"","type":{"complex_type":"table","parameters":[{"name":"count_signal","order":2,"description":"The signal to emit.","type":"SignalID","optional":false},{"name":"index_constant","order":1,"description":"The signal index to use if not using a specific signal.","type":"uint","optional":false},{"name":"index_signal","order":0,"description":"The signal to use.","type":"SignalID","optional":false},{"name":"operation","order":3,"description":"Must be one of `\"select\"`, `\"count\"`, `\"random\"`. When not specified, defaults to `\"select\"`.","type":"string","optional":true},{"name":"select_max","order":4,"description":"If the maximum value is used.","type":"boolean","optional":false}]}},{"name":"Signal","order":199,"description":"An actual signal transmitted by the network.","type":{"complex_type":"table","parameters":[{"name":"count","order":1,"description":"Value of the signal.","type":"int","optional":false},{"name":"signal","order":0,"description":"ID of the signal.","type":"SignalID","optional":false}]}},{"name":"SignalFilter","order":94,"description":"A signal filter may be specified in two ways, either as a string which is a virtual signal name or item prototype name or as a table.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"comparator","order":3,"description":"The comparator for quality. `nil` if any quality.","type":"ComparatorString","optional":true},{"name":"name","order":1,"description":"Name of the signal.","type":"string","optional":false},{"name":"quality","order":2,"description":"The prototype name of the signal's quality. `nil` for any quality.","type":"QualityID","optional":true},{"name":"type","order":0,"description":"The type of the signal filter.","type":"SignalIDType","optional":true}]},"string"],"full_format":false}},{"name":"SignalID","order":198,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"Name of the prototype.","type":"string","optional":true},{"name":"type","order":0,"description":"The type of the signal. If the type is `\"item\"`, this will be `nil` when reading.","type":"SignalIDType","optional":true}]}},{"name":"SignalIDType","order":41,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"item","description":""},{"complex_type":"literal","value":"fluid","description":""},{"complex_type":"literal","value":"virtual","description":""},{"complex_type":"literal","value":"entity","description":""},{"complex_type":"literal","value":"recipe","description":""},{"complex_type":"literal","value":"space-location","description":""},{"complex_type":"literal","value":"asteroid-chunk","description":""},{"complex_type":"literal","value":"quality","description":""}],"full_format":true}},{"name":"SimpleItemStack","order":228,"description":"An item stack may be specified in one of two ways.","examples":["```\n-- Both of these lines specify an item stack of one iron plate\n{name=\"iron-plate\"}\n{name=\"iron-plate\", count=1}\n```","```\n-- This is a stack of 47 copper plates\n{name=\"copper-plate\", count=47}\n```","```\nThese are both full stacks of iron plates (for iron-plate, a full stack is 100 plates)\n\"iron-plate\"\n{name=\"iron-plate\", count=100}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"type","value":"string","description":"The name of the item, which represents a full stack of that item."},{"complex_type":"type","value":"ItemStackDefinition","description":"The detailed definition of an item stack."}],"full_format":true}},{"name":"SmokeSource","order":162,"description":"","type":{"complex_type":"table","parameters":[{"name":"deviation","order":12,"description":"","type":"MapPosition","optional":true},{"name":"east_position","order":6,"description":"","type":"Vector","optional":true},{"name":"frequency","order":1,"description":"","type":"float","optional":false},{"name":"height","order":15,"description":"","type":"float","optional":false},{"name":"height_deviation","order":16,"description":"","type":"float","optional":false},{"name":"name","order":0,"description":"","type":"string","optional":false},{"name":"north_east_position","order":5,"description":"","type":"Vector","optional":true},{"name":"north_position","order":4,"description":"","type":"Vector","optional":true},{"name":"north_west_position","order":11,"description":"","type":"Vector","optional":true},{"name":"offset","order":2,"description":"","type":"float","optional":false},{"name":"position","order":3,"description":"","type":"Vector","optional":true},{"name":"south_east_position","order":7,"description":"","type":"Vector","optional":true},{"name":"south_position","order":8,"description":"","type":"Vector","optional":true},{"name":"south_west_position","order":9,"description":"","type":"Vector","optional":true},{"name":"starting_frame","order":13,"description":"","type":"uint16","optional":false},{"name":"starting_frame_deviation","order":14,"description":"","type":"uint16","optional":false},{"name":"starting_vertical_speed","order":17,"description":"","type":"float","optional":false},{"name":"starting_vertical_speed_deviation","order":18,"description":"","type":"float","optional":false},{"name":"vertical_speed_slowdown","order":19,"description":"","type":"float","optional":false},{"name":"west_position","order":10,"description":"","type":"Vector","optional":true}]}},{"name":"SoundPath","order":235,"description":"It can be either the name of a [SoundPrototype](prototype:SoundPrototype) defined in the data stage, or a path in the form `\"type/name\"`. The latter option can be sorted into three categories.\n\nThe validity of a SoundPath can be verified at runtime using [LuaHelpers::is_valid_sound_path](runtime:LuaHelpers::is_valid_sound_path).","lists":["The utility and ambient types each contain general use sound prototypes defined by the game itself.\n\n- `\"utility\"` - Uses [UtilitySounds](prototype:UtilitySounds). Example: `\"utility/wire_connect_pole\"`\n- `\"ambient\"` - Uses [AmbientSound](prototype:AmbientSound). Example: `\"ambient/resource-deficiency\"`"],"type":"string"},{"name":"SoundType","order":28,"description":"Defines which slider in the game's sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"game-effect","description":""},{"complex_type":"literal","value":"gui-effect","description":""},{"complex_type":"literal","value":"ambient","description":""},{"complex_type":"literal","value":"environment","description":""},{"complex_type":"literal","value":"walking","description":""},{"complex_type":"literal","value":"alert","description":""},{"complex_type":"literal","value":"wind","description":""},{"complex_type":"literal","value":"world-ambient","description":""},{"complex_type":"literal","value":"weapon","description":""},{"complex_type":"literal","value":"explosion","description":""},{"complex_type":"literal","value":"enemy","description":""}],"full_format":true}},{"name":"SpaceConnectionAsteroidSpawnDefinition","order":177,"description":"","type":{"complex_type":"table","parameters":[{"name":"asteroid","order":1,"description":"The asteroid chunk or entity name.","type":"string","optional":false},{"name":"spawn_points","order":2,"description":"","type":{"complex_type":"array","value":"SpaceConnectionAsteroidSpawnPoint"},"optional":false},{"name":"type","order":0,"description":"`asteroid-chunk` or `entity`","type":"string","optional":false}]}},{"name":"SpaceConnectionAsteroidSpawnPoint","order":176,"description":"","type":{"complex_type":"table","parameters":[{"name":"distance","order":2,"description":"","type":"double","optional":false},{"name":"probability","order":0,"description":"","type":"double","optional":false},{"name":"speed","order":1,"description":"","type":"double","optional":false}]}},{"name":"SpaceLocationAsteroidSpawnDefinition","order":175,"description":"","type":{"complex_type":"table","parameters":[{"name":"asteroid","order":1,"description":"The asteroid chunk or entity name.","type":"string","optional":false},{"name":"probability","order":2,"description":"","type":"double","optional":false},{"name":"speed","order":3,"description":"","type":"double","optional":false},{"name":"type","order":0,"description":"`asteroid-chunk` or `entity`","type":"string","optional":false}]}},{"name":"SpaceLocationID","order":93,"description":"A space location prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaSpaceLocationPrototype","description":"The space location prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"SpaceLocationPrototypeFilter","order":292,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"fly-condition"},{"complex_type":"literal","value":"type"},{"complex_type":"literal","value":"solar-power-in-space"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"solar-power-in-space","order":1,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"type","order":0,"description":"","parameters":[{"name":"type","order":0,"description":"The prototype type, or a list of acceptable types.","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"SpacePlatformIdentification","order":89,"description":"Space platform may be specified in one of one ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaSpacePlatform","description":""}],"full_format":true}},{"name":"SpawnPointDefinition","order":226,"description":"","type":{"complex_type":"table","parameters":[{"name":"evolution_factor","order":0,"description":"Evolution factor for which this weight applies.","type":"double","optional":false},{"name":"weight","order":1,"description":"Probability of spawning this unit at this evolution factor.","type":"double","optional":false}]}},{"name":"SpoilToTriggerResult","order":227,"description":"","type":{"complex_type":"table","parameters":[{"name":"items_per_trigger","order":0,"description":"The trigger runs (count-in-stack / items_per_trigger) times; rounded up.","type":"uint","optional":false},{"name":"trigger","order":1,"description":"The trigger items that are run.","type":{"complex_type":"array","value":"TriggerItem"},"optional":false}]}},{"name":"SpritePath","order":4,"description":"It can be either the name of a [SpritePrototype](prototype:SpritePrototype) defined in the data stage, or a path in form \"type/name\" or \"type.name\".\n\nThe validity of a SpritePath can be verified at runtime using [LuaHelpers::is_valid_sprite_path](runtime:LuaHelpers::is_valid_sprite_path).","lists":["The supported types are:\n\n- `\"item\"` - for example \"item/iron-plate\" is the icon sprite of iron plate\n- `\"entity\"` - for example \"entity/small-biter\" is the icon sprite of the small biter\n- `\"technology\"`\n- `\"recipe\"`\n- `\"fluid\"`\n- `\"tile\"`\n- `\"item-group\"`\n- `\"virtual-signal\"`\n- `\"shortcut\"`\n- `\"achievement\"`\n- `\"equipment\"`\n- `\"ammo-category\"`\n- `\"decorative\"`\n- `\"space-connection\"`\n- `\"space-location\"`\n- `\"surface\"`\n- `\"airborne-pollutant\"`\n- `\"asteroid-chunk\"`\n- `\"quality\"`\n- `\"file\"` - path to an image file located inside the current scenario. This file is not preloaded so it will be slower; for frequently used sprites, it is better to define sprite prototype and use it instead.\n- `\"utility\"` - sprite defined in the utility-sprites object, these are the pictures used by the game internally for the UI."],"type":"string"},{"name":"SteeringMapSetting","order":121,"description":"","type":{"complex_type":"table","parameters":[{"name":"force_unit_fuzzy_goto_behavior","order":3,"description":"Used to make steering look better for aesthetic purposes.","type":"boolean","optional":false},{"name":"radius","order":0,"description":"Does not include the radius of the unit.","type":"double","optional":false},{"name":"separation_factor","order":1,"description":"","type":"double","optional":false},{"name":"separation_force","order":2,"description":"","type":"double","optional":false}]}},{"name":"SteeringMapSettings","order":122,"description":"","type":{"complex_type":"table","parameters":[{"name":"default","order":0,"description":"","type":"SteeringMapSetting","optional":false},{"name":"moving","order":1,"description":"","type":"SteeringMapSetting","optional":false}]}},{"name":"SurfaceCondition","order":161,"description":"","type":{"complex_type":"table","parameters":[{"name":"max","order":2,"description":"","type":"double","optional":false},{"name":"min","order":1,"description":"","type":"double","optional":false},{"name":"property","order":0,"description":"","type":"string","optional":false}]}},{"name":"SurfaceIdentification","order":229,"description":"A surface may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"uint","description":"It will be the index of the surface. `nauvis` has index `1`, the first surface-created surface will have index `2` and so on."},{"complex_type":"type","value":"string","description":"It will be the surface name. E.g. `\"nauvis\"`."},{"complex_type":"type","value":"LuaSurface","description":"A reference to [LuaSurface](runtime:LuaSurface) may be passed directly."}],"full_format":true}},{"name":"SurfacePropertyID","order":97,"description":"Surface property prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaSurfacePropertyPrototype","description":"The surface property prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"SwitchState","order":139,"description":"State of a GUI [switch](runtime:LuaGuiElement::switch_state).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left","description":""},{"complex_type":"literal","value":"right","description":""},{"complex_type":"literal","value":"none","description":""}],"full_format":true}},{"name":"TabAndContent","order":158,"description":"","type":{"complex_type":"table","parameters":[{"name":"content","order":1,"description":"","type":"LuaGuiElement","optional":false},{"name":"tab","order":0,"description":"","type":"LuaGuiElement","optional":false}]}},{"name":"Tags","order":160,"description":"A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`.\n\nNote that the API returns tags as a simple table, meaning any modifications to it will not propagate back to the game. Thus, to modify a set of tags, the whole table needs to be written back to the respective property.","examples":["```\n{a = 1, b = true, c = \"three\", d = {e = \"f\"}}\n```"],"type":{"complex_type":"dictionary","key":"string","value":"AnyBasic"}},{"name":"TargetType","order":232,"description":"Target type of an [AmmoType](runtime:AmmoType).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"entity","description":"Fires at an entity."},{"complex_type":"literal","value":"position","description":"Fires directly at a position."},{"complex_type":"literal","value":"direction","description":"Fires in a direction."}],"full_format":true}},{"name":"TechnologyID","order":75,"description":"An technology prototype may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaTechnologyPrototype","description":"The technology prototype."},{"complex_type":"type","value":"LuaTechnology","description":"Instance of the technology."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"TechnologyModifier","order":189,"description":"The effect that is applied when a technology is researched. It is a table that contains at least the field `type`.","type":{"complex_type":"table","parameters":[{"name":"type","order":0,"description":"Modifier type. Specifies which of the other fields will be available.","type":"ModifierType","optional":false}],"variant_parameter_groups":[{"name":"OtherTypes","order":6,"description":"","parameters":[{"name":"modifier","order":0,"description":"Modification value. This value will be added to the variable it modifies.","type":"double","optional":false}]},{"name":"ammo-damage","order":1,"description":"","parameters":[{"name":"ammo_category","order":0,"description":"Prototype name of the ammunition category that is affected","type":"string","optional":false},{"name":"modifier","order":1,"description":"Modification value. This will be added to the current ammo damage modifier upon researching.","type":"double","optional":false}]},{"name":"give-item","order":2,"description":"","parameters":[{"name":"count","order":1,"description":"Number of items to give. Defaults to `1`.","type":"uint","optional":true},{"name":"item","order":0,"description":"Item prototype name to give.","type":"string","optional":false}]},{"name":"gun-speed","order":0,"description":"","parameters":[{"name":"ammo_category","order":0,"description":"Prototype name of the ammunition category that is affected","type":"string","optional":false},{"name":"modifier","order":1,"description":"Modification value. This will be added to the current gun speed modifier upon researching.","type":"double","optional":false}]},{"name":"nothing","order":5,"description":"","parameters":[{"name":"effect_description","order":0,"description":"Description of this nothing modifier.","type":"LocalisedString","optional":false}]},{"name":"turret-attack","order":3,"description":"","parameters":[{"name":"modifier","order":1,"description":"Modification value. This will be added to the current turret damage modifier upon researching.","type":"double","optional":false},{"name":"turret_id","order":0,"description":"Turret prototype name this modifier will affect.","type":"string","optional":false}]},{"name":"unlock-recipe","order":4,"description":"","parameters":[{"name":"recipe","order":0,"description":"Recipe prototype name to unlock.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"TechnologyPrototypeFilter","order":287,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"enabled"},{"complex_type":"literal","value":"hidden"},{"complex_type":"literal","value":"upgrade"},{"complex_type":"literal","value":"visible-when-disabled"},{"complex_type":"literal","value":"has-effects"},{"complex_type":"literal","value":"has-prerequisites"},{"complex_type":"literal","value":"research-unit-ingredient"},{"complex_type":"literal","value":"unlocks-recipe"},{"complex_type":"literal","value":"level"},{"complex_type":"literal","value":"max-level"},{"complex_type":"literal","value":"time"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"level","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"max-level","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"research-unit-ingredient","order":0,"description":"","parameters":[{"name":"ingredient","order":0,"description":"The research ingredient to check.","type":"string","optional":false}]},{"name":"time","order":4,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"uint","optional":false}]},{"name":"unlocks-recipe","order":1,"description":"","parameters":[{"name":"recipe","order":0,"description":"The recipe to check.","type":"string","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"TerritorySettings","order":115,"description":"","type":{"complex_type":"table","parameters":[{"name":"minimum_territory_size","order":3,"description":"","type":"uint","optional":false},{"name":"territory_index_expression","order":1,"description":"","type":"string","optional":false},{"name":"territory_variation_expression","order":2,"description":"","type":"string","optional":false},{"name":"units","order":0,"description":"","type":{"complex_type":"array","value":"string"},"optional":false}]}},{"name":"TextAlign","order":79,"description":"The text is aligned so that the target position is at the given side of the text.\n\nFor example, `\"right\"` aligned text means the right side of the text is at the target position. Or in other words, the target is on the right of the text.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"left","description":""},{"complex_type":"literal","value":"right","description":""},{"complex_type":"literal","value":"center","description":""}],"full_format":true}},{"name":"Tile","order":186,"description":"","type":{"complex_type":"table","parameters":[{"name":"name","order":1,"description":"The prototype name of the tile.","type":"string","optional":false},{"name":"position","order":0,"description":"The position of the tile.","type":"TilePosition","optional":false}]}},{"name":"TileID","order":83,"description":"A tile may be specified in one of three ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaTilePrototype","description":"By tile prototype."},{"complex_type":"type","value":"LuaTile","description":"By instance of tile."},{"complex_type":"type","value":"string","description":"By name of the tile prototype."}],"full_format":true}},{"name":"TilePosition","order":152,"description":"Coordinates of a tile on a [LuaSurface](runtime:LuaSurface) where each integer `x`/`y` represents a different tile. This uses the same format as [MapPosition](runtime:MapPosition), except it rounds any non-integer `x`/`y` down to whole numbers. It can be specified either with or without explicit keys.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"int","optional":false},{"name":"y","order":1,"description":"","type":"int","optional":false}]},{"complex_type":"tuple","values":["int","int"]}],"full_format":false}},{"name":"TilePrototypeFilter","order":283,"description":"","type":{"complex_type":"table","parameters":[{"name":"filter","order":0,"description":"The condition to filter on.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"minable"},{"complex_type":"literal","value":"autoplace"},{"complex_type":"literal","value":"blueprintable"},{"complex_type":"literal","value":"item-to-place"},{"complex_type":"literal","value":"collision-mask"},{"complex_type":"literal","value":"walking-speed-modifier"},{"complex_type":"literal","value":"vehicle-friction-modifier"},{"complex_type":"literal","value":"decorative-removal-probability"},{"complex_type":"literal","value":"absorptions-per-second"}],"full_format":false},"optional":false},{"name":"invert","order":2,"description":"Inverts the condition. Default is `false`.","type":"boolean","optional":true},{"name":"mode","order":1,"description":"How to combine this with the previous filter. Defaults to `\"or\"`. When evaluating the filters, `\"and\"` has higher precedence than `\"or\"`.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"or"},{"complex_type":"literal","value":"and"}],"full_format":false},"optional":true}],"variant_parameter_groups":[{"name":"absorptions-per-second","order":4,"description":"","parameters":[{"name":"comparison","order":1,"description":"","type":"ComparatorString","optional":false},{"name":"pollutant","order":0,"description":"The name of a pollutant type to check.","type":"string","optional":false},{"name":"value","order":2,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"collision-mask","order":0,"description":"","parameters":[{"name":"mask","order":0,"description":"Name of one [layer](runtime:LuaCollisionLayerPrototype) or a full collision mask.","type":{"complex_type":"union","options":["CollisionLayerID","CollisionMask"],"full_format":false},"optional":false},{"name":"mask_mode","order":1,"description":"How to filter.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"collides"},{"complex_type":"literal","value":"layers-equals"},{"complex_type":"literal","value":"contains-any"},{"complex_type":"literal","value":"contains-all"}],"full_format":false},"optional":false}]},{"name":"decorative-removal-probability","order":3,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"float","optional":false}]},{"name":"vehicle-friction-modifier","order":2,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]},{"name":"walking-speed-modifier","order":1,"description":"","parameters":[{"name":"comparison","order":0,"description":"","type":"ComparatorString","optional":false},{"name":"value","order":1,"description":"The value to compare against.","type":"double","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `filter`:"}},{"name":"TileSearchFilters","order":11,"description":"","type":{"complex_type":"table","parameters":[{"name":"area","order":0,"description":"","type":"BoundingBox","optional":true},{"name":"collision_mask","order":9,"description":"","type":{"complex_type":"union","options":["CollisionLayerID",{"complex_type":"array","value":"CollisionLayerID"},{"complex_type":"dictionary","key":"CollisionLayerID","value":{"complex_type":"literal","value":true}}],"full_format":false},"optional":true},{"name":"force","order":10,"description":"","type":"ForceSet","optional":true},{"name":"has_double_hidden_tile","order":6,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true},{"name":"has_hidden_tile","order":5,"description":"","type":"boolean","optional":true},{"name":"has_tile_ghost","order":7,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true},{"name":"invert","order":11,"description":"If the filters should be inverted.","type":"boolean","optional":true},{"name":"limit","order":4,"description":"","type":"uint","optional":true},{"name":"name","order":3,"description":"An empty array means nothing matches the name filter.","type":{"complex_type":"union","options":["TileID",{"complex_type":"array","value":"TileID"}],"full_format":false},"optional":true},{"name":"position","order":1,"description":"Ignored if not given with radius.","type":"MapPosition","optional":true},{"name":"radius","order":2,"description":"If given with position, will return all tiles within the radius of the position.","type":"double","optional":true},{"name":"to_be_deconstructed","order":8,"description":"Can be further filtered by supplying a `force` filter.","type":"boolean","optional":true}]}},{"name":"TrainFilter","order":13,"description":"","type":{"complex_type":"table","parameters":[{"name":"force","order":2,"description":"Train must contain at least one rolling stock of this force to pass","type":"ForceID","optional":true},{"name":"has_passenger","order":7,"description":"Checks if train has a passenger.","type":"boolean","optional":true},{"name":"is_manual","order":8,"description":"Checks if train is in manual controller.","type":"boolean","optional":true},{"name":"is_moving","order":6,"description":"Checks if train is moving (has speed != 0) or not moving.","type":"boolean","optional":true},{"name":"max_stocks","order":5,"description":"Train must have at most that many stocks to pass","type":"uint","optional":true},{"name":"min_stocks","order":4,"description":"Train must have at least that many stocks to pass","type":"uint","optional":true},{"name":"stock","order":3,"description":"Train must contain a rolling stock of any of provided prototype to pass","type":{"complex_type":"union","options":["EntityID",{"complex_type":"array","value":"EntityID"}],"full_format":false},"optional":true},{"name":"surface","order":1,"description":"Surface the train must be on in order to pass","type":"SurfaceIdentification","optional":true},{"name":"train_id","order":0,"description":"Train ID filter","type":"uint","optional":true}]}},{"name":"TrainPathAllGoalsResult","order":21,"description":"","type":{"complex_type":"table","parameters":[{"name":"accessible","order":1,"description":"Array of the same length as requested goals: each field will tell if related goal is accessible for the train.","type":{"complex_type":"array","value":"boolean"},"optional":false},{"name":"amount_accessible","order":0,"description":"Amount of goals that are accessible.","type":"uint","optional":false},{"name":"penalties","order":2,"description":"Array of the same length as requested goals. Only present if request type was `\"all-goals-penalties\"`.","type":{"complex_type":"array","value":"double"},"optional":true},{"name":"steps_count","order":3,"description":"Amount of steps pathfinder performed. This is a measure of how expensive this search was.","type":"uint","optional":false}]}},{"name":"TrainPathFinderGoal","order":16,"description":"","type":{"complex_type":"union","options":[{"complex_type":"type","value":"TrainStopGoal","description":""},{"complex_type":"type","value":"RailEndGoal","description":""},{"complex_type":"type","value":"LuaRailEnd","description":""},{"complex_type":"type","value":"LuaEntity","description":"Only if it points at train-stop that is connected to a rail."}],"full_format":true}},{"name":"TrainPathFinderOneGoalResult","order":20,"description":"","type":{"complex_type":"table","parameters":[{"name":"found_path","order":0,"description":"True if found path.","type":"boolean","optional":false},{"name":"goal_index","order":1,"description":"If path was found, provides index of the specific goal to which the path goes to.","type":"uint","optional":true},{"name":"is_front","order":4,"description":"If path was found, tells if the path was reached from the train's front end or from [RailEndStart](runtime:RailEndStart) with [RailEndStart::is_front](runtime:RailEndStart::is_front) set.","type":"boolean","optional":true},{"name":"path","order":6,"description":"Only if search was of type `\"path\"`, `return_path` was set to true and path was found. Contains all rails in order that are part of the found path.","type":{"complex_type":"array","value":"LuaEntity"},"optional":true},{"name":"penalty","order":3,"description":"Penalty of the path to goal if path was found.","type":"double","optional":true},{"name":"start_index","order":2,"description":"If path was found, provides index of the specific start from which the path to target goes from","type":"uint","optional":true},{"name":"steps_count","order":7,"description":"Amount of steps pathfinder performed. This is a measure of how expensive this search was.","type":"uint","optional":false},{"name":"total_length","order":5,"description":"If path was found and search was of type `\"path\"`, provides total length of all rails of the path.","type":"double","optional":true}]}},{"name":"TrainPathRequestType","order":15,"description":"A [string](runtime:string) specifying the type of request for [LuaTrainManager::request_train_path](runtime:LuaTrainManager::request_train_path).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"path","description":"The method will return [TrainPathFinderOneGoalResult](runtime:TrainPathFinderOneGoalResult)."},{"complex_type":"literal","value":"any-goal-accessible","description":"The method will return [TrainPathFinderOneGoalResult](runtime:TrainPathFinderOneGoalResult)."},{"complex_type":"literal","value":"all-goals-accessible","description":"The method will return [TrainPathAllGoalsResult](runtime:TrainPathAllGoalsResult)."},{"complex_type":"literal","value":"all-goals-penalties","description":"The method will return [TrainPathAllGoalsResult](runtime:TrainPathAllGoalsResult) with `penalties`."}],"full_format":true}},{"name":"TrainSchedule","order":61,"description":"","type":{"complex_type":"table","parameters":[{"name":"current","order":0,"description":"Index of the currently active record","type":"uint","optional":false},{"name":"records","order":1,"description":"","type":{"complex_type":"array","value":"ScheduleRecord"},"optional":false}]}},{"name":"TrainStopFilter","order":14,"description":"","type":{"complex_type":"table","parameters":[{"name":"force","order":1,"description":"ForceID the train stop must have to pass","type":"ForceID","optional":true},{"name":"is_connected_to_rail","order":3,"description":"Checks if train stop has a rail next to it.","type":"boolean","optional":true},{"name":"is_disabled","order":7,"description":"If train stop is disabled by a control behavior","type":"boolean","optional":true},{"name":"is_full","order":2,"description":"Checks if train stop is full (trains count >= trains limit or disabled) or not full.","type":"boolean","optional":true},{"name":"limit_set_by_control_behavior","order":6,"description":"If train stop has limit set by control behavior","type":"boolean","optional":true},{"name":"station_name","order":5,"description":"Train stop must belong to given station name to pass","type":{"complex_type":"union","options":["string",{"complex_type":"array","value":"string"}],"full_format":false},"optional":true},{"name":"surface","order":0,"description":"Surface the train stop must be on in order to pass","type":"SurfaceIdentification","optional":true},{"name":"type","order":4,"description":"If given, only train stops of this type will pass","type":{"complex_type":"union","options":["EntityID",{"complex_type":"array","value":"EntityID"}],"full_format":false},"optional":true}]}},{"name":"TrainStopGoal","order":17,"description":"","type":{"complex_type":"table","parameters":[{"name":"priority","order":1,"description":"Goal priority. If not provided, defaults to [LuaEntity::train_stop_priority](runtime:LuaEntity::train_stop_priority) of provided train_stop.","type":"uint8","optional":true},{"name":"train_stop","order":0,"description":"Train stop target. Must be connected to rail ([LuaEntity::connected_rail](runtime:LuaEntity::connected_rail) returns valid LuaEntity).","type":"LuaEntity","optional":false}]}},{"name":"TriggerDelivery","order":145,"description":"","type":{"complex_type":"table","parameters":[{"name":"source_effects","order":1,"description":"","type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":false},{"name":"target_effects","order":2,"description":"","type":{"complex_type":"array","value":"TriggerEffectItem"},"optional":false},{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"instant"},{"complex_type":"literal","value":"projectile"},{"complex_type":"literal","value":"beam"},{"complex_type":"literal","value":"stream"},{"complex_type":"literal","value":"artillery"},{"complex_type":"literal","value":"chain"},{"complex_type":"literal","value":"delayed"}],"full_format":false},"optional":false}]}},{"name":"TriggerEffectItem","order":142,"description":"","type":{"complex_type":"table","parameters":[{"name":"affects_target","order":4,"description":"","type":"boolean","optional":false},{"name":"damage_type_filters","order":6,"description":"","type":"DamageTypeFilters","optional":true},{"name":"probability","order":3,"description":"","type":"float","optional":false},{"name":"repeat_count","order":1,"description":"","type":"uint16","optional":false},{"name":"repeat_count_deviation","order":2,"description":"","type":"uint16","optional":false},{"name":"show_in_tooltip","order":5,"description":"","type":"boolean","optional":false},{"name":"type","order":0,"description":"","type":"TriggerEffectItemType","optional":false}]}},{"name":"TriggerEffectItemType","order":141,"description":"Used by [TriggerEffectItem](runtime:TriggerEffectItem).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"damage","description":""},{"complex_type":"literal","value":"create-entity","description":""},{"complex_type":"literal","value":"create-explosion","description":""},{"complex_type":"literal","value":"create-fire","description":""},{"complex_type":"literal","value":"create-smoke","description":""},{"complex_type":"literal","value":"create-trivial-smoke","description":""},{"complex_type":"literal","value":"create-asteroid-chunk","description":""},{"complex_type":"literal","value":"create-particle","description":""},{"complex_type":"literal","value":"create-sticker","description":""},{"complex_type":"literal","value":"create-decorative","description":""},{"complex_type":"literal","value":"nested-result","description":""},{"complex_type":"literal","value":"play-sound","description":""},{"complex_type":"literal","value":"push-back","description":""},{"complex_type":"literal","value":"destroy-cliffs","description":""},{"complex_type":"literal","value":"show-explosion-on-chart","description":""},{"complex_type":"literal","value":"insert-item","description":""},{"complex_type":"literal","value":"script","description":""},{"complex_type":"literal","value":"set-tile","description":""},{"complex_type":"literal","value":"invoke-tile-trigger","description":""},{"complex_type":"literal","value":"destroy-decoratives","description":""},{"complex_type":"literal","value":"camera-effect","description":""},{"complex_type":"literal","value":"activate-impact","description":""}],"full_format":true}},{"name":"TriggerItem","order":144,"description":"","type":{"complex_type":"table","parameters":[{"name":"action_delivery","order":1,"description":"","type":{"complex_type":"array","value":"TriggerDelivery"},"optional":true},{"name":"collision_mask","order":4,"description":"The trigger will only affect entities that would collide with given collision mask.","type":"CollisionMask","optional":false},{"name":"entity_flags","order":2,"description":"The trigger will only affect entities that contain any of these flags.","type":"EntityPrototypeFlags","optional":true},{"name":"force","order":6,"description":"If `\"enemy\"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `\"ally\"` is the opposite of `\"enemy\"`.","type":"ForceCondition","optional":false},{"name":"ignore_collision_condition","order":3,"description":"","type":"boolean","optional":false},{"name":"probability","order":8,"description":"","type":"float","optional":false},{"name":"repeat_count","order":7,"description":"","type":"uint","optional":false},{"name":"trigger_target_mask","order":5,"description":"","type":"TriggerTargetMask","optional":false},{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"direct"},{"complex_type":"literal","value":"area"},{"complex_type":"literal","value":"line"},{"complex_type":"literal","value":"cluster"}],"full_format":false},"optional":false}]}},{"name":"TriggerTargetMask","order":143,"description":"A set of trigger target masks.","type":{"complex_type":"dictionary","key":"string","value":{"complex_type":"literal","value":true}}},{"name":"TrivialSmokeID","order":78,"description":"A trivial smoke prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaTrivialSmokePrototype","description":"The trivial smoke prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"UndoRedoAction","order":26,"description":"","type":{"complex_type":"table","parameters":[{"name":"tags","order":1,"description":"The tags attached to the undo action, if any.","type":"Tags","optional":true},{"name":"type","order":0,"description":"The type of action that was undone or redone.","type":"string","optional":false}],"variant_parameter_groups":[{"name":"built-entity","order":0,"description":"","parameters":[{"name":"target","order":0,"description":"The specification of the built entity.","type":"BlueprintEntity","optional":false}]},{"name":"built-tile","order":2,"description":"","parameters":[{"name":"new_tile","order":3,"description":"The prototype name of the newly built tile.","type":"string","optional":false},{"name":"position","order":0,"description":"The position of the newly built tile.","type":"TilePosition","optional":false},{"name":"previous_tile","order":2,"description":"The prototype name of the replaced tile, if any was replaced.","type":"string","optional":true},{"name":"surface_index","order":1,"description":"The surface on which the tile was built.","type":"uint","optional":false}]},{"name":"copy-entity-settings","order":9,"description":"","parameters":[{"name":"entity_with_previous_settings","order":1,"description":"","type":"BlueprintEntity","optional":true},{"name":"target","order":0,"description":"","type":"BlueprintEntity","optional":true}]},{"name":"removed-entity","order":1,"description":"","parameters":[{"name":"insert_plan","order":2,"description":"The items that the entity will request when revived, if there are any. It's a mapping of prototype names to amounts. Not present for entities the game can't restore, like trees or rocks.","type":{"complex_type":"array","value":"BlueprintInsertPlan"},"optional":true},{"name":"schedule","order":3,"description":"The schedule of the entity, if it has one. Only relevant for locomotives. Not present for entities the game can't restore, like trees or rocks.","type":"BlueprintSchedule","optional":true},{"name":"surface_index","order":1,"description":"The surface from which the entity was removed. Not present for entities the game can't restore, like trees or rocks.","type":"uint","optional":true},{"name":"target","order":0,"description":"The specification of the removed entity.","type":"BlueprintEntity","optional":false}]},{"name":"removed-tile","order":3,"description":"","parameters":[{"name":"position","order":0,"description":"The position of the removed tile.","type":"TilePosition","optional":false},{"name":"previous_tile","order":2,"description":"The prototype name of the removed tile.","type":"string","optional":false},{"name":"surface_index","order":1,"description":"The surface from which the tile was removed.","type":"uint","optional":false}]},{"name":"rotated-entity","order":8,"description":"","parameters":[{"name":"original_direction","order":1,"description":"The direction of the entity before upgrading.","type":"defines.direction","optional":false},{"name":"original_mirroring","order":2,"description":"","type":"boolean","optional":false},{"name":"target","order":0,"description":"The specification of the rotated entity.","type":"BlueprintEntity","optional":false}]},{"name":"upgraded-entity","order":4,"description":"","parameters":[{"name":"original_name","order":1,"description":"The prototype name of the upgraded entity.","type":"string","optional":false},{"name":"original_quality_name","order":2,"description":"The quality prototype name of the entity before upgrading.","type":"string","optional":false},{"name":"target","order":0,"description":"The specification of the upgraded entity.","type":"BlueprintEntity","optional":false}]},{"name":"upgraded-modules","order":5,"description":"","parameters":[{"name":"modules_before","order":1,"description":"The modules present in the target before the upgrade.","type":"BlueprintInsertPlan","optional":false},{"name":"target","order":0,"description":"The specification of the upgraded entity.","type":"BlueprintEntity","optional":false}]},{"name":"wire-added","order":6,"description":"","parameters":[{"name":"a","order":0,"description":"","type":"BlueprintWireEnd","optional":false},{"name":"b","order":1,"description":"","type":"BlueprintWireEnd","optional":false}]},{"name":"wire-removed","order":7,"description":"","parameters":[{"name":"a","order":0,"description":"","type":"BlueprintWireEnd","optional":false},{"name":"b","order":1,"description":"","type":"BlueprintWireEnd","optional":false}]}],"variant_parameter_description":"Other attributes may be specified depending on `type`:"}},{"name":"UnitGroupMapSettings","order":123,"description":"","type":{"complex_type":"table","parameters":[{"name":"max_gathering_unit_groups","order":11,"description":"The maximum number of automatically created unit groups gathering for attack at any time. Defaults to `30`.","type":"uint","optional":false},{"name":"max_group_gathering_time","order":1,"description":"The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3 600=36 000` ticks.","type":"uint","optional":false},{"name":"max_group_member_fallback_factor","order":8,"description":"When a member of a group falls back more than this factor times the group radius, the group will slow down to its `max_group_slowdown_factor` speed to let them catch up. Defaults to `3`.","type":"double","optional":false},{"name":"max_group_radius","order":4,"description":"The maximum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `30.0`.","type":"double","optional":false},{"name":"max_group_slowdown_factor","order":7,"description":"The minimum speed as a percentage of its maximum speed that a group will slow down to so members that fell behind can catch up. Defaults to `0.3`, or 30%.","type":"double","optional":false},{"name":"max_member_slowdown_when_ahead","order":6,"description":"The minimum speed a percentage of its regular speed that a group member can slow down to when ahead of the group. Defaults to `0.6`, or 60%.","type":"double","optional":false},{"name":"max_member_speedup_when_behind","order":5,"description":"The maximum speed a percentage of its regular speed that a group member can speed up to when catching up with the group. Defaults to `1.4`, or 140%.","type":"double","optional":false},{"name":"max_unit_group_size","order":12,"description":"The maximum number of members for an attack unit group. This only affects automatically created unit groups, manual groups created through the API are unaffected. Defaults to `200`.","type":"uint","optional":false},{"name":"max_wait_time_for_late_members","order":2,"description":"After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3 600=7 200` ticks.","type":"uint","optional":false},{"name":"member_disown_distance","order":9,"description":"When a member of a group falls back more than this factor times the group radius, it will be dropped from the group. Defaults to `10`.","type":"double","optional":false},{"name":"min_group_gathering_time","order":0,"description":"The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3 600` ticks.","type":"uint","optional":false},{"name":"min_group_radius","order":3,"description":"The minimum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `5.0`.","type":"double","optional":false},{"name":"tick_tolerance_when_member_arrives","order":10,"description":"","type":"uint","optional":false}]}},{"name":"UnitSpawnDefinition","order":225,"description":"","type":{"complex_type":"table","parameters":[{"name":"spawn_points","order":1,"description":"The points at which to spawn the unit.","type":{"complex_type":"array","value":"SpawnPointDefinition"},"optional":false},{"name":"unit","order":0,"description":"Prototype name of the unit that would be spawned.","type":"string","optional":false}]}},{"name":"UpgradeMapperDestination","order":201,"description":"","type":{"complex_type":"table","parameters":[{"name":"count","order":3,"description":"when type is `\"item\"` and the mapper is configured to install modules the limit per machine. If `0` then no limit.","type":"uint","optional":true},{"name":"name","order":1,"description":"Name of the item, or entity.","type":"string","optional":true},{"name":"quality","order":2,"description":"Name of the quality.","type":"string","optional":true},{"name":"type","order":0,"description":"`\"item\"`, or `\"entity\"`.","type":"string","optional":false}]}},{"name":"UpgradeMapperSource","order":200,"description":"","type":{"complex_type":"table","parameters":[{"name":"comparator","order":3,"description":"The quality comparison type.","type":"ComparatorString","optional":true},{"name":"name","order":1,"description":"Name of the item, or entity.","type":"string","optional":true},{"name":"quality","order":2,"description":"Name of the quality prototype.","type":"string","optional":true},{"name":"type","order":0,"description":"","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"item"},{"complex_type":"literal","value":"entity"}],"full_format":false},"optional":false}]}},{"name":"Vector","order":163,"description":"A vector is a two-element array or dictionary containing the `x` and `y` components. The game will always provide the array format. Positive x goes east, positive y goes south.","examples":["```\nright = {1.0, 0.0}\n```"],"type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"float","optional":false},{"name":"y","order":1,"description":"","type":"float","optional":false}]},{"complex_type":"tuple","values":["float","float"]}],"full_format":false}},{"name":"Vector3D","order":60,"description":"Reading this always returns the table with the named keys.\n\nIf this is specified as a three-element array then the array items are x, y and z, in that order.","type":{"complex_type":"union","options":[{"complex_type":"table","parameters":[{"name":"x","order":0,"description":"","type":"float","optional":false},{"name":"y","order":1,"description":"","type":"float","optional":false},{"name":"z","order":2,"description":"","type":"float","optional":false}]},{"complex_type":"tuple","values":["float","float","float"]}],"full_format":false}},{"name":"VehicleAutomaticTargetingParameters","order":261,"description":"","type":{"complex_type":"table","parameters":[{"name":"auto_target_with_gunner","order":1,"description":"","type":"boolean","optional":false},{"name":"auto_target_without_gunner","order":0,"description":"","type":"boolean","optional":false}]}},{"name":"VerticalTextAlign","order":80,"description":"The text is aligned so that the target position is at the given side of the text.\n\nFor example, `\"top\"` aligned text means the top of the text is at the target position. Or in other words, the target is at the top of the text.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"top","description":""},{"complex_type":"literal","value":"middle","description":""},{"complex_type":"literal","value":"baseline","description":""},{"complex_type":"literal","value":"bottom","description":""}],"full_format":true}},{"name":"VirtualSignalID","order":74,"description":"A virtual signal prototype may be specified in one of two ways.","type":{"complex_type":"union","options":[{"complex_type":"type","value":"LuaVirtualSignalPrototype","description":"The virtual signal prototype."},{"complex_type":"type","value":"string","description":"The prototype name."}],"full_format":true}},{"name":"WaitCondition","order":132,"description":"","type":{"complex_type":"table","parameters":[{"name":"compare_type","order":1,"description":"Specifies how this condition is to be compared with the preceding conditions in the corresponding `wait_conditions` array. Always present when reading, defaults to `\"and\"` when writing.","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"and"},{"complex_type":"literal","value":"or"}],"full_format":false},"optional":true},{"name":"condition","order":3,"description":"This is a CircuitCondition and only present when `type` is `\"item_count\"`, `\"circuit\"`, `\"fluid_count\"`, `\"fuel_item_count_all\"`, or `\"fuel_item_count_any\"`, and a circuit condition is configured. This is a ItemIDAndQualityIDPair and only present when `type` is `\"request_satisfied\"` or `\"request_not_satisfied\"`","type":{"complex_type":"union","options":["CircuitCondition","ItemIDAndQualityIDPair"],"full_format":false},"optional":true},{"name":"damage","order":6,"description":"Amount of damage to take when `type` is `\"damage_taken\"`.","type":"uint","optional":true},{"name":"planet","order":4,"description":"Name of the space location. Only present when `type` is \"`any_planet_import_zero`\" and a planet is configured.","type":"string","optional":true},{"name":"station","order":5,"description":"Name of the station. Only present when `type` is \"`specific_destination_full`\", \"`specific_destination_not_full`\", \"`at_station`\", or \"`not_at_station`\", and a station is configured.","type":"string","optional":true},{"name":"ticks","order":2,"description":"Number of ticks to wait when `type` is `\"time\"`, or number of ticks of inactivity when `type` is `\"inactivity\"`.","type":"uint","optional":true},{"name":"type","order":0,"description":"","type":"WaitConditionType","optional":false}]}},{"name":"WaitConditionType","order":133,"description":"Type of a [WaitCondition](runtime:WaitCondition).","type":{"complex_type":"union","options":[{"complex_type":"literal","value":"time","description":""},{"complex_type":"literal","value":"full","description":""},{"complex_type":"literal","value":"empty","description":""},{"complex_type":"literal","value":"not_empty","description":""},{"complex_type":"literal","value":"item_count","description":""},{"complex_type":"literal","value":"circuit","description":""},{"complex_type":"literal","value":"inactivity","description":""},{"complex_type":"literal","value":"robots_inactive","description":""},{"complex_type":"literal","value":"fluid_count","description":""},{"complex_type":"literal","value":"passenger_present","description":""},{"complex_type":"literal","value":"passenger_not_present","description":""},{"complex_type":"literal","value":"fuel_item_count_all","description":""},{"complex_type":"literal","value":"fuel_item_count_any","description":""},{"complex_type":"literal","value":"fuel_full","description":""},{"complex_type":"literal","value":"destination_full_or_no_path","description":""},{"complex_type":"literal","value":"request_satisfied","description":""},{"complex_type":"literal","value":"request_not_satisfied","description":""},{"complex_type":"literal","value":"all_requests_satisfied","description":""},{"complex_type":"literal","value":"any_request_not_satisfied","description":""},{"complex_type":"literal","value":"any_request_zero","description":""},{"complex_type":"literal","value":"any_planet_import_zero","description":""},{"complex_type":"literal","value":"specific_destination_full","description":""},{"complex_type":"literal","value":"specific_destination_not_full","description":""},{"complex_type":"literal","value":"at_station","description":""},{"complex_type":"literal","value":"not_at_station","description":""},{"complex_type":"literal","value":"damage_taken","description":""}],"full_format":true}},{"name":"WireConnection","order":267,"description":"","type":{"complex_type":"table","parameters":[{"name":"origin","order":1,"description":"Defaults to defines.wire_origin.player","type":"defines.wire_origin","optional":true},{"name":"target","order":0,"description":"","type":"LuaWireConnector","optional":false}]}},{"name":"WorkerRobotOrder","order":65,"description":"","type":{"complex_type":"table","parameters":[{"name":"cliff_explosive_id","order":4,"description":"The cliff explosive for the cliff explode job.","type":"LuaItemPrototype","optional":true},{"name":"item_to_place","order":2,"description":"The item to place if relevant.","type":"SimpleItemStack","optional":true},{"name":"secondary_target","order":3,"description":"The secondary target of the upgrade order.","type":"LuaEntity","optional":true},{"name":"target","order":1,"description":"The target of the order.","type":"LuaEntity","optional":true},{"name":"target_count","order":6,"description":"The target count of the pickup or deliver order.","type":"ItemCountType","optional":true},{"name":"target_item","order":5,"description":"The target item of the pickup or deliver order.","type":"ItemIDAndQualityIDPair","optional":true},{"name":"type","order":0,"description":"The type of the order.","type":"defines.robot_order_type","optional":false}]}},{"name":"boolean","order":278,"description":"Either `true` or `false`.","type":{"complex_type":"builtin"}},{"name":"double","order":269,"description":"A double-precision floating-point number. This is the same data type as all Lua numbers use.","type":{"complex_type":"builtin"}},{"name":"float","order":268,"description":"A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision numbers, when a function takes a float, the game engine will immediately convert the double-precision number to single-precision.","type":{"complex_type":"builtin"}},{"name":"int","order":270,"description":"32-bit signed integer. Possible values are `-2 147 483 648` to `2 147 483 647`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `int` will floor the given double.","type":{"complex_type":"builtin"}},{"name":"int8","order":271,"description":"8-bit signed integer. Possible values are `-128` to `127`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `int8` will floor the given double.","type":{"complex_type":"builtin"}},{"name":"nil","order":279,"description":"Nil is the type of the value `nil`, whose main property is to be different from any other value. It usually represents the absence of a useful value.","type":{"complex_type":"builtin"}},{"name":"number","order":276,"description":"Any kind of integer or floating point number.","type":{"complex_type":"builtin"}},{"name":"string","order":277,"description":"Strings are enclosed in double-quotes, like this `\"hi\"`.","type":{"complex_type":"builtin"}},{"name":"table","order":280,"description":"Tables are enclosed in curly brackets, like this `{}`.\n\nThroughout the API docs, the terms \"array\" and \"dictionary\" are used. These are fundamentally just [Lua tables](http://www.lua.org/pil/2.5.html), but have a limitation on which kind of table keys can be used. An array is a table that uses continuous integer keys starting at `1`, while a dictionary can use numeric or string keys in any order or combination.","type":{"complex_type":"builtin"}},{"name":"uint","order":272,"description":"32-bit unsigned integer. Possible values are `0` to `4 294 967 295`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `uint` will floor the given double.","type":{"complex_type":"builtin"}},{"name":"uint16","order":274,"description":"16-bit unsigned integer. Possible values are `0` to `65 535`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `uint16` will floor the given double.","type":{"complex_type":"builtin"}},{"name":"uint64","order":275,"description":"64-bit unsigned integer. Possible values are `0` to `18 446 744 073 709 551 615`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `uint64` will floor the given double.","type":{"complex_type":"builtin"}},{"name":"uint8","order":273,"description":"8-bit unsigned integer. Possible values are `0` to `255`.\n\nSince Lua 5.2 only uses doubles, any API that asks for `uint8` will floor the given double.","type":{"complex_type":"builtin"}}],"defines":[{"name":"alert_type","order":0,"description":"","values":[{"name":"collector_path_blocked","order":0,"description":""},{"name":"custom","order":1,"description":""},{"name":"entity_destroyed","order":2,"description":""},{"name":"entity_under_attack","order":3,"description":""},{"name":"no_material_for_construction","order":4,"description":""},{"name":"no_platform_storage","order":5,"description":""},{"name":"no_roboport_storage","order":6,"description":""},{"name":"no_storage","order":7,"description":""},{"name":"not_enough_construction_robots","order":8,"description":""},{"name":"not_enough_repair_packs","order":9,"description":""},{"name":"pipeline_overextended","order":10,"description":""},{"name":"platform_tile_building_blocked","order":11,"description":""},{"name":"train_no_path","order":12,"description":""},{"name":"train_out_of_fuel","order":13,"description":""},{"name":"turret_fire","order":14,"description":""},{"name":"turret_out_of_ammo","order":15,"description":""},{"name":"unclaimed_cargo","order":16,"description":""}]},{"name":"behavior_result","order":1,"description":"AI command exit status. See [LuaEntity::set_command](runtime:LuaEntity::set_command)","values":[{"name":"deleted","order":3,"description":""},{"name":"fail","order":1,"description":""},{"name":"in_progress","order":0,"description":""},{"name":"success","order":2,"description":""}]},{"name":"build_check_type","order":2,"description":"","values":[{"name":"blueprint_ghost","order":4,"description":""},{"name":"ghost_revive","order":5,"description":""},{"name":"manual","order":1,"description":""},{"name":"manual_ghost","order":2,"description":""},{"name":"script","order":0,"description":""},{"name":"script_ghost","order":3,"description":""}]},{"name":"build_mode","order":3,"description":"","values":[{"name":"forced","order":1,"description":""},{"name":"normal","order":0,"description":""},{"name":"superforced","order":2,"description":""}]},{"name":"chain_signal_state","order":4,"description":"State of a chain signal.","values":[{"name":"all_open","order":1,"description":""},{"name":"none","order":0,"description":""},{"name":"none_open","order":3,"description":""},{"name":"partially_open","order":2,"description":""}]},{"name":"chunk_generated_status","order":5,"description":"","values":[{"name":"basic_tiles","order":2,"description":""},{"name":"corrected_tiles","order":3,"description":""},{"name":"custom_tiles","order":1,"description":""},{"name":"entities","order":5,"description":""},{"name":"nothing","order":0,"description":""},{"name":"tiles","order":4,"description":""}]},{"name":"command","order":6,"description":"Command given to units describing what they should do.","values":[{"name":"attack","order":0,"description":"Attack another entity."},{"name":"attack_area","order":4,"description":"Go to a place and attack what you see."},{"name":"build_base","order":8,"description":"Go to a position and build a base there."},{"name":"compound","order":2,"description":"Chain commands together, see [defines.compound_command](runtime:defines.compound_command)."},{"name":"flee","order":6,"description":"Flee from another entity."},{"name":"go_to_location","order":1,"description":"Go to a specific position."},{"name":"group","order":3,"description":"Do what your group wants you to do."},{"name":"stop","order":7,"description":"Stop moving and stay where you are."},{"name":"wander","order":5,"description":"Chill."}]},{"name":"compound_command","order":7,"description":"How commands are joined together in a compound command (see [defines.command.compound](runtime:defines.command.compound)).","values":[{"name":"logical_and","order":0,"description":"Fail on first failure. Only succeeds if all commands (executed one after another) succeed."},{"name":"logical_or","order":1,"description":"Succeed on first success. Only fails if all commands (executed one after another) fail."},{"name":"return_last","order":2,"description":"Execute all commands in sequence and fail or succeed depending on the return status of the last command."}]},{"name":"control_behavior","order":8,"description":"","subkeys":[{"name":"cargo_landing_pad","order":7,"description":"","subkeys":[{"name":"exclusive_mode","order":0,"description":"","values":[{"name":"none","order":0,"description":""},{"name":"send_contents","order":1,"description":""},{"name":"set_requests","order":2,"description":""}]}]},{"name":"inserter","order":0,"description":"","subkeys":[{"name":"hand_read_mode","order":0,"description":"","values":[{"name":"hold","order":0,"description":""},{"name":"pulse","order":1,"description":""}]}]},{"name":"lamp","order":2,"description":"","subkeys":[{"name":"color_mode","order":0,"description":"","values":[{"name":"color_mapping","order":0,"description":""},{"name":"components","order":1,"description":""},{"name":"packed_rgb","order":2,"description":""}]}]},{"name":"logistic_container","order":1,"description":"","subkeys":[{"name":"exclusive_mode","order":0,"description":"","values":[{"name":"none","order":2,"description":""},{"name":"send_contents","order":0,"description":""},{"name":"set_requests","order":1,"description":""}]}]},{"name":"mining_drill","order":3,"description":"","subkeys":[{"name":"resource_read_mode","order":0,"description":"","values":[{"name":"entire_patch","order":1,"description":""},{"name":"this_miner","order":0,"description":""}]}]},{"name":"roboport","order":6,"description":"","subkeys":[{"name":"read_items_mode","order":0,"description":"","values":[{"name":"logistics","order":1,"description":""},{"name":"missing_requests","order":2,"description":""},{"name":"none","order":0,"description":""}]}]},{"name":"rocket_silo","order":5,"description":"","subkeys":[{"name":"read_mode","order":0,"description":"","values":[{"name":"logistic_inventory","order":1,"description":""},{"name":"none","order":0,"description":""},{"name":"orbital_requests","order":2,"description":""}]}]},{"name":"transport_belt","order":4,"description":"","subkeys":[{"name":"content_read_mode","order":0,"description":"","values":[{"name":"entire_belt_hold","order":2,"description":""},{"name":"hold","order":1,"description":""},{"name":"pulse","order":0,"description":""}]}]},{"name":"type","order":8,"description":"","values":[{"name":"accumulator","order":12,"description":"[LuaAccumulatorControlBehavior](runtime:LuaAccumulatorControlBehavior)"},{"name":"agricultural_tower","order":31,"description":"[LuaAgriculturalTowerControlBehavior](runtime:LuaAgriculturalTowerControlBehavior)"},{"name":"arithmetic_combinator","order":9,"description":"[LuaArithmeticCombinatorControlBehavior](runtime:LuaArithmeticCombinatorControlBehavior)"},{"name":"artillery_turret","order":25,"description":"[LuaArtilleryTurretControlBehavior](runtime:LuaArtilleryTurretControlBehavior)"},{"name":"assembling_machine","order":18,"description":"[LuaAssemblingMachineControlBehavior](runtime:LuaAssemblingMachineControlBehavior)"},{"name":"asteroid_collector","order":26,"description":"[LuaAsteroidCollectorControlBehavior](runtime:LuaAsteroidCollectorControlBehavior)"},{"name":"cargo_landing_pad","order":30,"description":"[LuaCargoLandingPadControlBehavior](runtime:LuaCargoLandingPadControlBehavior)"},{"name":"constant_combinator","order":10,"description":"[LuaConstantCombinatorControlBehavior](runtime:LuaConstantCombinatorControlBehavior)"},{"name":"container","order":0,"description":"[LuaContainerControlBehavior](runtime:LuaContainerControlBehavior)"},{"name":"decider_combinator","order":8,"description":"[LuaDeciderCombinatorControlBehavior](runtime:LuaDeciderCombinatorControlBehavior)"},{"name":"display_panel","order":28,"description":"[LuaDisplayPanelControlBehavior](runtime:LuaDisplayPanelControlBehavior)"},{"name":"generic_on_off","order":1,"description":"[LuaGenericOnOffControlBehavior](runtime:LuaGenericOnOffControlBehavior)"},{"name":"inserter","order":2,"description":"[LuaInserterControlBehavior](runtime:LuaInserterControlBehavior)"},{"name":"lamp","order":3,"description":"[LuaLampControlBehavior](runtime:LuaLampControlBehavior)"},{"name":"loader","order":29,"description":"[LuaLoaderControlBehavior](runtime:LuaLoaderControlBehavior)"},{"name":"logistic_container","order":4,"description":"[LuaLogisticContainerControlBehavior](runtime:LuaLogisticContainerControlBehavior)"},{"name":"mining_drill","order":16,"description":"[LuaMiningDrillControlBehavior](runtime:LuaMiningDrillControlBehavior)"},{"name":"programmable_speaker","order":17,"description":"[LuaProgrammableSpeakerControlBehavior](runtime:LuaProgrammableSpeakerControlBehavior)"},{"name":"pump","order":19,"description":"[LuaPumpControlBehavior](runtime:LuaPumpControlBehavior)"},{"name":"radar","order":27,"description":"[LuaRadarControlBehavior](runtime:LuaRadarControlBehavior)"},{"name":"rail_chain_signal","order":14,"description":"[LuaRailSignalBaseControlBehavior](runtime:LuaRailSignalBaseControlBehavior)"},{"name":"rail_signal","order":13,"description":"[LuaRailSignalBaseControlBehavior](runtime:LuaRailSignalBaseControlBehavior)"},{"name":"reactor","order":23,"description":"[LuaReactorControlBehavior](runtime:LuaReactorControlBehavior)"},{"name":"roboport","order":5,"description":"[LuaRoboportControlBehavior](runtime:LuaRoboportControlBehavior)"},{"name":"rocket_silo","order":21,"description":"[LuaRocketSiloControlBehavior](runtime:LuaRocketSiloControlBehavior)"},{"name":"selector_combinator","order":20,"description":"[LuaSelectorCombinatorControlBehavior](runtime:LuaSelectorCombinatorControlBehavior)"},{"name":"space_platform_hub","order":24,"description":"[LuaSpacePlatformHubControlBehavior](runtime:LuaSpacePlatformHubControlBehavior)"},{"name":"storage_tank","order":6,"description":"[LuaStorageTankControlBehavior](runtime:LuaStorageTankControlBehavior)"},{"name":"train_stop","order":7,"description":"[LuaTrainStopControlBehavior](runtime:LuaTrainStopControlBehavior)"},{"name":"transport_belt","order":11,"description":"[LuaTransportBeltControlBehavior](runtime:LuaTransportBeltControlBehavior)"},{"name":"turret","order":22,"description":"[LuaTurretControlBehavior](runtime:LuaTurretControlBehavior)"},{"name":"wall","order":15,"description":"[LuaWallControlBehavior](runtime:LuaWallControlBehavior)"}]}]},{"name":"controllers","order":9,"description":"","values":[{"name":"character","order":1,"description":"The controller controls a character. This is the default controller in freeplay."},{"name":"cutscene","order":4,"description":"The player can't interact with the world, and the camera pans around in a predefined manner."},{"name":"editor","order":3,"description":"The Editor Controller near ultimate power to do almost anything in the game."},{"name":"ghost","order":0,"description":"Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen."},{"name":"god","order":2,"description":"The controller isn't tied to a character. This is the default controller in sandbox."},{"name":"remote","order":6,"description":"Can't move/change items but can build ghosts/change settings."},{"name":"spectator","order":5,"description":"Can't change anything in the world but can view anything."}]},{"name":"deconstruction_item","order":10,"description":"","subkeys":[{"name":"entity_filter_mode","order":0,"description":"","values":[{"name":"blacklist","order":1,"description":""},{"name":"whitelist","order":0,"description":""}]},{"name":"tile_filter_mode","order":1,"description":"","values":[{"name":"blacklist","order":1,"description":""},{"name":"whitelist","order":0,"description":""}]},{"name":"tile_selection_mode","order":2,"description":"","values":[{"name":"always","order":1,"description":""},{"name":"never","order":2,"description":""},{"name":"normal","order":0,"description":""},{"name":"only","order":3,"description":""}]}]},{"name":"default_icon_size","order":11,"description":""},{"name":"difficulty","order":12,"description":"","values":[{"name":"easy","order":0,"description":""},{"name":"hard","order":2,"description":""},{"name":"normal","order":1,"description":""}]},{"name":"direction","order":13,"description":"","values":[{"name":"east","order":4,"description":""},{"name":"eastnortheast","order":3,"description":""},{"name":"eastsoutheast","order":5,"description":""},{"name":"north","order":0,"description":""},{"name":"northeast","order":2,"description":""},{"name":"northnortheast","order":1,"description":""},{"name":"northnorthwest","order":15,"description":""},{"name":"northwest","order":14,"description":""},{"name":"south","order":8,"description":""},{"name":"southeast","order":6,"description":""},{"name":"southsoutheast","order":7,"description":""},{"name":"southsouthwest","order":9,"description":""},{"name":"southwest","order":10,"description":""},{"name":"west","order":12,"description":""},{"name":"westnorthwest","order":13,"description":""},{"name":"westsouthwest","order":11,"description":""}]},{"name":"disconnect_reason","order":14,"description":"","values":[{"name":"afk","order":6,"description":""},{"name":"banned","order":9,"description":""},{"name":"cannot_keep_up","order":5,"description":""},{"name":"desync_limit_reached","order":4,"description":""},{"name":"dropped","order":1,"description":""},{"name":"kicked","order":7,"description":""},{"name":"kicked_and_deleted","order":8,"description":""},{"name":"quit","order":0,"description":""},{"name":"reconnect","order":2,"description":""},{"name":"switching_servers","order":10,"description":""},{"name":"wrong_input","order":3,"description":""}]},{"name":"distraction","order":15,"description":"","values":[{"name":"by_anything","order":2,"description":"Attack closer enemy entities, including entities \"built\" by player (belts, inserters, chests)."},{"name":"by_damage","order":3,"description":"Attack when attacked."},{"name":"by_enemy","order":1,"description":"Attack closer enemy entities with force."},{"name":"none","order":0,"description":"Perform command even if someone attacks the unit."}]},{"name":"entity_status","order":16,"description":"","values":[{"name":"broken","order":3,"description":"Only used if set through [LuaEntity::status](runtime:LuaEntity::status) or [ContainerPrototype::default_status](prototype:ContainerPrototype::default_status)."},{"name":"cant_divide_segments","order":59,"description":"Used by rail signals."},{"name":"charging","order":17,"description":"Used by accumulators."},{"name":"closed_by_circuit_network","order":10,"description":""},{"name":"computing_navigation","order":63,"description":"Used by asteroid collectors."},{"name":"destination_stop_full","order":48,"description":"Used by trains."},{"name":"disabled","order":56,"description":"Used by constant combinators: Combinator is turned off via switch in GUI."},{"name":"disabled_by_control_behavior","order":8,"description":""},{"name":"disabled_by_script","order":11,"description":""},{"name":"discharging","order":18,"description":"Used by accumulators."},{"name":"fluid_ingredient_shortage","order":28,"description":"Used by crafting machines."},{"name":"frozen","order":7,"description":""},{"name":"full_burnt_result_output","order":31,"description":"Used by burner energy sources."},{"name":"full_output","order":29,"description":"Used by crafting machines, boilers, burner energy sources and reactors: Reactor/burner has full burnt result inventory, boiler has full output fluidbox."},{"name":"fully_charged","order":19,"description":"Used by accumulators."},{"name":"ghost","order":2,"description":"Used by ghosts."},{"name":"item_ingredient_shortage","order":32,"description":"Used by crafting machines."},{"name":"launching_rocket","order":41,"description":"Used by the rocket silo."},{"name":"low_input_fluid","order":27,"description":"Used by boilers and fluid turrets: Boiler still has some fluid but is about to run out."},{"name":"low_power","order":5,"description":""},{"name":"low_temperature","order":55,"description":"Used by heat energy sources."},{"name":"marked_for_deconstruction","order":12,"description":""},{"name":"missing_required_fluid","order":33,"description":"Used by mining drills when the mining fluid is missing."},{"name":"missing_science_packs","order":34,"description":"Used by labs."},{"name":"networks_connected","order":15,"description":"Used by power switches."},{"name":"networks_disconnected","order":16,"description":"Used by power switches."},{"name":"no_ammo","order":54,"description":"Used by ammo turrets."},{"name":"no_filter","order":60,"description":"Used by filter inserters."},{"name":"no_fuel","order":6,"description":""},{"name":"no_ingredients","order":22,"description":"Used by furnaces."},{"name":"no_input_fluid","order":23,"description":"Used by boilers, fluid turrets and fluid energy sources: Boiler has no fluid to work with."},{"name":"no_minable_resources","order":25,"description":"Used by mining drills."},{"name":"no_modules_to_transmit","order":50,"description":"Used by beacons."},{"name":"no_path","order":49,"description":"Used by trains and space platform hubs."},{"name":"no_power","order":4,"description":""},{"name":"no_recipe","order":21,"description":"Used by assembling machines."},{"name":"no_research_in_progress","order":24,"description":"Used by labs."},{"name":"no_spot_seedable_by_inputs","order":61,"description":"Used by agricultural towers."},{"name":"normal","order":1,"description":""},{"name":"not_connected_to_hub_or_pad","order":26,"description":"Used by cargo bays."},{"name":"not_connected_to_rail","order":58,"description":"Used by rail signals."},{"name":"not_enough_space_in_output","order":30,"description":"Used by agricultural towers."},{"name":"not_enough_thrust","order":47,"description":"Used by space platform hubs."},{"name":"not_plugged_in_electric_network","order":14,"description":"Used by generators and solar panels."},{"name":"on_the_way","order":43,"description":"Used by space platform hubs."},{"name":"opened_by_circuit_network","order":9,"description":""},{"name":"out_of_logistic_network","order":20,"description":"Used by logistic containers."},{"name":"paused","order":13,"description":"Used by space platform hubs."},{"name":"pipeline_overextended","order":64,"description":"Used by pipes, pipes to ground and storage tanks."},{"name":"preparing_rocket_for_launch","order":38,"description":"Used by the rocket silo."},{"name":"recharging_after_power_outage","order":51,"description":"Used by roboports."},{"name":"thrust_not_required","order":42,"description":"Used by thrusters."},{"name":"turned_off_during_daytime","order":57,"description":"Used by lamps."},{"name":"waiting_at_stop","order":45,"description":"Used by trains."},{"name":"waiting_for_more_items","order":36,"description":"Used by inserters when wait_for_full_hand is set."},{"name":"waiting_for_plants_to_grow","order":62,"description":"Used by agricultural towers."},{"name":"waiting_for_rockets_to_arrive","order":46,"description":"Used by space platform hubs."},{"name":"waiting_for_source_items","order":35,"description":"Used by inserters."},{"name":"waiting_for_space_in_destination","order":37,"description":"Used by inserters and mining drills."},{"name":"waiting_for_space_in_platform_hub","order":40,"description":"Used by the rocket silo."},{"name":"waiting_for_target_to_be_built","order":52,"description":"Used by inserters targeting entity ghosts."},{"name":"waiting_for_train","order":53,"description":"Used by inserters targeting rails."},{"name":"waiting_in_orbit","order":44,"description":"Used by space platform hubs."},{"name":"waiting_to_launch_rocket","order":39,"description":"Used by the rocket silo."},{"name":"working","order":0,"description":""}]},{"name":"entity_status_diode","order":17,"description":"","values":[{"name":"green","order":0,"description":""},{"name":"red","order":1,"description":""},{"name":"yellow","order":2,"description":""}]},{"name":"events","order":18,"description":"See the [events page](runtime:events) for more info on what events contain and when they get raised.","values":[{"name":"on_achievement_gained","order":0,"description":""},{"name":"on_ai_command_completed","order":1,"description":""},{"name":"on_area_cloned","order":2,"description":""},{"name":"on_biter_base_built","order":3,"description":""},{"name":"on_brush_cloned","order":4,"description":""},{"name":"on_build_base_arrived","order":5,"description":""},{"name":"on_built_entity","order":6,"description":""},{"name":"on_cancelled_deconstruction","order":7,"description":""},{"name":"on_cancelled_upgrade","order":8,"description":""},{"name":"on_character_corpse_expired","order":9,"description":""},{"name":"on_chart_tag_added","order":10,"description":""},{"name":"on_chart_tag_modified","order":11,"description":""},{"name":"on_chart_tag_removed","order":12,"description":""},{"name":"on_chunk_charted","order":13,"description":""},{"name":"on_chunk_deleted","order":14,"description":""},{"name":"on_chunk_generated","order":15,"description":""},{"name":"on_combat_robot_expired","order":16,"description":""},{"name":"on_console_chat","order":17,"description":""},{"name":"on_console_command","order":18,"description":""},{"name":"on_cutscene_cancelled","order":19,"description":""},{"name":"on_cutscene_finished","order":20,"description":""},{"name":"on_cutscene_started","order":21,"description":""},{"name":"on_cutscene_waypoint_reached","order":22,"description":""},{"name":"on_entity_cloned","order":23,"description":""},{"name":"on_entity_color_changed","order":24,"description":""},{"name":"on_entity_damaged","order":25,"description":""},{"name":"on_entity_died","order":26,"description":""},{"name":"on_entity_logistic_slot_changed","order":27,"description":""},{"name":"on_entity_renamed","order":28,"description":""},{"name":"on_entity_settings_pasted","order":29,"description":""},{"name":"on_entity_spawned","order":30,"description":""},{"name":"on_equipment_inserted","order":31,"description":""},{"name":"on_equipment_removed","order":32,"description":""},{"name":"on_force_cease_fire_changed","order":33,"description":""},{"name":"on_force_created","order":34,"description":""},{"name":"on_force_friends_changed","order":35,"description":""},{"name":"on_force_reset","order":36,"description":""},{"name":"on_forces_merged","order":37,"description":""},{"name":"on_forces_merging","order":38,"description":""},{"name":"on_game_created_from_scenario","order":39,"description":""},{"name":"on_gui_checked_state_changed","order":40,"description":""},{"name":"on_gui_click","order":41,"description":""},{"name":"on_gui_closed","order":42,"description":""},{"name":"on_gui_confirmed","order":43,"description":""},{"name":"on_gui_elem_changed","order":44,"description":""},{"name":"on_gui_hover","order":45,"description":""},{"name":"on_gui_leave","order":46,"description":""},{"name":"on_gui_location_changed","order":47,"description":""},{"name":"on_gui_opened","order":48,"description":""},{"name":"on_gui_selected_tab_changed","order":49,"description":""},{"name":"on_gui_selection_state_changed","order":50,"description":""},{"name":"on_gui_switch_state_changed","order":51,"description":""},{"name":"on_gui_text_changed","order":52,"description":""},{"name":"on_gui_value_changed","order":53,"description":""},{"name":"on_land_mine_armed","order":54,"description":""},{"name":"on_lua_shortcut","order":55,"description":""},{"name":"on_marked_for_deconstruction","order":56,"description":""},{"name":"on_marked_for_upgrade","order":57,"description":""},{"name":"on_market_item_purchased","order":58,"description":""},{"name":"on_mod_item_opened","order":59,"description":""},{"name":"on_object_destroyed","order":60,"description":""},{"name":"on_permission_group_added","order":61,"description":""},{"name":"on_permission_group_deleted","order":62,"description":""},{"name":"on_permission_group_edited","order":63,"description":""},{"name":"on_permission_string_imported","order":64,"description":""},{"name":"on_picked_up_item","order":65,"description":""},{"name":"on_player_alt_reverse_selected_area","order":66,"description":""},{"name":"on_player_alt_selected_area","order":67,"description":""},{"name":"on_player_ammo_inventory_changed","order":68,"description":""},{"name":"on_player_armor_inventory_changed","order":69,"description":""},{"name":"on_player_banned","order":70,"description":""},{"name":"on_player_built_tile","order":71,"description":""},{"name":"on_player_cancelled_crafting","order":72,"description":""},{"name":"on_player_changed_force","order":73,"description":""},{"name":"on_player_changed_position","order":74,"description":""},{"name":"on_player_changed_surface","order":75,"description":""},{"name":"on_player_cheat_mode_disabled","order":76,"description":""},{"name":"on_player_cheat_mode_enabled","order":77,"description":""},{"name":"on_player_clicked_gps_tag","order":78,"description":""},{"name":"on_player_configured_blueprint","order":79,"description":""},{"name":"on_player_controller_changed","order":80,"description":""},{"name":"on_player_crafted_item","order":81,"description":""},{"name":"on_player_created","order":82,"description":""},{"name":"on_player_cursor_stack_changed","order":83,"description":""},{"name":"on_player_deconstructed_area","order":84,"description":""},{"name":"on_player_demoted","order":85,"description":""},{"name":"on_player_died","order":86,"description":""},{"name":"on_player_display_density_scale_changed","order":87,"description":""},{"name":"on_player_display_resolution_changed","order":88,"description":""},{"name":"on_player_display_scale_changed","order":89,"description":""},{"name":"on_player_driving_changed_state","order":90,"description":""},{"name":"on_player_dropped_item","order":91,"description":""},{"name":"on_player_fast_transferred","order":92,"description":""},{"name":"on_player_flipped_entity","order":93,"description":""},{"name":"on_player_flushed_fluid","order":94,"description":""},{"name":"on_player_gun_inventory_changed","order":95,"description":""},{"name":"on_player_input_method_changed","order":96,"description":""},{"name":"on_player_joined_game","order":97,"description":""},{"name":"on_player_kicked","order":98,"description":""},{"name":"on_player_left_game","order":99,"description":""},{"name":"on_player_locale_changed","order":100,"description":""},{"name":"on_player_main_inventory_changed","order":101,"description":""},{"name":"on_player_mined_entity","order":102,"description":""},{"name":"on_player_mined_item","order":103,"description":""},{"name":"on_player_mined_tile","order":104,"description":""},{"name":"on_player_muted","order":105,"description":""},{"name":"on_player_pipette","order":106,"description":""},{"name":"on_player_placed_equipment","order":107,"description":""},{"name":"on_player_promoted","order":108,"description":""},{"name":"on_player_removed","order":109,"description":""},{"name":"on_player_removed_equipment","order":110,"description":""},{"name":"on_player_repaired_entity","order":111,"description":""},{"name":"on_player_respawned","order":112,"description":""},{"name":"on_player_reverse_selected_area","order":113,"description":""},{"name":"on_player_rotated_entity","order":114,"description":""},{"name":"on_player_selected_area","order":115,"description":""},{"name":"on_player_set_quick_bar_slot","order":116,"description":""},{"name":"on_player_setup_blueprint","order":117,"description":""},{"name":"on_player_toggled_alt_mode","order":118,"description":""},{"name":"on_player_toggled_map_editor","order":119,"description":""},{"name":"on_player_trash_inventory_changed","order":120,"description":""},{"name":"on_player_unbanned","order":121,"description":""},{"name":"on_player_unmuted","order":122,"description":""},{"name":"on_player_used_capsule","order":123,"description":""},{"name":"on_player_used_spidertron_remote","order":124,"description":""},{"name":"on_post_entity_died","order":125,"description":""},{"name":"on_pre_build","order":126,"description":""},{"name":"on_pre_chunk_deleted","order":127,"description":""},{"name":"on_pre_entity_settings_pasted","order":128,"description":""},{"name":"on_pre_ghost_deconstructed","order":129,"description":""},{"name":"on_pre_ghost_upgraded","order":130,"description":""},{"name":"on_pre_permission_group_deleted","order":131,"description":""},{"name":"on_pre_permission_string_imported","order":132,"description":""},{"name":"on_pre_player_crafted_item","order":133,"description":""},{"name":"on_pre_player_died","order":134,"description":""},{"name":"on_pre_player_left_game","order":135,"description":""},{"name":"on_pre_player_mined_item","order":136,"description":""},{"name":"on_pre_player_removed","order":137,"description":""},{"name":"on_pre_player_toggled_map_editor","order":138,"description":""},{"name":"on_pre_robot_exploded_cliff","order":139,"description":""},{"name":"on_pre_scenario_finished","order":140,"description":""},{"name":"on_pre_script_inventory_resized","order":141,"description":""},{"name":"on_pre_surface_cleared","order":142,"description":""},{"name":"on_pre_surface_deleted","order":143,"description":""},{"name":"on_redo_applied","order":144,"description":""},{"name":"on_research_cancelled","order":145,"description":""},{"name":"on_research_finished","order":146,"description":""},{"name":"on_research_moved","order":147,"description":""},{"name":"on_research_reversed","order":148,"description":""},{"name":"on_research_started","order":149,"description":""},{"name":"on_resource_depleted","order":150,"description":""},{"name":"on_robot_built_entity","order":151,"description":""},{"name":"on_robot_built_tile","order":152,"description":""},{"name":"on_robot_exploded_cliff","order":153,"description":""},{"name":"on_robot_mined","order":154,"description":""},{"name":"on_robot_mined_entity","order":155,"description":""},{"name":"on_robot_mined_tile","order":156,"description":""},{"name":"on_robot_pre_mined","order":157,"description":""},{"name":"on_rocket_launch_ordered","order":158,"description":""},{"name":"on_rocket_launched","order":159,"description":""},{"name":"on_runtime_mod_setting_changed","order":160,"description":""},{"name":"on_script_inventory_resized","order":161,"description":""},{"name":"on_script_path_request_finished","order":162,"description":""},{"name":"on_script_trigger_effect","order":163,"description":""},{"name":"on_sector_scanned","order":164,"description":""},{"name":"on_segment_entity_created","order":165,"description":""},{"name":"on_selected_entity_changed","order":166,"description":""},{"name":"on_space_platform_built_entity","order":167,"description":""},{"name":"on_space_platform_built_tile","order":168,"description":""},{"name":"on_space_platform_changed_state","order":169,"description":""},{"name":"on_space_platform_mined_entity","order":170,"description":""},{"name":"on_space_platform_mined_item","order":171,"description":""},{"name":"on_space_platform_mined_tile","order":172,"description":""},{"name":"on_space_platform_pre_mined","order":173,"description":""},{"name":"on_spider_command_completed","order":174,"description":""},{"name":"on_string_translated","order":175,"description":""},{"name":"on_surface_cleared","order":176,"description":""},{"name":"on_surface_created","order":177,"description":""},{"name":"on_surface_deleted","order":178,"description":""},{"name":"on_surface_imported","order":179,"description":""},{"name":"on_surface_renamed","order":180,"description":""},{"name":"on_technology_effects_reset","order":181,"description":""},{"name":"on_tick","order":182,"description":""},{"name":"on_train_changed_state","order":183,"description":""},{"name":"on_train_created","order":184,"description":""},{"name":"on_train_schedule_changed","order":185,"description":""},{"name":"on_trigger_created_entity","order":186,"description":""},{"name":"on_trigger_fired_artillery","order":187,"description":""},{"name":"on_undo_applied","order":188,"description":""},{"name":"on_unit_added_to_group","order":189,"description":""},{"name":"on_unit_group_created","order":190,"description":""},{"name":"on_unit_group_finished_gathering","order":191,"description":""},{"name":"on_unit_removed_from_group","order":192,"description":""},{"name":"on_worker_robot_expired","order":193,"description":""},{"name":"script_raised_built","order":194,"description":""},{"name":"script_raised_destroy","order":195,"description":""},{"name":"script_raised_revive","order":196,"description":""},{"name":"script_raised_set_tiles","order":197,"description":""},{"name":"script_raised_teleported","order":198,"description":""}]},{"name":"flow_precision_index","order":19,"description":"","values":[{"name":"fifty_hours","order":5,"description":""},{"name":"five_seconds","order":0,"description":""},{"name":"one_hour","order":3,"description":""},{"name":"one_minute","order":1,"description":""},{"name":"one_thousand_hours","order":7,"description":""},{"name":"ten_hours","order":4,"description":""},{"name":"ten_minutes","order":2,"description":""},{"name":"two_hundred_fifty_hours","order":6,"description":""}]},{"name":"game_controller_interaction","order":20,"description":"","values":[{"name":"always","order":0,"description":"Game controller will always hover this element regardless of type or state."},{"name":"never","order":1,"description":"Never hover this element with a game controller."},{"name":"normal","order":2,"description":"Hover according to the element type and implementation."}]},{"name":"group_state","order":21,"description":"","values":[{"name":"attacking_distraction","order":2,"description":""},{"name":"attacking_target","order":3,"description":""},{"name":"finished","order":4,"description":""},{"name":"gathering","order":0,"description":""},{"name":"moving","order":1,"description":""},{"name":"pathfinding","order":5,"description":""},{"name":"wander_in_group","order":6,"description":""}]},{"name":"gui_type","order":22,"description":"","values":[{"name":"achievement","order":0,"description":""},{"name":"blueprint_library","order":1,"description":""},{"name":"bonus","order":2,"description":""},{"name":"controller","order":3,"description":""},{"name":"custom","order":4,"description":""},{"name":"entity","order":5,"description":""},{"name":"equipment","order":6,"description":""},{"name":"global_electric_network","order":7,"description":""},{"name":"item","order":8,"description":""},{"name":"logistic","order":9,"description":""},{"name":"none","order":10,"description":""},{"name":"opened_entity_grid","order":11,"description":""},{"name":"other_player","order":12,"description":""},{"name":"permissions","order":13,"description":""},{"name":"player_management","order":14,"description":""},{"name":"production","order":15,"description":""},{"name":"script_inventory","order":16,"description":""},{"name":"server_management","order":17,"description":""},{"name":"tile","order":18,"description":""},{"name":"trains","order":19,"description":""}]},{"name":"input_action","order":23,"description":"","values":[{"name":"activate_interrupt","order":0,"description":""},{"name":"activate_paste","order":1,"description":""},{"name":"add_decider_combinator_condition","order":2,"description":""},{"name":"add_decider_combinator_output","order":3,"description":""},{"name":"add_logistic_section","order":4,"description":""},{"name":"add_permission_group","order":5,"description":""},{"name":"add_pin","order":6,"description":""},{"name":"add_train_interrupt","order":7,"description":""},{"name":"add_train_station","order":8,"description":""},{"name":"adjust_blueprint_snapping","order":9,"description":""},{"name":"admin_action","order":10,"description":""},{"name":"alt_reverse_select_area","order":11,"description":""},{"name":"alt_select_area","order":12,"description":""},{"name":"alt_select_blueprint_entities","order":13,"description":""},{"name":"alternative_copy","order":14,"description":""},{"name":"begin_mining","order":15,"description":""},{"name":"begin_mining_terrain","order":16,"description":""},{"name":"build","order":17,"description":""},{"name":"build_rail","order":18,"description":""},{"name":"build_terrain","order":19,"description":""},{"name":"cancel_craft","order":20,"description":""},{"name":"cancel_deconstruct","order":21,"description":""},{"name":"cancel_delete_space_platform","order":22,"description":""},{"name":"cancel_new_blueprint","order":23,"description":""},{"name":"cancel_research","order":24,"description":""},{"name":"cancel_upgrade","order":25,"description":""},{"name":"change_active_character_tab","order":26,"description":""},{"name":"change_active_item_group_for_crafting","order":27,"description":""},{"name":"change_active_item_group_for_filters","order":28,"description":""},{"name":"change_active_quick_bar","order":29,"description":""},{"name":"change_arithmetic_combinator_parameters","order":30,"description":""},{"name":"change_entity_label","order":31,"description":""},{"name":"change_item_label","order":32,"description":""},{"name":"change_logistic_point_group","order":33,"description":""},{"name":"change_multiplayer_config","order":34,"description":""},{"name":"change_picking_state","order":35,"description":""},{"name":"change_programmable_speaker_alert_parameters","order":36,"description":""},{"name":"change_programmable_speaker_circuit_parameters","order":37,"description":""},{"name":"change_programmable_speaker_parameters","order":38,"description":""},{"name":"change_riding_state","order":39,"description":""},{"name":"change_selector_combinator_parameters","order":40,"description":""},{"name":"change_shooting_state","order":41,"description":""},{"name":"change_train_name","order":42,"description":""},{"name":"change_train_stop_station","order":43,"description":""},{"name":"change_train_wait_condition","order":44,"description":""},{"name":"change_train_wait_condition_data","order":45,"description":""},{"name":"clear_cursor","order":46,"description":""},{"name":"connect_rolling_stock","order":47,"description":""},{"name":"copy","order":48,"description":""},{"name":"copy_entity_settings","order":49,"description":""},{"name":"copy_large_opened_blueprint","order":50,"description":""},{"name":"copy_large_opened_item","order":51,"description":""},{"name":"copy_opened_blueprint","order":52,"description":""},{"name":"copy_opened_item","order":53,"description":""},{"name":"craft","order":54,"description":""},{"name":"create_space_platform","order":55,"description":""},{"name":"cursor_split","order":56,"description":""},{"name":"cursor_transfer","order":57,"description":""},{"name":"custom_input","order":58,"description":""},{"name":"cycle_blueprint_book_backwards","order":59,"description":""},{"name":"cycle_blueprint_book_forwards","order":60,"description":""},{"name":"cycle_quality_down","order":61,"description":""},{"name":"cycle_quality_up","order":62,"description":""},{"name":"deconstruct","order":63,"description":""},{"name":"delete_blueprint_library","order":64,"description":""},{"name":"delete_blueprint_record","order":65,"description":""},{"name":"delete_custom_tag","order":66,"description":""},{"name":"delete_logistic_group","order":67,"description":""},{"name":"delete_permission_group","order":68,"description":""},{"name":"delete_space_platform","order":69,"description":""},{"name":"destroy_item","order":70,"description":""},{"name":"destroy_opened_item","order":71,"description":""},{"name":"disconnect_rolling_stock","order":72,"description":""},{"name":"drag_decider_combinator_condition","order":73,"description":""},{"name":"drag_decider_combinator_output","order":74,"description":""},{"name":"drag_train_schedule","order":75,"description":""},{"name":"drag_train_schedule_interrupt","order":76,"description":""},{"name":"drag_train_wait_condition","order":77,"description":""},{"name":"drop_blueprint_record","order":78,"description":""},{"name":"drop_item","order":79,"description":""},{"name":"edit_blueprint_tool_preview","order":80,"description":""},{"name":"edit_custom_tag","order":81,"description":""},{"name":"edit_display_panel","order":82,"description":""},{"name":"edit_display_panel_always_show","order":83,"description":""},{"name":"edit_display_panel_icon","order":84,"description":""},{"name":"edit_display_panel_parameters","order":85,"description":""},{"name":"edit_display_panel_show_in_chart","order":86,"description":""},{"name":"edit_interrupt","order":87,"description":""},{"name":"edit_permission_group","order":88,"description":""},{"name":"edit_pin","order":89,"description":""},{"name":"enable_transitional_requests","order":90,"description":""},{"name":"export_blueprint","order":91,"description":""},{"name":"fast_entity_split","order":92,"description":""},{"name":"fast_entity_transfer","order":93,"description":""},{"name":"flip_entity","order":94,"description":""},{"name":"flush_opened_entity_fluid","order":95,"description":""},{"name":"flush_opened_entity_specific_fluid","order":96,"description":""},{"name":"go_to_train_station","order":97,"description":""},{"name":"grab_blueprint_record","order":98,"description":""},{"name":"gui_checked_state_changed","order":99,"description":""},{"name":"gui_click","order":100,"description":""},{"name":"gui_confirmed","order":101,"description":""},{"name":"gui_elem_changed","order":102,"description":""},{"name":"gui_hover","order":103,"description":""},{"name":"gui_leave","order":104,"description":""},{"name":"gui_location_changed","order":105,"description":""},{"name":"gui_selected_tab_changed","order":106,"description":""},{"name":"gui_selection_state_changed","order":107,"description":""},{"name":"gui_switch_state_changed","order":108,"description":""},{"name":"gui_text_changed","order":109,"description":""},{"name":"gui_value_changed","order":110,"description":""},{"name":"import_blueprint","order":111,"description":""},{"name":"import_blueprint_string","order":112,"description":""},{"name":"import_blueprints_filtered","order":113,"description":""},{"name":"import_permissions_string","order":114,"description":""},{"name":"instantly_create_space_platform","order":115,"description":""},{"name":"inventory_split","order":116,"description":""},{"name":"inventory_transfer","order":117,"description":""},{"name":"land_at_planet","order":118,"description":""},{"name":"launch_rocket","order":119,"description":""},{"name":"lua_shortcut","order":120,"description":""},{"name":"map_editor_action","order":121,"description":""},{"name":"market_offer","order":122,"description":""},{"name":"mod_settings_changed","order":123,"description":""},{"name":"modify_decider_combinator_condition","order":124,"description":""},{"name":"modify_decider_combinator_output","order":125,"description":""},{"name":"move_research","order":126,"description":""},{"name":"open_achievements_gui","order":127,"description":""},{"name":"open_blueprint_library_gui","order":128,"description":""},{"name":"open_blueprint_record","order":129,"description":""},{"name":"open_bonus_gui","order":130,"description":""},{"name":"open_character_gui","order":131,"description":""},{"name":"open_current_vehicle_gui","order":132,"description":""},{"name":"open_equipment","order":133,"description":""},{"name":"open_global_electric_network_gui","order":134,"description":""},{"name":"open_gui","order":135,"description":""},{"name":"open_item","order":136,"description":""},{"name":"open_logistics_gui","order":137,"description":""},{"name":"open_mod_item","order":138,"description":""},{"name":"open_new_platform_button_from_rocket_silo","order":139,"description":""},{"name":"open_opened_entity_grid","order":140,"description":""},{"name":"open_parent_of_opened_item","order":141,"description":""},{"name":"open_production_gui","order":142,"description":""},{"name":"open_train_gui","order":143,"description":""},{"name":"open_train_station_gui","order":144,"description":""},{"name":"open_trains_gui","order":145,"description":""},{"name":"parametrise_blueprint","order":146,"description":""},{"name":"paste_entity_settings","order":147,"description":""},{"name":"pin_alert_group","order":148,"description":""},{"name":"pin_custom_alert","order":149,"description":""},{"name":"pin_search_result","order":150,"description":""},{"name":"pipette","order":151,"description":""},{"name":"place_equipment","order":152,"description":""},{"name":"quick_bar_pick_slot","order":153,"description":""},{"name":"quick_bar_set_selected_page","order":154,"description":""},{"name":"quick_bar_set_slot","order":155,"description":""},{"name":"reassign_blueprint","order":156,"description":""},{"name":"redo","order":157,"description":""},{"name":"remote_view_entity","order":158,"description":""},{"name":"remote_view_surface","order":159,"description":""},{"name":"remove_cables","order":160,"description":""},{"name":"remove_decider_combinator_condition","order":161,"description":""},{"name":"remove_decider_combinator_output","order":162,"description":""},{"name":"remove_logistic_section","order":163,"description":""},{"name":"remove_pin","order":164,"description":""},{"name":"remove_train_interrupt","order":165,"description":""},{"name":"remove_train_station","order":166,"description":""},{"name":"rename_interrupt","order":167,"description":""},{"name":"rename_space_platform","order":168,"description":""},{"name":"reorder_logistic_section","order":169,"description":""},{"name":"request_missing_construction_materials","order":170,"description":""},{"name":"reset_assembling_machine","order":171,"description":""},{"name":"reverse_select_area","order":172,"description":""},{"name":"rotate_entity","order":173,"description":""},{"name":"select_area","order":174,"description":""},{"name":"select_asteroid_chunk_slot","order":175,"description":""},{"name":"select_blueprint_entities","order":176,"description":""},{"name":"select_entity_filter_slot","order":177,"description":""},{"name":"select_entity_slot","order":178,"description":""},{"name":"select_item_filter","order":179,"description":""},{"name":"select_mapper_slot_from","order":180,"description":""},{"name":"select_mapper_slot_to","order":181,"description":""},{"name":"select_next_valid_gun","order":182,"description":""},{"name":"select_tile_slot","order":183,"description":""},{"name":"send_spidertron","order":184,"description":""},{"name":"send_stack_to_trash","order":185,"description":""},{"name":"send_stacks_to_trash","order":186,"description":""},{"name":"send_train_to_pin_target","order":187,"description":""},{"name":"set_behavior_mode","order":188,"description":""},{"name":"set_car_weapons_control","order":189,"description":""},{"name":"set_cheat_mode_quality","order":190,"description":""},{"name":"set_circuit_condition","order":191,"description":""},{"name":"set_circuit_mode_of_operation","order":192,"description":""},{"name":"set_combinator_description","order":193,"description":""},{"name":"set_copy_color_from_train_stop","order":194,"description":""},{"name":"set_deconstruction_item_tile_selection_mode","order":195,"description":""},{"name":"set_deconstruction_item_trees_and_rocks_only","order":196,"description":""},{"name":"set_entity_color","order":197,"description":""},{"name":"set_entity_energy_property","order":198,"description":""},{"name":"set_filter","order":199,"description":""},{"name":"set_ghost_cursor","order":200,"description":""},{"name":"set_heat_interface_mode","order":201,"description":""},{"name":"set_heat_interface_temperature","order":202,"description":""},{"name":"set_infinity_container_filter_item","order":203,"description":""},{"name":"set_infinity_container_remove_unfiltered_items","order":204,"description":""},{"name":"set_infinity_pipe_filter","order":205,"description":""},{"name":"set_inserter_max_stack_size","order":206,"description":""},{"name":"set_inventory_bar","order":207,"description":""},{"name":"set_lamp_always_on","order":208,"description":""},{"name":"set_linked_container_link_i_d","order":209,"description":""},{"name":"set_logistic_filter_item","order":210,"description":""},{"name":"set_logistic_network_name","order":211,"description":""},{"name":"set_logistic_section_active","order":212,"description":""},{"name":"set_player_color","order":213,"description":""},{"name":"set_pump_fluid_filter","order":214,"description":""},{"name":"set_request_from_buffers","order":215,"description":""},{"name":"set_research_finished_stops_game","order":216,"description":""},{"name":"set_rocket_silo_send_to_orbit_automated_mode","order":217,"description":""},{"name":"set_schedule_record_allow_unloading","order":218,"description":""},{"name":"set_signal","order":219,"description":""},{"name":"set_splitter_priority","order":220,"description":""},{"name":"set_spoil_priority","order":221,"description":""},{"name":"set_train_stop_priority","order":222,"description":""},{"name":"set_train_stopped","order":223,"description":""},{"name":"set_trains_limit","order":224,"description":""},{"name":"set_turret_ignore_unlisted","order":225,"description":""},{"name":"set_use_inserter_filters","order":226,"description":""},{"name":"set_vehicle_automatic_targeting_parameters","order":227,"description":""},{"name":"setup_assembling_machine","order":228,"description":""},{"name":"setup_blueprint","order":229,"description":""},{"name":"setup_single_blueprint_record","order":230,"description":""},{"name":"spawn_item","order":231,"description":""},{"name":"spectator_change_surface","order":232,"description":""},{"name":"stack_split","order":233,"description":""},{"name":"stack_transfer","order":234,"description":""},{"name":"start_repair","order":235,"description":""},{"name":"start_research","order":236,"description":""},{"name":"start_walking","order":237,"description":""},{"name":"stop_drag_build","order":238,"description":""},{"name":"swap_logistic_filter_items","order":239,"description":""},{"name":"switch_connect_to_logistic_network","order":240,"description":""},{"name":"switch_constant_combinator_state","order":241,"description":""},{"name":"switch_inserter_filter_mode_state","order":242,"description":""},{"name":"switch_mining_drill_filter_mode_state","order":243,"description":""},{"name":"switch_power_switch_state","order":244,"description":""},{"name":"take_equipment","order":245,"description":""},{"name":"toggle_artillery_auto_targeting","order":246,"description":""},{"name":"toggle_deconstruction_item_entity_filter_mode","order":247,"description":""},{"name":"toggle_deconstruction_item_tile_filter_mode","order":248,"description":""},{"name":"toggle_driving","order":249,"description":""},{"name":"toggle_enable_vehicle_logistics_while_moving","order":250,"description":""},{"name":"toggle_entity_logistic_requests","order":251,"description":""},{"name":"toggle_equipment_movement_bonus","order":252,"description":""},{"name":"toggle_map_editor","order":253,"description":""},{"name":"toggle_personal_logistic_requests","order":254,"description":""},{"name":"toggle_personal_roboport","order":255,"description":""},{"name":"toggle_selected_entity","order":256,"description":""},{"name":"toggle_show_entity_info","order":257,"description":""},{"name":"translate_string","order":258,"description":""},{"name":"trash_not_requested_items","order":259,"description":""},{"name":"undo","order":260,"description":""},{"name":"upgrade","order":261,"description":""},{"name":"upgrade_opened_blueprint_by_item","order":262,"description":""},{"name":"upgrade_opened_blueprint_by_record","order":263,"description":""},{"name":"use_item","order":264,"description":""},{"name":"wire_dragging","order":265,"description":""},{"name":"write_to_console","order":266,"description":""}]},{"name":"input_method","order":24,"description":"","values":[{"name":"game_controller","order":1,"description":""},{"name":"keyboard_and_mouse","order":0,"description":""}]},{"name":"inventory","order":25,"description":"","values":[{"name":"artillery_turret_ammo","order":42,"description":""},{"name":"artillery_wagon_ammo","order":43,"description":""},{"name":"assembling_machine_dump","order":25,"description":""},{"name":"assembling_machine_input","order":22,"description":""},{"name":"assembling_machine_modules","order":24,"description":""},{"name":"assembling_machine_output","order":23,"description":""},{"name":"beacon_modules","order":40,"description":""},{"name":"burnt_result","order":1,"description":""},{"name":"car_ammo","order":37,"description":""},{"name":"car_trunk","order":36,"description":""},{"name":"cargo_landing_pad_main","order":49,"description":""},{"name":"cargo_landing_pad_trash","order":50,"description":""},{"name":"cargo_unit","order":35,"description":""},{"name":"cargo_wagon","order":38,"description":""},{"name":"character_ammo","order":9,"description":""},{"name":"character_armor","order":10,"description":""},{"name":"character_corpse","order":41,"description":""},{"name":"character_guns","order":8,"description":""},{"name":"character_main","order":7,"description":""},{"name":"character_trash","order":12,"description":""},{"name":"character_vehicle","order":11,"description":""},{"name":"chest","order":2,"description":""},{"name":"editor_ammo","order":16,"description":""},{"name":"editor_armor","order":17,"description":""},{"name":"editor_guns","order":15,"description":""},{"name":"editor_main","order":14,"description":""},{"name":"fuel","order":0,"description":""},{"name":"furnace_modules","order":6,"description":""},{"name":"furnace_result","order":5,"description":""},{"name":"furnace_source","order":4,"description":""},{"name":"god_main","order":13,"description":""},{"name":"hub_main","order":47,"description":""},{"name":"hub_trash","order":48,"description":""},{"name":"item_main","order":29,"description":""},{"name":"lab_input","order":26,"description":""},{"name":"lab_modules","order":27,"description":""},{"name":"logistic_container_trash","order":3,"description":""},{"name":"mining_drill_modules","order":28,"description":""},{"name":"roboport_material","order":19,"description":""},{"name":"roboport_robot","order":18,"description":""},{"name":"robot_cargo","order":20,"description":""},{"name":"robot_repair","order":21,"description":""},{"name":"rocket_silo_input","order":32,"description":""},{"name":"rocket_silo_modules","order":34,"description":""},{"name":"rocket_silo_output","order":33,"description":""},{"name":"rocket_silo_rocket","order":30,"description":""},{"name":"rocket_silo_trash","order":31,"description":""},{"name":"spider_ammo","order":45,"description":""},{"name":"spider_trash","order":46,"description":""},{"name":"spider_trunk","order":44,"description":""},{"name":"turret_ammo","order":39,"description":""}]},{"name":"logistic_member_index","order":26,"description":"","values":[{"name":"character_provider","order":4,"description":""},{"name":"character_requester","order":2,"description":""},{"name":"character_storage","order":3,"description":""},{"name":"generic_on_off_behavior","order":5,"description":""},{"name":"logistic_container","order":0,"description":""},{"name":"spidertron_requester","order":6,"description":""},{"name":"vehicle_storage","order":1,"description":""}]},{"name":"logistic_mode","order":27,"description":"","values":[{"name":"active_provider","order":1,"description":""},{"name":"buffer","order":5,"description":""},{"name":"none","order":0,"description":""},{"name":"passive_provider","order":4,"description":""},{"name":"requester","order":3,"description":""},{"name":"storage","order":2,"description":""}]},{"name":"logistic_section_type","order":28,"description":"","values":[{"name":"circuit_controlled","order":1,"description":""},{"name":"manual","order":0,"description":""},{"name":"request_missing_materials_controlled","order":3,"description":"Used by space platform hubs."},{"name":"transitional_request_controlled","order":2,"description":"Used by rocket silos."}]},{"name":"mouse_button_type","order":29,"description":"","values":[{"name":"left","order":1,"description":""},{"name":"middle","order":3,"description":""},{"name":"none","order":0,"description":""},{"name":"right","order":2,"description":""}]},{"name":"moving_state","order":30,"description":"","values":[{"name":"adaptive","order":2,"description":""},{"name":"moving","order":1,"description":""},{"name":"stale","order":0,"description":""},{"name":"stuck","order":3,"description":""}]},{"name":"print_skip","order":31,"description":"","values":[{"name":"if_redundant","order":1,"description":"Print will be skipped if same text was recently printed (within last 60 ticks). Used by most game messages."},{"name":"if_visible","order":2,"description":"Print will be skipped if same text is still visible (printed within last 1152 ticks). Used by some notifications."},{"name":"never","order":0,"description":"Print will not be skipped."}]},{"name":"print_sound","order":32,"description":"","values":[{"name":"always","order":0,"description":""},{"name":"never","order":1,"description":""},{"name":"use_player_settings","order":2,"description":""}]},{"name":"prototypes","order":33,"description":"This define describes all top-level prototypes and their associated subtypes. It is organized as a lookup table, meaning the values of all the defines is `0`. As an example, `defines.prototypes['entity']` looks like `{furnace=0, inserter=0, container=0, ...}`.","subkeys":[{"name":"achievement","order":0,"description":"","values":[{"name":"achievement","order":0,"description":""},{"name":"build-entity-achievement","order":1,"description":""},{"name":"change-surface-achievement","order":2,"description":""},{"name":"combat-robot-count-achievement","order":3,"description":""},{"name":"complete-objective-achievement","order":4,"description":""},{"name":"construct-with-robots-achievement","order":5,"description":""},{"name":"create-platform-achievement","order":6,"description":""},{"name":"deconstruct-with-robots-achievement","order":7,"description":""},{"name":"deliver-by-robots-achievement","order":8,"description":""},{"name":"deplete-resource-achievement","order":9,"description":""},{"name":"destroy-cliff-achievement","order":10,"description":""},{"name":"dont-build-entity-achievement","order":11,"description":""},{"name":"dont-craft-manually-achievement","order":12,"description":""},{"name":"dont-kill-manually-achievement","order":13,"description":""},{"name":"dont-research-before-researching-achievement","order":14,"description":""},{"name":"dont-use-entity-in-energy-production-achievement","order":15,"description":""},{"name":"equip-armor-achievement","order":16,"description":""},{"name":"group-attack-achievement","order":17,"description":""},{"name":"kill-achievement","order":18,"description":""},{"name":"module-transfer-achievement","order":19,"description":""},{"name":"place-equipment-achievement","order":20,"description":""},{"name":"player-damaged-achievement","order":21,"description":""},{"name":"produce-achievement","order":22,"description":""},{"name":"produce-per-hour-achievement","order":23,"description":""},{"name":"research-achievement","order":24,"description":""},{"name":"research-with-science-pack-achievement","order":25,"description":""},{"name":"shoot-achievement","order":26,"description":""},{"name":"space-connection-distance-traveled-achievement","order":27,"description":""},{"name":"train-path-achievement","order":28,"description":""},{"name":"use-item-achievement","order":29,"description":""}]},{"name":"active-trigger","order":1,"description":"","values":[{"name":"chain-active-trigger","order":0,"description":""},{"name":"delayed-active-trigger","order":1,"description":""}]},{"name":"airborne-pollutant","order":2,"description":"","values":[{"name":"airborne-pollutant","order":0,"description":""}]},{"name":"ambient-sound","order":3,"description":"","values":[{"name":"ambient-sound","order":0,"description":""}]},{"name":"ammo-category","order":4,"description":"","values":[{"name":"ammo-category","order":0,"description":""}]},{"name":"animation","order":5,"description":"","values":[{"name":"animation","order":0,"description":""}]},{"name":"asteroid-chunk","order":6,"description":"","values":[{"name":"asteroid-chunk","order":0,"description":""}]},{"name":"autoplace-control","order":7,"description":"","values":[{"name":"autoplace-control","order":0,"description":""}]},{"name":"burner-usage","order":8,"description":"","values":[{"name":"burner-usage","order":0,"description":""}]},{"name":"collision-layer","order":9,"description":"","values":[{"name":"collision-layer","order":0,"description":""}]},{"name":"custom-event","order":10,"description":"","values":[{"name":"custom-event","order":0,"description":""}]},{"name":"custom-input","order":11,"description":"","values":[{"name":"custom-input","order":0,"description":""}]},{"name":"damage-type","order":12,"description":"","values":[{"name":"damage-type","order":0,"description":""}]},{"name":"decorative","order":13,"description":"","values":[{"name":"optimized-decorative","order":0,"description":""}]},{"name":"deliver-category","order":14,"description":"","values":[{"name":"deliver-category","order":0,"description":""}]},{"name":"deliver-impact-combination","order":15,"description":"","values":[{"name":"deliver-impact-combination","order":0,"description":""}]},{"name":"editor-controller","order":16,"description":"","values":[{"name":"editor-controller","order":0,"description":""}]},{"name":"entity","order":17,"description":"","values":[{"name":"accumulator","order":0,"description":""},{"name":"agricultural-tower","order":1,"description":""},{"name":"ammo-turret","order":2,"description":""},{"name":"arithmetic-combinator","order":3,"description":""},{"name":"arrow","order":4,"description":""},{"name":"artillery-flare","order":5,"description":""},{"name":"artillery-projectile","order":6,"description":""},{"name":"artillery-turret","order":7,"description":""},{"name":"artillery-wagon","order":8,"description":""},{"name":"assembling-machine","order":9,"description":""},{"name":"asteroid","order":10,"description":""},{"name":"asteroid-collector","order":11,"description":""},{"name":"beacon","order":12,"description":""},{"name":"beam","order":13,"description":""},{"name":"boiler","order":14,"description":""},{"name":"burner-generator","order":15,"description":""},{"name":"capture-robot","order":16,"description":""},{"name":"car","order":17,"description":""},{"name":"cargo-bay","order":18,"description":""},{"name":"cargo-landing-pad","order":19,"description":""},{"name":"cargo-pod","order":20,"description":""},{"name":"cargo-wagon","order":21,"description":""},{"name":"character","order":22,"description":""},{"name":"character-corpse","order":23,"description":""},{"name":"cliff","order":24,"description":""},{"name":"combat-robot","order":25,"description":""},{"name":"constant-combinator","order":26,"description":""},{"name":"construction-robot","order":27,"description":""},{"name":"container","order":28,"description":""},{"name":"corpse","order":29,"description":""},{"name":"crafting-machine","order":30,"description":""},{"name":"curved-rail-a","order":31,"description":""},{"name":"curved-rail-b","order":32,"description":""},{"name":"decider-combinator","order":33,"description":""},{"name":"deconstructible-tile-proxy","order":34,"description":""},{"name":"display-panel","order":35,"description":""},{"name":"electric-energy-interface","order":36,"description":""},{"name":"electric-pole","order":37,"description":""},{"name":"electric-turret","order":38,"description":""},{"name":"elevated-curved-rail-a","order":39,"description":""},{"name":"elevated-curved-rail-b","order":40,"description":""},{"name":"elevated-half-diagonal-rail","order":41,"description":""},{"name":"elevated-straight-rail","order":42,"description":""},{"name":"entity-ghost","order":43,"description":""},{"name":"explosion","order":44,"description":""},{"name":"fire","order":45,"description":""},{"name":"fish","order":46,"description":""},{"name":"fluid-turret","order":47,"description":""},{"name":"fluid-wagon","order":48,"description":""},{"name":"fusion-generator","order":49,"description":""},{"name":"fusion-reactor","order":50,"description":""},{"name":"gate","order":51,"description":""},{"name":"generator","order":52,"description":""},{"name":"half-diagonal-rail","order":53,"description":""},{"name":"heat-interface","order":54,"description":""},{"name":"heat-pipe","order":55,"description":""},{"name":"highlight-box","order":56,"description":""},{"name":"infinity-container","order":57,"description":""},{"name":"infinity-pipe","order":58,"description":""},{"name":"inserter","order":59,"description":""},{"name":"item-entity","order":60,"description":""},{"name":"item-request-proxy","order":61,"description":""},{"name":"lab","order":62,"description":""},{"name":"lamp","order":63,"description":""},{"name":"land-mine","order":64,"description":""},{"name":"lane-splitter","order":65,"description":""},{"name":"legacy-curved-rail","order":66,"description":""},{"name":"legacy-straight-rail","order":67,"description":""},{"name":"lightning","order":68,"description":""},{"name":"lightning-attractor","order":69,"description":""},{"name":"linked-belt","order":70,"description":""},{"name":"linked-container","order":71,"description":""},{"name":"loader","order":72,"description":""},{"name":"loader-1x1","order":73,"description":""},{"name":"locomotive","order":74,"description":""},{"name":"logistic-container","order":75,"description":""},{"name":"logistic-robot","order":76,"description":""},{"name":"market","order":77,"description":""},{"name":"mining-drill","order":78,"description":""},{"name":"offshore-pump","order":79,"description":""},{"name":"particle-source","order":80,"description":""},{"name":"pipe","order":81,"description":""},{"name":"pipe-to-ground","order":82,"description":""},{"name":"plant","order":83,"description":""},{"name":"player-port","order":84,"description":""},{"name":"power-switch","order":85,"description":""},{"name":"programmable-speaker","order":86,"description":""},{"name":"projectile","order":87,"description":""},{"name":"pump","order":88,"description":""},{"name":"radar","order":89,"description":""},{"name":"rail","order":90,"description":""},{"name":"rail-chain-signal","order":91,"description":""},{"name":"rail-ramp","order":92,"description":""},{"name":"rail-remnants","order":93,"description":""},{"name":"rail-signal","order":94,"description":""},{"name":"rail-support","order":95,"description":""},{"name":"reactor","order":96,"description":""},{"name":"resource","order":97,"description":""},{"name":"roboport","order":98,"description":""},{"name":"rocket-silo","order":99,"description":""},{"name":"rocket-silo-rocket","order":100,"description":""},{"name":"rocket-silo-rocket-shadow","order":101,"description":""},{"name":"rolling-stock","order":102,"description":""},{"name":"segment","order":103,"description":""},{"name":"segmented-unit","order":104,"description":""},{"name":"selector-combinator","order":105,"description":""},{"name":"simple-entity","order":106,"description":""},{"name":"simple-entity-with-force","order":107,"description":""},{"name":"simple-entity-with-owner","order":108,"description":""},{"name":"smoke-with-trigger","order":109,"description":""},{"name":"solar-panel","order":110,"description":""},{"name":"space-platform-hub","order":111,"description":""},{"name":"speech-bubble","order":112,"description":""},{"name":"spider-leg","order":113,"description":""},{"name":"spider-unit","order":114,"description":""},{"name":"spider-vehicle","order":115,"description":""},{"name":"splitter","order":116,"description":""},{"name":"sticker","order":117,"description":""},{"name":"storage-tank","order":118,"description":""},{"name":"straight-rail","order":119,"description":""},{"name":"stream","order":120,"description":""},{"name":"temporary-container","order":121,"description":""},{"name":"thruster","order":122,"description":""},{"name":"tile-ghost","order":123,"description":""},{"name":"train-stop","order":124,"description":""},{"name":"transport-belt","order":125,"description":""},{"name":"transport-belt-connectable","order":126,"description":""},{"name":"tree","order":127,"description":""},{"name":"turret","order":128,"description":""},{"name":"underground-belt","order":129,"description":""},{"name":"unit","order":130,"description":""},{"name":"unit-spawner","order":131,"description":""},{"name":"vehicle","order":132,"description":""},{"name":"wall","order":133,"description":""}]},{"name":"equipment","order":18,"description":"","values":[{"name":"active-defense-equipment","order":0,"description":""},{"name":"battery-equipment","order":1,"description":""},{"name":"belt-immunity-equipment","order":2,"description":""},{"name":"energy-shield-equipment","order":3,"description":""},{"name":"equipment-ghost","order":4,"description":""},{"name":"generator-equipment","order":5,"description":""},{"name":"inventory-bonus-equipment","order":6,"description":""},{"name":"movement-bonus-equipment","order":7,"description":""},{"name":"night-vision-equipment","order":8,"description":""},{"name":"roboport-equipment","order":9,"description":""},{"name":"solar-panel-equipment","order":10,"description":""}]},{"name":"equipment-category","order":19,"description":"","values":[{"name":"equipment-category","order":0,"description":""}]},{"name":"equipment-grid","order":20,"description":"","values":[{"name":"equipment-grid","order":0,"description":""}]},{"name":"fluid","order":21,"description":"","values":[{"name":"fluid","order":0,"description":""}]},{"name":"font","order":22,"description":"","values":[{"name":"font","order":0,"description":""}]},{"name":"fuel-category","order":23,"description":"","values":[{"name":"fuel-category","order":0,"description":""}]},{"name":"god-controller","order":24,"description":"","values":[{"name":"god-controller","order":0,"description":""}]},{"name":"gui-style","order":25,"description":"","values":[{"name":"gui-style","order":0,"description":""}]},{"name":"impact-category","order":26,"description":"","values":[{"name":"impact-category","order":0,"description":""}]},{"name":"item","order":27,"description":"","values":[{"name":"ammo","order":0,"description":""},{"name":"armor","order":1,"description":""},{"name":"blueprint","order":2,"description":""},{"name":"blueprint-book","order":3,"description":""},{"name":"capsule","order":4,"description":""},{"name":"copy-paste-tool","order":5,"description":""},{"name":"deconstruction-item","order":6,"description":""},{"name":"gun","order":7,"description":""},{"name":"item","order":8,"description":""},{"name":"item-with-entity-data","order":9,"description":""},{"name":"item-with-inventory","order":10,"description":""},{"name":"item-with-label","order":11,"description":""},{"name":"item-with-tags","order":12,"description":""},{"name":"module","order":13,"description":""},{"name":"rail-planner","order":14,"description":""},{"name":"repair-tool","order":15,"description":""},{"name":"selection-tool","order":16,"description":""},{"name":"space-platform-starter-pack","order":17,"description":""},{"name":"spidertron-remote","order":18,"description":""},{"name":"tool","order":19,"description":""},{"name":"upgrade-item","order":20,"description":""}]},{"name":"item-group","order":28,"description":"","values":[{"name":"item-group","order":0,"description":""}]},{"name":"item-subgroup","order":29,"description":"","values":[{"name":"item-subgroup","order":0,"description":""}]},{"name":"map-gen-presets","order":30,"description":"","values":[{"name":"map-gen-presets","order":0,"description":""}]},{"name":"map-settings","order":31,"description":"","values":[{"name":"map-settings","order":0,"description":""}]},{"name":"module-category","order":32,"description":"","values":[{"name":"module-category","order":0,"description":""}]},{"name":"mouse-cursor","order":33,"description":"","values":[{"name":"mouse-cursor","order":0,"description":""}]},{"name":"noise-expression","order":34,"description":"","values":[{"name":"noise-expression","order":0,"description":""}]},{"name":"noise-function","order":35,"description":"","values":[{"name":"noise-function","order":0,"description":""}]},{"name":"particle","order":36,"description":"","values":[{"name":"optimized-particle","order":0,"description":""}]},{"name":"procession","order":37,"description":"","values":[{"name":"procession","order":0,"description":""}]},{"name":"procession-layer-inheritance-group","order":38,"description":"","values":[{"name":"procession-layer-inheritance-group","order":0,"description":""}]},{"name":"quality","order":39,"description":"","values":[{"name":"quality","order":0,"description":""}]},{"name":"recipe","order":40,"description":"","values":[{"name":"recipe","order":0,"description":""}]},{"name":"recipe-category","order":41,"description":"","values":[{"name":"recipe-category","order":0,"description":""}]},{"name":"remote-controller","order":42,"description":"","values":[{"name":"remote-controller","order":0,"description":""}]},{"name":"resource-category","order":43,"description":"","values":[{"name":"resource-category","order":0,"description":""}]},{"name":"shortcut","order":44,"description":"","values":[{"name":"shortcut","order":0,"description":""}]},{"name":"sound","order":45,"description":"","values":[{"name":"sound","order":0,"description":""}]},{"name":"space-connection","order":46,"description":"","values":[{"name":"space-connection","order":0,"description":""}]},{"name":"space-location","order":47,"description":"","values":[{"name":"planet","order":0,"description":""},{"name":"space-location","order":1,"description":""}]},{"name":"spectator-controller","order":48,"description":"","values":[{"name":"spectator-controller","order":0,"description":""}]},{"name":"sprite","order":49,"description":"","values":[{"name":"sprite","order":0,"description":""}]},{"name":"surface","order":50,"description":"","values":[{"name":"surface","order":0,"description":""}]},{"name":"surface-property","order":51,"description":"","values":[{"name":"surface-property","order":0,"description":""}]},{"name":"technology","order":52,"description":"","values":[{"name":"technology","order":0,"description":""}]},{"name":"tile","order":53,"description":"","values":[{"name":"tile","order":0,"description":""}]},{"name":"tile-effect","order":54,"description":"","values":[{"name":"tile-effect","order":0,"description":""}]},{"name":"tips-and-tricks-item","order":55,"description":"","values":[{"name":"tips-and-tricks-item","order":0,"description":""}]},{"name":"tips-and-tricks-item-category","order":56,"description":"","values":[{"name":"tips-and-tricks-item-category","order":0,"description":""}]},{"name":"trigger-target-type","order":57,"description":"","values":[{"name":"trigger-target-type","order":0,"description":""}]},{"name":"trivial-smoke","order":58,"description":"","values":[{"name":"trivial-smoke","order":0,"description":""}]},{"name":"tutorial","order":59,"description":"","values":[{"name":"tutorial","order":0,"description":""}]},{"name":"utility-constants","order":60,"description":"","values":[{"name":"utility-constants","order":0,"description":""}]},{"name":"utility-sounds","order":61,"description":"","values":[{"name":"utility-sounds","order":0,"description":""}]},{"name":"utility-sprites","order":62,"description":"","values":[{"name":"utility-sprites","order":0,"description":""}]},{"name":"virtual-signal","order":63,"description":"","values":[{"name":"virtual-signal","order":0,"description":""}]}]},{"name":"rail_connection_direction","order":34,"description":"","values":[{"name":"left","order":0,"description":""},{"name":"none","order":3,"description":""},{"name":"right","order":2,"description":""},{"name":"straight","order":1,"description":""}]},{"name":"rail_direction","order":35,"description":"","values":[{"name":"back","order":1,"description":""},{"name":"front","order":0,"description":""}]},{"name":"rail_layer","order":36,"description":"","values":[{"name":"elevated","order":1,"description":""},{"name":"ground","order":0,"description":""}]},{"name":"relative_gui_position","order":37,"description":"","values":[{"name":"bottom","order":1,"description":""},{"name":"left","order":2,"description":""},{"name":"right","order":3,"description":""},{"name":"top","order":0,"description":""}]},{"name":"relative_gui_type","order":38,"description":"","values":[{"name":"accumulator_gui","order":0,"description":""},{"name":"achievement_gui","order":1,"description":""},{"name":"additional_entity_info_gui","order":2,"description":""},{"name":"admin_gui","order":3,"description":""},{"name":"agriculture_tower_gui","order":4,"description":""},{"name":"arithmetic_combinator_gui","order":5,"description":""},{"name":"armor_gui","order":6,"description":""},{"name":"assembling_machine_gui","order":7,"description":""},{"name":"assembling_machine_select_recipe_gui","order":8,"description":""},{"name":"asteroid_collector_gui","order":9,"description":""},{"name":"beacon_gui","order":10,"description":""},{"name":"blueprint_book_gui","order":11,"description":""},{"name":"blueprint_library_gui","order":12,"description":""},{"name":"blueprint_setup_gui","order":13,"description":""},{"name":"bonus_gui","order":14,"description":""},{"name":"burner_equipment_gui","order":15,"description":""},{"name":"car_gui","order":16,"description":""},{"name":"cargo_landing_pad_gui","order":17,"description":""},{"name":"constant_combinator_gui","order":18,"description":""},{"name":"container_gui","order":19,"description":""},{"name":"controller_gui","order":20,"description":""},{"name":"decider_combinator_gui","order":21,"description":""},{"name":"deconstruction_item_gui","order":22,"description":""},{"name":"display_panel_gui","order":23,"description":""},{"name":"electric_energy_interface_gui","order":24,"description":""},{"name":"electric_network_gui","order":25,"description":""},{"name":"entity_variations_gui","order":26,"description":""},{"name":"entity_with_energy_source_gui","order":27,"description":""},{"name":"equipment_grid_gui","order":28,"description":""},{"name":"furnace_gui","order":29,"description":""},{"name":"generic_on_off_entity_gui","order":30,"description":""},{"name":"ghost_picker_gui","order":31,"description":""},{"name":"global_electric_network_gui","order":32,"description":""},{"name":"heat_interface_gui","order":33,"description":""},{"name":"infinity_pipe_gui","order":34,"description":""},{"name":"inserter_gui","order":35,"description":""},{"name":"item_with_inventory_gui","order":36,"description":""},{"name":"lab_gui","order":37,"description":""},{"name":"lamp_gui","order":38,"description":""},{"name":"linked_container_gui","order":39,"description":""},{"name":"loader_gui","order":40,"description":""},{"name":"logistic_gui","order":41,"description":""},{"name":"market_gui","order":42,"description":""},{"name":"mining_drill_gui","order":43,"description":""},{"name":"other_player_gui","order":44,"description":""},{"name":"permissions_gui","order":45,"description":""},{"name":"pick_stop_gui","order":46,"description":""},{"name":"pipe_gui","order":47,"description":""},{"name":"power_switch_gui","order":48,"description":""},{"name":"production_gui","order":49,"description":""},{"name":"programmable_speaker_gui","order":50,"description":""},{"name":"pump_gui","order":51,"description":""},{"name":"rail_signal_base_gui","order":52,"description":""},{"name":"reactor_gui","order":53,"description":""},{"name":"resource_entity_gui","order":54,"description":""},{"name":"roboport_gui","order":55,"description":""},{"name":"rocket_silo_gui","order":56,"description":""},{"name":"script_inventory_gui","order":57,"description":""},{"name":"selector_combinator_gui","order":58,"description":""},{"name":"server_config_gui","order":59,"description":""},{"name":"space_platform_hub_gui","order":60,"description":""},{"name":"spider_vehicle_gui","order":61,"description":""},{"name":"splitter_gui","order":62,"description":""},{"name":"standalone_character_gui","order":63,"description":""},{"name":"storage_tank_gui","order":64,"description":""},{"name":"tile_variations_gui","order":65,"description":""},{"name":"tips_and_tricks_gui","order":66,"description":""},{"name":"train_gui","order":67,"description":""},{"name":"train_stop_gui","order":68,"description":""},{"name":"trains_gui","order":69,"description":""},{"name":"transport_belt_gui","order":70,"description":""},{"name":"turret_gui","order":71,"description":""},{"name":"upgrade_item_gui","order":72,"description":""},{"name":"wall_gui","order":73,"description":""}]},{"name":"render_mode","order":39,"description":"","values":[{"name":"chart","order":1,"description":""},{"name":"chart_zoomed_in","order":2,"description":""},{"name":"game","order":0,"description":""}]},{"name":"rich_text_setting","order":40,"description":"","values":[{"name":"disabled","order":1,"description":""},{"name":"enabled","order":0,"description":""},{"name":"highlight","order":2,"description":""}]},{"name":"riding","order":41,"description":"","subkeys":[{"name":"acceleration","order":0,"description":"","values":[{"name":"accelerating","order":1,"description":""},{"name":"braking","order":2,"description":""},{"name":"nothing","order":0,"description":""},{"name":"reversing","order":3,"description":""}]},{"name":"direction","order":1,"description":"","values":[{"name":"left","order":0,"description":""},{"name":"right","order":2,"description":""},{"name":"straight","order":1,"description":""}]}]},{"name":"robot_order_type","order":42,"description":"","values":[{"name":"construct","order":0,"description":"Construct a ghost."},{"name":"deconstruct","order":4,"description":"Deconstruct an entity."},{"name":"deliver","order":2,"description":"Deliver an item."},{"name":"deliver_items","order":5,"description":"Deliver specific items to an entity (item request proxy)."},{"name":"explode_cliff","order":7,"description":"Explode a cliff."},{"name":"pickup","order":1,"description":"Pickup an item."},{"name":"pickup_items","order":8,"description":"Pickup items from an entity (item request proxy)."},{"name":"repair","order":3,"description":"Repair an entity."},{"name":"upgrade","order":6,"description":"Upgrade an entity."}]},{"name":"rocket_silo_status","order":43,"description":"The various parts of the launch sequence of the rocket silo.","values":[{"name":"arms_advance","order":6,"description":"The next state is `rocket_ready` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting prepared for launch."},{"name":"arms_retract","order":10,"description":"The next state is `rocket_flying` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting launched."},{"name":"building_rocket","order":0,"description":"The rocket silo is crafting rocket parts. When there are enough rocket parts, the silo will switch into the `create_rocket` state."},{"name":"create_rocket","order":1,"description":"The next state is `lights_blinking_open`. The rocket silo rocket entity gets created."},{"name":"doors_closing","order":13,"description":"The next state is `building_rocket`."},{"name":"doors_opened","order":4,"description":"The next state is `rocket_rising` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting prepared for launch."},{"name":"doors_opening","order":3,"description":"The next state is `doors_opened`. The rocket is getting prepared for launch."},{"name":"engine_starting","order":9,"description":"The next state is `arms_retract` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting launched."},{"name":"launch_started","order":14,"description":"The next state is `engine_starting` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting launched."},{"name":"launch_starting","order":8,"description":"The next state is `launch_started`."},{"name":"lights_blinking_close","order":12,"description":"The next state is `doors_closing`."},{"name":"lights_blinking_open","order":2,"description":"The next state is `doors_opening`. The rocket is getting prepared for launch."},{"name":"rocket_flying","order":11,"description":"The next state is `lights_blinking_close`. The rocket is getting launched."},{"name":"rocket_ready","order":7,"description":"The rocket launch can be started by the player. When the launch is started, the silo switches into the `launch_starting` state."},{"name":"rocket_rising","order":5,"description":"The next state is `arms_advance` or if the rocket is destroyed in this state then the next state will be `lights_blinking_close`. The rocket is getting prepared for launch."}]},{"name":"selection_mode","order":44,"description":"","values":[{"name":"alt_reverse_select","order":3,"description":""},{"name":"alt_select","order":1,"description":""},{"name":"reverse_select","order":2,"description":""},{"name":"select","order":0,"description":""}]},{"name":"shooting","order":45,"description":"","values":[{"name":"not_shooting","order":0,"description":""},{"name":"shooting_enemies","order":1,"description":""},{"name":"shooting_selected","order":2,"description":""}]},{"name":"signal_state","order":46,"description":"State of an ordinary rail signal.","values":[{"name":"closed","order":1,"description":"Red."},{"name":"open","order":0,"description":"Green."},{"name":"reserved","order":2,"description":"Orange."},{"name":"reserved_by_circuit_network","order":3,"description":"Red - From circuit network."}]},{"name":"space_platform_state","order":47,"description":"","values":[{"name":"no_path","order":6,"description":"Doesn't have anywhere to go."},{"name":"no_schedule","order":5,"description":"Waiting for a starter pack"},{"name":"on_the_path","order":3,"description":"Following the path."},{"name":"starter_pack_on_the_way","order":2,"description":"Starter pack is on the way."},{"name":"starter_pack_requested","order":1,"description":"Starter pack was requested from the logistics system."},{"name":"waiting_at_station","order":7,"description":"Waiting at a station."},{"name":"waiting_for_departure","order":4,"description":"Platform is ready to leave this planet and does not accept deliveries."},{"name":"waiting_for_starter_pack","order":0,"description":"Waiting for a starter pack."}]},{"name":"target_type","order":48,"description":"","values":[{"name":"commandable","order":15,"description":""},{"name":"custom_chart_tag","order":16,"description":""},{"name":"entity","order":0,"description":""},{"name":"equipment","order":1,"description":""},{"name":"equipment_grid","order":2,"description":""},{"name":"gui_element","order":17,"description":""},{"name":"item","order":3,"description":""},{"name":"logistic_cell","order":4,"description":""},{"name":"logistic_network","order":5,"description":""},{"name":"logistic_section","order":6,"description":""},{"name":"permission_group","order":7,"description":""},{"name":"planet","order":8,"description":""},{"name":"player","order":9,"description":""},{"name":"rail_path","order":10,"description":""},{"name":"render_object","order":11,"description":""},{"name":"space_platform","order":12,"description":""},{"name":"surface","order":13,"description":""},{"name":"train","order":14,"description":""}]},{"name":"train_state","order":49,"description":"","values":[{"name":"arrive_signal","order":3,"description":"Braking before a rail signal."},{"name":"arrive_station","order":5,"description":"Braking before a station."},{"name":"destination_full","order":9,"description":"Same as no_path but all candidate train stops are full"},{"name":"manual_control","order":7,"description":"Can move if user explicitly sits in and rides the train."},{"name":"manual_control_stop","order":6,"description":"Switched to manual control and has to stop."},{"name":"no_path","order":2,"description":"Has no path and is stopped."},{"name":"no_schedule","order":1,"description":"Doesn't have anywhere to go."},{"name":"on_the_path","order":0,"description":"Normal state -- following the path."},{"name":"wait_signal","order":4,"description":"Waiting at a signal."},{"name":"wait_station","order":8,"description":"Waiting at a station."}]},{"name":"transport_line","order":50,"description":"","values":[{"name":"left_line","order":0,"description":""},{"name":"left_split_line","order":6,"description":""},{"name":"left_underground_line","order":2,"description":""},{"name":"right_line","order":1,"description":""},{"name":"right_split_line","order":7,"description":""},{"name":"right_underground_line","order":3,"description":""},{"name":"secondary_left_line","order":4,"description":""},{"name":"secondary_left_split_line","order":8,"description":""},{"name":"secondary_right_line","order":5,"description":""},{"name":"secondary_right_split_line","order":9,"description":""}]},{"name":"wire_connector_id","order":51,"description":"","values":[{"name":"circuit_green","order":1,"description":""},{"name":"circuit_red","order":0,"description":""},{"name":"combinator_input_green","order":3,"description":""},{"name":"combinator_input_red","order":2,"description":""},{"name":"combinator_output_green","order":5,"description":""},{"name":"combinator_output_red","order":4,"description":""},{"name":"pole_copper","order":6,"description":""},{"name":"power_switch_left_copper","order":7,"description":""},{"name":"power_switch_right_copper","order":8,"description":""}]},{"name":"wire_origin","order":52,"description":"","values":[{"name":"player","order":0,"description":""},{"name":"radars","order":2,"description":""},{"name":"script","order":1,"description":""}]},{"name":"wire_type","order":53,"description":"","values":[{"name":"copper","order":2,"description":""},{"name":"green","order":1,"description":""},{"name":"red","order":0,"description":""}]}],"global_objects":[{"name":"commands","order":2,"description":"Allows registration of custom commands for the in-game console.","type":"LuaCommandProcessor"},{"name":"game","order":0,"description":"The main scripting interface through which most of the API is accessed.","type":"LuaGameScript"},{"name":"helpers","order":3,"description":"Provides access to various helper and utility functions.","type":"LuaHelpers"},{"name":"prototypes","order":4,"description":"Allows read-only access to prototypes.","type":"LuaPrototypes"},{"name":"rcon","order":5,"description":"Allows printing messages to the calling RCON instance, if any.","type":"LuaRCON"},{"name":"remote","order":6,"description":"Allows registration and use of functions to communicate between mods.","type":"LuaRemote"},{"name":"rendering","order":7,"description":"Allows rendering of geometric shapes, text and sprites in the game world.","type":"LuaRendering"},{"name":"script","order":1,"description":"Provides an interface for registering game event handlers.","type":"LuaBootstrap"},{"name":"settings","order":8,"description":"Provides access to the current mod settings.","type":"LuaSettings"}],"global_functions":[{"name":"localised_print","order":1,"description":"`localised_print()` allows printing [LocalisedString](runtime:LocalisedString) to stdout without polluting the Factorio [log file](https://wiki.factorio.com/Log_file). This is primarily useful when communicating with external tools that launch Factorio as a child process.","parameters":[{"name":"string","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"log","order":0,"description":"`log()` can print [LocalisedStrings](runtime:LocalisedString) to the Factorio [log file](https://wiki.factorio.com/Log_file). This, in combination with the serpent library, makes debugging in the data stage easier because it allows the inspection of entire prototype tables. For example, printing all properties of the sulfur item prototype can be done like so: `log(serpent.block(data.raw[\"item\"][\"sulfur\"]))`","parameters":[{"name":"string","order":0,"description":"","type":"LocalisedString","optional":false}],"format":{"takes_table":false},"return_values":[]},{"name":"table_size","order":2,"description":"Factorio provides the `table_size()` function as a simple way to determine the size of tables with non-continuous keys, as the standard `#` operator does not work correctly for these. The function is a C++ implementation of the following Lua code, which is faster than doing the same in Lua:\n\n```\nlocal function size(t)\n  local count = 0\n  for k,v in pairs(t) do\n    count = count + 1\n  end\n  return count\nend\n```\n\nNote that `table_size()` does not work correctly for [LuaCustomTable](runtime:LuaCustomTable), their size has to be determined with [LuaCustomTable::length_operator](runtime:LuaCustomTable::length_operator) instead.","parameters":[{"name":"table","order":0,"description":"","type":"table","optional":false}],"format":{"takes_table":false},"return_values":[{"order":0,"description":"","type":"uint","optional":false}]}]}