diff --git a/data/classes.json b/data/classes.json index 178240c..eb353ba 100644 --- a/data/classes.json +++ b/data/classes.json @@ -27,11 +27,17 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "path_resolution_modifier": { "name": "path_resolution_modifier", - "type": "boolean", + "type": "int8", "mode": "[RW]", - "doc": "The pathing resolution modifie" + "doc": "The pathing resolution modifier, must be between -8 and" }, "valid": { "name": "valid", @@ -40,7 +46,7 @@ "doc": "Is this object valid?" } }, - "doc": "Collection of settings for overriding default ai behavior" + "doc": "If enabled, units that repeatedly fail to succeed at commands will be destroyed." }, "LuaAccumulatorControlBehavior": { "name": "LuaAccumulatorControlBehavior", @@ -78,6 +84,12 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "output_signal": { "name": "output_signal", "type": "SignalID", @@ -98,6 +110,63 @@ }, "doc": "Control behavior for accumulators." }, + "LuaAchievementPrototype": { + "name": "LuaAchievementPrototype", + "type": "LuaAchievementPrototype", + "inherits": [], + "properties": { + "allowed_without_fight": { + "name": "allowed_without_fight", + "type": "boolean", + "mode": "[R]" + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "hidden": { + "name": "hidden", + "type": "boolean", + "mode": "[R]" + }, + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" + }, + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string of this prototype." + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" + }, "LuaAmmoCategoryPrototype": { "name": "LuaAmmoCategoryPrototype", "type": "LuaAmmoCategoryPrototype", @@ -129,6 +198,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -142,7 +217,7 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a ammo category." + "doc": "" }, "LuaArithmeticCombinatorControlBehavior": { "name": "LuaArithmeticCombinatorControlBehavior", @@ -194,6 +269,12 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "parameters": { "name": "parameters", "type": "ArithmeticCombinatorParameters", @@ -258,6 +339,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -276,19 +363,38 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of an autoplace control." + "doc": "" }, "LuaBootstrap": { "name": "LuaBootstrap", "type": "LuaBootstrap", "inherits": [], "properties": { + "active_mods": { + "name": "active_mods", + "type": "dictionary string → string", + "mode": "[R]", + "doc": "A dictionary listing the names of all currently active mods and mapping them to their versio \n\n**Example** \nThis will print the names and versions of all active mods to the consol \n````\nfor name, version in pairs(script.active_mods) do \n  game.print(name .. \" version \" .. version) \nend````" + }, "generate_event_name": { "name": "generate_event_name", "type": "function", "doc": "Generate a new, unique event ID. \n\n**Return value** \nThe new ID", "returns": "uint" }, + "get_event_filter": { + "name": "get_event_filter", + "type": "function", + "doc": "Gets the filters for the given even \n\n**Parameters** \nevent :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to get. \n\n**Return value** \nThe filters or ````\nnil````\nif none are defined.", + "returns": "table", + "args": { + "event": { + "name": "event", + "type": "uint", + "doc": "event :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to get." + } + } + }, "get_event_handler": { "name": "get_event_handler", "doc": "Find the event handler for an event. \n\n**Parameters** \nevent :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The event identifier to get a handler for \n\n**Return value** \nReference to the function currently registered as the handler.", @@ -306,12 +412,24 @@ "doc": "Gets the mod event orde \ntype(string)", "type": "function" }, + "level": { + "name": "level", + "type": "table", + "mode": "[R]", + "doc": "Information about the currently running scenario/campaign/tutori \nTable with the following fields: \nis_simulation :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Is this level a simulation? (menu, tips&tricks) \nis_tutorial :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Is this level a tutorial? \ncampaign_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The campaign name if any. \nlevel_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The level name. \nmod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The mod name if any." + }, "mod_name": { "name": "mod_name", "type": "string", "mode": "[R]", "doc": "The name of the mod from the environment this is used i" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "This object's nam" + }, "on_configuration_changed": { "name": "on_configuration_changed", "doc": "Register a function to be run when mod configuration change \nThis is called any time the game version changes, prototypes change, startup mod settings change, and any time mod versions change including adding or removing mod \n\n**Parameters** \nf :: function([ConfigurationChangedData](http://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData)) \nThe handler for this event. Passing ````\nnil````\nwill unregister the handler.", @@ -326,7 +444,7 @@ }, "on_event": { "name": "on_event", - "doc": "Register a handler to run on event or event \n\n**Parameters** \nevent :: [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events) or array of [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The events or custom-input name to invoke the handler on \nf :: function(Event): The handler to run. Passing nil will unregister the handler. The handl \nwill receive a table that contains the key ````\nname````\n(of type [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events)) specifying the na \nof the event it was called to handle, and ````\ntick````\nthat specifies when the event was created. This table wi \nalso contain other fields, depending on the type of the event. S \n[ the list of Factorio events](http://lua-api.factorio.com/latest/events.html) for a listing of these additional fields. \n\n**Note: ** Events raised by [LuaBootstrap::raise_event](http://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) contain ````\nmod_name````\nadditionally to the above properties.", + "doc": "Register a handler to run on event or event \n\n**Parameters** \nevent :: [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events) or array of [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The events or custom-input name to invoke the handler on \nf :: function(Event): The handler to run. Passing nil will unregister the handler. The handl \nwill receive a table that contains the key ````\nname````\n(of type [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events)) specifying the na \nof the event it was called to handle, and ````\ntick````\nthat specifies when the event was created. This table wi \nalso contain other fields, depending on the type of the event. S \n[ the list of Factorio events](http://lua-api.factorio.com/latest/events.html) for a listing of these additional fields. \nfilters :: Filters (optional): The filters for this single event registratio \nSee [ the list of event filters](http://lua-api.factorio.com/latest/Event-Filters.html) for a listing of these filters. \n\n**Note: ** Events raised by [LuaBootstrap::raise_event](http://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) contain ````\nmod_name````\nadditionally to the above properties.", "type": "function", "args": { "event": { @@ -338,6 +456,11 @@ "name": "f", "type": "function(Event)", "doc": "f :: function(Event): The handler to run. Passing nil will unregister the handler. The handl \nwill receive a table that contains the key ````\nname````\n(of type [defines.events](http://lua-api.factorio.com/latest/defines.html#defines.events)) specifying the na \nof the event it was called to handle, and ````\ntick````\nthat specifies when the event was created. This table wi \nalso contain other fields, depending on the type of the event. S \n[ the list of Factorio events](http://lua-api.factorio.com/latest/events.html) for a listing of these additional fields." + }, + "filters": { + "name": "filters", + "type": "Filters", + "doc": "filters :: Filters (optional): The filters for this single event registratio \nSee [ the list of event filters](http://lua-api.factorio.com/latest/Event-Filters.html) for a listing of these filters." } } }, @@ -367,24 +490,48 @@ }, "on_nth_tick": { "name": "on_nth_tick", - "doc": "Register a handler to run on nth tick(s). When the game is on tick 0 it will trigger all registered handler \n\n**Parameters** \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or array of [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The nth-tick(s) to invoke the handler on. Passing nil will unregister all nth-tick handlers. \nf :: function([NthTickEvent](http://lua-api.factorio.com/latest/Concepts.html#NthTickEvent)): The handler to run. Passing nil will unregister the handler for the provided ticks.", + "doc": "Register a handler to run every nth tick(s). When the game is on tick 0 it will trigger all registered handler \n\n**Parameters** \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or array of [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The nth-tick(s) to invoke the handler on. Passing ````\nnil````\nas the only parameter will unregister all nth-tick handlers. \nf :: function([NthTickEvent](http://lua-api.factorio.com/latest/Concepts.html#NthTickEvent)): The handler to run. Passing ````\nnil````\nwill unregister the handler for the provided ticks.", "type": "function", "args": { "f": { "name": "f", "type": "function(NthTickEvent)", - "doc": "f :: function([NthTickEvent](http://lua-api.factorio.com/latest/Concepts.html#NthTickEvent)): The handler to run. Passing nil will unregister the handler for the provided ticks." + "doc": "f :: function([NthTickEvent](http://lua-api.factorio.com/latest/Concepts.html#NthTickEvent)): The handler to run. Passing ````\nnil````\nwill unregister the handler for the provided ticks." }, "tick": { "name": "tick", "type": "uint or array of uint", - "doc": "tick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or array of [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The nth-tick(s) to invoke the handler on. Passing nil will unregister all nth-tick handlers." + "doc": "tick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or array of [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The nth-tick(s) to invoke the handler on. Passing ````\nnil````\nas the only parameter will unregister all nth-tick handlers." + } + } + }, + "raise_biter_base_built": { + "name": "raise_biter_base_built", + "doc": "Raises [on_biter_base_built](http://lua-api.factorio.com/latest/events.html#on_biter_base_buil \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_console_chat": { + "name": "raise_console_chat", + "doc": "Raises [on_console_chat](http://lua-api.factorio.com/latest/events.html#on_console_cha \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" } } }, "raise_event": { "name": "raise_event", - "doc": "Raise an even \n\n**Parameters** \nevent :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to raise \ntable: Table with extra data. This table will be passed to the event handler.", + "doc": "Raise an event. Only events generated with [LuaBootstrap::generate_event_name](http://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.generate_event_name) and the following can be raise \n[on_console_chat](http://lua-api.factorio.com/latest/events.html#on_console_cha \n[on_player_crafted_item](http://lua-api.factorio.com/latest/events.html#on_player_crafted_ite \n[on_player_fast_transferred](http://lua-api.factorio.com/latest/events.html#on_player_fast_transferre \n[on_biter_base_built](http://lua-api.factorio.com/latest/events.html#on_biter_base_buil \n[on_market_item_purchased](http://lua-api.factorio.com/latest/events.html#on_market_item_purchase \n[script_raised_built](http://lua-api.factorio.com/latest/events.html#script_raised_buil \n[script_raised_destroy](http://lua-api.factorio.com/latest/events.html#script_raised_destro \n[script_raised_revive](http://lua-api.factorio.com/latest/events.html#script_raised_reviv \n[script_raised_set_tiles](http://lua-api.factorio.com/latest/events.html#script_raised_set_tile \n\n**Parameters** \nevent :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to raise \ntable: Table with extra data. This table will be passed to the event handler.", "type": "function", "args": { "event": { @@ -398,9 +545,123 @@ "type": "table" } } + }, + "raise_market_item_purchased": { + "name": "raise_market_item_purchased", + "doc": "Raises [on_market_item_purchased](http://lua-api.factorio.com/latest/events.html#on_market_item_purchase \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_player_crafted_item": { + "name": "raise_player_crafted_item", + "doc": "Raises [on_player_crafted_item](http://lua-api.factorio.com/latest/events.html#on_player_crafted_ite \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_player_fast_transferred": { + "name": "raise_player_fast_transferred", + "doc": "Raises [on_player_fast_transferred](http://lua-api.factorio.com/latest/events.html#on_player_fast_transferre \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_script_built": { + "name": "raise_script_built", + "doc": "Raises [script_raised_built](http://lua-api.factorio.com/latest/events.html#script_raised_buil \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_script_destroy": { + "name": "raise_script_destroy", + "doc": "Raises [script_raised_destroy](http://lua-api.factorio.com/latest/events.html#script_raised_destro \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_script_revive": { + "name": "raise_script_revive", + "doc": "Raises [script_raised_revive](http://lua-api.factorio.com/latest/events.html#script_raised_reviv \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "raise_script_set_tiles": { + "name": "raise_script_set_tiles", + "doc": "Raises [script_raised_set_tiles](http://lua-api.factorio.com/latest/events.html#script_raised_set_tile \n\n**Parameters** \ntable :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)", + "type": "function", + "args": { + "table": { + "name": "table", + "type": "RaiseEventParameters", + "doc": "table :: [RaiseEvent\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#RaiseEvent\n\n**Parameters** \n)" + } + } + }, + "register_on_entity_destroyed": { + "name": "register_on_entity_destroyed", + "type": "function", + "doc": "Registers an entity so that after it's destroyed [on_entity_destroyed](http://lua-api.factorio.com/latest/events.html#on_entity_destroyed) is calle \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to register. \n\n**Return value** \nThe registration number. \n\n**Note: ** Once an entity is registered it's registered forever (until it's destroyed) and persists through save/load. \n\n**Note: ** Registered is global across all mods: once an entity is registered the event will be fired for all mods when its destroyed. \n\n**Note: ** An entity registered multiple times will only fire the event once and gives back the same registration number. \n\n**Note: ** Depending on when a given entity is destroyed [on_entity_destroyed](http://lua-api.factorio.com/latest/events.html#on_entity_destroyed) will be fired at the end of the current tick or end of the next tick.", + "returns": "uint64", + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to register." + } + } + }, + "set_event_filter": { + "name": "set_event_filter", + "doc": "Sets the filters for the given even \n\n**Parameters** \nevent :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to filter. \nfilters :: Filters (optional): The [ filters](http://lua-api.factorio.com/latest/Event-Filters.html) or ````\nnil````\nto clear the filters", + "type": "function", + "args": { + "event": { + "name": "event", + "type": "uint", + "doc": "event :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): ID of the event to filter." + }, + "filters": { + "name": "filters", + "type": "Filters", + "doc": "filters :: Filters (optional): The [ filters](http://lua-api.factorio.com/latest/Event-Filters.html) or ````\nnil````\nto clear the filters" + } + } } }, - "doc": "Entry point for registering event handlers. It is accessible through the global object named script." + "doc": "Register a callback to be run on mod init.\n This is called once when a new save game is created or once when a save file is loaded that previously didn't contain the mod.\n This is always called before other event handlers and is meant for setting up initial values that a mod will use for its lifetime." }, "LuaBurner": { "name": "LuaBurner", @@ -446,6 +707,12 @@ "mode": "[R]", "doc": "The fuel inventor" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "owner": { "name": "owner", "type": "LuaEntity or LuaEquipment", @@ -465,7 +732,7 @@ "doc": "Is this object valid?" } }, - "doc": "A reference to the burner energy source owned by a specific LuaEntity or LuaEquipment." + "doc": "The owner of this burner energy source" }, "LuaBurnerPrototype": { "name": "LuaBurnerPrototype", @@ -509,6 +776,12 @@ "mode": "[R]", "doc": "The light flicker definition for this burner prototype if an \nTable with the following fields: \nminimum_intensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nmaximum_intensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nderivation_change_frequency :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nderivation_change_deviation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nborder_fix_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nminimum_light_size :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nlight_intensity_to_size_coefficient :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color)" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "render_no_network_icon": { "name": "render_no_network_icon", "type": "boolean", @@ -521,9 +794,9 @@ }, "smoke": { "name": "smoke", - "type": "array of table", + "type": "array of SmokeSource", "mode": "[R]", - "doc": "The smoke sources for this burner prototype if an \nEach element is a table: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nfrequency :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \noffset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nposition :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \nnorth_position :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \neast_position :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \nsouth_position :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \nwest_position :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \ndeviation :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \nstarting_frame_speed :: [uint16](http://lua-api.factorio.com/latest/Builtin-Types.html#uint16) \nstarting_frame_speed_deviation :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nstarting_frame :: [uint16](http://lua-api.factorio.com/latest/Builtin-Types.html#uint16) \nstarting_frame_deviation :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nslow_down_factor :: [uint8](http://lua-api.factorio.com/latest/Builtin-Types.html#uint8) \nheight :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nheight_deviation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nstarting_vertical_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nstarting_vertical_speed_deviation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nvertical_speed_slowdown :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" + "doc": "The smoke sources for this burner prototype if an" }, "valid": { "name": "valid", @@ -532,7 +805,7 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a burner energy source." + "doc": "" }, "LuaChunkIterator": { "name": "LuaChunkIterator", @@ -543,13 +816,19 @@ "name": "()", "type": "function", "doc": "Get the next chunk position or ````\nnil````\n, and increments the iterator.", - "returns": "ChunkPosition" + "returns": "ChunkPositionAndArea" }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "valid": { "name": "valid", "type": "boolean", @@ -557,7 +836,7 @@ "doc": "Is this object valid?" } }, - "doc": "A chunk iterator can be used for iterating chunks coordinates of a surface." + "doc": "" }, "LuaCircuitNetwork": { "name": "LuaCircuitNetwork", @@ -606,6 +885,12 @@ "mode": "[R]", "doc": "The circuit networks ID." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "signals": { "name": "signals", "type": "array of Signal", @@ -625,7 +910,7 @@ "doc": "The wire type this network is associated with." } }, - "doc": "A circuit network associated with a given entity, connector, and wire type." + "doc": "" }, "LuaCombinatorControlBehavior": { "name": "LuaCombinatorControlBehavior", @@ -661,7 +946,7 @@ "properties": { "add_command": { "name": "add_command", - "doc": "Add a command \nThe function registered to the command is passed a table when the command is invoked. The table contains: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the command. \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Tick the command was used. \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who used the command. \nparameter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The parameter passed after the command, separated from the command by 1 space. \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the command (case sensitive). \nhelp :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The localised help message. \nfunction :: function: The function that will be called when this command is invoked. \n\n**Note: ** It is an error if the given command ````\nname````\nis already registered or already exists as a game command.", + "doc": "Add a custom console command \nThe function registered to the command is passed a table when the command is invoked. This table contain \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The name of the command. \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The tick the command was used in. \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player who issued the command, or ````\nnil````\nif it was issued from the server console. \nparameter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The parameter passed after the command, if there is one. \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The desired name of the command (case sensitive). \nhelp :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The localised help message. It will be shown to players using the ````\n/help````\ncommand. \nfunction :: function: The function that will be called when this command is invoked. \n\n**Note: ** Trying to add a command with the ````\nname````\nof a game command or the name of a custom command that is already in use will result in an error. \n\n**Example** \nThis will register a custom event called ````\nprint_tick````\nthat prints the current tick to either the player issuing the command or to everyone on the server, depending on the command parameter. It shows the usage of the table that gets passed to any function handling a custom command. This specific example makes use of the ````\ntick````\nand the optional ````\nplayer_index````\nand ````\nparameter````\nfields. The user is supposed to either call it without any parameter (````\n\"/print_tick\"````\n) or with the ````\n\"me\"````\nparameter (````\n\"/print_tick me\"```` \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)````", "type": "function", "args": { "function": { @@ -672,12 +957,12 @@ "help": { "name": "help", "type": "LocalisedString", - "doc": "help :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The localised help message." + "doc": "help :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The localised help message. It will be shown to players using the ````\n/help````\ncommand." }, "name": { "name": "name", "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the command (case sensitive)." + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The desired name of the command (case sensitive)." } } }, @@ -685,27 +970,35 @@ "name": "commands", "type": "dictionary string → LocalisedString", "mode": "[R]", - "doc": "Commands registered by scripts through ````\nLuaCommandProcessor````" + "doc": "Lists the custom commands registered by scripts through ````\nLuaCommandProcessor````" }, "game_commands": { "name": "game_commands", "type": "dictionary string → LocalisedString", "mode": "[R]", - "doc": "Builtin commands of the core gam" + "doc": "Lists the built-in commands of the core game. The wiki has an overview of thes" + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "This object's nam" }, "remove_command": { "name": "remove_command", "type": "function", - "doc": "Removes a registered comma \n\n**Parameters** \n\n**Return value** \nIf the command was removed. ````\nFalse````\nif the command didn't exist.", + "doc": "Remove a custom console comman \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The name of the command to remove (case sensitive). \n\n**Return value** \nWhether the command was successfully removed. Returns ````\nfalse````\nif the command didn't exist.", "returns": "boolean", "args": { - "undefined": { - "doc": "" + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The name of the command to remove (case sensitive)." } } } }, - "doc": "Custom game console commands. These don't persist through save and load; instead, scripts are expected to\n re-register their commands in LuaBootstrap::on_load." + "doc": "Add a custom console command." }, "LuaConstantCombinatorControlBehavior": { "name": "LuaConstantCombinatorControlBehavior", @@ -762,11 +1055,17 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "parameters": { "name": "parameters", "type": "ConstantCombinatorParameters", "mode": "[RW]", - "doc": "The constant combinator paramete \n\n**Note: ** ````\nparameters````\nmay be ````\nnil````\nin order to clear the parameters. \n\n**Example** \nbehavior.parameters = {parameters = new_parameter" + "doc": "The constant combinator paramete \n\n**Note: ** Setting to ````\nnil````\nclears the parameters." }, "set_signal": { "name": "set_signal", @@ -842,6 +1141,12 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "type": { "name": "type", "type": "defines.control_behavior.type", @@ -862,12 +1167,6 @@ "type": "LuaControl", "inherits": [], "properties": { - "auto_trash_filters": { - "name": "auto_trash_filters", - "type": "dictionary string → uint", - "mode": "[RW]", - "doc": "The auto-trash filters. The keys are item prototype names, the values are the slot values. \n\n**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)). \n\n**Example** \nThis will set the auto-trash slots to keep only at most 20 iron plates and 42 copper wires in the player \ninventor \n````\ngame.player.auto_trash_filters = {[\"iron-plate\"] = 20, [\"copper-cable\"] = 42}````" - }, "begin_crafting": { "name": "begin_crafting", "type": "function", @@ -967,12 +1266,6 @@ "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "character_logistic_slot_count_bonus": { - "name": "character_logistic_slot_count_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, "character_loot_pickup_distance_bonus": { "name": "character_loot_pickup_distance_bonus", "type": "uint", @@ -985,12 +1278,24 @@ "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, + "character_mining_progress": { + "name": "character_mining_progress", + "type": "double", + "mode": "[R]", + "doc": "Gets the current mining progress between 0 and 1 of this character, or 0 if they aren't minin" + }, "character_mining_speed_modifier": { "name": "character_mining_speed_modifier", "type": "double", "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, + "character_personal_logistic_requests_enabled": { + "name": "character_personal_logistic_requests_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "If personal logistic requests are enabled for this character or players character." + }, "character_reach_distance_bonus": { "name": "character_reach_distance_bonus", "type": "uint", @@ -1037,17 +1342,47 @@ "doc": "Remove all items from this entity.", "type": "function" }, + "clear_personal_logistic_slot": { + "name": "clear_personal_logistic_slot", + "type": "function", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." + } + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if personal logistics are not researched." + }, "clear_selected_entity": { "name": "clear_selected_entity", "doc": "Unselect any selected entity.", "type": "function" }, + "clear_vehicle_logistic_slot": { + "name": "clear_vehicle_logistic_slot", + "type": "function", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." + } + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if the vehicle does not use logistics." + }, "crafting_queue": { "name": "crafting_queue", "mode": "[R]", "doc": "Gets the current crafting queue items. Each CraftingQueueItem is a table: \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The recipe. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count being crafted.", "type": "array of CraftingQueueItem" }, + "crafting_queue_progress": { + "name": "crafting_queue_progress", + "type": "double", + "mode": "[R]", + "doc": "The crafting queue progress [0- \n0 when no recipe is being crafte" + }, "crafting_queue_size": { "name": "crafting_queue_size", "type": "uint", @@ -1064,7 +1399,7 @@ "name": "cursor_stack", "type": "LuaItemStack", "mode": "[R]", - "doc": "The player's cursor stack." + "doc": "The player's cursor stack, or ````\nnil````\nif the player controller is a spectator. Even though this property is marked as read-only, it returns a [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html), meaning it can be manipulated like so: \n\n**Example** \n````\nplayer.cursor_stack.clear()````" }, "disable_flashlight": { "name": "disable_flashlight", @@ -1100,6 +1435,12 @@ "mode": "[RW]", "doc": "The force of this entity. Reading will always give a [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html), but it is possible \nassign either [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) to this attribute to change the forc" }, + "get_blueprint_entities": { + "name": "get_blueprint_entities", + "doc": "Returns the same type of data as [LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities), but works for the currently selected blueprin \nregardless of it being in a blueprint book or picked from the blueprint library.", + "type": "function", + "returns": "array of blueprint entity" + }, "get_craftable_count": { "name": "get_craftable_count", "type": "function", @@ -1145,6 +1486,32 @@ "doc": "Gets the main inventory for this character or player if this is a character or player. \n\n**Return value** \nor ````\nnil````\nif this entity is not a character or player.", "returns": "LuaInventory" }, + "get_personal_logistic_slot": { + "name": "get_personal_logistic_slot", + "type": "function", + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if personal logistics aren't researched yet.", + "returns": "PersonalLogisticParameters", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." + } + } + }, + "get_vehicle_logistic_slot": { + "name": "get_vehicle_logistic_slot", + "type": "function", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if the vehicle does not use logistics.", + "returns": "PersonalLogisticParameters", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." + } + } + }, "has_items_inside": { "name": "has_items_inside", "type": "function", @@ -1170,6 +1537,17 @@ } } }, + "is_cursor_blueprint": { + "name": "is_cursor_blueprint", + "type": "function", + "doc": "Returns whether the player is holding a blueprint, it takes into account a blueprint as an item as well as bluepri \nfrom the blueprint record from the blueprint librar \nNote that the is_cursor_blueprint and get_cursor_blueprint_entities refer to the currently selected blueprint, \nit returns blueprint related information also when holding a blueprint book with a blueprint being selected in it.", + "returns": "boolean" + }, + "is_flashlight_enabled": { + "name": "is_flashlight_enabled", + "doc": "Is the flashlight enabled.", + "type": "function" + }, "is_player": { "name": "is_player", "type": "function", @@ -1241,7 +1619,7 @@ "name": "opened", "type": "LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type", "mode": "[RW]", - "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, element or nil." + "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, equipment-grid, player, element or nil." }, "opened_gui_type": { "name": "opened_gui_type", @@ -1316,12 +1694,48 @@ } } }, - "shooting_state": { - "name": "shooting_state", - "type": "table", - "mode": "[RW]", - "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" - }, + "set_personal_logistic_slot": { + "name": "set_personal_logistic_slot", + "type": "function", + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if personal logistics are not researched.", + "returns": "boolean", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" + } + } + }, + "set_vehicle_logistic_slot": { + "name": "set_vehicle_logistic_slot", + "type": "function", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if the spider does not use logistics.", + "returns": "boolean", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" + } + } + }, + "shooting_state": { + "name": "shooting_state", + "type": "table", + "mode": "[RW]", + "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" + }, "surface": { "name": "surface", "type": "LuaSurface", @@ -1331,7 +1745,7 @@ "teleport": { "name": "teleport", "type": "function", - "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, rail signa \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", + "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, transport bel \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", "returns": "boolean", "args": { "position": { @@ -1342,7 +1756,7 @@ "surface": { "name": "surface", "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface." + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface." } } }, @@ -1364,6 +1778,12 @@ "mode": "[R]", "doc": "The vehicle the player is currently sitting in; ````\nnil````\nif none." }, + "vehicle_logistic_requests_enabled": { + "name": "vehicle_logistic_requests_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "If personal logistic requests are enabled for this vehicle (spidertron)." + }, "walking_state": { "name": "walking_state", "type": "table", @@ -1371,7 +1791,7 @@ "doc": "Current walking stat \nIt is a table with two fields: \nwalking :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If ````\nfalse````\n, the player is currently not walking; otherwise it's going somewhere \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): Direction where the player is walking \n\n**Example** \nMake the player go north. Note that a one-shot action like this will only make the player walk for one tic \n````\ngame.player.walking_state = {walking = true, direction = defines.direction.north}````" } }, - "doc": "This is an abstract base class containing the common functionality between LuaPlayer and character entities\n (see LuaEntity). When accessing these members through a LuaEntity, it must refer to a character\n entity." + "doc": "Get an inventory belonging to this entity. This can be either the \"main\" inventory or some auxiliary\n one, like the module slots or logistic trash slots." }, "LuaControlBehavior": { "name": "LuaControlBehavior", @@ -1443,6 +1863,12 @@ "mode": "[RW]", "doc": "The player who last edited this ta" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "position": { "name": "position", "type": "Position", @@ -1473,13 +1899,19 @@ "doc": "Is this object valid?" } }, - "doc": "A custom tag that shows on the map view." + "doc": "Destroys this tag." }, "LuaCustomInputPrototype": { "name": "LuaCustomInputPrototype", "type": "LuaCustomInputPrototype", "inherits": [], "properties": { + "action": { + "name": "action", + "type": "string", + "mode": "[R]", + "doc": "The action that happens when this custom input is triggere" + }, "alternative_key_sequence": { "name": "alternative_key_sequence", "type": "string", @@ -1498,11 +1930,35 @@ "mode": "[R]", "doc": "If this custom input is enabled. Disabled custom inputs exist but are not used by the gam" }, + "enabled_while_in_cutscene": { + "name": "enabled_while_in_cutscene", + "type": "boolean", + "mode": "[R]", + "doc": "If this custom input is enabled while using the cutscene controlle" + }, + "enabled_while_spectating": { + "name": "enabled_while_spectating", + "type": "boolean", + "mode": "[R]", + "doc": "If this custom input is enabled while using the spectator controlle" + }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, + "include_selected_prototype": { + "name": "include_selected_prototype", + "type": "boolean", + "mode": "[R]", + "doc": "If this custom input will include the selected prototype (if any) when triggere" + }, + "item_to_spawn": { + "name": "item_to_spawn", + "type": "LuaItemPrototype", + "mode": "[R]", + "doc": "The item that gets spawned when this custom input is fired or ````\nnil````" + }, "key_sequence": { "name": "key_sequence", "type": "string", @@ -1531,6 +1987,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -1544,7 +2006,7 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a custom input." + "doc": "" }, "LuaCustomTable": { "name": "LuaCustomTable", @@ -1556,6 +2018,12 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "operator []": { "name": "operator []", "mode": "[RW]", @@ -1574,7 +2042,7 @@ "doc": "Is this object valid?" } }, - "doc": "Lazily evaluated table.\n For performance reasons, we sometimes return a custom table-like type instead of a native Lua table. This custom\n type lazily constructs the necessary Lua wrappers of the corresponding C++ objects, therefore preventing their\n unnecessary construction in some cases." + "doc": "Access an element of this custom table." }, "LuaDamagePrototype": { "name": "LuaDamagePrototype", @@ -1608,6 +2076,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -1621,7 +2095,7 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a damage." + "doc": "" }, "LuaDeciderCombinatorControlBehavior": { "name": "LuaDeciderCombinatorControlBehavior", @@ -1673,11 +2147,17 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "parameters": { "name": "parameters", "type": "DeciderCombinatorParameters", "mode": "[RW]", - "doc": "The decider combinator parameters \n\n**Note: ** ````\nparameters````\nmay be ````\nnil````\nin order to clear the parameters." + "doc": "The decider combinator parameters \n\n**Note: ** Setting to ````\nnil````\nclears the parameters." }, "signals_last_tick": { "name": "signals_last_tick", @@ -1717,6 +2197,17 @@ "mode": "[R]", "doc": "The bounding box used for collision checking." }, + "collision_mask": { + "name": "collision_mask", + "type": "CollisionMask", + "mode": "[R]", + "doc": "The collision masks this decorative uses" + }, + "collision_mask_with_flags": { + "name": "collision_mask_with_flags", + "type": "CollisionMaskWithFlags", + "mode": "[R]" + }, "help": { "name": "help", "type": "string", @@ -1738,6 +2229,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -1751,7 +2248,7 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of an optimized decorative." + "doc": "" }, "LuaElectricEnergySourcePrototype": { "name": "LuaElectricEnergySourcePrototype", @@ -1783,6 +2280,12 @@ "type": "double", "mode": "[R]" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "output_flow_limit": { "name": "output_flow_limit", "type": "double", @@ -1810,87 +2313,15 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of an electric energy source." + "doc": "" }, "LuaEntity": { "name": "LuaEntity", "type": "LuaEntity", "inherits": [ - "Inherited from LuaControl: get_inventory, get_main_inventory, can_insert, insert, set_gui_arrow, clear_gui_arrow, get_item_count, has_items_inside, can_reach_entity, clear_items_inside, remove_item, teleport, update_selected_entity, clear_selected_entity, disable_flashlight, enable_flashlight, get_craftable_count, begin_crafting, cancel_crafting, mine_entity, mine_tile, is_player, open_technology_gui, surface, position, vehicle, force, selected, opened, crafting_queue_size, walking_state, riding_state, mining_state, shooting_state, picking_state, repair_state, cursor_stack, cursor_ghost, driving, crafting_queue, following_robots, cheat_mode, character_crafting_speed_modifier, character_mining_speed_modifier, character_additional_mining_categories, character_running_speed_modifier, character_build_distance_bonus, character_item_drop_distance_bonus, character_reach_distance_bonus, character_resource_reach_distance_bonus, character_item_pickup_distance_bonus, character_loot_pickup_distance_bonus, character_inventory_slots_bonus, character_logistic_slot_count_bonus, character_trash_slot_count_bonus, character_maximum_following_robot_count_bonus, character_health_bonus, auto_trash_filters, opened_gui_type, build_distance, drop_item_distance, reach_distance, item_pickup_distance, loot_pickup_distance, resource_reach_distance, in_combat, character_running_speed" + "Inherited from LuaControl: get_inventory, get_main_inventory, can_insert, insert, set_gui_arrow, clear_gui_arrow, get_item_count, has_items_inside, can_reach_entity, clear_items_inside, remove_item, teleport, update_selected_entity, clear_selected_entity, disable_flashlight, enable_flashlight, is_flashlight_enabled, get_craftable_count, begin_crafting, cancel_crafting, mine_entity, mine_tile, is_player, open_technology_gui, set_personal_logistic_slot, set_vehicle_logistic_slot, get_personal_logistic_slot, get_vehicle_logistic_slot, clear_personal_logistic_slot, clear_vehicle_logistic_slot, is_cursor_blueprint, get_blueprint_entities, surface, position, vehicle, force, selected, opened, crafting_queue_size, crafting_queue_progress, walking_state, riding_state, mining_state, shooting_state, picking_state, repair_state, cursor_stack, cursor_ghost, driving, crafting_queue, following_robots, cheat_mode, character_crafting_speed_modifier, character_mining_speed_modifier, character_additional_mining_categories, character_running_speed_modifier, character_build_distance_bonus, character_item_drop_distance_bonus, character_reach_distance_bonus, character_resource_reach_distance_bonus, character_item_pickup_distance_bonus, character_loot_pickup_distance_bonus, character_inventory_slots_bonus, character_trash_slot_count_bonus, character_maximum_following_robot_count_bonus, character_health_bonus, character_personal_logistic_requests_enabled, vehicle_logistic_requests_enabled, opened_gui_type, build_distance, drop_item_distance, reach_distance, item_pickup_distance, loot_pickup_distance, resource_reach_distance, in_combat, character_running_speed, character_mining_progress" ], "properties": { - "active": { - "name": "active", - "type": "boolean", - "mode": "[RW]", - "doc": "Deactivating an entity will stop all its operations (car will stop moving, inserte \nwill stop working, fish will stop moving etc) \n\n**Note: ** Entities that are not active naturally can't be set to be active (setti \nit to be active will do nothing) \n\n**Note: ** Ghosts, simple smoke, and corpses can't be modified at this time. \n\n**Note: ** It is even possible to set the character to not be active, so he can't move a \nperform most of the tasks." - }, - "add_market_item": { - "name": "add_market_item", - "doc": "Offer a thing on the marke \n\n**Parameters** \noffer :: [Offer](http://lua-api.factorio.com/latest/Concepts.html#Offer) \n\n**Example** \nAdds market offer, 1 copper ore for 10 iron or \n````\nmarket.add_market_item{price={{\"iron-ore\", 10}}, offer={type=\"give-item\", item=\"copper-ore\"}}```` \n\n**Example** \nAdds market offer, 1 copper ore for 5 iron ore and 5 stone or \n````\nmarket.add_market_item{price={{\"iron-ore\", 5}, {\"stone\", 5}}, offer={type=\"give-item\", item=\"copper-ore\"}}```` \n_Can only be used if this is Market_", - "type": "function", - "args": { - "offer": { - "name": "offer", - "type": "Offer", - "doc": "offer :: [Offer](http://lua-api.factorio.com/latest/Concepts.html#Offer)" - } - } - }, - "ai_settings": { - "name": "ai_settings", - "type": "LuaAISettings", - "mode": "[R]", - "doc": "The ai settings of this uni \n_Can only be used if this is Unit_" - }, - "alert_parameters": { - "name": "alert_parameters", - "type": "ProgrammableSpeakerAlertParameters", - "mode": "[RW]", - "doc": "_Can only be used if this is ProgrammableSpeaker_" - }, - "allow_dispatching_robots": { - "name": "allow_dispatching_robots", - "type": "boolean", - "mode": "[RW]", - "doc": "Whether this character's personal roboports are allowed to dispatch robot \n_Can only be used if this is Character_" - }, - "amount": { - "name": "amount", - "type": "uint", - "mode": "[RW]", - "doc": "Count of resource units containe \n_Can only be used if this is ResourceEntity_" - }, - "armed": { - "name": "armed", - "type": "boolean", - "mode": "[R]", - "doc": "If this land mine is arme \n_Can only be used if this is LandMine_" - }, - "associated_player": { - "name": "associated_player", - "type": "LuaPlayer", - "mode": "[RW]", - "doc": "The player this character is associated with or ````\nnil````\nif non \nWhen the player logs off in multiplayer all of the associated characters will be logged off with hi \n\n**Note: ** A character associated with a player is not directly controlled by any player. \n\n**Note: ** Set to ````\nnil````\nto clear. The player will be automatically disassociated when a controller is set on the character. \n_Can only be used if this is Character_" - }, - "auto_launch": { - "name": "auto_launch", - "type": "boolean", - "mode": "[RW]", - "doc": "Whether this rocket silo automatically launches the rocket when cargo is inserte \n_Can only be used if this is RocketSilo_" - }, - "auto_trash_filters": { - "name": "auto_trash_filters", - "type": "dictionary string → uint", - "mode": "[RW]", - "doc": "The auto-trash filters. The keys are item prototype names, the values are the slot values. \n\n**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)). \n\n**Example** \nThis will set the auto-trash slots to keep only at most 20 iron plates and 42 copper wires in the player \ninventor \n````\ngame.player.auto_trash_filters = {[\"iron-plate\"] = 20, [\"copper-cable\"] = 42}````" - }, - "backer_name": { - "name": "backer_name", - "type": "string", - "mode": "[RW]", - "doc": "The name of a backer (of Factorio) assigned to a lab or train station / sto \n\n**Note: ** Only useable on entities that support backer names. Returns ````\nnil````\nwhen the entity doesn't support a backer name." - }, "begin_crafting": { "name": "begin_crafting", "type": "function", @@ -1904,47 +2335,12 @@ } } }, - "belt_to_ground_type": { - "name": "belt_to_ground_type", - "type": "string", - "mode": "[R]", - "doc": "````\n\"input\"````\nor ````\n\"output\"````\n, depending on whether this underground belt goes down or u \n_Can only be used if this is TransportBeltToGround_" - }, - "bonus_mining_progress": { - "name": "bonus_mining_progress", - "type": "double", - "mode": "[RW]", - "doc": "The bonus mining progress for this mining drill or ````\nnil````\nif this isn't a mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_tim" - }, - "bonus_progress": { - "name": "bonus_progress", - "type": "double", - "mode": "[RW]", - "doc": "The current productivity bonus progress, as a number in range [0, 1 \n_Can only be used if this is CraftingMachine_" - }, - "bounding_box": { - "name": "bounding_box", - "type": "BoundingBox", - "mode": "[R]" - }, "build_distance": { "name": "build_distance", "type": "uint", "mode": "[R]", "doc": "The build distance of this character or max uint when not a character or player connected to a characte" }, - "burner": { - "name": "burner", - "type": "LuaBurner", - "mode": "[R]", - "doc": "The burner energy source for this entity or ````\nnil````\nif there isn't on" - }, - "can_be_destroyed": { - "name": "can_be_destroyed", - "type": "function", - "doc": "Checks if the entity can be destroy \n\n**Return value** \nif the entity can be destroyed.", - "returns": "boolean" - }, "can_insert": { "name": "can_insert", "type": "function", @@ -1983,47 +2379,6 @@ } } }, - "cancel_deconstruction": { - "name": "cancel_deconstruction", - "doc": "Cancels deconstruction if it is scheduled, does nothing otherwis \n\n**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force who did the deconstruction order. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any.", - "type": "function", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force who did the deconstruction order." - }, - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any." - } - } - }, - "cancel_upgrade": { - "name": "cancel_upgrade", - "type": "function", - "doc": "Cancels upgrade if it is scheduled, does nothing otherwis \n\n**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force who did the upgrade order. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \n\n**Return value** \nIf the cancel was successful.", - "returns": "boolean", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force who did the upgrade order." - }, - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any." - } - } - }, - "chain_signal_state": { - "name": "chain_signal_state", - "type": "defines.chain_signal_state", - "mode": "[R]", - "doc": "The state of this chain signa \n_Can only be used if this is RailChainSignal_" - }, "character_additional_mining_categories": { "name": "character_additional_mining_categories", "type": "array of string", @@ -2036,24 +2391,6 @@ "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "character_corpse_death_cause": { - "name": "character_corpse_death_cause", - "type": "LocalisedString", - "mode": "[RW]", - "doc": "The reason this character corpse character died (if any \n_Can only be used if this is CharacterCorpse_" - }, - "character_corpse_player_index": { - "name": "character_corpse_player_index", - "type": "uint", - "mode": "[RW]", - "doc": "The player index associated with this character corps \n\n**Note: ** The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists. \n_Can only be used if this is CharacterCorpse_" - }, - "character_corpse_tick_of_death": { - "name": "character_corpse_tick_of_death", - "type": "uint", - "mode": "[RW]", - "doc": "The tick this character corpse died a \n_Can only be used if this is CharacterCorpse_" - }, "character_crafting_speed_modifier": { "name": "character_crafting_speed_modifier", "type": "double", @@ -2084,12 +2421,6 @@ "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "character_logistic_slot_count_bonus": { - "name": "character_logistic_slot_count_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, "character_loot_pickup_distance_bonus": { "name": "character_loot_pickup_distance_bonus", "type": "uint", @@ -2102,12 +2433,24 @@ "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, + "character_mining_progress": { + "name": "character_mining_progress", + "type": "double", + "mode": "[R]", + "doc": "Gets the current mining progress between 0 and 1 of this character, or 0 if they aren't minin" + }, "character_mining_speed_modifier": { "name": "character_mining_speed_modifier", "type": "double", "mode": "[RW]", "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, + "character_personal_logistic_requests_enabled": { + "name": "character_personal_logistic_requests_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "If personal logistic requests are enabled for this character or players character." + }, "character_reach_distance_bonus": { "name": "character_reach_distance_bonus", "type": "uint", @@ -2144,23 +2487,6 @@ "mode": "[RW]", "doc": "When ````\ntrue````\nhand crafting is free and instant" }, - "circuit_connected_entities": { - "name": "circuit_connected_entities", - "type": "table", - "mode": "[R]", - "doc": "Entities connected to this entity via the circuit networ \nIt is a table: \nred :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Entities connected via the red wire. \ngreen :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Entities connected via the green wire." - }, - "circuit_connection_definitions": { - "name": "circuit_connection_definitions", - "mode": "[R]", - "doc": "The connection definition for entities connected to this entity via the circuit networ \nEach CircuitConnectionDefinition is a table: \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color, either [defines.wire_type.red](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) \n[defines.wire_type.green](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). \ntarget_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nsource_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ntarget_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "array of CircuitConnectionDefinition" - }, - "clear_fluid_inside": { - "name": "clear_fluid_inside", - "doc": "Remove all fluids from this entity.", - "type": "function" - }, "clear_gui_arrow": { "name": "clear_gui_arrow", "doc": "Removes the arrow created by ````\nset_gui_arrow````\n.", @@ -2171,109 +2497,34 @@ "doc": "Remove all items from this entity.", "type": "function" }, - "clear_market_items": { - "name": "clear_market_items", - "doc": "Removes all offers from a marke \n_Can only be used if this is Market_", - "type": "function" - }, - "clear_request_slot": { - "name": "clear_request_slot", - "doc": "Clear a logistic requester slot. \n\n**Parameters** \nslot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index. \n\n**Note: ** Useable only on entities that have requester slots.", + "clear_personal_logistic_slot": { + "name": "clear_personal_logistic_slot", "type": "function", "args": { - "slot": { - "name": "slot", + "slot_index": { + "name": "slot_index", "type": "uint", - "doc": "slot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index." + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." } - } + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if personal logistics are not researched." }, "clear_selected_entity": { "name": "clear_selected_entity", "doc": "Unselect any selected entity.", "type": "function" }, - "cliff_orientation": { - "name": "cliff_orientation", - "type": "string", - "mode": "[R]", - "doc": "The orientation of this clif" - }, - "clone": { - "name": "clone", - "type": "function", - "doc": "Clones this entit \n\n**Parameters** \nTable with the following fields: \nposition :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The destination position \nsurface :: [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html) (optional): The destination surface \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \n\n**Return value** \nThe cloned entity or ````\nnil````\nif this entity can't be cloned/can't be cloned to the given location. \n\n**Note: ** [defines.events.on_entity_cloned](http://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_cloned) is raised.", - "returns": "LuaEntity", - "args": { - "position": { - "name": "position", - "type": "LuaEntity", - "doc": "Table with the following fields: \nposition :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The destination position \nsurface :: [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html) (optional): The destination surface \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional)" - } - } - }, - "color": { - "name": "color", - "type": "Color", - "mode": "[RW]", - "doc": "The character, rolling stock, train stop, flying text, or simple-entity-with-owner color. Returns ````\nnil````\nif this entity doesn't use custom color" - }, - "connect_neighbour": { - "name": "connect_neighbour", - "type": "function", - "doc": "Connect two devices with wire or cable. \n\n**Parameters** \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table) \nTo connect two electric poles, target has to be a [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) specifying anoth \nelectric pole. This will connect them with copper cable. \nTo connect two devices with wire, this parameter is a tabl \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color, either [defines.wire_type.red](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) \n[defines.wire_type.green](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). \ntarget_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to connect the wire to \nsource_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory if the source entity has more than o \ncircuit connector. \ntarget_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory if the target entity has more than o \ncircuit connector. \n\n**Return value** \nWhether the connection was formed.", - "returns": "boolean", - "args": { - "target": { - "name": "target", - "type": "LuaEntity or table", - "doc": "target :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table) \nTo connect two electric poles, target has to be a [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) specifying anoth \nelectric pole. This will connect them with copper cable. \nTo connect two devices with wire, this parameter is a tabl \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color, either [defines.wire_type.red](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) \n[defines.wire_type.green](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). \ntarget_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to connect the wire to \nsource_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory if the source entity has more than o \ncircuit connector. \ntarget_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory if the target entity has more than o \ncircuit connector." - } - } - }, - "connect_rolling_stock": { - "name": "connect_rolling_stock", - "type": "function", - "doc": "Connects the rolling stock in the given directio \n\n**Parameters** \ndirection :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) \n\n**Return value** \nIf any connection was made", - "returns": "boolean", - "args": { - "direction": { - "name": "direction", - "type": "defines.rail_direction", - "doc": "direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction)" - } - } - }, - "connected_rail": { - "name": "connected_rail", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The rail entity this train stop is connected to or ````\nnil````\nif there is non \n_Can only be used if this is TrainStop_" - }, - "consumption_modifier": { - "name": "consumption_modifier", - "type": "float", - "mode": "[RW]", - "doc": "Multiplies the energy consumptio \n_Can only be used if this is Car_" - }, - "copy_settings": { - "name": "copy_settings", + "clear_vehicle_logistic_slot": { + "name": "clear_vehicle_logistic_slot", "type": "function", - "doc": "Copies settings from the given entity onto this entit \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \n\n**Return value** \nAny items removed from this entity as a result of copying the settings.", - "returns": "dictionary string → uint", "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." } - } - }, - "crafting_progress": { - "name": "crafting_progress", - "type": "float", - "mode": "[RW]", - "doc": "The current crafting progress, as a number in range [0, 1 \n_Can only be used if this is CraftingMachine_" + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if the vehicle does not use logistics." }, "crafting_queue": { "name": "crafting_queue", @@ -2281,23 +2532,18 @@ "doc": "Gets the current crafting queue items. Each CraftingQueueItem is a table: \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The recipe. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count being crafted.", "type": "array of CraftingQueueItem" }, + "crafting_queue_progress": { + "name": "crafting_queue_progress", + "type": "double", + "mode": "[R]", + "doc": "The crafting queue progress [0- \n0 when no recipe is being crafte" + }, "crafting_queue_size": { "name": "crafting_queue_size", "type": "uint", "mode": "[R]", "doc": "Size of the crafting queue." }, - "crafting_speed": { - "name": "crafting_speed", - "type": "double", - "mode": "[R]", - "doc": "The current crafting speed, including speed bonuses from modules and beacon \n_Can only be used if this is CraftingMachine_" - }, - "create_build_effect_smoke": { - "name": "create_build_effect_smoke", - "doc": "Creates the same smoke that is created when you place a building by han \nYou can play the building sound to go with it by using [LuaSurface::play_sound](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.play_sound), e \nentity.surface.play_sound{path=\"entity-build/\"..entity.prototype.name, position=entity.position}", - "type": "function" - }, "cursor_ghost": { "name": "cursor_ghost", "type": "ItemPrototypeSpecification", @@ -2308,110 +2554,13 @@ "name": "cursor_stack", "type": "LuaItemStack", "mode": "[R]", - "doc": "The player's cursor stack." - }, - "damage": { - "name": "damage", - "type": "function", - "doc": "Damages the entit \n\n**Parameters** \ndamage :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The amount of damage to be done \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that will be doing the damage. \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The type of damage to be done. \n\n**Return value** \nthe total damage actually applied after resistances. \n_Can only be used if this is EntityWithHealth_", - "returns": "float", - "args": { - "damage": { - "name": "damage", - "type": "float", - "doc": "damage :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The amount of damage to be done" - }, - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that will be doing the damage." - }, - "type": { - "name": "type", - "type": "string", - "doc": "type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The type of damage to be done." - } - } - }, - "damage_dealt": { - "name": "damage_dealt", - "type": "double", - "mode": "[RW]", - "doc": "The damage dealt by this turret, artillery turret, or artillery wago \n_Can only be used if this is Turret_" - }, - "destroy": { - "name": "destroy", - "type": "function", - "doc": "Destroys the entit \n\n**Parameters** \nopts (optional): Table with the following fields: \ndo_cliff_correction :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If neighbouring cliffs should be corrected. Defaults to false. \nraise_destroy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_destroy](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_destroy) will be called. \n\n**Return value** \nif the entity was actually destroyed. \n\n**Note: ** Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.", - "returns": "boolean", - "args": { - "opts": { - "name": "opts", - "type": "boolean", - "doc": "opts (optional): Table with the following fields: \ndo_cliff_correction :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If neighbouring cliffs should be corrected. Defaults to false. \nraise_destroy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_destroy](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_destroy) will be called." - } - } - }, - "destructible": { - "name": "destructible", - "type": "boolean", - "mode": "[RW]", - "doc": "When the entity is not destructible it can't be damaged \n\n**Note: ** An indestructible entity can still be mined. \n\n**Note: ** Entities that are indestructible naturally (they have no health, like smok \nresource etc) can't be set to be destructible." - }, - "die": { - "name": "die", - "type": "function", - "doc": "Immediately kills the entity. Doesn't care whether the entity is destroyable or damageabl \nDoes nothing if the entity doesn't have healt \nUnlike [LuaEntity::destroy](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy), die will trigger [on_entity_died](http://lua-api.factorio.com/latest/events.html#on_entity_die \nand the entity will drop loot and corpse if it have an \n\n**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to attribute the kill to. \ncause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The cause to attribute the kill to. \n\n**Return value** \nIf the entity was killed. \n\n**Note: ** Pass ````\nnil````\nfor force if you just want to provide the cause entity.", - "returns": "boolean", - "args": { - "cause": { - "name": "cause", - "type": "LuaEntity", - "doc": "cause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The cause to attribute the kill to." - }, - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to attribute the kill to." - } - } - }, - "direction": { - "name": "direction", - "type": "defines.direction", - "mode": "[RW]", - "doc": "The current direction this entity is facin" + "doc": "The player's cursor stack, or ````\nnil````\nif the player controller is a spectator. Even though this property is marked as read-only, it returns a [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html), meaning it can be manipulated like so: \n\n**Example** \n````\nplayer.cursor_stack.clear()````" }, "disable_flashlight": { "name": "disable_flashlight", "doc": "Disable the flashlight.", "type": "function" }, - "disconnect_neighbour": { - "name": "disconnect_neighbour", - "doc": "Disconnect wires or cables. \n\n**Parameters** \ntarget :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table) (optional) \nTo remove all copper cables, leave this parameter out: ````\npole.disconnect_neighbour()```` \nTo remove all wires of a specific color, pass [defines.wire_type.red](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) \n[defines.wire_type.green](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). \nTo remove a specific copper cable between two poles, target can be a [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.htm \nspecifying the other pole. E.g. ````\npole1.disconnect_neighbour(pole2)````\n. \nTo remove a specific red or green wire, pass a table in the same format as f \n[LuaEntity::connect_neighbour](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_neighbour \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color \ntarget_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nsource_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ntarget_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "function", - "args": { - "target": { - "name": "target", - "type": "defines.wire_type or LuaEntity or table", - "doc": "target :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table) (optional) \nTo remove all copper cables, leave this parameter out: ````\npole.disconnect_neighbour()```` \nTo remove all wires of a specific color, pass [defines.wire_type.red](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) \n[defines.wire_type.green](http://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). \nTo remove a specific copper cable between two poles, target can be a [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.htm \nspecifying the other pole. E.g. ````\npole1.disconnect_neighbour(pole2)````\n. \nTo remove a specific red or green wire, pass a table in the same format as f \n[LuaEntity::connect_neighbour](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_neighbour \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color \ntarget_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nsource_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ntarget_circuit_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)" - } - } - }, - "disconnect_rolling_stock": { - "name": "disconnect_rolling_stock", - "type": "function", - "doc": "Tries to disconnect this rolling stock in the given directio \n\n**Parameters** \ndirection :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) \n\n**Return value** \nIf anything was disconnected", - "returns": "boolean", - "args": { - "direction": { - "name": "direction", - "type": "defines.rail_direction", - "doc": "direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction)" - } - } - }, "driving": { "name": "driving", "type": "boolean", @@ -2424,101 +2573,11 @@ "mode": "[R]", "doc": "The item drop distance of this character or max uint when not a character or player connected to a characte" }, - "drop_position": { - "name": "drop_position", - "type": "Position", - "mode": "[RW]", - "doc": "Position where the entity puts its stuf \n\n**Note: ** Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have ````\nallow_custom_vectors````\nset to true on their prototype to allow changing the drop position." - }, - "drop_target": { - "name": "drop_target", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The entity this entity is putting its stuff to or ````\nnil````\nif there is no such entit \n\n**Note: ** Meaningful only for entities that put stuff somewhere, such as mining drills or inserters." - }, - "effectivity_modifier": { - "name": "effectivity_modifier", - "type": "float", - "mode": "[RW]", - "doc": "Multiplies the acceleration the vehicle can create for one unit of energy. By defau \nis ````\n1````\n. \n_Can only be used if this is Car_" - }, - "effects": { - "name": "effects", - "type": "Effects", - "mode": "[R]", - "doc": "The effects being applied to this entity or ````\nnil````\n. For beacons this is the effect the beacon is broadcastin" - }, - "electric_buffer_size": { - "name": "electric_buffer_size", - "type": "double", - "mode": "[RW]", - "doc": "The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source. \n\n**Note: ** Write access is limited to the ElectricEnergyInterface type" - }, - "electric_drain": { - "name": "electric_drain", - "type": "double", - "mode": "[R]", - "doc": "The electric drain for the electric energy source or nil if the entity doesn't have an electric energy source." - }, - "electric_emissions": { - "name": "electric_emissions", - "type": "double", - "mode": "[R]", - "doc": "The emissions for the electric energy source or nil if the entity doesn't have an electric energy source." - }, - "electric_input_flow_limit": { - "name": "electric_input_flow_limit", - "type": "double", - "mode": "[R]", - "doc": "The input flow limit for the electric energy source or nil if the entity doesn't have an electric energy source." - }, - "electric_network_id": { - "name": "electric_network_id", - "type": "uint", - "mode": "[R]", - "doc": "Returns the id of the electric network that this entity is connected to or ````\nnil````" - }, - "electric_network_statistics": { - "name": "electric_network_statistics", - "type": "LuaFlowStatistics", - "mode": "[R]", - "doc": "The electric network statistics for this electric pol \n_Can only be used if this is ElectricPole_" - }, - "electric_output_flow_limit": { - "name": "electric_output_flow_limit", - "type": "double", - "mode": "[R]", - "doc": "The output flow limit for the electric energy source or nil if the entity doesn't have an electric energy source." - }, "enable_flashlight": { "name": "enable_flashlight", "doc": "Enable the flashlight.", "type": "function" }, - "enable_logistics_while_moving": { - "name": "enable_logistics_while_moving", - "type": "boolean", - "mode": "[RW]", - "doc": "If equipment grid logistics are enabled while this vehicle is movin \n_Can only be used if this is Vehicle_" - }, - "energy": { - "name": "energy", - "type": "double", - "mode": "[RW]", - "doc": "Energy stored in the entity (heat in furnace, energy stored in electrical devices etc. \nalways 0 for entities that don't have the concept of energy stored inside \n\n**Example** \n````\ngame.player.print(\"Machine energy: \" .. game.player.selected.energy .. \"J\") \ngame.player.selected.energy = 3000````" - }, - "filter_slot_count": { - "name": "filter_slot_count", - "type": "uint", - "mode": "[R]", - "doc": "The number of filter slots this inserter or loader has. 0 if not an inserter or loade" - }, - "fluidbox": { - "name": "fluidbox", - "type": "LuaFluidBox", - "mode": "[RW]", - "doc": "Fluidboxes of this entit" - }, "following_robots": { "name": "following_robots", "type": "array of LuaEntity", @@ -2531,72 +2590,11 @@ "mode": "[RW]", "doc": "The force of this entity. Reading will always give a [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html), but it is possible \nassign either [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) to this attribute to change the forc" }, - "friction_modifier": { - "name": "friction_modifier", - "type": "float", - "mode": "[RW]", - "doc": "Multiplies the car friction rate \n\n**Example** \nThis will allow the car to go much fast \n````\ngame.player.vehicle.friction_modifier = 0.5```` \n_Can only be used if this is Car_" - }, - "get_beam_source": { - "name": "get_beam_source", - "type": "function", - "doc": "Get the source of this bea \n_Can only be used if this is Beam_", - "returns": "BeamTarget" - }, - "get_beam_target": { - "name": "get_beam_target", - "type": "function", - "doc": "Get the target of this bea \n_Can only be used if this is Beam_", - "returns": "BeamTarget" - }, - "get_burnt_result_inventory": { - "name": "get_burnt_result_inventory", - "type": "function", - "doc": "The burnt result inventory for this entity or ````\nnil````\nif this entity doesn't have a burnt result inventor", - "returns": "LuaInventory" - }, - "get_circuit_network": { - "name": "get_circuit_network", - "type": "function", - "returns": "LuaCircuitNetwork", - "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." - } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." - }, - "get_connected_rail": { - "name": "get_connected_rail", - "type": "function", - "returns": "LuaEntity", - "args": { - "rail_direction": { - "name": "rail_direction", - "type": "defines.rail_direction", - "doc": "Table with the following fields: \nrail_direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) \nrail_connection_direction :: [defines.rail_connection_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction)" - } - }, - "doc": "**Parameters** \nTable with the following fields: \nrail_direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) \nrail_connection_direction :: [defines.rail_connection_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction) \n\n**Return value** \nRail connected in the specified manner to this one. \n_Can only be used if this is Rail_" - }, - "get_connected_rails": { - "name": "get_connected_rails", - "type": "function", - "doc": "Get the rails that this signal is connected t \n_Can only be used if this is RailSignal_", - "returns": "array of LuaEntity" - }, - "get_control_behavior": { - "name": "get_control_behavior", + "get_blueprint_entities": { + "name": "get_blueprint_entities", + "doc": "Returns the same type of data as [LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities), but works for the currently selected blueprin \nregardless of it being in a blueprint book or picked from the blueprint library.", "type": "function", - "doc": "Gets the control behavior of the entity (if any). \n\n**Return value** \nThe control behavior or nil.", - "returns": "LuaControlBehavior" + "returns": "array of blueprint entity" }, "get_craftable_count": { "name": "get_craftable_count", @@ -2611,81 +2609,6 @@ } } }, - "get_driver": { - "name": "get_driver", - "type": "function", - "doc": "Gets the driver of this vehicle if any. \n\n**Note: ** May be ````\nnil````\nif the vehicle contains no driver. To check if there's a passenger see [LuaEntity::get_passenger](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger). \n_Can only be used if this is Vehicle_", - "returns": "LuaEntity or LuaPlayer" - }, - "get_filter": { - "name": "get_filter", - "type": "function", - "doc": "Get the filter for a slot in an inserter or a loader. \n\n**Parameters** \nuint: Slot to get the filter of. \n\n**Return value** \nPrototype name of the item being filtered; ````\nnil````\nif the given sl \nhas no filter. \n\n**Note: ** The inserter/loader must allow filters.", - "returns": "string", - "args": { - "uint": { - "name": "uint", - "doc": "uint: Slot to get the filter of.", - "type": "uint" - } - } - }, - "get_fluid_contents": { - "name": "get_fluid_contents", - "type": "function", - "doc": "Get amounts of all fluids in this entity. \n\n**Return value** \nThe amounts, indexed by fluid names.", - "returns": "dictionary string → double" - }, - "get_fluid_count": { - "name": "get_fluid_count", - "type": "function", - "doc": "Get the amount of all or some fluid in this entity. \n\n**Parameters** \nfluid :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the fluid to count. If not specified, count all fluids.", - "returns": "double", - "args": { - "fluid": { - "name": "fluid", - "type": "string", - "doc": "fluid :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the fluid to count. If not specified, count all fluids." - } - } - }, - "get_fuel_inventory": { - "name": "get_fuel_inventory", - "type": "function", - "doc": "The fuel inventory for this entity or ````\nnil````\nif this entity doesn't have a fuel inventor", - "returns": "LuaInventory" - }, - "get_health_ratio": { - "name": "get_health_ratio", - "type": "function", - "doc": "The health ratio of this entity between 1 and 0 (for full health and no health respectively", - "returns": "float" - }, - "get_heat_setting": { - "name": "get_heat_setting", - "type": "function", - "doc": "Gets the heat setting for this heat interfac \n_Can only be used if this is HeatInterface_", - "returns": "HeatSetting" - }, - "get_infinity_container_filter": { - "name": "get_infinity_container_filter", - "type": "function", - "doc": "Gets the filter for this infinity container at the given index or ````\nnil````\nif the filter index doesn't exist or is empt \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get. \n_Can only be used if this is InfinityContainer_", - "returns": "InfinityContainerFilter", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get." - } - } - }, - "get_infinity_pipe_filter": { - "name": "get_infinity_pipe_filter", - "type": "function", - "doc": "Gets the filter for this infinity pipe or ````\nnil````\nif the filter is empt \n_Can only be used if this is InfinityPipe_", - "returns": "InfinityPipeFilter" - }, "get_inventory": { "name": "get_inventory", "type": "function", @@ -2712,1314 +2635,1153 @@ } } }, - "get_logistic_point": { - "name": "get_logistic_point", - "type": "function", - "doc": "Gets the [LuaLogisticPoint](http://lua-api.factorio.com/latest/LuaLogisticPoint.html) specified by the given index or if not given returns all of the points this entity own \n\n**Parameters** \ndefines.logistic_member_index (optional) \n\n**Note: ** When the index is not given for most entities this will be a single entry. For some (such as the player character) this can be zero or more.", - "returns": "LuaLogisticPoint or array of LuaLogisticPoint", - "args": { - "defines.logistic_member_index": { - "name": "defines.logistic_member_index", - "doc": "defines.logistic_member_index (optional)", - "type": "defines.logistic_member_index" - } - } - }, "get_main_inventory": { "name": "get_main_inventory", "type": "function", "doc": "Gets the main inventory for this character or player if this is a character or player. \n\n**Return value** \nor ````\nnil````\nif this entity is not a character or player.", "returns": "LuaInventory" }, - "get_market_items": { - "name": "get_market_items", - "type": "function", - "doc": "Get all offers in a market as an arra \n_Can only be used if this is Market_", - "returns": "array of Offer" - }, - "get_max_transport_line_index": { - "name": "get_max_transport_line_index", + "get_personal_logistic_slot": { + "name": "get_personal_logistic_slot", "type": "function", - "doc": "Get the maximum transport line index of a belt or belt connectable entit \n_Can only be used if this is TransportBeltConnectable_", - "returns": "uint" + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if personal logistics aren't researched yet.", + "returns": "PersonalLogisticParameters", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." + } + } }, - "get_merged_signals": { - "name": "get_merged_signals", + "get_vehicle_logistic_slot": { + "name": "get_vehicle_logistic_slot", "type": "function", - "doc": "The merged circuit network signals or ````\nnil````\nif there are no signal \n\n**Parameters** \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get signals fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe sum of signals on both the red and green networks, or nil if it doesn't have a circuit connector.", - "returns": "array of Signal", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if the vehicle does not use logistics.", + "returns": "PersonalLogisticParameters", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get signals fo \nMust be specified for entities with more than one circuit network connector." + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." } } }, - "get_module_inventory": { - "name": "get_module_inventory", + "has_items_inside": { + "name": "has_items_inside", "type": "function", - "returns": "LuaInventory", - "doc": "**Return value** \nInventory for storing modules of this entity; ````\nnil````\nif this entity h \nno module inventory." + "doc": "Does this entity have any item inside it?", + "returns": "boolean" }, - "get_or_create_control_behavior": { - "name": "get_or_create_control_behavior", - "type": "function", - "doc": "Gets (and or creates if needed) the control behavior of the entity. \n\n**Return value** \nThe control behavior or nil.", - "returns": "LuaControlBehavior" + "in_combat": { + "name": "in_combat", + "type": "boolean", + "mode": "[R]", + "doc": "If this character entity is in comba" }, - "get_output_inventory": { - "name": "get_output_inventory", + "insert": { + "name": "insert", "type": "function", - "doc": "Gets the entities output inventory if it has on \n\n**Return value** \na reference to the entities output inventory.", - "returns": "LuaInventory" + "doc": "Insert items into this entity. This works the same way as inserters or shift-clicking: the \"bes \ninventory is chosen automatically. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", + "returns": "uint", + "args": { + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." + } + } }, - "get_passenger": { - "name": "get_passenger", + "is_cursor_blueprint": { + "name": "is_cursor_blueprint", "type": "function", - "doc": "Gets the passenger of this car if any. \n\n**Note: ** May be ````\nnil````\nif the vehicle contains no passenger. To check if there's a driver see [LuaEntity::get_driver](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver). \n\n**Note: ** This differs over [LuaEntity::get_driver](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver) in that the passenger can't drive the car. \n_Can only be used if this is Car_", - "returns": "LuaEntity or LuaPlayer" + "doc": "Returns whether the player is holding a blueprint, it takes into account a blueprint as an item as well as bluepri \nfrom the blueprint record from the blueprint librar \nNote that the is_cursor_blueprint and get_cursor_blueprint_entities refer to the currently selected blueprint, \nit returns blueprint related information also when holding a blueprint book with a blueprint being selected in it.", + "returns": "boolean" }, - "get_radius": { - "name": "get_radius", - "type": "function", - "doc": "The radius of this entit", - "returns": "double" + "is_flashlight_enabled": { + "name": "is_flashlight_enabled", + "doc": "Is the flashlight enabled.", + "type": "function" }, - "get_rail_segment_end": { - "name": "get_rail_segment_end", + "is_player": { + "name": "is_player", "type": "function", - "doc": "Get the rail at the end of the rail segment this rail is i \n\n**Parameters** \ndirection :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) \n\n**Note: ** A rail segment is a continuous section of rail with no branches, signals, nor train stops. \n\n**Note: ** This function has a second return value. A [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction) that points out of the rail segment from the end rail. \n_Can only be used if this is Rail_", - "returns": "LuaEntity", - "args": { - "direction": { - "name": "direction", - "type": "defines.rail_direction", - "doc": "direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction)" - } - } + "doc": "When ````\ntrue````\ncontrol adapter is a LuaPlayer object, ````\nfalse````\nfor entities including characters with players", + "returns": "boolean" + }, + "item_pickup_distance": { + "name": "item_pickup_distance", + "type": "double", + "mode": "[R]", + "doc": "The item pickup distance of this character or max double when not a character or player connected to a characte" + }, + "loot_pickup_distance": { + "name": "loot_pickup_distance", + "type": "double", + "mode": "[R]", + "doc": "The loot pickup distance of this character or max double when not a character or player connected to a characte" }, - "get_rail_segment_entity": { - "name": "get_rail_segment_entity", + "mine_entity": { + "name": "mine_entity", "type": "function", - "doc": "Get the rail signal or train stop at the start/end of the rail segment this rail is in, or ````\nnil````\nif the rail segment doesn't start/end with a signal nor a train sto \n\n**Parameters** \ndirection :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction): The direction of travel relative to this rail. \nin_else_out :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment. \n\n**Note: ** A rail segment is a continuous section of rail with no branches, signals, nor train stops. \n_Can only be used if this is Rail_", - "returns": "LuaEntity", + "doc": "Mines the given entity as if this player (or character) mined i \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player. \n\n**Return value** \nIf the mining succeeded.", + "returns": "boolean", "args": { - "direction": { - "name": "direction", - "type": "defines.rail_direction", - "doc": "direction :: [defines.rail_direction](http://lua-api.factorio.com/latest/defines.html#defines.rail_direction): The direction of travel relative to this rail." + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine" }, - "in_else_out": { - "name": "in_else_out", + "force": { + "name": "force", "type": "boolean", - "doc": "in_else_out :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment." + "doc": "force :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player." } } }, - "get_rail_segment_length": { - "name": "get_rail_segment_length", + "mine_tile": { + "name": "mine_tile", "type": "function", - "doc": "Get the length of the rail segment this rail is i \n\n**Note: ** A rail segment is a continuous section of rail with no branches, signals, nor train stops. \n_Can only be used if this is Rail_", - "returns": "double" - }, - "get_rail_segment_overlaps": { - "name": "get_rail_segment_overlaps", - "type": "function", - "doc": "Get a rail from each rail segment that overlaps with this rail's rail segmen \n\n**Note: ** A rail segment is a continuous section of rail with no branches, signals, nor train stops. \n_Can only be used if this is Rail_", - "returns": "array of LuaEntity" - }, - "get_recipe": { - "name": "get_recipe", - "type": "function", - "doc": "Current recipe being assembled by this machine or ````\nnil````\nif no recipe is se \n_Can only be used if this is CraftingMachine_", - "returns": "LuaRecipe" - }, - "get_request_slot": { - "name": "get_request_slot", - "type": "function", - "doc": "Get a logistic requester slot. \n\n**Parameters** \nslot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index. \n\n**Return value** \nContents of the specified slot; ````\nnil````\nif the given slot contains no request. \n\n**Note: ** Useable only on entities that have requester slots.", - "returns": "SimpleItemStack", + "doc": "Mines the given tile as if this player (or character) mined i \n\n**Parameters** \ntile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine. \n\n**Return value** \nIf the mining succeeded.", + "returns": "boolean", "args": { - "slot": { - "name": "slot", - "type": "uint", - "doc": "slot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index." + "tile": { + "name": "tile", + "type": "LuaTile", + "doc": "tile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine." } } }, - "get_stopped_train": { - "name": "get_stopped_train", - "type": "function", - "doc": "The train currently stopped at this train stop or ````\nnil````\nif non \n_Can only be used if this is TrainStop_", - "returns": "LuaTrain" - }, - "get_train_stop_trains": { - "name": "get_train_stop_trains", - "type": "function", - "doc": "The trains scheduled to stop at this train sto \n_Can only be used if this is TrainStop_", - "returns": "array of LuaTrain" - }, - "get_transport_line": { - "name": "get_transport_line", - "type": "function", - "doc": "Get a transport line of a belt or belt connectable entity. \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the requested transport line. \n_Can only be used if this is TransportBeltConnectable_", - "returns": "LuaTransportLine", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the requested transport line." - } - } + "mining_state": { + "name": "mining_state", + "type": "table", + "mode": "[RW]", + "doc": "Current mining stat \nIt is a table with two fields: \nmining :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the player is mining at all \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor). \n\n**Note: ** When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected) and [LuaControl::update_selected_entity](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity)." }, - "ghost_has_flag": { - "name": "ghost_has_flag", + "open_technology_gui": { + "name": "open_technology_gui", + "doc": "Open the technology GUI and select a given technolog \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI.", "type": "function", - "doc": "Same as [LuaEntity::has_flag](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag) but targets the inner entity on a entity ghos \n\n**Parameters** \nflag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to test \n\n**Return value** \n````\ntrue````\nif the entity has the given flag set.", - "returns": "boolean", "args": { - "flag": { - "name": "flag", - "type": "string", - "doc": "flag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to test" + "technology": { + "name": "technology", + "type": "TechnologySpecification", + "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI." } } }, - "ghost_localised_description": { - "name": "ghost_localised_description", - "type": "LocalisedString", - "mode": "[R]", - "doc": "_Can only be used if this is Ghost_" - }, - "ghost_localised_name": { - "name": "ghost_localised_name", - "type": "LocalisedString", - "mode": "[R]", - "doc": "Localised name of the entity or tile contained in this ghos \n_Can only be used if this is Ghost_" - }, - "ghost_name": { - "name": "ghost_name", - "type": "string", - "mode": "[R]", - "doc": "Name of the entity or tile contained in this gho \n_Can only be used if this is Ghost_" - }, - "ghost_prototype": { - "name": "ghost_prototype", - "type": "LuaEntityPrototype or LuaTilePrototype", - "mode": "[R]", - "doc": "The prototype of the entity or tile contained in this ghos \n_Can only be used if this is Ghost_" + "opened": { + "name": "opened", + "type": "LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type", + "mode": "[RW]", + "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, equipment-grid, player, element or nil." }, - "ghost_type": { - "name": "ghost_type", - "type": "string", + "opened_gui_type": { + "name": "opened_gui_type", + "type": "defines.gui_type", "mode": "[R]", - "doc": "The prototype type of the entity or tile contained in this ghos \n_Can only be used if this is Ghost_" + "doc": "Returns the [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type) or ````\nnil````\n." }, - "graphics_variation": { - "name": "graphics_variation", - "type": "uint8", + "picking_state": { + "name": "picking_state", + "type": "boolean", "mode": "[RW]", - "doc": "The graphics variation for this entity or ````\nnil````\nif this entity doesn't use graphics variation" + "doc": "Current item-picking stat" }, - "grid": { - "name": "grid", - "type": "LuaEquipmentGrid", + "position": { + "name": "position", + "type": "Position", "mode": "[R]", - "doc": "The equipment grid or ````\nnil````\nif this entity doesn't have an equipment gri" + "doc": "Current position of the entity." }, - "has_command": { - "name": "has_command", - "type": "function", - "doc": "Has this unit been assigned a comman \n_Can only be used if this is Unit_", - "returns": "boolean" + "reach_distance": { + "name": "reach_distance", + "type": "uint", + "mode": "[R]", + "doc": "The reach distance of this character or max uint when not a character or player connected to a characte" }, - "has_flag": { - "name": "has_flag", + "remove_item": { + "name": "remove_item", "type": "function", - "doc": "Test whether this entity's prototype has a flag set \n\n**Parameters** \nflag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to test \n\n**Return value** \n````\ntrue````\nif the entity has the given flag set. \n\n**Note: ** ````\nentity.has_flag(f)````\nis a shortcut for ````\nentity.prototype.has_flag(f)````\n.", - "returns": "boolean", + "doc": "Remove items from this entity. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", + "returns": "uint", "args": { - "flag": { - "name": "flag", - "type": "string", - "doc": "flag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to test" + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." } } }, - "has_items_inside": { - "name": "has_items_inside", - "type": "function", - "doc": "Does this entity have any item inside it?", - "returns": "boolean" - }, - "health": { - "name": "health", - "type": "float", - "mode": "[RW]", - "doc": "Health of the entity. Setting health to less than 0 will set health to 0, entiti \nwith 0 health can not be attacked. Setting health to higher than max health wi \nset health to max health. \n\n**Note: ** If used on an entity that doesn't support health, this field will be ````\nnil````\n." - }, - "held_stack": { - "name": "held_stack", - "type": "LuaItemStack", - "mode": "[R]", - "doc": "The item stack currently held in an inserter's han \n_Can only be used if this is Inserter_" - }, - "held_stack_position": { - "name": "held_stack_position", - "type": "Position", - "mode": "[R]", - "doc": "Current position of the inserter's \"hand \n_Can only be used if this is Inserter_" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "highlight_box_blink_interval": { - "name": "highlight_box_blink_interval", - "type": "uint", - "mode": "[RW]", - "doc": "The blink interval of this highlight box entit \n0 indicates no blin \n_Can only be used if this is HighlightBox_" - }, - "highlight_box_type": { - "name": "highlight_box_type", - "type": "string", + "repair_state": { + "name": "repair_state", + "type": "table", "mode": "[RW]", - "doc": "The hightlight box type of this highlight box entit \n_Can only be used if this is HighlightBox_" + "doc": "Current repair stat \nIt is a table with two fields: \nrepairing :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being repaired" }, - "in_combat": { - "name": "in_combat", - "type": "boolean", + "resource_reach_distance": { + "name": "resource_reach_distance", + "type": "double", "mode": "[R]", - "doc": "If this character entity is in comba" + "doc": "The resource reach distance of this character or max double when not a character or player connected to a characte" }, - "infinity_container_filters": { - "name": "infinity_container_filters", - "type": "array of InfinityContainerFilter", + "riding_state": { + "name": "riding_state", + "type": "RidingState", "mode": "[RW]", - "doc": "The filters for this infinity containe \n_Can only be used if this is InfinityContainer_" + "doc": "Current riding state of this car or the vehicle this player is riding i" }, - "initial_amount": { - "name": "initial_amount", - "type": "uint", + "selected": { + "name": "selected", + "type": "LuaEntity", "mode": "[RW]", - "doc": "Count of initial resource units containe \n\n**Note: ** If this is not an infinite resource reading will give ````\nnil````\nand writing will give an error. \n_Can only be used if this is ResourceEntity_" + "doc": "The currently selected entity; ````\nnil````\nif none. Assigning an entity will select it if selectable otherwise clears selection." }, - "insert": { - "name": "insert", + "set_gui_arrow": { + "name": "set_gui_arrow", + "doc": "Create an arrow which points at this entity. This is used in the tutorial. For examples, see ````\ncontrol.lua```` \nin the campaign missions. \n\n**Parameters** \nTable with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n.", "type": "function", - "doc": "Insert items into this entity. This works the same way as inserters or shift-clicking: the \"bes \ninventory is chosen automatically. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", - "returns": "uint", "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." + "type": { + "name": "type", + "type": "string", + "doc": "Table with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n." } } }, - "insert_fluid": { - "name": "insert_fluid", + "set_personal_logistic_slot": { + "name": "set_personal_logistic_slot", "type": "function", - "doc": "Insert fluid into this entit \nFluidbox is chosen automatically. \n\n**Parameters** \nfluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid): Fluid to insert. \n\n**Return value** \nAmount of fluid actually inserted.", - "returns": "double", + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if personal logistics are not researched.", + "returns": "boolean", "args": { - "fluid": { - "name": "fluid", - "type": "Fluid", - "doc": "fluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid): Fluid to insert." + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" } } }, - "inserter_filter_mode": { - "name": "inserter_filter_mode", - "type": "string", - "mode": "[RW]", - "doc": "The filter mode for this filter inserter: \"whitelist\", \"blacklist\", or ````\nnil````\nif this inserter doesn't use filter \n_Can only be used if this is Inserter_" - }, - "inserter_stack_size_override": { - "name": "inserter_stack_size_override", - "type": "uint", - "mode": "[RW]", - "doc": "Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignore \n\n**Note: ** Set to 0 to reset." - }, - "is_closed": { - "name": "is_closed", - "type": "function", - "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this gate is currently closed. \n_Can only be used if this is Gate_" - }, - "is_closing": { - "name": "is_closing", + "set_vehicle_logistic_slot": { + "name": "set_vehicle_logistic_slot", "type": "function", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if the spider does not use logistics.", "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this gate is currently closing \n_Can only be used if this is Gate_" - }, - "is_connected_to_electric_network": { - "name": "is_connected_to_electric_network", - "type": "function", - "doc": "Returns true if this entity is connected to an electric network.", - "returns": "boolean" + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" + } + } }, - "is_crafting": { - "name": "is_crafting", - "type": "function", - "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this machine is currently crafting. \n_Can only be used if this is CraftingMachine_" + "shooting_state": { + "name": "shooting_state", + "type": "table", + "mode": "[RW]", + "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" }, - "is_opened": { - "name": "is_opened", - "type": "function", - "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this gate is currently opened. \n_Can only be used if this is Gate_" + "surface": { + "name": "surface", + "type": "LuaSurface", + "mode": "[R]", + "doc": "The surface this entity is currently on." }, - "is_opening": { - "name": "is_opening", + "teleport": { + "name": "teleport", "type": "function", + "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, transport bel \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this gate is currently opening. \n_Can only be used if this is Gate_" + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface." + } + } }, - "is_player": { - "name": "is_player", + "update_selected_entity": { + "name": "update_selected_entity", + "doc": "Select an entity, as if by hovering the mouse above it. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select", "type": "function", - "doc": "When ````\ntrue````\ncontrol adapter is a LuaPlayer object, ````\nfalse````\nfor entities including characters with players", - "returns": "boolean" + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select" + } + } }, - "item_pickup_distance": { - "name": "item_pickup_distance", - "type": "double", + "vehicle": { + "name": "vehicle", + "type": "LuaEntity", "mode": "[R]", - "doc": "The item pickup distance of this character or max double when not a character or player connected to a characte" + "doc": "The vehicle the player is currently sitting in; ````\nnil````\nif none." }, - "item_requests": { - "name": "item_requests", - "type": "dictionary string → uint", + "vehicle_logistic_requests_enabled": { + "name": "vehicle_logistic_requests_enabled", + "type": "boolean", "mode": "[RW]", - "doc": "Items this ghost will request when revived or items this item request proxy is requestin \nResult is a dictionary mapping each item prototype name to the required count." + "doc": "If personal logistic requests are enabled for this vehicle (spidertron)." }, - "kills": { - "name": "kills", - "type": "uint", + "walking_state": { + "name": "walking_state", + "type": "table", "mode": "[RW]", - "doc": "The number of units killed by this turret, artillery turret, or artillery wago \n_Can only be used if this is Turret_" + "doc": "Current walking stat \nIt is a table with two fields: \nwalking :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If ````\nfalse````\n, the player is currently not walking; otherwise it's going somewhere \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): Direction where the player is walking \n\n**Example** \nMake the player go north. Note that a one-shot action like this will only make the player walk for one tic \n````\ngame.player.walking_state = {walking = true, direction = defines.direction.north}````" + } + } + }, + "LuaEntityPrototype": { + "name": "LuaEntityPrototype", + "type": "LuaEntityPrototype", + "inherits": [], + "properties": {} + }, + "LuaEquipment": { + "name": "LuaEquipment", + "type": "LuaEquipment", + "inherits": [], + "properties": { + "burner": { + "name": "burner", + "type": "LuaBurner", + "mode": "[R]", + "doc": "The burner energy source for this equipment or ````\nnil````\nif there isn't on" }, - "last_user": { - "name": "last_user", - "type": "LuaPlayer", + "energy": { + "name": "energy", + "type": "double", "mode": "[RW]", - "doc": "The player who built the enti \n_Can only be used if this is EntityWithOwner_" + "doc": "Current available energy." }, - "launch_rocket": { - "name": "launch_rocket", - "type": "function", - "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif the rocket was successfully launched. \n\n**Return value** \nof ````\nfalse```` \nmeans the silo is not ready for launch. \n_Can only be used if this is RocketSilo_" + "generator_power": { + "name": "generator_power", + "type": "double", + "mode": "[R]", + "doc": "Energy generated per tick." }, - "loader_type": { - "name": "loader_type", + "help": { + "name": "help", "type": "string", - "mode": "[RW]", - "doc": "````\n\"input\"````\nor ````\n\"output\"````\n, depending on whether this loader puts to or gets from a containe \n_Can only be used if this is Loader_" - }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" + "doc": "All methods, and properties that this object supports." }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", + "max_energy": { + "name": "max_energy", + "type": "double", "mode": "[R]", - "doc": "Localised name of the entit" + "doc": "Maximum amount of energy that can be stored in this equipment." }, - "logistic_cell": { - "name": "logistic_cell", - "type": "LuaLogisticCell", + "max_shield": { + "name": "max_shield", + "type": "double", "mode": "[R]", - "doc": "The logistic cell this entity is a part of. Will be ````\nnil````\nif this entity is not a part of any logistic cel" + "doc": "Maximum shield value." }, - "logistic_network": { - "name": "logistic_network", - "type": "LuaLogisticNetwork", + "max_solar_power": { + "name": "max_solar_power", + "type": "double", "mode": "[R]", - "doc": "The logistic network this entity is a part o" + "doc": "Maximum solar power generated." }, - "loot_pickup_distance": { - "name": "loot_pickup_distance", + "movement_bonus": { + "name": "movement_bonus", "type": "double", "mode": "[R]", - "doc": "The loot pickup distance of this character or max double when not a character or player connected to a characte" + "doc": "Movement speed bonus." }, - "minable": { - "name": "minable", - "type": "boolean", - "mode": "[RW]", - "doc": "**Note: ** Not minable entities can still be destroyed. \n\n**Note: ** Entities that are not minable naturally (like smoke, character, enemy units et \ncan't be set to minable." + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this equipment." }, - "mine_entity": { - "name": "mine_entity", - "type": "function", - "doc": "Mines the given entity as if this player (or character) mined i \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player. \n\n**Return value** \nIf the mining succeeded.", - "returns": "boolean", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine" - }, - "force": { - "name": "force", - "type": "boolean", - "doc": "force :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player." - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "mine_tile": { - "name": "mine_tile", - "type": "function", - "doc": "Mines the given tile as if this player (or character) mined i \n\n**Parameters** \ntile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine. \n\n**Return value** \nIf the mining succeeded.", - "returns": "boolean", - "args": { - "tile": { - "name": "tile", - "type": "LuaTile", - "doc": "tile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine." - } - } + "position": { + "name": "position", + "type": "Position", + "mode": "[R]", + "doc": "Position of this equipment in the equipment grid." }, - "mining_progress": { - "name": "mining_progress", - "type": "double", - "mode": "[RW]", - "doc": "The mining progress for this mining drill or ````\nnil````\nif this isn't a mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_tim" + "prototype": { + "name": "prototype", + "type": "LuaEquipmentPrototype", + "mode": "[R]" }, - "mining_state": { - "name": "mining_state", + "shape": { + "name": "shape", "type": "table", + "mode": "[R]", + "doc": "Shape of this equipment. It is a table: \nwidth :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nheight :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + }, + "shield": { + "name": "shield", + "type": "double", "mode": "[RW]", - "doc": "Current mining stat \nIt is a table with two fields: \nmining :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the player is mining at all \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor). \n\n**Note: ** When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected) and [LuaControl::update_selected_entity](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity)." + "doc": "Current shield value of the equipmen \n\n**Note: ** Can't be set higher than [LuaEquipment::max_shield](http://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_shield)." }, - "mining_target": { - "name": "mining_target", - "type": "LuaEntity", + "type": { + "name": "type", + "type": "string", "mode": "[R]", - "doc": "The mining target or ````\nnil````\nif no \n_Can only be used if this is MiningDrill_" + "doc": "Type of this equipment." }, - "moving": { - "name": "moving", - "type": "LuaEntity", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "Returns true if this unit is movin \n_Can only be used if this is Unit_" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaEquipmentCategoryPrototype": { + "name": "LuaEquipmentCategoryPrototype", + "type": "LuaEquipmentCategoryPrototype", + "inherits": [], + "properties": { + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, "name": { "name": "name", "type": "string", "mode": "[R]", - "doc": "Name of the entity prototype. E.g. \"inserter\" or \"filter-inserter" + "doc": "Name of this prototype." }, - "neighbour_bonus": { - "name": "neighbour_bonus", - "type": "double", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The current total neighbour bonus of this reacto \n_Can only be used if this is Reactor_" + "doc": "The class name of this object." }, - "neighbours": { - "name": "neighbours", - "type": "dictionary string → array of LuaEntity or array of array of LuaEntity or LuaEntity", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "When called on an electric pole, this is a dictionary of all connections, index \nby the strings ````\n\"copper\"````\n, ````\n\"red\"````\n, and ````\n\"green\"````\n. \nWhen called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to. \nWhen called on an underground transport belt, this is the other end of t \nunderground belt connection, or ````\nnil````\nif none. \nWhen 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\"." - }, - "open_technology_gui": { - "name": "open_technology_gui", - "doc": "Open the technology GUI and select a given technolog \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI.", - "type": "function", - "args": { - "technology": { - "name": "technology", - "type": "TechnologySpecification", - "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI." - } - } - }, - "opened": { - "name": "opened", - "type": "LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type", - "mode": "[RW]", - "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, element or nil." + "doc": "Order string of this prototype." }, - "opened_gui_type": { - "name": "opened_gui_type", - "type": "defines.gui_type", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "Returns the [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type) or ````\nnil````\n." + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaEquipmentGrid": { + "name": "LuaEquipmentGrid", + "type": "LuaEquipmentGrid", + "inherits": [], + "properties": { + "available_in_batteries": { + "name": "available_in_batteries", + "type": "double", + "mode": "[R]", + "doc": "The total energy stored in all batteries in the equipment grid." }, - "operable": { - "name": "operable", - "type": "boolean", - "mode": "[RW]", - "doc": "Player can't open gui of this entity and he can't quick insert/input stuff in to the enti \nwhen it is not operabl" + "battery_capacity": { + "name": "battery_capacity", + "type": "double", + "mode": "[R]", + "doc": "Total energy storage capacity of all batteries in the equipment grid." }, - "order_deconstruction": { - "name": "order_deconstruction", + "can_move": { + "name": "can_move", "type": "function", - "doc": "Sets the entity to be deconstructed by construction robot \n\n**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose robots are supposed to do the deconstruction. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \n\n**Return value** \nif the entity was marked for deconstruction.", + "doc": "Check whether moving an equipment would succeed \n\n**Parameters** \nTable with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it", "returns": "boolean", "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose robots are supposed to do the deconstruction." - }, - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any." + "equipment": { + "name": "equipment", + "type": "LuaEquipment", + "doc": "Table with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it" } } }, - "order_upgrade": { - "name": "order_upgrade", + "clear": { + "name": "clear", + "doc": "Clear all equipment from the grid, i.e. remove it without actually returning i \n\n**Parameters** \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided, the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered.", "type": "function", - "doc": "Sets the entity to be upgraded by construction robot \n\n**Parameters** \nTable with the following fields: \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose robots are supposed to do the upgrade. \ntarget :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification): The prototype of the entity to upgrade to. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional) \n\n**Return value** \nif the entity was marked for upgrade.", - "returns": "boolean", "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "Table with the following fields: \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose robots are supposed to do the upgrade. \ntarget :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification): The prototype of the entity to upgrade to. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional)" + "by_player": { + "name": "by_player", + "type": "PlayerSpecification", + "doc": "by_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided, the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered." } } }, - "orientation": { - "name": "orientation", - "type": "float", - "mode": "[RW]", - "doc": "The smooth orientatio" - }, - "parameters": { - "name": "parameters", - "type": "ProgrammableSpeakerParameters", - "mode": "[RW]", - "doc": "_Can only be used if this is ProgrammableSpeaker_" - }, - "picking_state": { - "name": "picking_state", - "type": "boolean", - "mode": "[RW]", - "doc": "Current item-picking stat" - }, - "pickup_position": { - "name": "pickup_position", - "type": "Position", - "mode": "[RW]", - "doc": "Where the inserter will pick up items fro \n\n**Note: ** Inserters must have ````\nallow_custom_vectors````\nset to true on their prototype to allow changing the pickup position. \n_Can only be used if this is Inserter_" + "equipment": { + "name": "equipment", + "type": "array of LuaEquipment", + "mode": "[R]", + "doc": "All the equipment in this grid." }, - "pickup_target": { - "name": "pickup_target", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The entity the inserter will attempt to pick up from. For example, this can be a transport belt or \nstorage ches \n_Can only be used if this is Inserter_" + "generator_energy": { + "name": "generator_energy", + "type": "double", + "mode": "[R]", + "doc": "Total energy per tick generated by the equipment inside this grid." }, - "play_note": { - "name": "play_note", + "get": { + "name": "get", "type": "function", - "doc": "Plays a note with the given instrument and not \n\n**Parameters** \ninstrument :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nnote :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Return value** \nIf the request is valid. The sound may or may not be played depending on polyphony settings. \n_Can only be used if this is ProgrammableSpeaker_", - "returns": "boolean", + "doc": "Find equipment in the Equipment Grid based off a position \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position \n\n**Return value** \nThe found equipment, or ````\nnil````\nif equipment could not be found at the given position.", + "returns": "LuaEquipment", "args": { - "instrument": { - "name": "instrument", - "type": "uint", - "doc": "instrument :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - }, - "note": { - "name": "note", - "type": "uint", - "doc": "note :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position" } } }, - "player": { - "name": "player", - "type": "LuaPlayer", - "mode": "[R]", - "doc": "The player connected to this character or ````\nnil````\nif non \n_Can only be used if this is Character_" + "get_contents": { + "name": "get_contents", + "type": "function", + "doc": "Get counts of all equipment in this grid. \n\n**Return value** \nThe counts, indexed by equipment names.", + "returns": "dictionary string → uint" }, - "position": { - "name": "position", - "type": "Position", + "height": { + "name": "height", + "type": "uint", "mode": "[R]", - "doc": "Current position of the entity." + "doc": "Height of the equipment grid." }, - "power_production": { - "name": "power_production", - "type": "double", - "mode": "[RW]", - "doc": "The power production specific to the ElectricEnergyInterface entity typ \n_Can only be used if this is ElectricEnergyInterface_" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "power_switch_state": { - "name": "power_switch_state", + "inhibit_movement_bonus": { + "name": "inhibit_movement_bonus", "type": "boolean", "mode": "[RW]", - "doc": "The state of this power switc" - }, - "power_usage": { - "name": "power_usage", - "type": "double", - "mode": "[RW]", - "doc": "The power usage specific to the ElectricEnergyInterface entity typ \n_Can only be used if this is ElectricEnergyInterface_" - }, - "previous_recipe": { - "name": "previous_recipe", - "type": "LuaRecipe", - "mode": "[R]", - "doc": "The previous recipe this furnace was using or nil if the furnace had no previous recip \n_Can only be used if this is Furnace_" - }, - "products_finished": { - "name": "products_finished", - "type": "uint", - "mode": "[RW]", - "doc": "_Can only be used if this is CraftingMachine_" + "doc": "True if this movement bonus equipment is turned off, otherwise fals" }, - "prototype": { - "name": "prototype", - "type": "LuaEntityPrototype", + "max_shield": { + "name": "max_shield", + "type": "float", "mode": "[R]", - "doc": "The entity prototype of this entity." + "doc": "The maximum amount of shields this equipment grid ha" }, - "proxy_target": { - "name": "proxy_target", - "type": "LuaEntity", + "max_solar_energy": { + "name": "max_solar_energy", + "type": "double", "mode": "[R]", - "doc": "The target entity for this item-request-proxy or ````\nnil````" + "doc": "Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generat \nenergy varies depending on the daylight levels." }, - "pump_rail_target": { - "name": "pump_rail_target", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The rail target of this pump or ````\nnil```` \n_Can only be used if this is Pump_" + "move": { + "name": "move", + "type": "function", + "doc": "Move an equipment within this grid \n\n**Parameters** \nTable with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it \n\n**Return value** \n````\ntrue````\nif the equipment was successfully moved.", + "returns": "boolean", + "args": { + "equipment": { + "name": "equipment", + "type": "LuaEquipment", + "doc": "Table with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it" + } + } }, - "reach_distance": { - "name": "reach_distance", - "type": "uint", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The reach distance of this character or max uint when not a character or player connected to a characte" + "doc": "The class name of this object." }, - "recipe_locked": { - "name": "recipe_locked", - "type": "boolean", - "mode": "[RW]", - "doc": "When locked; the recipe in this assembling machine can't be changed by the playe \n_Can only be used if this is AssemblingMachine_" - }, - "relative_turret_orientation": { - "name": "relative_turret_orientation", - "type": "float", - "mode": "[RW]", - "doc": "The relative orientation of the vehicle turret or ````\nnil````\nif this entity isn't a vehicle or have a vehicle turre \n\n**Note: ** Writing does nothing if the vehicle doesn't have a turret. \n_Can only be used if this is Vehicle_" - }, - "release_from_spawner": { - "name": "release_from_spawner", - "doc": "Release the unit from the spawner which spawned it. This allows the spawner to continue spawning additional unit \n_Can only be used if this is Unit_", - "type": "function" + "prototype": { + "name": "prototype", + "type": "LuaEquipmentGridPrototype", + "mode": "[R]" }, - "remove_fluid": { - "name": "remove_fluid", + "put": { + "name": "put", "type": "function", - "doc": "Remove fluid from this entity. \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name. \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount to remove \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \ntemperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \n\n**Return value** \nAmount of fluid actually removed. \n\n**Note: ** If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.", - "returns": "double", + "doc": "Insert an equipment into the grid \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Equipment prototype name \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Grid position to put the equipment in. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided the action is done 'as' this player and [on_player_placed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) is triggered. \n\n**Return value** \nThe newly-added equipment, or ````\nnil````\nif the equipment could not be added.", + "returns": "LuaEquipment", "args": { "name": { "name": "name", "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name. \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount to remove \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \ntemperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)" + "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Equipment prototype name \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Grid position to put the equipment in. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided the action is done 'as' this player and [on_player_placed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) is triggered." } } }, - "remove_item": { - "name": "remove_item", + "shield": { + "name": "shield", + "type": "float", + "mode": "[R]", + "doc": "The amount of shields this equipment grid ha" + }, + "take": { + "name": "take", "type": "function", - "doc": "Remove items from this entity. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", - "returns": "uint", + "doc": "Remove an equipment from the grid \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Take the equipment that contains this position in the grid. \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): Take this exact equipment. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered. \nEither ````\nposition````\nor ````\nequipment````\nmust be specified. \n\n**Return value** \nThe removed equipment, or ````\nnil````\nif no equipment was removed.", + "returns": "SimpleItemStack", "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." + "position": { + "name": "position", + "type": "Position", + "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Take the equipment that contains this position in the grid. \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): Take this exact equipment. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered. \nEither ````\nposition````\nor ````\nequipment````\nmust be specified." } } }, - "remove_market_item": { - "name": "remove_market_item", + "take_all": { + "name": "take_all", "type": "function", - "doc": "Remove an offer from a marke \n\n**Parameters** \noffer :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of offer to remove. \n\n**Return value** \n````\ntrue````\nif the offer was successfully removed; ````\nfalse````\nwhen the given index was not valid. \n\n**Note: ** The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array. \n_Can only be used if this is Market_", - "returns": "boolean", + "doc": "Remove all equipment from the gri \n\n**Parameters** \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided, the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered. \n\n**Return value** \nCount of each removed equipment, indexed by their prototype names.", + "returns": "dictionary string → uint", "args": { - "offer": { - "name": "offer", - "type": "uint", - "doc": "offer :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of offer to remove." + "by_player": { + "name": "by_player", + "type": "PlayerSpecification", + "doc": "by_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If provided, the action is done 'as' this player and [on_player_removed_equipment](http://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered." } } }, - "remove_unfiltered_items": { - "name": "remove_unfiltered_items", + "valid": { + "name": "valid", "type": "boolean", - "mode": "[RW]", - "doc": "If items not included in this infinity container filters should be removed from the containe \n_Can only be used if this is InfinityContainer_" - }, - "render_player": { - "name": "render_player", - "type": "LuaPlayer", - "mode": "[RW]", - "doc": "The player that this simple-entity-with-owner, simple-entity-with-force, flying-text or highlight-box is visible to or ````\nnil````\n. Set to ````\nnil````\nto clea" - }, - "render_to_forces": { - "name": "render_to_forces", - "type": "array of ForceSpecification", - "mode": "[RW]", - "doc": "The forces that this simple-entity-with-owner, simple-entity-with-force or flying-text is visible to or ````\nnil````\n. Set to ````\nnil````\nto clea \n\n**Note: ** Reading will always give an array of [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html)" - }, - "repair_state": { - "name": "repair_state", - "type": "table", - "mode": "[RW]", - "doc": "Current repair stat \nIt is a table with two fields: \nrepairing :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being repaired" + "mode": "[R]", + "doc": "Is this object valid?" }, - "request_slot_count": { - "name": "request_slot_count", + "width": { + "name": "width", "type": "uint", "mode": "[R]", - "doc": "The number of request slots this entity ha" - }, - "request_to_close": { - "name": "request_to_close", - "type": "function", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that requests the gate to be closed." - } - }, - "doc": "**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that requests the gate to be closed. \n_Can only be used if this is Gate_" - }, - "request_to_open": { - "name": "request_to_open", - "type": "function", - "args": { - "extra_time": { - "name": "extra_time", - "type": "uint", - "doc": "extra_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Extra ticks to stay open." - }, - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that requests the gate to be open." - } - }, - "doc": "**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force that requests the gate to be open. \nextra_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Extra ticks to stay open. \n_Can only be used if this is Gate_" - }, - "resource_reach_distance": { - "name": "resource_reach_distance", - "type": "double", + "doc": "Width of the equipment grid." + } + }, + "doc": "Remove an equipment from the grid." + }, + "LuaEquipmentGridPrototype": { + "name": "LuaEquipmentGridPrototype", + "type": "LuaEquipmentGridPrototype", + "inherits": [], + "properties": { + "equipment_categories": { + "name": "equipment_categories", + "type": "array of string", "mode": "[R]", - "doc": "The resource reach distance of this character or max double when not a character or player connected to a characte" + "doc": "Equipment category names for the categories that may be inserted into this equipment grid. The grid will acce \nany equipment that has at least one category in this lis \nSee also \n[LuaEquipmentPrototype::equipment_categories](http://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.equipment_categories)" }, - "revive": { - "name": "revive", - "type": "function", - "doc": "Revive a ghost. I.e. turn it from a ghost to a real entity or tile. \n\n**Parameters** \nopts (optional): Table with the following fields: \nreturn_item_request_proxy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\nthe function will return item request proxy as the third parameter. \nraise_revive :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_revive](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_revive) will be called. \n\n**Return value** \nAny items the new real entity collided with or ````\nnil````\nif the ghost could not be revived. \n\n**Note: ** If this is an entity ghost and it is successfully revived this will also return the revived entity or ````\nnil````\nas a second return val \nand possibly item request proxy as the third parameter depending on value of return_item_request_proxy.", - "returns": "dictionary string → uint", - "args": { - "opts": { - "name": "opts", - "type": "boolean", - "doc": "opts (optional): Table with the following fields: \nreturn_item_request_proxy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\nthe function will return item request proxy as the third parameter. \nraise_revive :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_revive](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_revive) will be called." - } - } + "height": { + "name": "height", + "type": "uint", + "mode": "[R]" }, - "riding_state": { - "name": "riding_state", - "type": "RidingState", - "mode": "[RW]", - "doc": "Current riding state of this car or the vehicle this player is riding i" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "rocket_parts": { - "name": "rocket_parts", - "type": "uint", - "mode": "[RW]", - "doc": "Number of rocket parts in the sil \n_Can only be used if this is RocketSilo_" + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "rotatable": { - "name": "rotatable", + "locked": { + "name": "locked", "type": "boolean", - "mode": "[RW]", - "doc": "When entity is not to be rotatable (inserter, transport belt etc), it can't be rotat \nby player using the R key. \n\n**Note: ** Entities that are not rotatable naturally (like chest or furnace) can't be set \nbe rotatable." + "mode": "[R]", + "doc": "If the player can move equipment into or out of this gri" }, - "rotate": { - "name": "rotate", - "type": "function", - "doc": "Rotates this entity as if the player rotated \n\n**Parameters** \noptions (optional): Table with the following fields: \nreverse :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \nby_player :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) (optional) \nspill_items :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the player is not given should extra items be spilled or returned as a second return value from this. \nenable_looted :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, each spilled item will be flagged with the [LuaEntity::to_be_looted](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When provided the spilled items will be marked for deconstruction by this force. \n\n**Return value** \nIf the rotation was successful.", - "returns": "boolean", - "args": { - "options": { - "name": "options", - "type": "boolean", - "doc": "options (optional): Table with the following fields: \nreverse :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \nby_player :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) (optional) \nspill_items :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the player is not given should extra items be spilled or returned as a second return value from this. \nenable_looted :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, each spilled item will be flagged with the [LuaEntity::to_be_looted](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When provided the spilled items will be marked for deconstruction by this force." - } - } + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." }, - "secondary_bounding_box": { - "name": "secondary_bounding_box", - "type": "BoundingBox", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The secondary bounding box of this entity or ````\nnil````\nif it doesn't have on" + "doc": "The class name of this object." }, - "secondary_selection_box": { - "name": "secondary_selection_box", - "type": "BoundingBox", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "The secondary selection box of this entity or ````\nnil````\nif it doesn't have on" + "doc": "Order string of this prototype." }, - "selected": { - "name": "selected", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The currently selected entity; ````\nnil````\nif none. Assigning an entity will select it if selectable otherwise clears selection." + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" }, - "selected_gun_index": { - "name": "selected_gun_index", + "width": { + "name": "width", "type": "uint", - "mode": "[RW]", - "doc": "Index of the currently selected weapon slot of this characte \n_Can only be used if this is Character_" - }, - "selection_box": { - "name": "selection_box", - "type": "BoundingBox", "mode": "[R]" + } + }, + "doc": "" + }, + "LuaEquipmentPrototype": { + "name": "LuaEquipmentPrototype", + "type": "LuaEquipmentPrototype", + "inherits": [], + "properties": { + "attack_parameters": { + "name": "attack_parameters", + "type": "AttackParameters", + "mode": "[R]", + "doc": "The equipment attack parameters or ````\nnil````" }, - "set_beam_source": { - "name": "set_beam_source", - "doc": "Set the source of this bea \n\n**Parameters** \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \n_Can only be used if this is Beam_", - "type": "function", - "args": { - "source": { - "name": "source", - "type": "LuaEntity or Position", - "doc": "source :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "automatic": { + "name": "automatic", + "type": "boolean", + "mode": "[R]", + "doc": "Is this active defense equipment automati \nReturns false if not active defense equipmen" }, - "set_beam_target": { - "name": "set_beam_target", - "doc": "Set the target of this bea \n\n**Parameters** \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \n_Can only be used if this is Beam_", - "type": "function", - "args": { - "target": { - "name": "target", - "type": "LuaEntity or Position", - "doc": "target :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "background_color": { + "name": "background_color", + "type": "Color", + "mode": "[R]", + "doc": "The background color of this equipment prototype." }, - "set_command": { - "name": "set_command", - "doc": "Give the entity a comman \n\n**Parameters** \ncommand :: [Command](http://lua-api.factorio.com/latest/Concepts.html#Command) \n_Can only be used if this is Unit_", - "type": "function", - "args": { - "command": { - "name": "command", - "type": "Command", - "doc": "command :: [Command](http://lua-api.factorio.com/latest/Concepts.html#Command)" - } - } + "burner_prototype": { + "name": "burner_prototype", + "type": "LuaBurnerPrototype", + "mode": "[R]", + "doc": "The burner energy source prototype this equipment uses or ````\nnil````" }, - "set_driver": { - "name": "set_driver", - "doc": "Sets the driver of this vehicl \n\n**Parameters** \ndriver :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html): The new passenger or ````\nnil````\nto eject the current driver if any. \n\n**Note: ** This differs over [LuaEntity::set_passenger](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger) in that the passenger can't drive the vehicle. \n_Can only be used if this is Vehicle_", - "type": "function", - "args": { - "driver": { - "name": "driver", - "type": "LuaEntity or LuaPlayer", - "doc": "driver :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html): The new passenger or ````\nnil````\nto eject the current driver if any." - } - } + "electric_energy_source_prototype": { + "name": "electric_energy_source_prototype", + "type": "LuaElectricEnergySourcePrototype", + "mode": "[R]", + "doc": "The electric energy source prototype this equipment uses or ````\nnil````" }, - "set_filter": { - "name": "set_filter", - "doc": "Set the filter for a slot in an inserter or a loader \n\n**Parameters** \nuint: Slot to set the filter of. \nstring: Prototype name of the item to filter. \n\n**Note: ** The inserter/loader must allow filters.", - "args": { - "string": { - "name": "string", - "doc": "string: Prototype name of the item to filter.", - "type": "string" - }, - "uint": { - "name": "uint", - "doc": "uint: Slot to set the filter of.", - "type": "uint" - } - }, - "type": "function" + "energy_consumption": { + "name": "energy_consumption", + "type": "double", + "mode": "[R]" }, - "set_gui_arrow": { - "name": "set_gui_arrow", - "doc": "Create an arrow which points at this entity. This is used in the tutorial. For examples, see ````\ncontrol.lua```` \nin the campaign missions. \n\n**Parameters** \nTable with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n.", - "type": "function", - "args": { - "type": { - "name": "type", - "type": "string", - "doc": "Table with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n." - } - } + "energy_per_shield": { + "name": "energy_per_shield", + "type": "double", + "mode": "[R]", + "doc": "The energy per shield point restored. 0 for non-shield equipment." }, - "set_heat_setting": { - "name": "set_heat_setting", - "doc": "Sets the heat setting for this heat interfac \n\n**Parameters** \nfilter :: [HeatSetting](http://lua-api.factorio.com/latest/Concepts.html#HeatSetting): The new setting. \n_Can only be used if this is HeatInterface_", - "type": "function", - "args": { - "filter": { - "name": "filter", - "type": "HeatSetting", - "doc": "filter :: [HeatSetting](http://lua-api.factorio.com/latest/Concepts.html#HeatSetting): The new setting." - } - } + "energy_production": { + "name": "energy_production", + "type": "double", + "mode": "[R]", + "doc": "The max power generated by this equipment." }, - "set_infinity_container_filter": { - "name": "set_infinity_container_filter", - "doc": "Sets the filter for this infinity container at the given inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to set. \nfilter :: [InfinityContainerFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityContainerFilter): The new filter or ````\nnil````\nto clear the filter. \n_Can only be used if this is InfinityContainer_", - "type": "function", - "args": { - "filter": { - "name": "filter", - "type": "InfinityContainerFilter", - "doc": "filter :: [InfinityContainerFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityContainerFilter): The new filter or ````\nnil````\nto clear the filter." - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to set." - } - } + "energy_source": { + "name": "energy_source", + "type": "LuaElectricEnergySourcePrototype", + "mode": "[R]", + "doc": "The energy source prototype for the equipment." }, - "set_infinity_pipe_filter": { - "name": "set_infinity_pipe_filter", - "doc": "Sets the filter for this infinity pip \n\n**Parameters** \nfilter :: [InfinityPipeFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter): The new filter or ````\nnil````\nto clear the filter. \n_Can only be used if this is InfinityPipe_", - "type": "function", - "args": { - "filter": { - "name": "filter", - "type": "InfinityPipeFilter", - "doc": "filter :: [InfinityPipeFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter): The new filter or ````\nnil````\nto clear the filter." - } - } + "equipment_categories": { + "name": "equipment_categories", + "type": "array of string", + "mode": "[R]", + "doc": "Category names for this equipment. These categories will be used to determine whether this equipment is allow \nin a particular equipment gri \nSee also \n[LuaEquipmentGridPrototype::equipment_categories](http://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.equipment_categories)" }, - "set_passenger": { - "name": "set_passenger", - "doc": "Sets the passenger of this ca \n\n**Parameters** \npassenger :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) \n\n**Note: ** This differs over [LuaEntity::get_driver](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver) in that the passenger can't drive the car. \n_Can only be used if this is Car_", - "type": "function", - "args": { - "passenger": { - "name": "passenger", - "type": "LuaEntity or LuaPlayer", - "doc": "passenger :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html)" - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "set_recipe": { - "name": "set_recipe", - "type": "function", - "doc": "Sets the current recipe in this assembly machin \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The new recipe or ````\nnil````\nto clear the recipe. \n\n**Return value** \nAny items removed from this entity as a result of setting the recipe. \n_Can only be used if this is CraftingMachine_", - "returns": "dictionary string → uint", - "args": { - "recipe": { - "name": "recipe", - "type": "string or LuaRecipe", - "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The new recipe or ````\nnil````\nto clear the recipe." - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "set_request_slot": { - "name": "set_request_slot", - "doc": "Set a logistic requester slot. \n\n**Parameters** \nrequest :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to request. \nslot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index. \n\n**Note: ** Useable only on entities that have requester slots.", - "type": "function", - "args": { - "request": { - "name": "request", - "type": "ItemStackSpecification", - "doc": "request :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to request." - }, - "slot": { - "name": "slot", - "type": "uint", - "doc": "slot :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot index." - } - } + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "shooting_state": { - "name": "shooting_state", + "logistic_parameters": { + "name": "logistic_parameters", "type": "table", - "mode": "[RW]", - "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" - }, - "shooting_target": { - "name": "shooting_target", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The shooting target for this turret or ````\nnil````" - }, - "signal_state": { - "name": "signal_state", - "type": "defines.signal_state", - "mode": "[R]", - "doc": "The state of this rail signa \n_Can only be used if this is RailSignal_" - }, - "silent_revive": { - "name": "silent_revive", - "type": "function", - "doc": "Revives a ghost silently. \n\n**Parameters** \nopts (optional): Table with the following fields: \nreturn_item_request_proxy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\nthe function will return item request proxy as the third parameter. \nraise_revive :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_revive](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_revive) will be called. \n\n**Return value** \nAny items the new real entity collided with or ````\nnil````\nif the ghost could not be revived. \n\n**Note: ** If this is an entity ghost and it is successfully revived this will also return the revived entity or ````\nnil````\nas a second return val \nand possibly item request proxy as the third parameter depending on value of return_item_request_proxy.", - "returns": "dictionary string → uint", - "args": { - "opts": { - "name": "opts", - "type": "boolean", - "doc": "opts (optional): Table with the following fields: \nreturn_item_request_proxy :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\nthe function will return item request proxy as the third parameter. \nraise_revive :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_revive](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_revive) will be called." - } - } - }, - "spawner": { - "name": "spawner", - "type": "LuaEntity", "mode": "[R]", - "doc": "The spawner associated with this unit entity or ````\nnil````\nif the unit has no associated spawne" + "doc": "The logistic parameters for roboport equipmen \nTable with the following fields: \nspawn_and_station_height :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharge_approach_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nlogistic_radius :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nconstruction_radius :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharging_station_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ncharging_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharging_station_shift :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \ncharging_energy :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \ncharging_threshold_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nrobot_vertical_acceleration :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nstationing_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nrobot_limit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nlogistics_connection_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" }, - "speed": { - "name": "speed", + "movement_bonus": { + "name": "movement_bonus", "type": "float", - "mode": "[RW]", - "doc": "The current speed of the car or rolling stock, or current max speed of the unit. Only the speed of units and cars is writabl" - }, - "splitter_filter": { - "name": "splitter_filter", - "type": "LuaItemPrototype", - "mode": "[RW]", - "doc": "The filter for this splitter or ````\nnil````\nif no filter is se \n_Can only be used if this is Splitter_" + "mode": "[R]", + "doc": "_Can only be used if this is MovementBonusEquipmentPrototype_" }, - "splitter_input_priority": { - "name": "splitter_input_priority", + "name": { + "name": "name", "type": "string", - "mode": "[RW]", - "doc": "The input priority for this splitter : \"left\", \"none\", or \"right \n_Can only be used if this is Splitter_" + "mode": "[R]", + "doc": "Name of this prototype." }, - "splitter_output_priority": { - "name": "splitter_output_priority", + "object_name": { + "name": "object_name", "type": "string", - "mode": "[RW]", - "doc": "The output priority for this splitter : \"left\", \"none\", or \"right \n_Can only be used if this is Splitter_" + "mode": "[R]", + "doc": "The class name of this object." }, - "stack": { - "name": "stack", - "type": "LuaItemStack", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "_Can only be used if this is ItemEntity_" + "doc": "Order string of this prototype." }, - "status": { - "name": "status", - "type": "defines.entity_status", + "shape": { + "name": "shape", + "type": "table", "mode": "[R]", - "doc": "The status of this entity or ````\nnil````\nif no statu" + "doc": "Shape of this equipment prototype. It is a table: \nwidth :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nheight :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \npoints :: array of point (optional): A point is a table with x and y values. Only set when the shape is \"manual\"" }, - "sticked_to": { - "name": "sticked_to", - "type": "LuaEntity", + "shield": { + "name": "shield", + "type": "float", "mode": "[R]", - "doc": "The entity this sticker is sticked t" + "doc": "The shield value of this equipment. 0 for non-shield equipment." }, - "stickers": { - "name": "stickers", - "type": "array of LuaEntity", + "take_result": { + "name": "take_result", + "type": "LuaItemPrototype", "mode": "[R]", - "doc": "The sticker entities attached to this entit" + "doc": "The result item when taking this equipment out of an equipment grid. ````\nnil````\nif there is no result item." }, - "supports_backer_name": { - "name": "supports_backer_name", - "type": "function", - "returns": "boolean", - "doc": "**Return value** \n````\ntrue````\nif this entity supports a backer name." + "type": { + "name": "type", + "type": "string", + "mode": "[R]", + "doc": "Type of this equipment prototype." }, - "supports_direction": { - "name": "supports_direction", + "valid": { + "name": "valid", "type": "boolean", "mode": "[R]", - "doc": "Whether the entity has directio \nWhen it is false for this entity, it will always return north direction when asked fo" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaFlowStatistics": { + "name": "LuaFlowStatistics", + "type": "LuaFlowStatistics", + "inherits": [], + "properties": { + "clear": { + "name": "clear", + "doc": "Reset all the statistics data to 0.", + "type": "function" }, - "surface": { - "name": "surface", - "type": "LuaSurface", + "force": { + "name": "force", + "type": "LuaForce", "mode": "[R]", - "doc": "The surface this entity is currently on." + "doc": "The force these statistics belong to or ````\nnil````\nfor pollution statistics." }, - "teleport": { - "name": "teleport", + "get_flow_count": { + "name": "get_flow_count", "type": "function", - "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, rail signa \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", - "returns": "boolean", + "doc": "Gets the flow count value for the given time fram \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name. \ninput :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Read the input values or the output values \nprecision_index :: [defines.flow_precision_index](http://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index): The precision to read. \ncount :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, the count is returned instead of the per-time-frame value.", + "returns": "double", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface." + "name": { + "name": "name", + "type": "string", + "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name. \ninput :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Read the input values or the output values \nprecision_index :: [defines.flow_precision_index](http://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index): The precision to read. \ncount :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, the count is returned instead of the per-time-frame value." } } }, - "temperature": { - "name": "temperature", - "type": "double", - "mode": "[RW]", - "doc": "The temperature of this entities heat energy source if this entity uses a heat energy source or ````\nnil````" + "get_input_count": { + "name": "get_input_count", + "type": "function", + "doc": "Gets the total input count for a given prototype. \n\n**Parameters** \nstring: The prototype name.", + "returns": "uint64 or double", + "args": { + "string": { + "name": "string", + "doc": "string: The prototype name.", + "type": "string" + } + } }, - "text": { - "name": "text", - "type": "LocalisedString", - "mode": "[RW]", - "doc": "The text of this flying-text entit \n_Can only be used if this is FlyingText_" + "get_output_count": { + "name": "get_output_count", + "type": "function", + "doc": "Gets the total output count for a given prototype. \n\n**Parameters** \nstring: The prototype name.", + "returns": "uint64 or double", + "args": { + "string": { + "name": "string", + "doc": "string: The prototype name.", + "type": "string" + } + } }, - "tick_of_last_attack": { - "name": "tick_of_last_attack", - "type": "uint", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "input_counts": { + "name": "input_counts", + "type": "dictionary string → array of uint64 or double", "mode": "[R]", - "doc": "The last tick this character entity was attacke \n_Can only be used if this is Character_" + "doc": "List of input counts indexed by name <> valu \nRepresents the data that is shown on the left side of the GUI for the given statistics." }, - "tick_of_last_damage": { - "name": "tick_of_last_damage", - "type": "uint", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The last tick this character entity was damage \n_Can only be used if this is Character_" + "doc": "The class name of this object." }, - "time_to_live": { - "name": "time_to_live", - "type": "uint", - "mode": "[RW]", - "doc": "The ticks left before a ghost, combat robot or highlight box is destroyed. \nfor ghosts set to uint32 max (4,294,967,295) to never expire. \nfor ghosts Cannot be set higher than [LuaForce::ghost_time_to_live](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ghost_time_to_live) of the entity's force." + "on_flow": { + "name": "on_flow", + "doc": "Adds a value to this flow statistic \n\n**Parameters** \nstring: The prototype name. \ncount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The count: positive or negative determines if the value goes in the input or output statistics.", + "type": "function", + "args": { + "count": { + "name": "count", + "type": "float", + "doc": "count :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The count: positive or negative determines if the value goes in the input or output statistics." + }, + "string": { + "name": "string", + "doc": "string: The prototype name.", + "type": "string" + } + } }, - "timeout": { - "name": "timeout", - "type": "uint", - "mode": "[RW]", - "doc": "The timeout left on this landmine in tick \n_Can only be used if this is LandMine_" + "output_counts": { + "name": "output_counts", + "type": "dictionary string → array of uint64 or double", + "mode": "[R]", + "doc": "List of output counts indexed by name <> valu \nRepresents the data that is shown on the right side of the GUI for the given statistics." }, - "to_be_deconstructed": { - "name": "to_be_deconstructed", + "set_input_count": { + "name": "set_input_count", + "doc": "Sets the total input count for a given prototype. \n\n**Parameters** \nstring: The prototype name. \ncount :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics.", "type": "function", - "doc": "Is this entity marked for deconstructio \n\n**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force which ordered the deconstruction. This paramet \nis currently unused; it exists only for forward compatibility of the API.", - "returns": "boolean", "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force which ordered the deconstruction. This paramet \nis currently unused; it exists only for forward compatibility of the API." + "count": { + "name": "count", + "type": "uint64 or double", + "doc": "count :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics." + }, + "string": { + "name": "string", + "doc": "string: The prototype name.", + "type": "string" } } }, - "to_be_looted": { - "name": "to_be_looted", - "type": "boolean", - "mode": "[RW]", - "doc": "Will this entity be picked up automatically when the player walks over i \n_Can only be used if this is ItemEntity_" + "set_output_count": { + "name": "set_output_count", + "doc": "Sets the total output count for a given prototype. \n\n**Parameters** \nstring: The prototype name. \ncount :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics.", + "type": "function", + "args": { + "count": { + "name": "count", + "type": "uint64 or double", + "doc": "count :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics." + }, + "string": { + "name": "string", + "doc": "string: The prototype name.", + "type": "string" + } + } }, - "to_be_upgraded": { - "name": "to_be_upgraded", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Gets the total input count for a given prototype." + }, + "LuaFluidBox": { + "name": "LuaFluidBox", + "type": "LuaFluidBox", + "inherits": [], + "properties": { + "flush": { + "name": "flush", "type": "function", - "doc": "Is this entity marked for upgrad", - "returns": "boolean" + "doc": "Flushes all fluid from this fluidbox and its fluid syste \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nfluid :: [FluidSpecification](http://lua-api.factorio.com/latest/Concepts.html#FluidSpecification) (optional): If provided, only this fluid is flushed. \n\n**Return value** \nThe fluid removed.", + "returns": "dictionary string → float", + "args": { + "fluid": { + "name": "fluid", + "type": "FluidSpecification", + "doc": "fluid :: [FluidSpecification](http://lua-api.factorio.com/latest/Concepts.html#FluidSpecification) (optional): If provided, only this fluid is flushed." + }, + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "toggle_equipment_movement_bonus": { - "name": "toggle_equipment_movement_bonus", - "doc": "Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment gri \n\n**Note: ** This property can also be read and written on the equipment grid of this entity.", - "type": "function" + "get_capacity": { + "name": "get_capacity", + "type": "function", + "doc": "The capacity of the given fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "double", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "train": { - "name": "train", - "type": "LuaTrain", - "mode": "[R]", - "doc": "The train this rolling stock belongs to or nil if not rolling stoc \n_Can only be used if this is RollingStock_" + "get_connections": { + "name": "get_connections", + "type": "function", + "doc": "The fluidbox connections for the given fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "array of LuaFluidBox", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "trains_in_block": { - "name": "trains_in_block", - "type": "uint", - "mode": "[R]", - "doc": "The number of trains in this rail block for this rail entit \n_Can only be used if this is Rail_" + "get_filter": { + "name": "get_filter", + "type": "function", + "doc": "The filter of the given fluidbox index, 'nil' if non \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Return value** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The maximum temperature allowed into the fluidbox \nor 'nil'.", + "returns": "table", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "tree_color_index": { - "name": "tree_color_index", - "type": "uint8", - "mode": "[RW]", - "doc": "Index of the tree colo" + "get_flow": { + "name": "get_flow", + "type": "function", + "doc": "Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Note: ** Fluid wagons do not track it and will return 0.", + "returns": "double", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "tree_color_index_max": { - "name": "tree_color_index_max", - "type": "uint8", - "mode": "[R]", - "doc": "Maximum index of the tree color" + "get_locked_fluid": { + "name": "get_locked_fluid", + "type": "function", + "doc": "Returns the fluid the fluidbox is locked on \nReturns 'nil' for no lo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "string", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "tree_stage_index": { - "name": "tree_stage_index", - "type": "uint8", - "mode": "[RW]", - "doc": "Index of the tree stag" + "get_prototype": { + "name": "get_prototype", + "type": "function", + "doc": "The prototype of this fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "LuaFluidBoxPrototype", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "tree_stage_index_max": { - "name": "tree_stage_index_max", - "type": "uint8", - "mode": "[R]", - "doc": "Maximum index of the tree stage" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "type": { - "name": "type", + "object_name": { + "name": "object_name", "type": "string", "mode": "[R]", - "doc": "The entity prototype type of this entity." + "doc": "The class name of this object." }, - "unit_group": { - "name": "unit_group", - "type": "LuaUnitGroup", + "operator []": { + "name": "operator []", + "type": "Fluid or nil", "mode": "[R]", - "doc": "The unit group this unit is a member of, or ````\nnil````\nif non \n_Can only be used if this is Unit_" + "doc": "Access, set or clear a fluid box. The index must always be in bounds (see LuaFluidBox::operator # \nnew fluidboxes may not be added or removed using this operator. If the given fluid box doesn't contain a \nfluid, ````\nnil````\nis returned. Similarly, ````\nnil````\ncan be written to a fluid box to remove all fluid from it." }, - "unit_number": { - "name": "unit_number", + "operator #": { + "name": "operator #", "type": "uint", "mode": "[R]", - "doc": "The unit number or nil if the entity doesn't have one. This is universally unique for every entity that has one, for the lifetime of a whole game." + "doc": "Number of fluid boxes." }, - "units": { - "name": "units", - "type": "array of LuaEntity", + "owner": { + "name": "owner", + "type": "LuaEntity", "mode": "[R]", - "doc": "The units associated with this spawner entit" - }, - "update_connections": { - "name": "update_connections", - "doc": "Reconnect loader, beacon, cliff and mining drill connections to entities that might have be \nteleported out or in by the script. The game doesn't do this automatical \nas we don't want to loose performance by checking this in normal games.", - "type": "function" + "doc": "The entity that owns this fluidbo" }, - "update_selected_entity": { - "name": "update_selected_entity", - "doc": "Select an entity, as if by hovering the mouse above it. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select", + "set_filter": { + "name": "set_filter", "type": "function", + "doc": "Set the filter of the given fluidbox index, 'nil' to clea \nSome entities cannot have their fluidbox filter set, notably fluid wagons and crafting machine \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ntable: Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum temperature allowed into the fluidbox \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Force the filter to be set, regardless of current fluid content. \nor 'nil'. \n\n**Return value** \nIf the filter was set successfully.", + "returns": "boolean", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select" + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + }, + "table": { + "name": "table", + "type": "string", + "doc": "table: Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum temperature allowed into the fluidbox \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Force the filter to be set, regardless of current fluid content. \nor 'nil'." } } }, @@ -4028,1363 +3790,1281 @@ "type": "boolean", "mode": "[R]", "doc": "Is this object valid?" - }, - "vehicle": { - "name": "vehicle", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The vehicle the player is currently sitting in; ````\nnil````\nif none." - }, - "walking_state": { - "name": "walking_state", - "type": "table", - "mode": "[RW]", - "doc": "Current walking stat \nIt is a table with two fields: \nwalking :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If ````\nfalse````\n, the player is currently not walking; otherwise it's going somewhere \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): Direction where the player is walking \n\n**Example** \nMake the player go north. Note that a one-shot action like this will only make the player walk for one tic \n````\ngame.player.walking_state = {walking = true, direction = defines.direction.north}````" } }, - "doc": "The primary interface for interacting with entities through the Lua API.\n Entity is everything on the map except tiles." + "doc": "The prototype of this fluidbox index." }, - "LuaEntityPrototype": { - "name": "LuaEntityPrototype", - "type": "LuaEntityPrototype", + "LuaFluidBoxPrototype": { + "name": "LuaFluidBoxPrototype", + "type": "LuaFluidBoxPrototype", "inherits": [], "properties": { - "additional_pastable_entities": { - "name": "additional_pastable_entities", - "type": "array of LuaEntityPrototype", - "mode": "[R]", - "doc": "Entities this entity can be pasted onto in addition to the normal allowed one" - }, - "affected_by_tiles": { - "name": "affected_by_tiles", - "type": "boolean", - "mode": "[R]", - "doc": "Whether this unit prototype is affected by tile walking speed modifiers or ````\nnil````\n." - }, - "alert_icon_shift": { - "name": "alert_icon_shift", - "type": "Vector", - "mode": "[R]", - "doc": "The alert icon shift of this entity prototype." + "base_area": { + "name": "base_area", + "type": "double", + "mode": "[R]" }, - "alert_when_attacking": { - "name": "alert_when_attacking", - "type": "boolean", - "mode": "[R]", - "doc": "Does this turret prototype alert when attacking? or ````\nnil````\nif not turret prototyp" - }, - "alert_when_damaged": { - "name": "alert_when_damaged", - "type": "boolean", - "mode": "[R]", - "doc": "Does this entity with health prototype alert when damaged? or ````\nnil````\nif not entity with health prototyp" - }, - "allow_copy_paste": { - "name": "allow_copy_paste", - "type": "boolean", - "mode": "[R]", - "doc": "When false copy-paste is not allowed for this entit" + "base_level": { + "name": "base_level", + "type": "double", + "mode": "[R]" }, - "allow_custom_vectors": { - "name": "allow_custom_vectors", - "type": "boolean", + "entity": { + "name": "entity", + "type": "LuaEntityPrototype", "mode": "[R]", - "doc": "If this inserter allows custom pickup and drop vector" + "doc": "The entity that this belongs t" }, - "allowed_effects": { - "name": "allowed_effects", - "type": "dictionary string → boolean", + "filter": { + "name": "filter", + "type": "LuaFluidPrototype", "mode": "[R]", - "doc": "The allowed module effects for this entity or ````\nnil````" + "doc": "The filter or ````\nnil````\nif no filter is se" }, - "attack_parameters": { - "name": "attack_parameters", - "type": "table", - "mode": "[R]", - "doc": "The attack parameters for this entity or ````\nnil````\nif the entity doesn't use attack parameter \nIt is a table: \nrange :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nmin_range :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nturn_range :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nfire_penalty :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nmin_attack_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ndamage_modifier :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nammo_consumption_modifier :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncooldown :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nwarmup :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nmovement_slow_down_factor :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nmovement_slow_down_cooldown :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" + "height": { + "name": "height", + "type": "double", + "mode": "[R]" }, - "attack_result": { - "name": "attack_result", - "type": "Trigger", - "mode": "[R]", - "doc": "The attack result of this entity if the entity has one, else ````\nnil````\n." + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "automated_ammo_count": { - "name": "automated_ammo_count", + "index": { + "name": "index", "type": "uint", "mode": "[R]", - "doc": "The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret or ````\nnil````\n." - }, - "autoplace_specification": { - "name": "autoplace_specification", - "type": "AutoplaceSpecification", - "mode": "[R]", - "doc": "Autoplace specification for this entity prototype. ````\nnil````\nif non" + "doc": "The index of this fluidbox prototype in the owning entit" }, - "belt_distance": { - "name": "belt_distance", + "maximum_temperature": { + "name": "maximum_temperature", "type": "double", "mode": "[R]", - "doc": "_Can only be used if this is Loader_" + "doc": "The maximum temperature or ````\nnil````\nif none is se" }, - "belt_length": { - "name": "belt_length", + "minimum_temperature": { + "name": "minimum_temperature", "type": "double", "mode": "[R]", - "doc": "_Can only be used if this is Loader_" + "doc": "The minimum temperature or ````\nnil````\nif none is se" }, - "belt_speed": { - "name": "belt_speed", - "type": "double", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The speed of this transport belt or ````\nnil````\nif this isn't a transport belt related prototype." + "doc": "The class name of this object." }, - "braking_force": { - "name": "braking_force", - "type": "double", + "pipe_connections": { + "name": "pipe_connections", + "type": "array of FluidBoxConnection", "mode": "[R]", - "doc": "The braking force of this vehicle prototype or ````\nnil````\nif not a vehicle prototyp" + "doc": "The pipe connection point" }, - "build_base_evolution_requirement": { - "name": "build_base_evolution_requirement", - "type": "double", + "production_type": { + "name": "production_type", + "type": "string", "mode": "[R]", - "doc": "The evolution requirement to build this entity as a base when expanding enemy base" + "doc": "The production type. \"input\", \"output\", \"input-output\", or \"none" }, - "build_distance": { - "name": "build_distance", - "type": "uint", + "render_layer": { + "name": "render_layer", + "type": "string", "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "The render laye" }, - "building_grid_bit_shift": { - "name": "building_grid_bit_shift", - "type": "uint", + "secondary_draw_orders": { + "name": "secondary_draw_orders", + "type": "array of int", "mode": "[R]", - "doc": "The log2 of grid size of the buildi" + "doc": "The secondary draw orders for the 4 possible connection direction" }, - "burner_prototype": { - "name": "burner_prototype", - "type": "LuaBurnerPrototype", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The burner energy source prototype this entity uses or ````\nnil````" + "doc": "Is this object valid?" }, - "can_open_gates": { - "name": "can_open_gates", + "volume": { + "name": "volume", + "type": "double", + "mode": "[R]" + } + }, + "doc": "The entity that this belongs to." + }, + "LuaFluidEnergySourcePrototype": { + "name": "LuaFluidEnergySourcePrototype", + "type": "LuaFluidEnergySourcePrototype", + "inherits": [], + "properties": { + "burns_fluid": { + "name": "burns_fluid", "type": "boolean", - "mode": "[R]", - "doc": "Whether this unit prototype can open gates or ````\nnil````\n." + "mode": "[R]" }, - "character_corpse": { - "name": "character_corpse", - "type": "LuaEntityPrototype", + "effectivity": { + "name": "effectivity", + "type": "double", + "mode": "[R]" + }, + "emissions": { + "name": "emissions", + "type": "double", + "mode": "[R]" + }, + "fluid_box": { + "name": "fluid_box", "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "The fluid box for this energy source." + }, + "fluid_usage_per_tick": { + "name": "fluid_usage_per_tick", + "type": "double", + "mode": "[R]" }, - "cliff_explosive_prototype": { - "name": "cliff_explosive_prototype", + "help": { + "name": "help", "type": "string", - "mode": "[R]", - "doc": "The item prototype name used to destroy this cliff or ````\nnil````\n." + "doc": "All methods, and properties that this object supports." }, - "collision_box": { - "name": "collision_box", - "type": "BoundingBox", - "mode": "[R]", - "doc": "The bounding box used for collision checking." + "maximum_temperature": { + "name": "maximum_temperature", + "type": "double", + "mode": "[R]" }, - "collision_mask": { - "name": "collision_mask", - "type": "CollisionMask", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The collision masks this entity uses" + "doc": "The class name of this object." }, - "collision_mask_collides_with_self": { - "name": "collision_mask_collides_with_self", + "render_no_network_icon": { + "name": "render_no_network_icon", "type": "boolean", - "mode": "[R]", - "doc": "Does this prototype collision mask collide with itsel" + "mode": "[R]" }, - "collision_mask_collides_with_tiles_only": { - "name": "collision_mask_collides_with_tiles_only", + "render_no_power_icon": { + "name": "render_no_power_icon", "type": "boolean", - "mode": "[R]", - "doc": "Does this prototype collision mask collide with tiles onl" + "mode": "[R]" }, - "collision_mask_considers_tile_transitions": { - "name": "collision_mask_considers_tile_transitions", + "scale_fluid_usage": { + "name": "scale_fluid_usage", "type": "boolean", - "mode": "[R]", - "doc": "Does this prototype collision mask consider tile transition" + "mode": "[R]" }, - "color": { - "name": "color", - "type": "Color", + "smoke": { + "name": "smoke", + "type": "array of SmokeSource", "mode": "[R]", - "doc": "The color of the prototype, or ````\nnil````\nif the prototype doesn't have colo" + "doc": "The smoke sources for this prototype if an" }, - "construction_radius": { - "name": "construction_radius", - "type": "double", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The construction radius for this roboport prototype or ````\nnil````" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaFluidPrototype": { + "name": "LuaFluidPrototype", + "type": "LuaFluidPrototype", + "inherits": [], + "properties": { + "base_color": { + "name": "base_color", + "type": "Color", + "mode": "[R]" }, - "consumption": { - "name": "consumption", + "default_temperature": { + "name": "default_temperature", "type": "double", "mode": "[R]", - "doc": "The energy consumption of this car prototype or ````\nnil````\nif not a car prototyp" + "doc": "Default temperature of the fluid." }, - "container_distance": { - "name": "container_distance", + "emissions_multiplier": { + "name": "emissions_multiplier", "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Loader_" + "mode": "[R]" }, - "corpses": { - "name": "corpses", - "type": "dictionary string → LuaEntityPrototype", - "mode": "[R]", - "doc": "Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototy \nname." + "flow_color": { + "name": "flow_color", + "type": "Color", + "mode": "[R]" }, - "count_as_rock_for_filtered_deconstruction": { - "name": "count_as_rock_for_filtered_deconstruction", - "type": "boolean", - "mode": "[R]", - "doc": "If this simple-entity is counted as a rock for the deconstruction planner \"trees and rocks only\" filte" + "fuel_value": { + "name": "fuel_value", + "type": "double", + "mode": "[R]" }, - "crafting_categories": { - "name": "crafting_categories", - "type": "dictionary string → boolean", + "gas_temperature": { + "name": "gas_temperature", + "type": "double", + "mode": "[R]" + }, + "group": { + "name": "group", + "type": "LuaGroup", "mode": "[R]", - "doc": "The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity typ \n\n**Note: ** The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup." + "doc": "Group of this prototype." }, - "crafting_speed": { - "name": "crafting_speed", + "heat_capacity": { + "name": "heat_capacity", "type": "double", "mode": "[R]", - "doc": "The crafting speed of this crafting-machine or ````\nnil````" + "doc": "How much energy the fluid will generate at max temperature assuming 100% efficiency steam engine." }, - "create_ghost_on_death": { - "name": "create_ghost_on_death", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "hidden": { + "name": "hidden", "type": "boolean", - "mode": "[R]", - "doc": "If this prototype will attempt to create a ghost of itself on deat \n\n**Note: ** If this is false then a ghost will never be made, if it's true a ghost may be made." + "mode": "[R]" }, - "created_effect": { - "name": "created_effect", - "type": "Trigger", - "mode": "[R]", - "doc": "The trigger run when this entity is created or ````\nnil````\n." + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "created_smoke": { - "name": "created_smoke", - "type": "table", - "mode": "[R]", - "doc": "The smoke trigger run when this entity is built or ````\nnil```` \nIt is a table:" + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "damage_hit_tint": { - "name": "damage_hit_tint", - "type": "Color", + "max_temperature": { + "name": "max_temperature", + "type": "double", "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "Maximum temperature the fluid can reach." }, - "darkness_for_all_lamps_off": { - "name": "darkness_for_all_lamps_off", - "type": "float", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "Value between 0 and 1 darkness where all lamps of this lamp prototype are off or ````\nnil````\n." + "doc": "Name of this prototype." }, - "darkness_for_all_lamps_on": { - "name": "darkness_for_all_lamps_on", - "type": "float", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Value between 0 and 1 darkness where all lamps of this lamp prototype are on or ````\nnil````\n." + "doc": "The class name of this object." }, - "distraction_cooldown": { - "name": "distraction_cooldown", - "type": "uint", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "The distraction cooldown of this unit prototype or ````\nnil````\n." + "doc": "Order string for this prototype." }, - "distribution_effectivity": { - "name": "distribution_effectivity", - "type": "double", + "subgroup": { + "name": "subgroup", + "type": "LuaGroup", "mode": "[R]", - "doc": "The distribution effectivity for this beacon prototype or ````\nnil````\nif not a beacon prototyp" + "doc": "Subgroup of this prototype." }, - "draw_cargo": { - "name": "draw_cargo", + "valid": { + "name": "valid", "type": "boolean", "mode": "[R]", - "doc": "Whether this logistics or construction robot renders its cargo when flying or ````\nnil````" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaFontPrototype": { + "name": "LuaFontPrototype", + "type": "LuaFontPrototype", + "inherits": [], + "properties": { + "border": { + "name": "border", + "type": "boolean", + "mode": "[R]" }, - "drawing_box": { - "name": "drawing_box", - "type": "BoundingBox", + "border_color": { + "name": "border_color", + "type": "Color", "mode": "[R]", - "doc": "The bounding box used for drawing the entity icon." + "doc": "The border color or ````\nnil````\nif not set." }, - "drop_item_distance": { - "name": "drop_item_distance", - "type": "uint", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "filtered": { + "name": "filtered", + "type": "boolean", + "mode": "[R]" }, - "effectivity": { - "name": "effectivity", - "type": "double", - "mode": "[R]", - "doc": "The effectivity of this car prototype, generator prototype or ````\nnil````" + "from": { + "name": "from", + "type": "string", + "mode": "[R]" }, - "electric_energy_source_prototype": { - "name": "electric_energy_source_prototype", - "type": "LuaElectricEnergySourcePrototype", - "mode": "[R]", - "doc": "The electric energy source prototype this entity uses or ````\nnil````" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "emissions_per_second": { - "name": "emissions_per_second", - "type": "double", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "Amount of pollution emissions per second this entity will create." + "doc": "Name of this prototype." }, - "enemy_map_color": { - "name": "enemy_map_color", - "type": "Color", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The enemy map color used when charting this entit" + "doc": "The class name of this object." }, - "energy_per_hit_point": { - "name": "energy_per_hit_point", - "type": "double", - "mode": "[R]", - "doc": "The energy used per hitpoint taken for this vehicle during collisions or ````\nnil````" + "size": { + "name": "size", + "type": "int", + "mode": "[R]" }, - "energy_per_move": { - "name": "energy_per_move", - "type": "double", - "mode": "[R]", - "doc": "The energy consumed per tile moved for this flying robot or ````\nnil````" + "spacing": { + "name": "spacing", + "type": "float", + "mode": "[R]" }, - "energy_per_tick": { - "name": "energy_per_tick", - "type": "double", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The energy consumed per tick for this flying robot or ````\nnil````" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaForce": { + "name": "LuaForce", + "type": "LuaForce", + "inherits": [], + "properties": { + "add_chart_tag": { + "name": "add_chart_tag", + "type": "function", + "doc": "Adds a custom chart tag to the given surface and returns the new tag or ````\nnil````\nif the given position isn't valid for a chart ta \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Which surface to add the tag to. \ntag: Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlast_user :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional) \n\n**Note: ** The chunk must be charted for a tag to be valid at that location. \n\n**Note: ** The icon, text, or both must be provided.", + "returns": "LuaCustomChartTag", + "args": { + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Which surface to add the tag to." + }, + "tag": { + "name": "tag", + "type": "Position", + "doc": "tag: Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlast_user :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional)" + } + } }, - "energy_usage": { - "name": "energy_usage", - "type": "double", - "mode": "[R]", - "doc": "The direct energy usage of this entity or ````\nnil````\nif this entity doesn't have a direct energy usag" + "add_research": { + "name": "add_research", + "type": "function", + "doc": "Add this technology to the back of the research queue if the queue is enable \nOtherwise, set this technology to be researched no \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) \n\n**Return value** \nIf the technology was added.", + "returns": "boolean", + "args": { + "technology": { + "name": "technology", + "type": "TechnologySpecification", + "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification)" + } + } }, - "enter_vehicle_distance": { - "name": "enter_vehicle_distance", - "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "ai_controllable": { + "name": "ai_controllable", + "type": "boolean", + "mode": "[RW]", + "doc": "Enables some higher-level AI behaviour for this force. When set to ````\ntrue````\n, biters belonging \nthis force will automatically expand into new territories, build new spawners, and form un \ngroups. By default, this value is ````\ntrue````\nfor the enemy force and ````\nfalse````\nfor all others. \n\n**Note: ** Setting this to ````\nfalse````\ndoes not turn off biters' AI. They will still move around and atta \nplayers who come close. \n\n**Note: ** It is necessary for a force to be AI controllable in order to be able to create unit grou \nor build bases from scripts." }, - "explosion_beam": { - "name": "explosion_beam", + "artillery_range_modifier": { + "name": "artillery_range_modifier", "type": "double", - "mode": "[R]", - "doc": "Does this explosion have a beam or ````\nnil````\nif not an explosion prototyp" + "mode": "[RW]" }, - "explosion_rotate": { - "name": "explosion_rotate", - "type": "double", - "mode": "[R]", - "doc": "Does this explosion rotate or ````\nnil````\nif not an explosion prototyp" + "cancel_charting": { + "name": "cancel_charting", + "doc": "Cancels pending chart requests for the given surface or all surface \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", + "type": "function", + "args": { + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" + } + } }, - "fast_replaceable_group": { - "name": "fast_replaceable_group", - "type": "string", - "mode": "[R]", - "doc": "The group of mutually fast-replaceable entities. Possibly ````\nnil````\n." + "cancel_current_research": { + "name": "cancel_current_research", + "doc": "Stop the research currently in progres \nThis will remove any dependent technologies from the research queue.", + "type": "function" }, - "filter_count": { - "name": "filter_count", + "character_build_distance_bonus": { + "name": "character_build_distance_bonus", "type": "uint", - "mode": "[R]", - "doc": "The filter count of this inserter, loader, or requester chest or ````\nnil````" - }, - "final_attack_result": { - "name": "final_attack_result", - "type": "Trigger", - "mode": "[R]", - "doc": "The final attack result for projectiles ````\nnil````\nif not a projectile" + "mode": "[RW]" }, - "fixed_recipe": { - "name": "fixed_recipe", - "type": "string", - "mode": "[R]", - "doc": "The fixed recipe name for this assembling machine prototype or ````\nnil````" + "character_health_bonus": { + "name": "character_health_bonus", + "type": "double", + "mode": "[RW]" }, - "flags": { - "name": "flags", - "type": "EntityPrototypeFlags", - "mode": "[R]", - "doc": "The entity prototype flags for this entit" + "character_inventory_slots_bonus": { + "name": "character_inventory_slots_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "the number of additional inventory slots the character main inventory has." }, - "fluid": { - "name": "fluid", - "type": "LuaFluidPrototype", - "mode": "[R]", - "doc": "The fluid this offshore pump produces or ````\nnil````" + "character_item_drop_distance_bonus": { + "name": "character_item_drop_distance_bonus", + "type": "uint", + "mode": "[RW]" }, - "fluid_capacity": { - "name": "fluid_capacity", + "character_item_pickup_distance_bonus": { + "name": "character_item_pickup_distance_bonus", "type": "double", - "mode": "[R]", - "doc": "The fluid capacity of this entity or 0 if this entity doesn't support fluid \n\n**Note: ** Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs." + "mode": "[RW]" }, - "fluid_usage_per_tick": { - "name": "fluid_usage_per_tick", + "character_logistic_requests": { + "name": "character_logistic_requests", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif character requester logistics is enable" + }, + "character_loot_pickup_distance_bonus": { + "name": "character_loot_pickup_distance_bonus", "type": "double", - "mode": "[R]", - "doc": "The fluid usage of this generator prototype or ````\nnil````" + "mode": "[RW]" }, - "fluidbox_prototypes": { - "name": "fluidbox_prototypes", - "type": "array of LuaFluidBoxPrototype", - "mode": "[R]", - "doc": "The fluidbox prototypes for this entit" + "character_reach_distance_bonus": { + "name": "character_reach_distance_bonus", + "type": "uint", + "mode": "[RW]" }, - "friction_force": { - "name": "friction_force", + "character_resource_reach_distance_bonus": { + "name": "character_resource_reach_distance_bonus", "type": "double", - "mode": "[R]", - "doc": "The friction of this vehicle prototype or ````\nnil````\nif not a vehicle prototyp" + "mode": "[RW]" }, - "friendly_map_color": { - "name": "friendly_map_color", - "type": "Color", - "mode": "[R]", - "doc": "The friendly map color used when charting this entit" + "character_running_speed_modifier": { + "name": "character_running_speed_modifier", + "type": "double", + "mode": "[RW]" + }, + "character_trash_slot_count": { + "name": "character_trash_slot_count", + "type": "double", + "mode": "[RW]", + "doc": "Number of character trash slots." }, - "get_inventory_size": { - "name": "get_inventory_size", + "chart": { + "name": "chart", + "doc": "Chart a portion of the map. The chart for the given area is refreshed; it creates chart f \nany parts of the given area that haven't been charted yet \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area on the given surface to chart. \n\n**Example** \nCharts a 2048x2048 rectangle centered around the origi \n````\ngame.player.force.chart(game.player.surface, \n                        {{x = -1024, y = -1024}, {x = 1024, y = 1024}})````", "type": "function", - "doc": "Gets the base size of the given inventory on this entity or ````\nnil````\nif the given inventory doesn't exis \n\n**Parameters** \nindex :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory)", - "returns": "uint", "args": { - "index": { - "name": "index", - "type": "defines.inventory", - "doc": "index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory)" + "area": { + "name": "area", + "type": "BoundingBox", + "doc": "area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area on the given surface to chart." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" } } }, - "group": { - "name": "group", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Group of this entity." - }, - "guns": { - "name": "guns", - "type": "dictionary string → LuaItemPrototype", - "mode": "[R]", - "doc": "The guns this car prototype uses or ````\nnil````\nif not a car prototyp" - }, - "has_belt_immunity": { - "name": "has_belt_immunity", - "type": "boolean", - "mode": "[R]", - "doc": "Whether this unit or car prototype has belt immunity, ````\nnil````\nif not car or unit prototype." - }, - "has_flag": { - "name": "has_flag", + "chart_all": { + "name": "chart_all", + "doc": "Chart all generated chunk \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to chart or all if not given.", "type": "function", - "doc": "Does this prototype have a flag enabled \n\n**Parameters** \nflag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Must be one of \n````\n\"not-rotatable\"```` \n````\n\"placeable-neutral\"```` \n````\n\"placeable-player\"```` \n````\n\"placeable-enemy\"```` \n````\n\"placeable-off-grid\"```` \n````\n\"player-creation\"```` \n````\n\"building-direction-8-way\"```` \n````\n\"filter-directions\"```` \n````\n\"fast-replaceable-no-build-while-moving\"```` \n````\n\"breaths-air\"```` \n````\n\"not-repairable\"```` \n````\n\"not-on-map\"```` \n````\n\"not-deconstructable\"```` \n````\n\"not-blueprintable\"```` \n````\n\"hide-from-bonus-gui\"```` \n````\n\"hide-alt-info\"```` \n````\n\"fast-replaceable-no-cross-type-while-moving\"```` \n````\n\"no-gap-fill-while-building\"```` \n````\n\"not-flammable\"```` \n````\n\"no-automated-item-removal\"```` \n````\n\"no-automated-item-insertion\"```` \n````\n\"not-upgradable\"````", - "returns": "boolean", "args": { - "flag": { - "name": "flag", - "type": "string", - "doc": "flag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Must be one of \n````\n\"not-rotatable\"```` \n````\n\"placeable-neutral\"```` \n````\n\"placeable-player\"```` \n````\n\"placeable-enemy\"```` \n````\n\"placeable-off-grid\"```` \n````\n\"player-creation\"```` \n````\n\"building-direction-8-way\"```` \n````\n\"filter-directions\"```` \n````\n\"fast-replaceable-no-build-while-moving\"```` \n````\n\"breaths-air\"```` \n````\n\"not-repairable\"```` \n````\n\"not-on-map\"```` \n````\n\"not-deconstructable\"```` \n````\n\"not-blueprintable\"```` \n````\n\"hide-from-bonus-gui\"```` \n````\n\"hide-alt-info\"```` \n````\n\"fast-replaceable-no-cross-type-while-moving\"```` \n````\n\"no-gap-fill-while-building\"```` \n````\n\"not-flammable\"```` \n````\n\"no-automated-item-removal\"```` \n````\n\"no-automated-item-insertion\"```` \n````\n\"not-upgradable\"````" + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to chart or all if not given." } } }, - "healing_per_tick": { - "name": "healing_per_tick", - "type": "float", - "mode": "[R]", - "doc": "Amount this entity can heal per tick." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "clear_chart": { + "name": "clear_chart", + "doc": "Erases chart data for this forc \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to erase chart data for or if not provided all surfaces charts are erased.", + "type": "function", + "args": { + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to erase chart data for or if not provided all surfaces charts are erased." + } + } }, - "infinite_depletion_resource_amount": { - "name": "infinite_depletion_resource_amount", - "type": "uint", + "connected_players": { + "name": "connected_players", + "type": "array of LuaPlayer", "mode": "[R]", - "doc": "Every time this infinite resource 'ticks' down it is reduced by this amount. ````\nnil````\nwhen not a resource. Meaningless if this isn't an infinite type resource." + "doc": "The connected players belonging to this forc \nThis is primarily useful when you want to do some action against all online players of this force. \n\n**Note: ** This does *not* index using player index. See [LuaPlayer::index](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index) on each player instance for the player index." }, - "infinite_resource": { - "name": "infinite_resource", - "type": "boolean", + "current_research": { + "name": "current_research", + "type": "LuaTechnology", "mode": "[R]", - "doc": "Is this resource infinite? Will be ````\nnil````\nwhen used on a non-resource." + "doc": "The current technology in research, or ````\nnil````\nif no research is currently ongoing." }, - "ingredient_count": { - "name": "ingredient_count", + "deconstruction_time_to_live": { + "name": "deconstruction_time_to_live", "type": "uint", - "mode": "[R]", - "doc": "The max number of ingredients this crafting-machine prototype supports or ````\nnil````\nif this isn't a crafting-machine prototyp" + "mode": "[RW]", + "doc": "The time, in ticks, before a deconstruction order is removed." }, - "inserter_extension_speed": { - "name": "inserter_extension_speed", - "type": "double", - "mode": "[R]", - "doc": "The extension speed of this inserter or ````\nnil````\n." + "disable_all_prototypes": { + "name": "disable_all_prototypes", + "doc": "Disable all recipes and technologies. Only recipes and technologies enabled explicitly wi \nbe useable from this point.", + "type": "function" }, - "inserter_rotation_speed": { - "name": "inserter_rotation_speed", - "type": "double", - "mode": "[R]", - "doc": "The rotation speed of this inserter or ````\nnil````\n." + "disable_research": { + "name": "disable_research", + "doc": "Disable research for this force.", + "type": "function" }, - "instruments": { - "name": "instruments", - "type": "array of ProgrammableSpeakerInstrument", - "mode": "[R]", - "doc": "The instruments for this programmable speaker or ````\nnil````" + "enable_all_prototypes": { + "name": "enable_all_prototypes", + "doc": "Enables all recipes and technologie \nThe opposite of [LuaForce::disable_all_prototypes](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_all_prototypes)", + "type": "function" }, - "is_building": { - "name": "is_building", - "type": "boolean", - "mode": "[R]" - }, - "item_pickup_distance": { - "name": "item_pickup_distance", - "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" - }, - "item_slot_count": { - "name": "item_slot_count", - "type": "uint", - "mode": "[R]", - "doc": "The item slot count of this constant combinator prototype or ````\nnil````" - }, - "items_to_place_this": { - "name": "items_to_place_this", - "type": "array of SimpleItemStack", - "mode": "[R]", - "doc": "Items that when placed will produce this entity. It is a dictionary indexed by the item prototype name." - }, - "lab_inputs": { - "name": "lab_inputs", - "type": "array of string", - "mode": "[R]", - "doc": "The item prototype names that are the inputs of this lab prototype or ````\nnil````" - }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" - }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]" + "enable_all_recipes": { + "name": "enable_all_recipes", + "doc": "Unlock all recipes.", + "type": "function" }, - "logistic_mode": { - "name": "logistic_mode", - "type": "string", - "mode": "[R]", - "doc": "The logistic mode of this logistic container or ````\nnil````\nif this isn't a logistic container prototyp" + "enable_all_technologies": { + "name": "enable_all_technologies", + "doc": "Unlock all technologies.", + "type": "function" }, - "logistic_radius": { - "name": "logistic_radius", - "type": "double", - "mode": "[R]", - "doc": "The logistic radius for this roboport prototype or ````\nnil````" + "enable_research": { + "name": "enable_research", + "doc": "Enable research for this force.", + "type": "function" }, - "loot": { - "name": "loot", - "type": "Loot", + "entity_build_count_statistics": { + "name": "entity_build_count_statistics", + "type": "LuaFlowStatistics", "mode": "[R]", - "doc": "Loot that will be dropped when this entity is killed. ````\nnil````\nif there is no loot." + "doc": "The entity build statistics for this force (built and mined)" }, - "loot_pickup_distance": { - "name": "loot_pickup_distance", + "evolution_factor": { + "name": "evolution_factor", "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" - }, - "map_color": { - "name": "map_color", - "type": "Color", - "mode": "[R]", - "doc": "The map color used when charting this entity if a friendly or enemy color isn't defined or ````\nnil````" - }, - "map_generator_bounding_box": { - "name": "map_generator_bounding_box", - "type": "BoundingBox", - "mode": "[R]", - "doc": "The bounding box used for map generator collision checking." + "mode": "[RW]", + "doc": "Evolution factor of this force." }, - "max_circuit_wire_distance": { - "name": "max_circuit_wire_distance", + "evolution_factor_by_killing_spawners": { + "name": "evolution_factor_by_killing_spawners", "type": "double", - "mode": "[R]", - "doc": "The maximum circuit wire distance for this entity. 0 when the entity doesn't support circuit wire" - }, - "max_darkness_to_spawn": { - "name": "max_darkness_to_spawn", - "type": "float", - "mode": "[R]", - "doc": "The maximum darkness at which this unit spawner can spawn entities." + "mode": "[RW]" }, - "max_energy": { - "name": "max_energy", + "evolution_factor_by_pollution": { + "name": "evolution_factor_by_pollution", "type": "double", - "mode": "[R]", - "doc": "The max energy for this flying robot or ````\nnil````" + "mode": "[RW]" }, - "max_energy_usage": { - "name": "max_energy_usage", + "evolution_factor_by_time": { + "name": "evolution_factor_by_time", "type": "double", - "mode": "[R]", - "doc": "The theoretical maximum energy usage for this entit" - }, - "max_health": { - "name": "max_health", - "type": "float", - "mode": "[R]", - "doc": "Max health of this entity. Will be ````\n0````\nif this is not an entity with health." + "mode": "[RW]" }, - "max_payload_size": { - "name": "max_payload_size", - "type": "uint", - "mode": "[R]", - "doc": "The max payload size of this logistics or construction robot or ````\nnil````" + "find_chart_tags": { + "name": "find_chart_tags", + "type": "function", + "doc": "Finds all custom chart tags within the given bounding box on the given surfac \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional)", + "returns": "array of LuaCustomChartTag", + "args": { + "area": { + "name": "area", + "type": "BoundingBox", + "doc": "area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional)" + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + } + } }, - "max_polyphony": { - "name": "max_polyphony", - "type": "uint", - "mode": "[R]", - "doc": "The maximum polyphony for this programmable speaker or ````\nnil````" + "find_logistic_network_by_position": { + "name": "find_logistic_network_by_position", + "type": "function", + "returns": "LuaLogisticNetwork", + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position to find a network for" + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to search on" + } + }, + "doc": "**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position to find a network for \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to search on \n\n**Return value** \nThe found network or ````\nnil````\n." }, - "max_pursue_distance": { - "name": "max_pursue_distance", - "type": "double", + "fluid_production_statistics": { + "name": "fluid_production_statistics", + "type": "LuaFlowStatistics", "mode": "[R]", - "doc": "The maximum pursue distance of this unit prototype or ````\nnil````\n." + "doc": "The fluid production statistics for this force." }, - "max_speed": { - "name": "max_speed", + "following_robots_lifetime_modifier": { + "name": "following_robots_lifetime_modifier", "type": "double", - "mode": "[R]", - "doc": "The max speed of this Projectile prototype or ````\nnil````\n." - }, - "max_to_charge": { - "name": "max_to_charge", - "type": "float", - "mode": "[R]", - "doc": "The maximum energy for this flying robot above which it won't try to recharge when stationing or ````\nnil````" + "mode": "[RW]", + "doc": "Additional lifetime for following robot" }, - "max_underground_distance": { - "name": "max_underground_distance", - "type": "uint", - "mode": "[R]", - "doc": "The max underground distance for underground belts and underground pipes or ````\nnil````\nif this isn't one of those prototype" + "friendly_fire": { + "name": "friendly_fire", + "type": "boolean", + "mode": "[RW]", + "doc": "If friendly fire is enabled for this force." }, - "max_wire_distance": { - "name": "max_wire_distance", - "type": "double", - "mode": "[R]", - "doc": "The maximum wire distance for this entity. 0 when the entity doesn't support wire" + "get_ammo_damage_modifier": { + "name": "get_ammo_damage_modifier", + "type": "function", + "returns": "double", + "args": { + "ammo": { + "name": "ammo", + "type": "string", + "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + } + }, + "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" }, - "maximum_corner_sliding_distance": { - "name": "maximum_corner_sliding_distance", - "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "get_cease_fire": { + "name": "get_cease_fire", + "type": "function", + "doc": "Will this force attack members of another force? \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)", + "returns": "boolean", + "args": { + "other": { + "name": "other", + "type": "ForceSpecification", + "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + } + } }, - "maximum_temperature": { - "name": "maximum_temperature", - "type": "double", - "mode": "[R]", - "doc": "The maximum fluid temperature of this generator prototype or ````\nnil````" + "get_entity_count": { + "name": "get_entity_count", + "type": "function", + "doc": "Count entities of given type \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity. \n\n**Return value** \nNumber of entities of given prototype belonging to this force. \n\n**Note: ** This function has O(1) time complexity as entity counts are kept and maintain \nin the game engine.", + "returns": "uint", + "args": { + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity." + } + } }, - "min_darkness_to_spawn": { - "name": "min_darkness_to_spawn", - "type": "float", - "mode": "[R]", - "doc": "The minimum darkness at which this unit spawner can spawn entities." + "get_friend": { + "name": "get_friend", + "type": "function", + "doc": "Is this force a friend? \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)", + "returns": "boolean", + "args": { + "other": { + "name": "other", + "type": "ForceSpecification", + "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + } + } }, - "min_pursue_time": { - "name": "min_pursue_time", - "type": "uint", - "mode": "[R]", - "doc": "The minimum pursue time of this unit prototype or ````\nnil````\n." + "get_gun_speed_modifier": { + "name": "get_gun_speed_modifier", + "type": "function", + "returns": "double", + "args": { + "ammo": { + "name": "ammo", + "type": "string", + "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + } + }, + "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" }, - "min_to_charge": { - "name": "min_to_charge", - "type": "float", - "mode": "[R]", - "doc": "The minimum energy for this flying robot before it tries to recharge or ````\nnil````" + "get_hand_crafting_disabled_for_recipe": { + "name": "get_hand_crafting_disabled_for_recipe", + "type": "function", + "doc": "Gets if the given recipe is explicitly disabled from being hand crafte \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)", + "returns": "boolean", + "args": { + "recipe": { + "name": "recipe", + "type": "string or LuaRecipe", + "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)" + } + } }, - "mineable_properties": { - "name": "mineable_properties", - "type": "table", - "mode": "[R]", - "doc": "It is a table: \nminable :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Is this entity mineable at all? \nmining_time :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Energy required to mine an entity. \nmining_particle :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the particle produced when mining this entit \nWill only be present if this entity produces any particle during mining. \nproducts :: array of [Product](http://lua-api.factorio.com/latest/Concepts.html#Product): Products obtained by mining this entity. \nfluid_amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The required fluid amount if any. \nrequired_fluid :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The prototype name of the required fluid if any. \nmining_trigger :: [Trigger](http://lua-api.factorio.com/latest/Concepts.html#Trigger) (optional): The mining trigger if any." + "get_item_launched": { + "name": "get_item_launched", + "type": "function", + "doc": "Gets the count of a given item launched in rocket \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to get \n\n**Return value** \nThe count of the item that has been launched.", + "returns": "uint", + "args": { + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to get" + } + } }, - "minimum_resource_amount": { - "name": "minimum_resource_amount", - "type": "uint", - "mode": "[R]", - "doc": "Minimum amount of this resource. Will be ````\nnil````\nwhen used on a non-resource." + "get_linked_inventory": { + "name": "get_linked_inventory", + "type": "function", + "doc": "Gets the linked inventory for the given prototype and link ID if it exists or ````\nnil```` \n\n**Parameters** \nprototype :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification) \nlink_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "LuaInventory", + "args": { + "link_id": { + "name": "link_id", + "type": "uint", + "doc": "link_id :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + }, + "prototype": { + "name": "prototype", + "type": "EntityPrototypeSpecification", + "doc": "prototype :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification)" + } + } }, - "mining_drill_radius": { - "name": "mining_drill_radius", - "type": "double", - "mode": "[R]", - "doc": "The mining radius of this mining drill prototype or ````\nnil````\nif this isn't a mining drill prototyp" - }, - "mining_speed": { - "name": "mining_speed", - "type": "double", - "mode": "[R]", - "doc": "The mining speed of this mining drill/character prototype or ````\nnil````" - }, - "module_inventory_size": { - "name": "module_inventory_size", - "type": "uint", - "mode": "[R]", - "doc": "The module inventory size or ````\nnil````\nif this entity doesn't support module" - }, - "move_while_shooting": { - "name": "move_while_shooting", - "type": "boolean", - "mode": "[R]", - "doc": "Whether this unit prototype can move while shooting or ````\nnil````\n." + "get_saved_technology_progress": { + "name": "get_saved_technology_progress", + "type": "function", + "doc": "Gets the saved progress for the given technology or ````\nnil````\nif there is no saved progres \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology \n\n**Return value** \nThe progress as a percent.", + "returns": "double", + "args": { + "technology": { + "name": "technology", + "type": "TechnologySpecification", + "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology" + } + } }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this prototype." + "get_spawn_position": { + "name": "get_spawn_position", + "type": "function", + "returns": "Position", + "args": { + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + } + }, + "doc": "**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" }, - "neighbour_bonus": { - "name": "neighbour_bonus", - "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Reactor_" + "get_train_stops": { + "name": "get_train_stops", + "type": "function", + "doc": "Gets train stops matching the given filter \n\n**Parameters** \nopts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", + "returns": "array of LuaEntity", + "args": { + "opts": { + "name": "opts", + "type": "string or array of string", + "doc": "opts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" + } + } }, - "neighbour_collision_increase": { - "name": "neighbour_collision_increase", - "type": "double", - "mode": "[R]", - "doc": "Controls how much a reactor extends when connected to other reactor \n_Can only be used if this is Reactor_" + "get_trains": { + "name": "get_trains", + "type": "function", + "returns": "array of LuaTrain", + "args": { + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If given only trains on the surface are returned." + } + }, + "doc": "**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If given only trains on the surface are returned." }, - "next_upgrade": { - "name": "next_upgrade", - "type": "LuaEntityPrototype", - "mode": "[R]", - "doc": "The next upgrade for this entity or ````\nnil````\n." + "get_turret_attack_modifier": { + "name": "get_turret_attack_modifier", + "type": "function", + "returns": "double", + "args": { + "turret": { + "name": "turret", + "type": "string", + "doc": "turret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" + } + }, + "doc": "**Parameters** \nturret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" }, - "normal_resource_amount": { - "name": "normal_resource_amount", + "ghost_time_to_live": { + "name": "ghost_time_to_live", "type": "uint", - "mode": "[R]", - "doc": "The normal amount for this resource. ````\nnil````\nwhen not a resource." + "mode": "[RW]", + "doc": "The time, in ticks, before a placed ghost disappears." }, - "order": { - "name": "order", + "help": { + "name": "help", "type": "string", - "mode": "[R]", - "doc": "Order string of this prototype." + "doc": "All methods, and properties that this object supports." }, - "pollution_to_join_attack": { - "name": "pollution_to_join_attack", - "type": "float", + "index": { + "name": "index", + "type": "uint", "mode": "[R]", - "doc": "The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollutio \n````\nnil````\nwhen prototype is not a unit prototype." + "doc": "Unique ID associated with this force." }, - "production": { - "name": "production", + "inserter_stack_size_bonus": { + "name": "inserter_stack_size_bonus", "type": "double", - "mode": "[R]", - "doc": "The max production this solar panel prototype produces or ````\nnil````" + "mode": "[RW]", + "doc": "The inserter stack size bonus for non stack inserters" }, - "pumping_speed": { - "name": "pumping_speed", - "type": "double", - "mode": "[R]", - "doc": "The pumping speed of this offshore pump, normal pump, or ````\nnil````" + "is_chunk_charted": { + "name": "is_chunk_charted", + "type": "function", + "doc": "Has a chunk been charted? \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): Position of the chunk.", + "returns": "boolean", + "args": { + "position": { + "name": "position", + "type": "ChunkPosition", + "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): Position of the chunk." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + } + } }, - "radar_range": { - "name": "radar_range", - "type": "uint", - "mode": "[R]", - "doc": "The radar range of this unit prototype or ````\nnil````\n." + "is_chunk_visible": { + "name": "is_chunk_visible", + "type": "function", + "doc": "Is the given chunk currently charted and visible (not covered by fog of war) on the ma \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition)", + "returns": "boolean", + "args": { + "position": { + "name": "position", + "type": "ChunkPosition", + "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition)" + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + } + } }, - "radius": { - "name": "radius", - "type": "double", - "mode": "[R]", - "doc": "The radius of this entity prototype." + "is_pathfinder_busy": { + "name": "is_pathfinder_busy", + "type": "function", + "doc": "Is pathfinder busy? When the pathfinder is busy, it won't accept any more pathfinding requests.", + "returns": "boolean" }, - "reach_distance": { - "name": "reach_distance", - "type": "uint", + "item_production_statistics": { + "name": "item_production_statistics", + "type": "LuaFlowStatistics", "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "The item production statistics for this force." }, - "reach_resource_distance": { - "name": "reach_resource_distance", - "type": "double", + "items_launched": { + "name": "items_launched", + "type": "dictionary string → uint", "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "All of the items that have been launched in rocket" }, - "remains_when_mined": { - "name": "remains_when_mined", - "type": "array of LuaEntityPrototype", - "mode": "[R]", - "doc": "The remains left behind when this entity is mine" + "kill_all_units": { + "name": "kill_all_units", + "doc": "Kill all units and flush the pathfinder.", + "type": "function" }, - "repair_speed_modifier": { - "name": "repair_speed_modifier", - "type": "uint", + "kill_count_statistics": { + "name": "kill_count_statistics", + "type": "LuaFlowStatistics", "mode": "[R]", - "doc": "Repair-speed modifier for this entity. Actual repair speed will \n````\ntool_repair_speed * entity_repair_speed_modifier````\n. May be ````\nnil````\n." + "doc": "The kill counter statistics for this force." }, - "researching_speed": { - "name": "researching_speed", + "laboratory_productivity_bonus": { + "name": "laboratory_productivity_bonus", "type": "double", - "mode": "[R]", - "doc": "The base researching speed of this lab prototype or ````\nnil````" + "mode": "[RW]" }, - "resistances": { - "name": "resistances", - "type": "Resistances", - "mode": "[R]" + "laboratory_speed_modifier": { + "name": "laboratory_speed_modifier", + "type": "double", + "mode": "[RW]" }, - "resource_categories": { - "name": "resource_categories", - "type": "dictionary string → boolean", + "logistic_networks": { + "name": "logistic_networks", + "type": "dictionary string → array of LuaLogisticNetwork", "mode": "[R]", - "doc": "The resource categories this mining drill supports or ````\nnil````\nif not a mining dil \n\n**Note: ** The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup." + "doc": "List of logistic networks, grouped by surface." }, - "resource_category": { - "name": "resource_category", - "type": "string", - "mode": "[R]", - "doc": "Category of this resource. ````\n\"basic-solid\"````\n, ````\n\"basic-fluid\"````\nor ````\nnil````\n(when not a resource \n\n**Note: ** During data stage this property is named \"category\"." + "manual_crafting_speed_modifier": { + "name": "manual_crafting_speed_modifier", + "type": "double", + "mode": "[RW]", + "doc": "Multiplier of the manual crafting speed. Default value is ````\n0```` \nThe actual crafting speed will be multiplied by ````\n1 + manual_crafting_speed_modifier````\n. \n\n**Example** \nDouble the player's crafting spe \n````\ngame.player.force.manual_crafting_speed_modifier = 1````" }, - "respawn_time": { - "name": "respawn_time", - "type": "uint", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "manual_mining_speed_modifier": { + "name": "manual_mining_speed_modifier", + "type": "double", + "mode": "[RW]", + "doc": "Multiplier of the manual mining speed. Default value is ````\n0```` \nThe actual mining speed will be multiplied by ````\n1 + manual_mining_speed_modifier````\n. \n\n**Example** \nDouble the player's mining spe \n````\ngame.player.force.manual_mining_speed_modifier = 1````" }, - "result_units": { - "name": "result_units", - "mode": "[R]", - "doc": "The result units and spawn points with weight and evolution factor for a biter spawner entity. Each UnitSpawnDefinition is a table: \nunit :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the unit that would be spawned \nspawn_points :: array of SpawnPoint: Each SpawnPoint is a table: \nevolution_factor :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Evolution factor for which this weight applies. \nweight :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Probability of spawning this unit at this evolution factor.", - "type": "array of UnitSpawnDefinition" + "max_failed_attempts_per_tick_per_construction_queue": { + "name": "max_failed_attempts_per_tick_per_construction_queue", + "type": "uint", + "mode": "[RW]" }, - "rocket_parts_required": { - "name": "rocket_parts_required", + "max_successful_attempts_per_tick_per_construction_queue": { + "name": "max_successful_attempts_per_tick_per_construction_queue", "type": "uint", - "mode": "[R]", - "doc": "The rocket parts required for this rocket silo prototype or ````\nnil````" + "mode": "[RW]" }, - "rotation_speed": { - "name": "rotation_speed", - "type": "double", - "mode": "[R]", - "doc": "The rotation speed of this car prototype or ````\nnil````\nif not a car prototyp" + "maximum_following_robot_count": { + "name": "maximum_following_robot_count", + "type": "uint", + "mode": "[RW]", + "doc": "Maximum number of follower robots." }, - "running_speed": { - "name": "running_speed", + "mining_drill_productivity_bonus": { + "name": "mining_drill_productivity_bonus", "type": "double", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" - }, - "secondary_collision_box": { - "name": "secondary_collision_box", - "type": "BoundingBox", - "mode": "[R]", - "doc": "The secondary bounding box used for collision checking, or ````\nnil````\nif it doesn't have one. This is only used in rails and rail remnants." + "mode": "[RW]" }, - "selectable_in_game": { - "name": "selectable_in_game", - "type": "boolean", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "Is this entity selectable?" + "doc": "Name of the force. \n\n**Example** \nPrints \"````\nplayer```` \n````\ngame.player.print(game.player.force.name)````" }, - "selection_box": { - "name": "selection_box", - "type": "BoundingBox", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The bounding box used for drawing selection." + "doc": "The class name of this object." }, - "selection_priority": { - "name": "selection_priority", - "type": "uint", - "mode": "[R]", - "doc": "The selection priority of this entity - a value between 0 and 2" + "play_sound": { + "name": "play_sound", + "type": "function", + "doc": "Plays a sound for every player on this forc \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive. \noverride_sound_type :: [SoundType](http://lua-api.factorio.com/latest/Concepts.html#SoundType) (optional): Which volume mixer to play the sound through. Uses the default mixer for the sound type if not specified.", + "returns": "boolean", + "args": { + "path": { + "name": "path", + "type": "SoundPath", + "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive. \noverride_sound_type :: [SoundType](http://lua-api.factorio.com/latest/Concepts.html#SoundType) (optional): Which volume mixer to play the sound through. Uses the default mixer for the sound type if not specified." + } + } }, - "shooting_cursor_size": { - "name": "shooting_cursor_size", - "type": "double", + "players": { + "name": "players", + "type": "array of LuaPlayer", "mode": "[R]", - "doc": "The cursor size used when shooting at this entit" + "doc": "Players belonging to this force." }, - "spawn_cooldown": { - "name": "spawn_cooldown", - "type": "table", - "mode": "[R]", - "doc": "The spawning cooldown for this enemy spawner prototype or ````\nnil```` \nIt is a table: \nmin :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nmax :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + "previous_research": { + "name": "previous_research", + "type": "LuaTechnology", + "mode": "[RW]", + "doc": "The previous research if any." }, - "spawning_time_modifier": { - "name": "spawning_time_modifier", - "type": "double", - "mode": "[R]", - "doc": "The spawning time modifier of this unit prototype or ````\nnil````\n." - }, - "speed": { - "name": "speed", - "type": "double", - "mode": "[R]", - "doc": "The default speed of this flying robot, rolling stock, unit or ````\nnil````" - }, - "speed_multiplier_when_out_of_energy": { - "name": "speed_multiplier_when_out_of_energy", - "type": "float", - "mode": "[R]", - "doc": "The speed multiplier when this flying robot is out of energy or ````\nnil````" - }, - "stack": { - "name": "stack", - "type": "boolean", - "mode": "[R]", - "doc": "If this inserter is a stack-typ" + "print": { + "name": "print", + "doc": "Print text to the chat console of all players on this force. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \n\n**Note: ** Messages that are identical to a message sent in the last 60 ticks are not printed again.", + "type": "function", + "args": { + "color": { + "name": "color", + "type": "Color", + "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" + }, + "message": { + "name": "message", + "type": "LocalisedString", + "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + } + } }, - "sticker_box": { - "name": "sticker_box", - "type": "BoundingBox", - "mode": "[R]", - "doc": "The bounding box used to attach sticker type entities." + "rechart": { + "name": "rechart", + "doc": "Force a rechart of the whole chart.", + "type": "function" }, - "subgroup": { - "name": "subgroup", - "type": "LuaGroup", + "recipes": { + "name": "recipes", + "type": "CustomDictionary string → LuaRecipe", "mode": "[R]", - "doc": "Subgroup of this entity." + "doc": "Recipes available to this force, indexed by their name. \n\n**Example** \nPrints the category of the given reci \n````\ngame.player.print(game.player.force.recipes[\"transport-belt\"].category)````" }, - "supply_area_distance": { - "name": "supply_area_distance", - "type": "double", - "mode": "[R]", - "doc": "The supply area of this electric pole, beacon, or ````\nnil````\nif this is neithe" + "research_all_technologies": { + "name": "research_all_technologies", + "doc": "Research all technologie \n\n**Parameters** \ninclude_disabled_prototypes (optional): If technologies that are explicitly disabled in the prototype are also researched. This defaults to false.", + "args": { + "include_disabled_prototypes": { + "name": "include_disabled_prototypes", + "doc": "include_disabled_prototypes (optional): If technologies that are explicitly disabled in the prototype are also researched. This defaults to false.", + "type": "include_disabled_prototypes" + } + }, + "type": "function" }, - "tank_driving": { - "name": "tank_driving", + "research_enabled": { + "name": "research_enabled", "type": "boolean", "mode": "[R]", - "doc": "If this car prototype uses tank controls to drive or ````\nnil````\nif this is not a car prototyp" - }, - "target_temperature": { - "name": "target_temperature", - "type": "double", - "mode": "[R]", - "doc": "The target temperature of this boiler prototype or ````\nnil````" - }, - "ticks_to_keep_aiming_direction": { - "name": "ticks_to_keep_aiming_direction", - "type": "uint", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" - }, - "ticks_to_keep_gun": { - "name": "ticks_to_keep_gun", - "type": "uint", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" - }, - "ticks_to_stay_in_combat": { - "name": "ticks_to_stay_in_combat", - "type": "uint", - "mode": "[R]", - "doc": "_Can only be used if this is Character_" + "doc": "Whether research is enabled for this force, see [LuaForce::enable_research](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_research) and [LuaForce::disable_research](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_research)" }, - "time_to_live": { - "name": "time_to_live", - "type": "uint", - "mode": "[R]", - "doc": "The time to live for this prototype or ````\n0````\nif prototype doesn't have time_to_live or time_before_remove" - }, - "timeout": { - "name": "timeout", - "type": "uint", - "mode": "[R]", - "doc": "The time it takes this land mine to ar" - }, - "tree_color_count": { - "name": "tree_color_count", - "type": "uint8", - "mode": "[R]", - "doc": "If it is a tree, return the number of colors it supports. ````\nnil````\notherwis" - }, - "turret_range": { - "name": "turret_range", - "type": "uint", - "mode": "[R]", - "doc": "The range of this turret or ````\nnil````\nif this isn't a turret related prototyp" - }, - "turret_rotation_speed": { - "name": "turret_rotation_speed", + "research_progress": { + "name": "research_progress", "type": "double", - "mode": "[R]", - "doc": "The turret rotation speed of this car prototype or ````\nnil````\nif not a car prototyp" + "mode": "[RW]", + "doc": "Progress of current research, as a number in range [0, 1]." }, - "type": { - "name": "type", - "type": "string", - "mode": "[R]", - "doc": "Type of this prototype." + "research_queue": { + "name": "research_queue", + "type": "array of TechnologySpecification", + "mode": "[RW]", + "doc": "The research queue of this forc \nReading this attribute gives an array of [LuaTechnology](http://lua-api.factorio.com/latest/LuaTechnology.html \nTo write to this, the entire table must be written. Providing an empty table or ````\nnil````\nwill empty the research queue and cancel the current researc \nWriting to this when the research queue is disabled will simply set the last research in the table as the current research. \n\n**Note: ** The first research in the queue is the current research." }, - "valid": { - "name": "valid", + "research_queue_enabled": { + "name": "research_queue_enabled", "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - }, - "vision_distance": { - "name": "vision_distance", - "type": "double", - "mode": "[R]", - "doc": "The vision distance of this unit prototype or ````\nnil````\n." - }, - "weight": { - "name": "weight", - "type": "double", - "mode": "[R]", - "doc": "The weight of this vehicle prototype or ````\nnil````\nif not a vehicle prototyp" - } - }, - "doc": "Prototype of an entity." - }, - "LuaEquipment": { - "name": "LuaEquipment", - "type": "LuaEquipment", - "inherits": [], - "properties": { - "burner": { - "name": "burner", - "type": "LuaBurner", - "mode": "[R]", - "doc": "The burner energy source for this equipment or ````\nnil````\nif there isn't on" - }, - "energy": { - "name": "energy", - "type": "double", "mode": "[RW]", - "doc": "Current available energy." - }, - "generator_power": { - "name": "generator_power", - "type": "double", - "mode": "[R]", - "doc": "Energy generated per tick." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "max_energy": { - "name": "max_energy", - "type": "double", - "mode": "[R]", - "doc": "Maximum amount of energy that can be stored in this equipment." - }, - "max_shield": { - "name": "max_shield", - "type": "double", - "mode": "[R]", - "doc": "Maximum shield value." - }, - "max_solar_power": { - "name": "max_solar_power", - "type": "double", - "mode": "[R]", - "doc": "Maximum solar power generated." + "doc": "Whether the research queue is available for this force." }, - "movement_bonus": { - "name": "movement_bonus", - "type": "double", - "mode": "[R]", - "doc": "Movement speed bonus." + "reset": { + "name": "reset", + "doc": "Reset everything. All technologies are set to not researched, all modifiers are set to default values.", + "type": "function" }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this equipment." + "reset_evolution": { + "name": "reset_evolution", + "doc": "Resets evolution for this force to zero.", + "type": "function" }, - "position": { - "name": "position", - "type": "Position", - "mode": "[R]", - "doc": "Position of this equipment in the equipment grid." + "reset_recipes": { + "name": "reset_recipes", + "doc": "Load the original version of all recipes from the prototypes.", + "type": "function" }, - "prototype": { - "name": "prototype", - "type": "LuaEquipmentPrototype", - "mode": "[R]" + "reset_technologies": { + "name": "reset_technologies", + "doc": "Load the original versions of technologies from prototypes. Preserves research state of technologies.", + "type": "function" }, - "shape": { - "name": "shape", - "type": "table", - "mode": "[R]", - "doc": "Shape of this equipment. It is a table: \nwidth :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nheight :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "reset_technology_effects": { + "name": "reset_technology_effects", + "doc": "Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.", + "type": "function" }, - "shield": { - "name": "shield", - "type": "double", + "rockets_launched": { + "name": "rockets_launched", + "type": "uint", "mode": "[RW]", - "doc": "Current shield value of the equipmen \n\n**Note: ** Can't be set higher than [LuaEquipment::max_shield](http://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_shield)." - }, - "type": { - "name": "type", - "type": "string", - "mode": "[R]", - "doc": "Type of this equipment." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "An item in one's power armour." - }, - "LuaEquipmentGrid": { - "name": "LuaEquipmentGrid", - "type": "LuaEquipmentGrid", - "inherits": [], - "properties": { - "available_in_batteries": { - "name": "available_in_batteries", - "type": "double", - "mode": "[R]", - "doc": "The total energy stored in all batteries in the equipment grid." - }, - "battery_capacity": { - "name": "battery_capacity", - "type": "double", - "mode": "[R]", - "doc": "Total energy storage capacity of all batteries in the equipment grid." + "doc": "The number of rockets launche" }, - "can_move": { - "name": "can_move", + "set_ammo_damage_modifier": { + "name": "set_ammo_damage_modifier", "type": "function", - "doc": "Check whether moving an equipment would succeed \n\n**Parameters** \nTable with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it", - "returns": "boolean", "args": { - "equipment": { - "name": "equipment", - "type": "LuaEquipment", - "doc": "Table with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it" + "ammo": { + "name": "ammo", + "type": "string", + "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + }, + "modifier": { + "name": "modifier", + "type": "double", + "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } - } + }, + "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" }, - "clear": { - "name": "clear", - "doc": "Clear all equipment from the grid. I.e. remove it without actually returning it.", - "type": "function" - }, - "equipment": { - "name": "equipment", - "type": "array of LuaEquipment", - "mode": "[R]", - "doc": "All the equipment in this grid." - }, - "generator_energy": { - "name": "generator_energy", - "type": "double", - "mode": "[R]", - "doc": "Total energy per tick generated by the equipment inside this grid." - }, - "get": { - "name": "get", + "set_cease_fire": { + "name": "set_cease_fire", + "doc": "Stop attacking members of a given force. \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) \ncease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): When ````\ntrue````\n, this force won't attack ````\nother````\n; otherwise it will.", "type": "function", - "doc": "Find equipment in the Equipment Grid based off a position \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position \n\n**Return value** \nThe found equipment, or ````\nnil````\nif equipment could not be found at the given position.", - "returns": "LuaEquipment", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position" + "cease_fire": { + "name": "cease_fire", + "type": "boolean", + "doc": "cease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): When ````\ntrue````\n, this force won't attack ````\nother````\n; otherwise it will." + }, + "other": { + "name": "other", + "type": "ForceSpecification", + "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" } } }, - "get_contents": { - "name": "get_contents", + "set_friend": { + "name": "set_friend", + "doc": "Friends have unrestricted access to buildings and turrets won't fire at them. \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) \nfriend :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", "type": "function", - "doc": "Get counts of all equipment in this grid. \n\n**Return value** \nThe counts, indexed by equipment names.", - "returns": "dictionary string → uint" - }, - "height": { - "name": "height", - "type": "uint", - "mode": "[R]", - "doc": "Height of the equipment grid." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "inhibit_movement_bonus": { - "name": "inhibit_movement_bonus", - "type": "boolean", - "mode": "[RW]", - "doc": "True if this movement bonus equipment is turned off, otherwise fals" - }, - "max_shield": { - "name": "max_shield", - "type": "float", - "mode": "[R]", - "doc": "The maximum amount of shields this equipment grid ha" + "args": { + "friend": { + "name": "friend", + "type": "boolean", + "doc": "friend :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + }, + "other": { + "name": "other", + "type": "ForceSpecification", + "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + } + } }, - "max_solar_energy": { - "name": "max_solar_energy", - "type": "double", - "mode": "[R]", - "doc": "Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generat \nenergy varies depending on the daylight levels." + "set_gun_speed_modifier": { + "name": "set_gun_speed_modifier", + "type": "function", + "args": { + "ammo": { + "name": "ammo", + "type": "string", + "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + }, + "modifier": { + "name": "modifier", + "type": "double", + "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + } + }, + "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" }, - "move": { - "name": "move", + "set_hand_crafting_disabled_for_recipe": { + "name": "set_hand_crafting_disabled_for_recipe", + "doc": "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 recipe \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html) \nhand_crafting_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", "type": "function", - "doc": "Move an equipment within this grid \n\n**Parameters** \nTable with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it \n\n**Return value** \n````\ntrue````\nif the equipment was successfully moved.", - "returns": "boolean", "args": { - "equipment": { - "name": "equipment", - "type": "LuaEquipment", - "doc": "Table with the following fields: \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment to move \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to put it" + "hand_crafting_disabled": { + "name": "hand_crafting_disabled", + "type": "boolean", + "doc": "hand_crafting_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + }, + "recipe": { + "name": "recipe", + "type": "string or LuaRecipe", + "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)" } } }, - "prototype": { - "name": "prototype", - "type": "LuaEquipmentGridPrototype", - "mode": "[R]" - }, - "put": { - "name": "put", + "set_item_launched": { + "name": "set_item_launched", + "doc": "Sets the count of a given item launched in rocket \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to set \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to set", "type": "function", - "doc": "Insert an equipment into the grid \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Equipment prototype name \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Grid position to put the equipment in. \n\n**Return value** \nThe newly-added equipment, or ````\nnil````\nif the equipment could not be added.", - "returns": "LuaEquipment", "args": { - "name": { - "name": "name", + "count": { + "name": "count", + "type": "uint", + "doc": "count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to set" + }, + "item": { + "name": "item", "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Equipment prototype name \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Grid position to put the equipment in." + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to set" } } }, - "shield": { - "name": "shield", - "type": "float", - "mode": "[R]", - "doc": "The amount of shields this equipment grid ha" + "set_saved_technology_progress": { + "name": "set_saved_technology_progress", + "doc": "Sets the saved progress for the given technolog \nThe technology must not be in progress, must not be completed, and the new progress must be < 100 \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology \ndouble: Progress as a percent. Set to ````\nnil````\nto remove the saved progress.", + "type": "function", + "args": { + "double": { + "name": "double", + "doc": "double: Progress as a percent. Set to ````\nnil````\nto remove the saved progress.", + "type": "double" + }, + "technology": { + "name": "technology", + "type": "TechnologySpecification", + "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology" + } + } }, - "take": { - "name": "take", + "set_spawn_position": { + "name": "set_spawn_position", "type": "function", - "doc": "Remove an equipment from the grid \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Take the equipment that contains this position in the grid. \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): Take this exact equipment. \nEither ````\nposition````\nor ````\nequipment````\nmust be specified. \n\n**Return value** \nThe removed equipment, or ````\nnil````\nif no equipment was removed.", - "returns": "SimpleItemStack", "args": { "position": { "name": "position", "type": "Position", - "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Take the equipment that contains this position in the grid. \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): Take this exact equipment. \nEither ````\nposition````\nor ````\nequipment````\nmust be specified." + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The new position on the given surface." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to set the spawn position for." } - } + }, + "doc": "**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The new position on the given surface. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to set the spawn position for." }, - "take_all": { - "name": "take_all", + "set_turret_attack_modifier": { + "name": "set_turret_attack_modifier", "type": "function", - "doc": "Remove all equipment from the grid. \n\n**Return value** \nCount of each removed equipment, indexed by their prototype names.", - "returns": "dictionary string → uint" + "args": { + "modifier": { + "name": "modifier", + "type": "double", + "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + }, + "turret": { + "name": "turret", + "type": "string", + "doc": "turret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" + } + }, + "doc": "**Parameters** \nturret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" }, - "valid": { - "name": "valid", + "share_chart": { + "name": "share_chart", "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - }, - "width": { - "name": "width", - "type": "uint", - "mode": "[R]", - "doc": "Width of the equipment grid." - } - }, - "doc": "An equipment grid is the inside of a power armour." - }, - "LuaEquipmentGridPrototype": { - "name": "LuaEquipmentGridPrototype", - "type": "LuaEquipmentGridPrototype", - "inherits": [], - "properties": { - "equipment_categories": { - "name": "equipment_categories", - "type": "array of string", - "mode": "[R]", - "doc": "Equipment category names for the categories that may be inserted into this equipment grid. The grid will acce \nany equipment that has at least one category in this lis \nSee also \n[LuaEquipmentPrototype::equipment_categories](http://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.equipment_categories)" + "mode": "[RW]", + "doc": "If sharing chart data is enabled for this force." }, - "height": { - "name": "height", + "stack_inserter_capacity_bonus": { + "name": "stack_inserter_capacity_bonus", "type": "uint", - "mode": "[R]" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" - }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]" + "mode": "[RW]", + "doc": "Number of items that can be transferred by stack inserters. When writing to this value, it must be >= 0 and <= 254." }, - "locked": { - "name": "locked", - "type": "boolean", + "technologies": { + "name": "technologies", + "type": "CustomDictionary string → LuaTechnology", "mode": "[R]", - "doc": "If the player can move equipment into or out of this gri" + "doc": "Technologies owned by this force, indexed by their name. \n\n**Example** \nResearches the technology for the player's for \n````\ngame.player.force.technologies[\"steel-processing\"].researched = true````" }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this prototype." + "train_braking_force_bonus": { + "name": "train_braking_force_bonus", + "type": "double", + "mode": "[RW]" }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]", - "doc": "Order string of this prototype." + "unchart_chunk": { + "name": "unchart_chunk", + "type": "function", + "args": { + "position": { + "name": "position", + "type": "ChunkPosition", + "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to unchart." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to unchart on." + } + }, + "doc": "**Parameters** \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to unchart. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to unchart on." }, "valid": { "name": "valid", @@ -5392,66 +5072,59 @@ "mode": "[R]", "doc": "Is this object valid?" }, - "width": { - "name": "width", - "type": "uint", - "mode": "[R]" - } - }, - "doc": "Prototype of an equipment grid." - }, - "LuaEquipmentPrototype": { - "name": "LuaEquipmentPrototype", - "type": "LuaEquipmentPrototype", - "inherits": [], - "properties": { - "background_color": { - "name": "background_color", - "type": "Color", - "mode": "[R]", - "doc": "The background color of this equipment prototype." - }, - "burner_prototype": { - "name": "burner_prototype", - "type": "LuaBurnerPrototype", - "mode": "[R]", - "doc": "The burner energy source prototype this equipment uses or ````\nnil````" - }, - "electric_energy_source_prototype": { - "name": "electric_energy_source_prototype", - "type": "LuaElectricEnergySourcePrototype", - "mode": "[R]", - "doc": "The electric energy source prototype this equipment uses or ````\nnil````" - }, - "energy_consumption": { - "name": "energy_consumption", + "worker_robots_battery_modifier": { + "name": "worker_robots_battery_modifier", "type": "double", - "mode": "[R]" + "mode": "[RW]" }, - "energy_per_shield": { - "name": "energy_per_shield", + "worker_robots_speed_modifier": { + "name": "worker_robots_speed_modifier", "type": "double", - "mode": "[R]", - "doc": "The energy per shield point restored. 0 for non-shield equipment." + "mode": "[RW]" }, - "energy_production": { - "name": "energy_production", + "worker_robots_storage_bonus": { + "name": "worker_robots_storage_bonus", "type": "double", - "mode": "[R]", - "doc": "The max power generated by this equipment." + "mode": "[RW]" }, - "energy_source": { - "name": "energy_source", - "type": "LuaElectricEnergySourcePrototype", - "mode": "[R]", - "doc": "The energy source prototype for the equipment." + "zoom_to_world_blueprint_enabled": { + "name": "zoom_to_world_blueprint_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Ability to create new blueprints using empty blueprint item when using zoom-to-worl" }, - "equipment_categories": { - "name": "equipment_categories", - "type": "array of string", - "mode": "[R]", - "doc": "Category names for this equipment. These categories will be used to determine whether this equipment is allow \nin a particular equipment gri \nSee also \n[LuaEquipmentGridPrototype::equipment_categories](http://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.equipment_categories)" + "zoom_to_world_deconstruction_planner_enabled": { + "name": "zoom_to_world_deconstruction_planner_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Ability to use deconstruction planner when using zoom-to-worl" + }, + "zoom_to_world_enabled": { + "name": "zoom_to_world_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Ability to use zoom-to-world on ma" + }, + "zoom_to_world_ghost_building_enabled": { + "name": "zoom_to_world_ghost_building_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Ability to build ghosts through blueprint or direct ghost placement, or \"mine\" ghosts when using zoom-to-worl" }, + "zoom_to_world_selection_tool_enabled": { + "name": "zoom_to_world_selection_tool_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Ability to use custom selection tools when using zoom-to-worl" + } + }, + "doc": "Count entities of given type." + }, + "LuaFuelCategoryPrototype": { + "name": "LuaFuelCategoryPrototype", + "type": "LuaFuelCategoryPrototype", + "inherits": [], + "properties": { "help": { "name": "help", "type": "string", @@ -5467,29 +5140,17 @@ "type": "LocalisedString", "mode": "[R]" }, - "logistic_parameters": { - "name": "logistic_parameters", - "type": "table", - "mode": "[R]", - "doc": "The logistic parameters for roboport equipmen \nTable with the following fields: \nspawn_and_station_height :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharge_approach_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nlogistic_radius :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nconstruction_radius :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharging_station_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ncharging_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncharging_station_shift :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \ncharging_energy :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \ncharging_threshold_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nrobot_vertical_acceleration :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nstationing_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nrobot_limit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nlogistics_connection_distance :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" - }, - "movement_bonus": { - "name": "movement_bonus", - "type": "float", - "mode": "[R]", - "doc": "_Can only be used if this is MovementBonusEquipmentPrototype_" - }, "name": { "name": "name", "type": "string", "mode": "[R]", "doc": "Name of this prototype." }, - "night_vision_tint": { - "name": "night_vision_tint", - "type": "Color", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "_Can only be used if this is NightVisionEquipmentPrototype_" + "doc": "The class name of this object." }, "order": { "name": "order", @@ -5497,30 +5158,6 @@ "mode": "[R]", "doc": "Order string of this prototype." }, - "shape": { - "name": "shape", - "type": "table", - "mode": "[R]", - "doc": "Shape of this equipment prototype. It is a table: \nwidth :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nheight :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - }, - "shield": { - "name": "shield", - "type": "float", - "mode": "[R]", - "doc": "The shield value of this equipment. 0 for non-shield equipment." - }, - "take_result": { - "name": "take_result", - "type": "LuaItemPrototype", - "mode": "[R]", - "doc": "The result item when taking this equipment out of an equipment grid. ````\nnil````\nif there is no result item." - }, - "type": { - "name": "type", - "type": "string", - "mode": "[R]", - "doc": "Type of this equipment prototype." - }, "valid": { "name": "valid", "type": "boolean", @@ -5528,125 +5165,85 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a modular equipment." + "doc": "" }, - "LuaFlowStatistics": { - "name": "LuaFlowStatistics", - "type": "LuaFlowStatistics", + "LuaGameScript": { + "name": "LuaGameScript", + "type": "LuaGameScript", "inherits": [], + "properties": {} + }, + "LuaGenericOnOffControlBehavior": { + "name": "LuaGenericOnOffControlBehavior", + "type": "LuaGenericOnOffControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], "properties": { - "force": { - "name": "force", - "type": "LuaForce", - "mode": "[R]", - "doc": "The force these statistics belong to or ````\nnil````\nfor pollution statistics." + "circuit_condition": { + "name": "circuit_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" }, - "get_flow_count": { - "name": "get_flow_count", - "type": "function", - "doc": "Gets the flow count value for the given time fram \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name. \ninput :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Read the input values or the output values \nprecision_index :: [defines.flow_precision_index](http://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index): The precision to read. \ncount :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, the count is returned instead of the per-time-frame value.", - "returns": "double", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name. \ninput :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Read the input values or the output values \nprecision_index :: [defines.flow_precision_index](http://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index): The precision to read. \ncount :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, the count is returned instead of the per-time-frame value." - } - } + "connect_to_logistic_network": { + "name": "connect_to_logistic_network", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif this should connect to the logistic network." }, - "get_input_count": { - "name": "get_input_count", - "type": "function", - "doc": "Gets the total input count for a given prototype. \n\n**Parameters** \nstring: The prototype name.", - "returns": "uint64 or double", - "args": { - "string": { - "name": "string", - "doc": "string: The prototype name.", - "type": "string" - } - } + "disabled": { + "name": "disabled", + "type": "boolean", + "mode": "[R]", + "doc": "If the entity is currently disabled because of the control behavior." }, - "get_output_count": { - "name": "get_output_count", + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." + }, + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", - "doc": "Gets the total output count for a given prototype. \n\n**Parameters** \nstring: The prototype name.", - "returns": "uint64 or double", + "returns": "LuaCircuitNetwork", "args": { - "string": { - "name": "string", - "doc": "string: The prototype name.", - "type": "string" + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "input_counts": { - "name": "input_counts", - "type": "dictionary string → array of uint64 or double", + "logistic_condition": { + "name": "logistic_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" + }, + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "List of input counts indexed by name <> valu \nRepresents the data that is shown on the left side of the GUI for the given statistics." + "doc": "The class name of this object." }, - "on_flow": { - "name": "on_flow", - "doc": "Adds a value to this flow statistic \n\n**Parameters** \nstring: The prototype name. \ncount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The count: positive or negative determines if the value goes in the input or output statistics.", - "type": "function", - "args": { - "count": { - "name": "count", - "type": "float", - "doc": "count :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The count: positive or negative determines if the value goes in the input or output statistics." - }, - "string": { - "name": "string", - "doc": "string: The prototype name.", - "type": "string" - } - } - }, - "output_counts": { - "name": "output_counts", - "type": "dictionary string → array of uint64 or double", + "type": { + "name": "type", + "type": "defines.control_behavior.type", "mode": "[R]", - "doc": "List of output counts indexed by name <> valu \nRepresents the data that is shown on the right side of the GUI for the given statistics." - }, - "set_input_count": { - "name": "set_input_count", - "doc": "Sets the total input count for a given prototype. \n\n**Parameters** \nstring: The prototype name. \ncount :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics.", - "type": "function", - "args": { - "count": { - "name": "count", - "type": "uint64 or double", - "doc": "count :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics." - }, - "string": { - "name": "string", - "doc": "string: The prototype name.", - "type": "string" - } - } - }, - "set_output_count": { - "name": "set_output_count", - "doc": "Sets the total output count for a given prototype. \n\n**Parameters** \nstring: The prototype name. \ncount :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics.", - "type": "function", - "args": { - "count": { - "name": "count", - "type": "uint64 or double", - "doc": "count :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) or [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The new count. The type depends on the instance of the statistics." - }, - "string": { - "name": "string", - "doc": "string: The prototype name.", - "type": "string" - } - } + "doc": "The concrete type of this control behavior." }, "valid": { "name": "valid", @@ -5655,131 +5252,62 @@ "doc": "Is this object valid?" } }, - "doc": "Encapsulates statistic data for different parts of the game.\n In the context of flow statistics, input and output describe on which side of the associated GUI the values are shown. Input values are shown on the left side, output values on the right side." + "doc": "An abstract base class for behaviors that support switching the entity on or off based on some condition." }, - "LuaFluidBox": { - "name": "LuaFluidBox", - "type": "LuaFluidBox", + "LuaGroup": { + "name": "LuaGroup", + "type": "LuaGroup", "inherits": [], "properties": { - "get_capacity": { - "name": "get_capacity", - "type": "function", - "doc": "The capacity of the given fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "double", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "get_connections": { - "name": "get_connections", - "type": "function", - "doc": "The fluidbox connections for the given fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "array of LuaFluidBox", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "get_filter": { - "name": "get_filter", - "type": "function", - "doc": "The filter of the given fluidbox index, 'nil' if non \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Return value** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The maximum temperature allowed into the fluidbox \nor 'nil'.", - "returns": "table", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "get_flow": { - "name": "get_flow", - "type": "function", - "doc": "Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flo \nNote that wagons do not track it and will return \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "double", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "get_locked_fluid": { - "name": "get_locked_fluid", - "type": "function", - "doc": "Returns the fluid the fluidbox is locked onto (along with its whole syste \nReturns 'nil' for no lo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "string", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "get_prototype": { - "name": "get_prototype", - "type": "function", - "doc": "The prototype of this fluidbox inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "LuaFluidBoxPrototype", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } + "group": { + "name": "group", + "type": "LuaGroup", + "mode": "[R]", + "doc": "The parent group if any; ````\nnil````\nif none." }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "operator []": { - "name": "operator []", - "type": "Fluid or nil", + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", "mode": "[R]", - "doc": "Access, set or clear a fluid box. The index must always be in bounds (see LuaFluidBox::operator # \nnew fluidboxes may not be added or removed using this operator. If the given fluid box doesn't contain a \nfluid, ````\nnil````\nis returned. Similarly, ````\nnil````\ncan be written to a fluid box to remove all fluid from it." + "doc": "Localised name of the grou" }, - "operator #": { - "name": "operator #", - "type": "uint", + "name": { + "name": "name", + "type": "string", + "mode": "[R]" + }, + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Number of fluid boxes." + "doc": "The class name of this object." }, - "owner": { - "name": "owner", - "type": "LuaEntity", + "order": { + "name": "order", + "type": "string", + "mode": "[R]" + }, + "order_in_recipe": { + "name": "order_in_recipe", + "type": "string", "mode": "[R]", - "doc": "The entity that owns this fluidbo" + "doc": "The additional order value used in recipe orderin \n\n**Note: ** Can only be used on groups, not on subgroups." }, - "set_filter": { - "name": "set_filter", - "type": "function", - "doc": "Set the filter of the given fluidbox index, 'nil' to clea \nSome entities cannot have their fluidbox filter set, notably fluid wagons and crafting machine \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ntable: Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum temperature allowed into the fluidbox \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Force the filter to be set, regardless of current fluid content. \nor 'nil'. \n\n**Return value** \nIf the filter was set successfully.", - "returns": "boolean", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - }, - "table": { - "name": "table", - "type": "string", - "doc": "table: Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Fluid prototype name of the filtered fluid. \nminimum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum temperature allowed into the fluidbox \nmaximum_temperature :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum temperature allowed into the fluidbox \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Force the filter to be set, regardless of current fluid content. \nor 'nil'." - } - } + "subgroups": { + "name": "subgroups", + "type": "array of LuaGroup", + "mode": "[R]", + "doc": "Subgroups of this group. \n\n**Note: ** Can only be used on groups, not on subgroups." + }, + "type": { + "name": "type", + "type": "string", + "mode": "[R]" }, "valid": { "name": "valid", @@ -5788,192 +5316,282 @@ "doc": "Is this object valid?" } }, - "doc": "An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number\n of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending\n on its active recipe." + "doc": "" }, - "LuaFluidBoxPrototype": { - "name": "LuaFluidBoxPrototype", - "type": "LuaFluidBoxPrototype", + "LuaGui": { + "name": "LuaGui", + "type": "LuaGui", "inherits": [], "properties": { - "base_area": { - "name": "base_area", - "type": "double", - "mode": "[R]" - }, - "base_level": { - "name": "base_level", - "type": "double", - "mode": "[R]" - }, - "entity": { - "name": "entity", - "type": "LuaEntityPrototype", + "center": { + "name": "center", + "type": "LuaGuiElement", "mode": "[R]", - "doc": "The entity that this belongs t" + "doc": "The center part of the GUI. It is a flow elemen" }, - "filter": { - "name": "filter", - "type": "LuaFluidPrototype", + "children": { + "name": "children", + "type": "dictionary string → LuaGuiElement", "mode": "[R]", - "doc": "The filter or ````\nnil````\nif no filter is se" + "doc": "The children GUI elements mapped by name <> elemen" }, - "height": { - "name": "height", - "type": "double", - "mode": "[R]" + "goal": { + "name": "goal", + "type": "LuaGuiElement", + "mode": "[R]", + "doc": "The flow used in the objectives window. It is a flow elemen \nThe objectives window is only visible when the flow is not empty or the objective text is se" }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "index": { - "name": "index", - "type": "uint", + "is_valid_sprite_path": { + "name": "is_valid_sprite_path", + "type": "function", + "doc": "Returns ````\ntrue````\nif sprite_path is valid and contains loaded sprite, otherwise ````\nfalse````\n. Sprite path of type ````\nfile````\ndoesn't validate if file exist \n\n**Parameters** \nsprite_path :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath): Path to a image.", + "returns": "boolean", + "args": { + "sprite_path": { + "name": "sprite_path", + "type": "SpritePath", + "doc": "sprite_path :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath): Path to a image." + } + } + }, + "left": { + "name": "left", + "type": "LuaGuiElement", "mode": "[R]", - "doc": "The index of this fluidbox prototype in the owning entit" + "doc": "The left part of the GUI. It is a flow element inside a scroll pane elemen" }, - "maximum_temperature": { - "name": "maximum_temperature", - "type": "double", - "mode": "[R]", - "doc": "The maximum temperature or ````\nnil````\nif none is se" - }, - "minimum_temperature": { - "name": "minimum_temperature", - "type": "double", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The minimum temperature or ````\nnil````\nif none is se" + "doc": "The class name of this object." }, - "pipe_connections": { - "name": "pipe_connections", - "type": "array of FluidBoxConnection", + "player": { + "name": "player", + "type": "LuaPlayer", "mode": "[R]", - "doc": "The pipe connection point" + "doc": "The player who owns this gui." }, - "production_type": { - "name": "production_type", - "type": "string", + "relative": { + "name": "relative", + "type": "LuaGuiElement", "mode": "[R]", - "doc": "The production type. \"input\", \"output\", \"input-output\", or \"none" + "doc": "For showing a GUI somewhere relative to one of the game GUIs. It is an empty-widget elemen" }, - "render_layer": { - "name": "render_layer", - "type": "string", + "screen": { + "name": "screen", + "type": "LuaGuiElement", "mode": "[R]", - "doc": "The render laye" + "doc": "For showing a GUI somewhere on the entire screen. It is an empty-widget elemen" }, - "secondary_draw_orders": { - "name": "secondary_draw_orders", - "type": "array of int", + "top": { + "name": "top", + "type": "LuaGuiElement", "mode": "[R]", - "doc": "The secondary draw orders for the 4 possible connection direction" + "doc": "The top part of the GUI. It is a flow element inside a scroll pane elemen" }, "valid": { "name": "valid", "type": "boolean", "mode": "[R]", "doc": "Is this object valid?" - }, - "volume": { - "name": "volume", - "type": "double", - "mode": "[R]" } }, - "doc": "A prototype of a fluidbox owned by some LuaEntityPrototype." + "doc": "Returns true if sprite_path is valid and contains loaded sprite, otherwise false. Sprite path of type file doesn't validate if file exists." }, - "LuaFluidPrototype": { - "name": "LuaFluidPrototype", - "type": "LuaFluidPrototype", + "LuaGuiElement": { + "name": "LuaGuiElement", + "type": "LuaGuiElement", + "inherits": [], + "properties": {} + }, + "LuaHeatEnergySourcePrototype": { + "name": "LuaHeatEnergySourcePrototype", + "type": "LuaHeatEnergySourcePrototype", "inherits": [], "properties": { - "base_color": { - "name": "base_color", - "type": "Color", - "mode": "[R]" + "connections": { + "name": "connections", + "mode": "[R]", + "type": "array of Connection" }, "default_temperature": { "name": "default_temperature", "type": "double", - "mode": "[R]", - "doc": "Default temperature of the fluid." + "mode": "[R]" }, - "emissions_multiplier": { - "name": "emissions_multiplier", + "emissions": { + "name": "emissions", "type": "double", "mode": "[R]" }, - "flow_color": { - "name": "flow_color", - "type": "Color", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "max_temperature": { + "name": "max_temperature", + "type": "double", "mode": "[R]" }, - "fuel_value": { - "name": "fuel_value", + "max_transfer": { + "name": "max_transfer", "type": "double", "mode": "[R]" }, - "gas_temperature": { - "name": "gas_temperature", + "min_temperature_gradient": { + "name": "min_temperature_gradient", "type": "double", "mode": "[R]" }, - "group": { - "name": "group", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Group of this prototype." + "min_working_temperature": { + "name": "min_working_temperature", + "type": "double", + "mode": "[R]" }, - "heat_capacity": { - "name": "heat_capacity", + "minimum_glow_temperature": { + "name": "minimum_glow_temperature", "type": "double", - "mode": "[R]", - "doc": "How much energy the fluid will generate at max temperature assuming 100% efficiency steam engine." + "mode": "[R]" }, - "help": { - "name": "help", + "object_name": { + "name": "object_name", "type": "string", - "doc": "All methods, and properties that this object supports." + "mode": "[R]", + "doc": "The class name of this object." }, - "hidden": { - "name": "hidden", + "render_no_network_icon": { + "name": "render_no_network_icon", "type": "boolean", "mode": "[R]" }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", + "render_no_power_icon": { + "name": "render_no_power_icon", + "type": "boolean", "mode": "[R]" }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", + "specific_heat": { + "name": "specific_heat", + "type": "double", "mode": "[R]" }, - "max_temperature": { - "name": "max_temperature", - "type": "double", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "Maximum temperature the fluid can reach." + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaInserterControlBehavior": { + "name": "LuaInserterControlBehavior", + "type": "LuaInserterControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity", + "Inherited from LuaGenericOnOffControlBehavior: disabled, circuit_condition, logistic_condition, connect_to_logistic_network" + ], + "properties": { + "circuit_condition": { + "name": "circuit_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" }, - "name": { - "name": "name", - "type": "string", + "circuit_hand_read_mode": { + "name": "circuit_hand_read_mode", + "type": "defines.control_behavior.inserter.hand_read_mode", + "mode": "[RW]", + "doc": "The hand read mode for the inserter." + }, + "circuit_mode_of_operation": { + "name": "circuit_mode_of_operation", + "type": "defines.control_behavior.inserter.circuit_mode_of_operation", + "mode": "[RW]", + "doc": "The circuit mode of operations for the inserter." + }, + "circuit_read_hand_contents": { + "name": "circuit_read_hand_contents", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the contents of the inserter hand should be sent to the circuit network" + }, + "circuit_set_stack_size": { + "name": "circuit_set_stack_size", + "type": "boolean", + "mode": "[RW]", + "doc": "If the stack size of the inserter is set through the circuit network or no" + }, + "circuit_stack_control_signal": { + "name": "circuit_stack_control_signal", + "type": "SignalID", + "mode": "[RW]", + "doc": "The signal used to set the stack size of the inserte" + }, + "connect_to_logistic_network": { + "name": "connect_to_logistic_network", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif this should connect to the logistic network." + }, + "disabled": { + "name": "disabled", + "type": "boolean", "mode": "[R]", - "doc": "Name of this prototype." + "doc": "If the entity is currently disabled because of the control behavior." }, - "order": { - "name": "order", + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." + }, + "get_circuit_network": { + "name": "get_circuit_network", + "type": "function", + "returns": "LuaCircuitNetwork", + "args": { + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "logistic_condition": { + "name": "logistic_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" + }, + "object_name": { + "name": "object_name", "type": "string", "mode": "[R]", - "doc": "Order string for this prototype." + "doc": "The class name of this object." }, - "subgroup": { - "name": "subgroup", - "type": "LuaGroup", + "type": { + "name": "type", + "type": "defines.control_behavior.type", "mode": "[R]", - "doc": "Subgroup of this prototype." + "doc": "The concrete type of this control behavior." }, "valid": { "name": "valid", @@ -5982,2350 +5600,1545 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a fluid." + "doc": "Control behavior for inserters." }, - "LuaForce": { - "name": "LuaForce", - "type": "LuaForce", + "LuaInventory": { + "name": "LuaInventory", + "type": "LuaInventory", "inherits": [], "properties": { - "add_chart_tag": { - "name": "add_chart_tag", + "can_insert": { + "name": "can_insert", "type": "function", - "doc": "Adds a custom chart tag to the given surface and returns the new tag or ````\nnil````\nif the given position isn't valid for a chart ta \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Which surface to add the tag to. \ntag: Table with the following fields: \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): ) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlast_user :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional) \n\n**Note: ** The chunk must be charted for a tag to be valid at that location. \n\n**Note: ** The icon, text, or both must be provided.", - "returns": "LuaCustomChartTag", + "doc": "Can at least some items be inserted? \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted. \n\n**Return value** \n````\ntrue````\nif at least a part of the given items could be inserted into this inventory.", + "returns": "boolean", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Which surface to add the tag to." - }, - "tag": { - "name": "tag", - "type": "SignalID", - "doc": "tag: Table with the following fields: \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): ) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlast_user :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional)" + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted." } } }, - "add_research": { - "name": "add_research", - "doc": "Add this technology to the back of the research queue if the queue is enable \nOtherwise, set this technology to be researched no \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification)", + "can_set_filter": { + "name": "can_set_filter", "type": "function", + "doc": "If the given inventory slot filter can be set to the given filter \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name of the filter", + "returns": "boolean", "args": { - "technology": { - "name": "technology", - "type": "TechnologySpecification", - "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification)" + "filter": { + "name": "filter", + "type": "string", + "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name of the filter" + }, + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" } } }, - "ai_controllable": { - "name": "ai_controllable", - "type": "boolean", - "mode": "[RW]", - "doc": "Enables some higher-level AI behaviour for this force. When set to ````\ntrue````\n, biters belonging \nthis force will automatically expand into new territories, build new spawners, and form un \ngroups. By default, this value is ````\ntrue````\nfor the enemy force and ````\nfalse````\nfor all others. \n\n**Note: ** Setting this to ````\nfalse````\ndoes not turn off biters' AI. They will still move around and atta \nplayers who come close. \n\n**Note: ** It is necessary for a force to be AI controllable in order to be able to create unit grou \nor build bases from scripts." - }, - "artillery_range_modifier": { - "name": "artillery_range_modifier", - "type": "double", - "mode": "[RW]" - }, - "auto_character_trash_slots": { - "name": "auto_character_trash_slots", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif auto character trash slots are enabled. Character trash slots must be > 0 as well for this to actually be use" + "clear": { + "name": "clear", + "doc": "Make this inventory empty.", + "type": "function" }, - "cancel_charting": { - "name": "cancel_charting", - "doc": "Cancels pending chart requests for the given surface or all surface \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", + "count_empty_stacks": { + "name": "count_empty_stacks", "type": "function", + "doc": "Counts the number of empty stack \n\n**Parameters** \ninclude_filtered :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, filtered slots will be included. Defaults to false.", + "returns": "uint", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" + "include_filtered": { + "name": "include_filtered", + "type": "boolean", + "doc": "include_filtered :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, filtered slots will be included. Defaults to false." } } }, - "cancel_current_research": { - "name": "cancel_current_research", - "doc": "Stop the research currently in progres \nThis will remove any dependent technologies from the research queue.", + "destroy": { + "name": "destroy", + "doc": "Destroys this inventor \n\n**Note: ** Only inventories created by [LuaGameScript::create_inventory](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) can be destroyed this way.", "type": "function" }, - "character_build_distance_bonus": { - "name": "character_build_distance_bonus", - "type": "uint", - "mode": "[RW]" - }, - "character_health_bonus": { - "name": "character_health_bonus", - "type": "double", - "mode": "[RW]" - }, - "character_inventory_slots_bonus": { - "name": "character_inventory_slots_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "the number of additional inventory slots the character main inventory has." - }, - "character_item_drop_distance_bonus": { - "name": "character_item_drop_distance_bonus", - "type": "uint", - "mode": "[RW]" - }, - "character_item_pickup_distance_bonus": { - "name": "character_item_pickup_distance_bonus", - "type": "double", - "mode": "[RW]" - }, - "character_logistic_slot_count": { - "name": "character_logistic_slot_count", - "type": "double", - "mode": "[RW]", - "doc": "Number of character logistic slots." + "entity_owner": { + "name": "entity_owner", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity that owns this inventory or ````\nnil````\nif this isn't owned by an entity." }, - "character_loot_pickup_distance_bonus": { - "name": "character_loot_pickup_distance_bonus", - "type": "double", - "mode": "[RW]" + "equipment_owner": { + "name": "equipment_owner", + "type": "LuaEquipment", + "mode": "[R]", + "doc": "The equipment that owns this inventory or ````\nnil````\nif this isn't owned by an equipment." }, - "character_reach_distance_bonus": { - "name": "character_reach_distance_bonus", - "type": "uint", - "mode": "[RW]" + "find_empty_stack": { + "name": "find_empty_stack", + "type": "function", + "doc": "Finds the first empty stack. Filtered slots are excluded unless a filter item is give \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If given, empty stacks that are filtered for this item will be included. \n\n**Return value** \nor ````\nnil````\n. \n\n**Note: ** This will also return the stack index if one is found that matches as a second return value.", + "returns": "LuaItemStack", + "args": { + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If given, empty stacks that are filtered for this item will be included." + } + } }, - "character_resource_reach_distance_bonus": { - "name": "character_resource_reach_distance_bonus", - "type": "double", - "mode": "[RW]" + "find_item_stack": { + "name": "find_item_stack", + "type": "function", + "doc": "Gets the first LuaItemStack in the inventory that matches the given item nam \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name to find \n\n**Return value** \nor ````\nnil````\n. \n\n**Note: ** This will also return the stack index if one is found that matches as a second return value.", + "returns": "LuaItemStack", + "args": { + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name to find" + } + } }, - "character_running_speed_modifier": { - "name": "character_running_speed_modifier", - "type": "double", - "mode": "[RW]" + "get_bar": { + "name": "get_bar", + "type": "function", + "doc": "Get the current bar. This is the index at which the red area starts. \n\n**Note: ** Only useable if this inventory supports having a bar.", + "returns": "uint" }, - "character_trash_slot_count": { - "name": "character_trash_slot_count", - "type": "double", - "mode": "[RW]", - "doc": "Number of character trash slots." + "get_contents": { + "name": "get_contents", + "type": "function", + "doc": "Get counts of all items in this inventory. \n\n**Return value** \nThe counts, indexed by item names.", + "returns": "dictionary string → uint" }, - "chart": { - "name": "chart", - "doc": "Chart a portion of the map. The chart for the given area is refreshed; it creates chart f \nany parts of the given area that haven't been charted yet \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area on the given surface to chart. \n\n**Example** \nCharts a 2048x2048 rectangle centered around the origi \n````\ngame.player.force.chart(game.player.surface, \n                        {{x = -1024, y = -1024}, {x = 1024, y = 1024}})````", + "get_filter": { + "name": "get_filter", "type": "function", + "doc": "Gets the filter for the given item stack index \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \n\n**Return value** \nThe current filter or nil if none.", + "returns": "string", "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area on the given surface to chart." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" } } }, - "chart_all": { - "name": "chart_all", - "doc": "Chart all generated chunk \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to chart or all if not given.", + "get_insertable_count": { + "name": "get_insertable_count", + "doc": "Gets the number of the given item that can be inserted into this inventor \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to check. \n\n**Note: ** This 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. \n\n**Note: ** The main use for this is in checking how many of a basic item can fit into a basic inventory. \n\n**Note: ** This accounts for the 'bar' on the inventory.", "type": "function", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to chart or all if not given." + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to check." } } }, - "clear_chart": { - "name": "clear_chart", - "doc": "Erases chart data for this forc \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to erase chart data for or if not provided all surfaces charts are erased.", + "get_item_count": { + "name": "get_item_count", "type": "function", + "doc": "Get the number of all or some items in this inventory. \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items.", + "returns": "uint", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Which surface to erase chart data for or if not provided all surfaces charts are erased." + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items." } } }, - "connected_players": { - "name": "connected_players", - "type": "array of LuaPlayer", - "mode": "[R]", - "doc": "The connected players belonging to this forc \nThis is primarily useful when you want to do some action against all online players of this force. \n\n**Note: ** This does *not* index using player index. See [LuaPlayer::index](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index) on each player instance for the player index." + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "current_research": { - "name": "current_research", - "type": "LuaTechnology", + "index": { + "name": "index", + "type": "defines.inventory", "mode": "[R]", - "doc": "The current technology in research, or ````\nnil````\nif no research is currently ongoing." - }, - "deconstruction_time_to_live": { - "name": "deconstruction_time_to_live", - "type": "uint", - "mode": "[RW]", - "doc": "The time, in ticks, before a deconstruction order is removed." + "doc": "The inventory index this inventory uses, or ````\nnil````\nif the inventory doesn't have an index." }, - "disable_all_prototypes": { - "name": "disable_all_prototypes", - "doc": "Disable all recipes and technologies. Only recipes and technologies enabled explicitly wi \nbe useable from this point.", - "type": "function" + "insert": { + "name": "insert", + "type": "function", + "doc": "Insert items into this inventory. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", + "returns": "uint", + "args": { + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." + } + } }, - "disable_research": { - "name": "disable_research", - "doc": "Disable research for this force.", - "type": "function" + "is_empty": { + "name": "is_empty", + "type": "function", + "doc": "Does this inventory contain nothing?", + "returns": "boolean" }, - "enable_all_prototypes": { - "name": "enable_all_prototypes", - "doc": "Enables all recipes and technologie \nThe opposite of [LuaForce::disable_all_prototypes](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_all_prototypes)", - "type": "function" + "is_filtered": { + "name": "is_filtered", + "type": "function", + "doc": "If this inventory supports filters and has at least 1 filter se", + "returns": "boolean" }, - "enable_all_recipes": { - "name": "enable_all_recipes", - "doc": "Unlock all recipes.", - "type": "function" + "mod_owner": { + "name": "mod_owner", + "type": "string", + "mode": "[R]", + "doc": "The mod that owns this inventory or ````\nnil````\nif this isn't owned by a mod." }, - "enable_all_technologies": { - "name": "enable_all_technologies", - "doc": "Unlock all technologies.", - "type": "function" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "enable_research": { - "name": "enable_research", - "doc": "Enable research for this force.", - "type": "function" + "operator []": { + "name": "operator []", + "type": "LuaItemStack", + "mode": "[R]", + "doc": "The indexing operator \n\n**Example** \nWill get the first item in the player's inventor \n````\ngame.player.get_main_inventory()[1]````" }, - "entity_build_count_statistics": { - "name": "entity_build_count_statistics", - "type": "LuaFlowStatistics", + "operator #": { + "name": "operator #", + "type": "uint", "mode": "[R]", - "doc": "The entity build statistics for this force (built and mined)" + "doc": "Get the number of slots in this inventory \n\n**Example** \nWill print the number of slots in the player's main inventor \n````\ngame.player.print(#game.player.get_main_inventory())````" }, - "evolution_factor": { - "name": "evolution_factor", - "type": "double", - "mode": "[RW]", - "doc": "Evolution factor of this force." - }, - "evolution_factor_by_killing_spawners": { - "name": "evolution_factor_by_killing_spawners", - "type": "double", - "mode": "[RW]" - }, - "evolution_factor_by_pollution": { - "name": "evolution_factor_by_pollution", - "type": "double", - "mode": "[RW]" - }, - "evolution_factor_by_time": { - "name": "evolution_factor_by_time", - "type": "double", - "mode": "[RW]" - }, - "find_chart_tags": { - "name": "find_chart_tags", - "type": "function", - "doc": "Finds all custom chart tags within the given bounding box on the given surfac \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional)", - "returns": "array of LuaCustomChartTag", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional)" - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" - } - } - }, - "find_logistic_network_by_position": { - "name": "find_logistic_network_by_position", - "type": "function", - "returns": "LuaLogisticNetwork", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position to find a network for" - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to search on" - } - }, - "doc": "**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position to find a network for \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to search on \n\n**Return value** \nThe found network or ````\nnil````\n." - }, - "fluid_production_statistics": { - "name": "fluid_production_statistics", - "type": "LuaFlowStatistics", + "player_owner": { + "name": "player_owner", + "type": "LuaPlayer", "mode": "[R]", - "doc": "The fluid production statistics for this force." - }, - "following_robots_lifetime_modifier": { - "name": "following_robots_lifetime_modifier", - "type": "double", - "mode": "[RW]", - "doc": "Additional lifetime for following robot" - }, - "friendly_fire": { - "name": "friendly_fire", - "type": "boolean", - "mode": "[RW]", - "doc": "If friendly fire is enabled for this force." + "doc": "The player that owns this inventory or ````\nnil````\nif this isn't owned by a player." }, - "get_ammo_damage_modifier": { - "name": "get_ammo_damage_modifier", + "remove": { + "name": "remove", "type": "function", - "returns": "double", + "doc": "Remove items from this inventory. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", + "returns": "uint", "args": { - "ammo": { - "name": "ammo", - "type": "string", - "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." } - }, - "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + } }, - "get_cease_fire": { - "name": "get_cease_fire", + "resize": { + "name": "resize", + "doc": "Resizes the inventor \n\n**Parameters** \nsize :: [uint16](http://lua-api.factorio.com/latest/Builtin-Types.html#uint16): New size of a inventory \n\n**Note: ** Items in slots beyond the new capacity are deleted. \n\n**Note: ** Only inventories created by [LuaGameScript::create_inventory](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) can be resized.", "type": "function", - "doc": "Will this force attack members of another force? \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)", - "returns": "boolean", "args": { - "other": { - "name": "other", - "type": "ForceSpecification", - "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + "size": { + "name": "size", + "type": "uint16", + "doc": "size :: [uint16](http://lua-api.factorio.com/latest/Builtin-Types.html#uint16): New size of a inventory" } } }, - "get_entity_count": { - "name": "get_entity_count", + "set_bar": { + "name": "set_bar", + "doc": "Set the current bar. \n\n**Parameters** \nbar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The new limit. Omitting this parameter will clear the limit. \n\n**Note: ** Only useable if this inventory supports having a bar.", "type": "function", - "doc": "Count entities of given type \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity. \n\n**Return value** \nNumber of entities of given prototype belonging to this force. \n\n**Note: ** This function has O(1) time complexity as entity counts are kept and maintain \nin the game engine.", - "returns": "uint", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity." + "bar": { + "name": "bar", + "type": "uint", + "doc": "bar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The new limit. Omitting this parameter will clear the limit." } } }, - "get_friend": { - "name": "get_friend", + "set_filter": { + "name": "set_filter", "type": "function", - "doc": "Is this force a friend? \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)", + "doc": "Sets the filter for the given item stack index \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The new filter or nil to erase the filter \n\n**Return value** \nIf the filter was allowed to be set. \n\n**Note: ** Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).", "returns": "boolean", "args": { - "other": { - "name": "other", - "type": "ForceSpecification", - "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + "filter": { + "name": "filter", + "type": "string", + "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The new filter or nil to erase the filter" + }, + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" } } }, - "get_gun_speed_modifier": { - "name": "get_gun_speed_modifier", - "type": "function", - "returns": "double", - "args": { - "ammo": { - "name": "ammo", - "type": "string", - "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" - } - }, - "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" + "sort_and_merge": { + "name": "sort_and_merge", + "doc": "Sorts and merges the items in this inventory.", + "type": "function" }, - "get_hand_crafting_disabled_for_recipe": { - "name": "get_hand_crafting_disabled_for_recipe", + "supports_bar": { + "name": "supports_bar", "type": "function", - "doc": "Gets if the given recipe is explicitly disabled from being hand crafte \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)", - "returns": "boolean", - "args": { - "recipe": { - "name": "recipe", - "type": "string or LuaRecipe", - "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)" - } - } + "doc": "Does this inventory support a bar? Bar is the draggable red thing, found for example on chest \nthat limits the portion of the inventory that may be manipulated by machines \n\n**Note: ** \"Supporting a bar\" doesn't mean that the bar is set to some nontrivial value. Supporting a b \nmeans the inventory supports having this limit at all. The character's inventory is \nexample of an inventory without a bar; the wooden chest's inventory is an example of o \nwith a bar.", + "returns": "boolean" }, - "get_item_launched": { - "name": "get_item_launched", + "supports_filters": { + "name": "supports_filters", "type": "function", - "doc": "Gets the count of a given item launched in rocket \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to get \n\n**Return value** \nThe count of the item that has been launched.", - "returns": "uint", - "args": { - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to get" - } - } + "doc": "If this inventory supports filter", + "returns": "boolean" }, - "get_saved_technology_progress": { - "name": "get_saved_technology_progress", - "type": "function", - "doc": "Gets the saved progress for the given technology or ````\nnil````\nif there is no saved progres \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology \n\n**Return value** \nThe progress as a percent.", - "returns": "double", - "args": { - "technology": { - "name": "technology", - "type": "TechnologySpecification", - "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology" - } - } + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Make this inventory empty." + }, + "LuaItemPrototype": { + "name": "LuaItemPrototype", + "type": "LuaItemPrototype", + "inherits": [], + "properties": { + "alt_entity_filter_mode": { + "name": "alt_entity_filter_mode", + "type": "string", + "mode": "[R]", + "doc": "The alt entity filter mode used by this selection too \n_Can only be used if this is SelectionTool_" }, - "get_spawn_position": { - "name": "get_spawn_position", - "type": "function", - "returns": "Position", - "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" - } - }, - "doc": "**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" + "alt_entity_filters": { + "name": "alt_entity_filters", + "type": "dictionary string → LuaEntityPrototype", + "mode": "[R]", + "doc": "The alt entity filters used by this selection tool indexed by entity nam \n_Can only be used if this is SelectionTool_" }, - "get_train_stops": { - "name": "get_train_stops", - "type": "function", - "doc": "Gets train stops matching the given filter \n\n**Parameters** \nopts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", - "returns": "array of LuaEntity", - "args": { - "opts": { - "name": "opts", - "type": "string or array of string", - "doc": "opts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" - } - } + "alt_entity_type_filters": { + "name": "alt_entity_type_filters", + "type": "dictionary string → boolean", + "mode": "[R]", + "doc": "The alt entity type filters used by this selection tool indexed by entity typ \n\n**Note: ** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary. \n_Can only be used if this is SelectionTool_" }, - "get_trains": { - "name": "get_trains", - "type": "function", - "returns": "array of LuaTrain", - "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If given only trains on the surface are returned." - } - }, - "doc": "**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If given only trains on the surface are returned." + "alt_selection_border_color": { + "name": "alt_selection_border_color", + "type": "Color", + "mode": "[R]", + "doc": "The color used when doing alt selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" }, - "get_turret_attack_modifier": { - "name": "get_turret_attack_modifier", - "type": "function", - "returns": "double", - "args": { - "turret": { - "name": "turret", - "type": "string", - "doc": "turret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" - } - }, - "doc": "**Parameters** \nturret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" + "alt_selection_cursor_box_type": { + "name": "alt_selection_cursor_box_type", + "type": "string", + "mode": "[R]", + "doc": "_Can only be used if this is SelectionTool_" }, - "ghost_time_to_live": { - "name": "ghost_time_to_live", - "type": "uint", - "mode": "[RW]", - "doc": "The time, in ticks, before a placed ghost disappears." + "alt_selection_mode_flags": { + "name": "alt_selection_mode_flags", + "type": "SelectionModeFlags", + "mode": "[R]", + "doc": "Flags that affect which entities will be selected during alternate selection. \n_Can only be used if this is SelectionTool_" }, - "help": { - "name": "help", + "alt_tile_filter_mode": { + "name": "alt_tile_filter_mode", "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "index": { - "name": "index", - "type": "uint", "mode": "[R]", - "doc": "Unique ID associated with this force." + "doc": "The alt tile filter mode used by this selection too \n_Can only be used if this is SelectionTool_" }, - "inserter_stack_size_bonus": { - "name": "inserter_stack_size_bonus", - "type": "double", - "mode": "[RW]", - "doc": "The inserter stack size bonus for non stack inserters" + "alt_tile_filters": { + "name": "alt_tile_filters", + "type": "dictionary string → LuaTilePrototype", + "mode": "[R]", + "doc": "The alt tile filters used by this selection tool indexed by tile nam \n_Can only be used if this is SelectionTool_" }, - "is_chunk_charted": { - "name": "is_chunk_charted", - "type": "function", - "doc": "Has a chunk been charted? \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): Position of the chunk.", - "returns": "boolean", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): Position of the chunk." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" - } - } + "always_include_tiles": { + "name": "always_include_tiles", + "type": "boolean", + "mode": "[R]", + "doc": "If tiles area always included when doing selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" }, - "is_chunk_visible": { - "name": "is_chunk_visible", - "type": "function", - "doc": "Is the given chunk currently charted and visible (not covered by fog of war) on the ma \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition)", - "returns": "boolean", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition)" - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification)" - } - } + "attack_parameters": { + "name": "attack_parameters", + "type": "AttackParameters", + "mode": "[R]", + "doc": "The gun attack parameters or ````\nnil````\nif not a gun item prototyp" }, - "is_pathfinder_busy": { - "name": "is_pathfinder_busy", - "type": "function", - "doc": "Is pathfinder busy? When the pathfinder is busy, it won't accept any more pathfinding requests.", - "returns": "boolean" + "burnt_result": { + "name": "burnt_result", + "type": "LuaItemPrototype", + "mode": "[R]", + "doc": "The result of burning this item as fuel or ````\nnil````\n." }, - "item_production_statistics": { - "name": "item_production_statistics", - "type": "LuaFlowStatistics", + "can_be_mod_opened": { + "name": "can_be_mod_opened", + "type": "boolean", "mode": "[R]", - "doc": "The item production statistics for this force." + "doc": "If this item can be mod-opene" }, - "items_launched": { - "name": "items_launched", - "type": "dictionary string → uint", + "capsule_action": { + "name": "capsule_action", + "type": "CapsuleAction", "mode": "[R]", - "doc": "All of the items that have been launched in rocket" + "doc": "The capsule action for this capsule item prototype or ````\nnil````\nif this isn't a capsule item prototyp" }, - "kill_all_units": { - "name": "kill_all_units", - "doc": "Kill all units and flush the pathfinder.", - "type": "function" + "category": { + "name": "category", + "type": "string", + "mode": "[R]", + "doc": "The name of a [LuaModuleCategoryPrototype](http://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html). Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier module \n_Can only be used if this is ModuleItem_" }, - "kill_count_statistics": { - "name": "kill_count_statistics", - "type": "LuaFlowStatistics", + "curved_rail": { + "name": "curved_rail", + "type": "LuaEntityPrototype", "mode": "[R]", - "doc": "The kill counter statistics for this force." + "doc": "The curved rail prototype used for this rail planner prototyp \n_Can only be used if this is RailPlanner_" }, - "laboratory_productivity_bonus": { - "name": "laboratory_productivity_bonus", - "type": "double", - "mode": "[RW]" + "default_label_color": { + "name": "default_label_color", + "type": "Color", + "mode": "[R]", + "doc": "The default label color used for this item with label. ````\nnil````\nif not defined or if this isn't an item with labe \n_Can only be used if this is ItemWithLabel_" }, - "laboratory_speed_modifier": { - "name": "laboratory_speed_modifier", - "type": "double", - "mode": "[RW]" + "default_request_amount": { + "name": "default_request_amount", + "type": "uint", + "mode": "[R]", + "doc": "The default request value." }, - "logistic_networks": { - "name": "logistic_networks", - "type": "dictionary string → array of LuaLogisticNetwork", + "draw_label_for_cursor_render": { + "name": "draw_label_for_cursor_render", + "type": "boolean", "mode": "[R]", - "doc": "List of logistic networks, grouped by surface." + "doc": "If true, and this item with label has a label it is drawn in place of the normal number when held in the curso \n_Can only be used if this is ItemWithLabel_" }, - "manual_crafting_speed_modifier": { - "name": "manual_crafting_speed_modifier", + "durability": { + "name": "durability", "type": "double", - "mode": "[RW]", - "doc": "Multiplier of the manual crafting speed. Default value is ````\n0```` \nThe actual crafting speed will be multiplied by ````\n1 + manual_crafting_speed_modifier````\n. \n\n**Example** \nDouble the player's crafting spe \n````\ngame.player.force.manual_crafting_speed_modifier = 1````" + "mode": "[R]", + "doc": "The durability of this tool item or ````\nnil````\nif not a tool ite \n_Can only be used if this is ToolItem_" }, - "manual_mining_speed_modifier": { - "name": "manual_mining_speed_modifier", - "type": "double", - "mode": "[RW]", - "doc": "Multiplier of the manual mining speed. Default value is ````\n0```` \nThe actual mining speed will be multiplied by ````\n1 + manual_mining_speed_modifier````\n. \n\n**Example** \nDouble the player's mining spe \n````\ngame.player.force.manual_mining_speed_modifier = 1````" + "durability_description_key": { + "name": "durability_description_key", + "type": "string", + "mode": "[R]", + "doc": "The durability message key used when displaying the durability of this too \n_Can only be used if this is ToolItem_" }, - "max_failed_attempts_per_tick_per_construction_queue": { - "name": "max_failed_attempts_per_tick_per_construction_queue", - "type": "uint", - "mode": "[RW]" + "entity_filter_mode": { + "name": "entity_filter_mode", + "type": "string", + "mode": "[R]", + "doc": "The entity filter mode used by this selection too \n_Can only be used if this is SelectionTool_" }, - "max_successful_attempts_per_tick_per_construction_queue": { - "name": "max_successful_attempts_per_tick_per_construction_queue", + "entity_filter_slots": { + "name": "entity_filter_slots", "type": "uint", - "mode": "[RW]" + "mode": "[R]", + "doc": "The number of entity filters this deconstruction item has or ````\nnil````\nif this isn't a deconstruction item prototyp \n_Can only be used if this is DeconstructionItem_" }, - "maximum_following_robot_count": { - "name": "maximum_following_robot_count", - "type": "uint", - "mode": "[RW]", - "doc": "Maximum number of follower robots." + "entity_filters": { + "name": "entity_filters", + "type": "dictionary string → LuaEntityPrototype", + "mode": "[R]", + "doc": "The entity filters used by this selection tool indexed by entity nam \n_Can only be used if this is SelectionTool_" }, - "mining_drill_productivity_bonus": { - "name": "mining_drill_productivity_bonus", - "type": "double", - "mode": "[RW]" + "entity_type_filters": { + "name": "entity_type_filters", + "type": "dictionary string → boolean", + "mode": "[R]", + "doc": "The entity type filters used by this selection tool indexed by entity typ \n\n**Note: ** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary. \n_Can only be used if this is SelectionTool_" }, - "name": { - "name": "name", - "type": "string", + "equipment_grid": { + "name": "equipment_grid", + "type": "LuaEquipmentGridPrototype", "mode": "[R]", - "doc": "Name of the force. \n\n**Example** \nPrints \"````\nplayer```` \n````\ngame.player.print(game.player.force.name)````" + "doc": "The prototype of this armor equipment grid or ````\nnil````\nif none or this is not an armor ite" }, - "play_sound": { - "name": "play_sound", - "type": "function", - "doc": "Plays a sound for every player on this forc \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive.", - "returns": "boolean", - "args": { - "path": { - "name": "path", - "type": "SoundPath", - "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive." - } - } + "extend_inventory_by_default": { + "name": "extend_inventory_by_default", + "type": "boolean", + "mode": "[R]", + "doc": "If this item with inventory extends the inventory it resides in by defaul \n_Can only be used if this is ItemWithInventory_" }, - "players": { - "name": "players", - "type": "array of LuaPlayer", + "filter_mode": { + "name": "filter_mode", + "type": "string", "mode": "[R]", - "doc": "Players belonging to this force." + "doc": "The filter mode used by this item with inventor \n_Can only be used if this is ItemWithInventory_" }, - "previous_research": { - "name": "previous_research", - "type": "LuaTechnology", - "mode": "[RW]", - "doc": "The previous research if any." + "flags": { + "name": "flags", + "type": "ItemPrototypeFlags", + "mode": "[R]", + "doc": "The item prototype flags for this item prototype" }, - "print": { - "name": "print", - "doc": "Print text to the chat console of all players on this force. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)", - "type": "function", - "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" - }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" - } - } - }, - "rechart": { - "name": "rechart", - "doc": "Force a rechart of the whole chart.", - "type": "function" - }, - "recipes": { - "name": "recipes", - "type": "custom dictionary string → LuaRecipe", + "fuel_acceleration_multiplier": { + "name": "fuel_acceleration_multiplier", + "type": "double", "mode": "[R]", - "doc": "Recipes available to this force, indexed by their name. \n\n**Example** \nPrints the category of the given reci \n````\ngame.player.print(game.player.force.recipes[\"transport-belt\"].category)````" + "doc": "The acceleration multiplier when this item is used as fuel in a vehicle." }, - "research_all_technologies": { - "name": "research_all_technologies", - "doc": "Research all technologie \n\n**Parameters** \ninclude_disabled_prototypes (optional): If technologies that are explicitly disabled in the prototype are also researched. This defaults to false.", - "args": { - "include_disabled_prototypes": { - "name": "include_disabled_prototypes", - "doc": "include_disabled_prototypes (optional): If technologies that are explicitly disabled in the prototype are also researched. This defaults to false.", - "type": "include_disabled_prototypes" - } - }, - "type": "function" + "fuel_category": { + "name": "fuel_category", + "type": "string", + "mode": "[R]", + "doc": "The fuel category or ````\nnil````\n." }, - "research_progress": { - "name": "research_progress", + "fuel_emissions_multiplier": { + "name": "fuel_emissions_multiplier", "type": "double", - "mode": "[RW]", - "doc": "Progress of current research, as a number in range [0, 1]." - }, - "research_queue": { - "name": "research_queue", - "type": "array of TechnologySpecification", - "mode": "[RW]", - "doc": "The research queue of this forc \nReading this attribute gives an array of [LuaTechnology](http://lua-api.factorio.com/latest/LuaTechnology.html \nTo write to this, the entire table must be written. Providing an empty table or ````\nnil````\nwill empty the research queue and cancel the current researc \nWriting to this when the research queue is disabled will simply set the last research in the table as the current research. \n\n**Note: ** The first research in the queue is the current research." - }, - "research_queue_enabled": { - "name": "research_queue_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Whether the research queue is available for this force." - }, - "reset": { - "name": "reset", - "doc": "Reset everything. All technologies are set to not researched, all modifiers are set to default values.", - "type": "function" - }, - "reset_evolution": { - "name": "reset_evolution", - "doc": "Resets evolution for this force to zero.", - "type": "function" - }, - "reset_recipes": { - "name": "reset_recipes", - "doc": "Load the original version of all recipes from the prototypes.", - "type": "function" - }, - "reset_technologies": { - "name": "reset_technologies", - "doc": "Load the original versions of technologies from prototypes. Preserves research state of technologies.", - "type": "function" + "mode": "[R]", + "doc": "The emissions multiplier if this is used as fuel." }, - "reset_technology_effects": { - "name": "reset_technology_effects", - "doc": "Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.", - "type": "function" + "fuel_top_speed_multiplier": { + "name": "fuel_top_speed_multiplier", + "type": "double", + "mode": "[R]", + "doc": "The fuel top speed multiplier when this item is used as fuel in a vehicle." }, - "rockets_launched": { - "name": "rockets_launched", - "type": "uint", - "mode": "[RW]", - "doc": "The number of rockets launche" + "fuel_value": { + "name": "fuel_value", + "type": "float", + "mode": "[R]", + "doc": "Fuel value when burned." }, - "set_ammo_damage_modifier": { - "name": "set_ammo_damage_modifier", + "get_ammo_type": { + "name": "get_ammo_type", "type": "function", + "doc": "Type of this ammo prototype or ````\nnil````\nif this is not an ammo prototyp \n\n**Parameters** \nammo_source_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): \"default\", \"player\", \"turret\", or \"vehicle\"", + "returns": "AmmoType", "args": { - "ammo": { - "name": "ammo", + "ammo_source_type": { + "name": "ammo_source_type", "type": "string", - "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" - }, - "modifier": { - "name": "modifier", - "type": "double", - "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - }, - "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "set_cease_fire": { - "name": "set_cease_fire", - "doc": "Stop attacking members of a given force. \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) \ncease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): When ````\ntrue````\n, this force won't attack ````\nother````\n; otherwise it will.", - "type": "function", - "args": { - "cease_fire": { - "name": "cease_fire", - "type": "boolean", - "doc": "cease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): When ````\ntrue````\n, this force won't attack ````\nother````\n; otherwise it will." - }, - "other": { - "name": "other", - "type": "ForceSpecification", - "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + "doc": "ammo_source_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): \"default\", \"player\", \"turret\", or \"vehicle\"" } } }, - "set_friend": { - "name": "set_friend", - "doc": "Friends have unrestricted access to buildings and turrets won't fire at them. \n\n**Parameters** \nother :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) \ncease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "function", - "args": { - "cease_fire": { - "name": "cease_fire", - "type": "boolean", - "doc": "cease_fire :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - }, - "other": { - "name": "other", - "type": "ForceSpecification", - "doc": "other :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" - } - } + "group": { + "name": "group", + "type": "LuaGroup", + "mode": "[R]", + "doc": "The group this prototype belongs to." }, - "set_gun_speed_modifier": { - "name": "set_gun_speed_modifier", + "has_flag": { + "name": "has_flag", "type": "function", + "doc": "Does this prototype have a flag enable \nAny other value will cause an erro \n\n**Parameters** \nflag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Can be one of [ItemPrototypeFlags](http://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags)", + "returns": "boolean", "args": { - "ammo": { - "name": "ammo", + "flag": { + "name": "flag", "type": "string", - "doc": "ammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category" - }, - "modifier": { - "name": "modifier", - "type": "double", - "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - }, - "doc": "**Parameters** \nammo :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Ammo category \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "set_hand_crafting_disabled_for_recipe": { - "name": "set_hand_crafting_disabled_for_recipe", - "doc": "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 recipe \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html) \nhand_crafting_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "function", - "args": { - "hand_crafting_disabled": { - "name": "hand_crafting_disabled", - "type": "boolean", - "doc": "hand_crafting_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - }, - "recipe": { - "name": "recipe", - "type": "string or LuaRecipe", - "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html)" + "doc": "flag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Can be one of [ItemPrototypeFlags](http://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags)" } } }, - "set_item_launched": { - "name": "set_item_launched", - "doc": "Sets the count of a given item launched in rocket \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to set \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to set", - "type": "function", - "args": { - "count": { - "name": "count", - "type": "uint", - "doc": "count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to set" - }, - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item to set" - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "set_saved_technology_progress": { - "name": "set_saved_technology_progress", - "doc": "Sets the saved progress for the given technolog \nThe technology must not be in progress, must not be completed, and the new progress must be < 100 \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology \ndouble: Progress as a percent. Set to ````\nnil````\nto remove the saved progress.", - "type": "function", - "args": { - "double": { - "name": "double", - "doc": "double: Progress as a percent. Set to ````\nnil````\nto remove the saved progress.", - "type": "double" - }, - "technology": { - "name": "technology", - "type": "TechnologySpecification", - "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification): The technology" - } - } + "infinite": { + "name": "infinite", + "type": "boolean", + "mode": "[R]", + "doc": "If this tool item has infinite durability. ````\nnil````\nif not a tool type ite \n_Can only be used if this is ToolItem_" }, - "set_spawn_position": { - "name": "set_spawn_position", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The new position on the given surface." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to set the spawn position for." - } - }, - "doc": "**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The new position on the given surface. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to set the spawn position for." + "insertion_priority_mode": { + "name": "insertion_priority_mode", + "type": "string", + "mode": "[R]", + "doc": "The insertion priority mode used by this item with inventor \n_Can only be used if this is ItemWithInventory_" }, - "set_turret_attack_modifier": { - "name": "set_turret_attack_modifier", - "type": "function", - "args": { - "modifier": { - "name": "modifier", - "type": "double", - "doc": "modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "turret": { - "name": "turret", - "type": "string", - "doc": "turret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name" - } - }, - "doc": "**Parameters** \nturret :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Turret prototype name \nmodifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "share_chart": { - "name": "share_chart", - "type": "boolean", - "mode": "[RW]", - "doc": "If sharing chart data is enabled for this force." - }, - "stack_inserter_capacity_bonus": { - "name": "stack_inserter_capacity_bonus", + "inventory_size": { + "name": "inventory_size", "type": "uint", - "mode": "[RW]", - "doc": "Number of items that can be transferred by stack inserters. When writing to this value, it must be 0 >= and <= 200." - }, - "technologies": { - "name": "technologies", - "type": "custom dictionary string → LuaTechnology", "mode": "[R]", - "doc": "Technologies owned by this force, indexed by their name. \n\n**Example** \nResearches the technology for the player's for \n````\ngame.player.force.technologies[\"steel-processing\"].researched = true````" - }, - "train_braking_force_bonus": { - "name": "train_braking_force_bonus", - "type": "double", - "mode": "[RW]" - }, - "unchart_chunk": { - "name": "unchart_chunk", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to unchart." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to unchart on." - } - }, - "doc": "**Parameters** \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to unchart. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to unchart on." + "doc": "The main inventory size for item-with-inventory-prototype. ````\nnil````\nif not an item-with-inventory-prototyp \n_Can only be used if this is ItemWithInventoryPrototype_" }, - "valid": { - "name": "valid", - "type": "boolean", + "inventory_size_bonus": { + "name": "inventory_size_bonus", + "type": "uint", "mode": "[R]", - "doc": "Is this object valid?" - }, - "worker_robots_battery_modifier": { - "name": "worker_robots_battery_modifier", - "type": "double", - "mode": "[RW]" - }, - "worker_robots_speed_modifier": { - "name": "worker_robots_speed_modifier", - "type": "double", - "mode": "[RW]" - }, - "worker_robots_storage_bonus": { - "name": "worker_robots_storage_bonus", - "type": "double", - "mode": "[RW]" - }, - "zoom_to_world_blueprint_enabled": { - "name": "zoom_to_world_blueprint_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Ability to create new blueprints using empty blueprint item when using zoom-to-worl" - }, - "zoom_to_world_deconstruction_planner_enabled": { - "name": "zoom_to_world_deconstruction_planner_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Ability to use deconstruction planner when using zoom-to-worl" + "doc": "The inventory size bonus for this armor prototype. ````\nnil````\nif this isn't an armor prototyp \n_Can only be used if this is ArmorPrototype_" }, - "zoom_to_world_enabled": { - "name": "zoom_to_world_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Ability to use zoom-to-world on ma" + "item_filters": { + "name": "item_filters", + "type": "dictionary string → LuaItemPrototype", + "mode": "[R]", + "doc": "_Can only be used if this is ItemWithInventory_" }, - "zoom_to_world_ghost_building_enabled": { - "name": "zoom_to_world_ghost_building_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Ability to build ghosts through blueprint or direct ghost placement, or \"mine\" ghosts when using zoom-to-worl" + "item_group_filters": { + "name": "item_group_filters", + "type": "dictionary string → LuaGroup", + "mode": "[R]", + "doc": "_Can only be used if this is ItemWithInventory_" }, - "zoom_to_world_selection_tool_enabled": { - "name": "zoom_to_world_selection_tool_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Ability to use custom selection tools when using zoom-to-worl" - } - }, - "doc": "LuaForce encapsulates data local to each \"force\" or \"faction\" of the game.\n Default forces are player, enemy and neutral. Players and mods can create\n additional forces (up to 64 total)." - }, - "LuaGameScript": { - "name": "LuaGameScript", - "type": "LuaGameScript", - "inherits": [], - "properties": { - "active_mods": { - "name": "active_mods", - "type": "dictionary string → string", + "item_subgroup_filters": { + "name": "item_subgroup_filters", + "type": "dictionary string → LuaGroup", "mode": "[R]", - "doc": "The active mods versions. The keys are mod names, the values are the version \n\n**Example** \nThis will print the names and versions of active mods to player p's consol \n````\nfor name, version in pairs(game.active_mods) do \n  p.print(name .. \" version \" .. version) \nend````" + "doc": "_Can only be used if this is ItemWithInventory_" }, - "ammo_category_prototypes": { - "name": "ammo_category_prototypes", - "type": "custom dictionary string → LuaAmmoCategoryPrototype", - "mode": "[R]" + "limitation_message_key": { + "name": "limitation_message_key", + "type": "string", + "mode": "[R]", + "doc": "The limitation message key used when the player attempts to use this modules in some place it's not allowe \n_Can only be used if this is ModuleItem_" }, - "auto_save": { - "name": "auto_save", - "doc": "Instruct the game to perform an auto-sav \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The autosave name if any. Saves will be named _autosave-*name* when provided. \n\n**Note: ** Only the server will save in multiplayer. In single player a standard auto-save is triggered.", - "type": "function", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The autosave name if any. Saves will be named _autosave-*name* when provided." - } - } + "limitations": { + "name": "limitations", + "type": "array of string", + "mode": "[R]", + "doc": "An array of recipe names this module is allowed to work wit \nEmpty when all recipes are allowe \n_Can only be used if this is ModuleItem_" }, - "autoplace_control_prototypes": { - "name": "autoplace_control_prototypes", - "type": "custom dictionary string → LuaAutoplaceControlPrototype", + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", "mode": "[R]" }, - "autosave_enabled": { - "name": "autosave_enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "True by default. Can be used to disable autosavin \nMake sure to turn it back on soon afte" + "localised_filter_message": { + "name": "localised_filter_message", + "type": "LocalisedString", + "mode": "[R]", + "doc": "The localised string used when the player attempts to put items into this item with inventory that aren't allowe \n_Can only be used if this is ItemWithInventory_" }, - "backer_names": { - "name": "backer_names", - "type": "custom dictionary uint → string", + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", "mode": "[R]" }, - "ban_player": { - "name": "ban_player", - "doc": "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 admi \n\n**Parameters** \nPlayerSpecification: The player to ban. \nreason :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The reason given if any.", - "type": "function", - "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to ban.", - "type": "PlayerSpecification" - }, - "reason": { - "name": "reason", - "type": "LocalisedString", - "doc": "reason :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The reason given if any." - } - } - }, - "check_consistency": { - "name": "check_consistency", - "doc": "Run internal consistency checks. Allegedly prints any errors it finds. \n\n**Note: ** Exists mainly for debugging reasons.", - "type": "function" - }, - "check_prototype_translations": { - "name": "check_prototype_translations", - "doc": "Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrec \n\n**Note: ** Also prints true/false if called from the console.", - "type": "function" - }, - "connected_players": { - "name": "connected_players", - "type": "array of LuaPlayer", + "magazine_size": { + "name": "magazine_size", + "type": "float", "mode": "[R]", - "doc": "The online playe \nThis is primarily useful when you want to do some action against all online players. \n\n**Note: ** This does *not* index using player index. See [LuaPlayer::index](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index) on each player instance for the player index." - }, - "count_pipe_groups": { - "name": "count_pipe_groups", - "doc": "Counts how many distinct groups of pipes exist in the world.", - "type": "function" + "doc": "Size of full magazine; ````\nnil````\nif this is not an ammo item." }, - "create_force": { - "name": "create_force", - "type": "function", - "doc": "Create a new force \n\n**Parameters** \nforce :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the new force \n\n**Return value** \nThe force that was just created \n\n**Note: ** The game currently supports a maximum of 64 forces, including the three built-in force \nThis means that a maximum of 61 new forces may be created. \n\n**Note: ** Force names must be unique.", - "returns": "LuaForce", - "args": { - "force": { - "name": "force", - "type": "string", - "doc": "force :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the new force" - } - } + "mapper_count": { + "name": "mapper_count", + "type": "uint", + "mode": "[R]", + "doc": "How many filters an upgrade item has. ````\nnil````\nif not a upgrade ite \n_Can only be used if this is UpgradeItem_" }, - "create_profiler": { - "name": "create_profiler", - "type": "function", - "doc": "Creates a [LuaProfiler](http://lua-api.factorio.com/latest/LuaProfiler.html), which is used for measuring script performanc \n\n**Note: ** LuaProfiler cannot be serialized.", - "returns": "LuaProfiler" + "module_effects": { + "name": "module_effects", + "type": "Effects", + "mode": "[R]", + "doc": "Effects of this module; ````\nnil````\nif this is not a module. It is a dictionary indexed by the effect typ \n_Can only be used if this is ModuleItem_" }, - "create_random_generator": { - "name": "create_random_generator", - "type": "function", - "doc": "Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is use \n\n**Parameters** \nseed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \n\n**Note: ** *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).", - "returns": "LuaRandomGenerator", - "args": { - "seed": { - "name": "seed", - "type": "uint", - "doc": "seed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)" - } - } + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." }, - "create_surface": { - "name": "create_surface", - "type": "function", - "doc": "Create a new surface \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the new surface \nsettings :: [MapGenSettings](http://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) (optional): Map generation settings \n\n**Return value** \nThe surface that was just created \n\n**Note: ** The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface. \n\n**Note: ** Surface names must be unique", - "returns": "LuaSurface", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the new surface" - }, - "settings": { - "name": "settings", - "type": "MapGenSettings", - "doc": "settings :: [MapGenSettings](http://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) (optional): Map generation settings" - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "custom_input_prototypes": { - "name": "custom_input_prototypes", - "type": "custom dictionary string → LuaCustomInputPrototype", - "mode": "[R]" + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string." }, - "damage_prototypes": { - "name": "damage_prototypes", - "type": "custom dictionary string → LuaDamagePrototype", - "mode": "[R]" + "place_as_equipment_result": { + "name": "place_as_equipment_result", + "type": "LuaEquipmentPrototype", + "mode": "[R]", + "doc": "Prototype of the equipment that will be created by placing this item in an equipment grid or ````\nnil````\nif there is no equipment defined." }, - "decorative_prototypes": { - "name": "decorative_prototypes", - "type": "custom dictionary string → LuaDecorativePrototype", - "mode": "[R]" + "place_as_tile_result": { + "name": "place_as_tile_result", + "type": "PlaceAsTileResult", + "mode": "[R]", + "doc": "The place as tile result if one is defined else ````\nnil````" }, - "default_map_gen_settings": { - "name": "default_map_gen_settings", - "type": "MapGenSettings", + "place_result": { + "name": "place_result", + "type": "LuaEntityPrototype", "mode": "[R]", - "doc": "The default map gen settings for this sav" + "doc": "Prototype of the entity that will be created by placing this item, or ````\nnil````\nif there is no su \nentity." }, - "delete_surface": { - "name": "delete_surface", - "doc": "Deletes the given surface and all entities on i \n\n**Parameters** \nsurface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html): The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.", - "type": "function", - "args": { - "surface": { - "name": "surface", - "type": "string or LuaSurface", - "doc": "surface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html): The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted." - } - } + "reload_time": { + "name": "reload_time", + "type": "float", + "mode": "[R]", + "doc": "Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine or ````\nnil````\nif this is not an ammo item." }, - "difficulty": { - "name": "difficulty", - "type": "defines.difficulty", + "repair_result": { + "name": "repair_result", + "type": "Trigger", "mode": "[R]", - "doc": "Current scenario difficulty." + "doc": "The repair result of this repair tool prototype or ````\nnil````\nif this isn't a repair tool prototyp \n_Can only be used if this is RepairTool_" }, - "difficulty_settings": { - "name": "difficulty_settings", - "type": "DifficultySettings", + "resistances": { + "name": "resistances", + "type": "Resistances", "mode": "[R]", - "doc": "Although it can be done; because different difficulties can have different technology or recipe trees it's not recommended to change difficulty settings mid-game." + "doc": "Resistances of this armour item; ````\nnil````\nif not an armor or the armor has no resistances." }, - "direction_to_string": { - "name": "direction_to_string", - "doc": "Converts the given direction into the string version of the directio \n\n**Parameters** \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction)", - "type": "function", - "args": { - "direction": { - "name": "direction", - "type": "defines.direction", - "doc": "direction :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction)" - } - } + "rocket_launch_products": { + "name": "rocket_launch_products", + "type": "array of Product", + "mode": "[R]", + "doc": "The results from launching this item in a rocke" }, - "disable_replay": { - "name": "disable_replay", - "doc": "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.", - "type": "function" + "selection_border_color": { + "name": "selection_border_color", + "type": "Color", + "mode": "[R]", + "doc": "The color used when doing normal selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" }, - "disable_tips_and_tricks": { - "name": "disable_tips_and_tricks", - "doc": "Disable showing tips and tricks.", - "type": "function" + "selection_cursor_box_type": { + "name": "selection_cursor_box_type", + "type": "string", + "mode": "[R]", + "doc": "_Can only be used if this is SelectionTool_" }, - "disable_tutorial_triggers": { - "name": "disable_tutorial_triggers", - "doc": "Disables tutorial triggers, that unlock new tutorials and show notices about unlocked tutorials.", - "type": "function" + "selection_mode_flags": { + "name": "selection_mode_flags", + "type": "SelectionModeFlags", + "mode": "[R]", + "doc": "Flags that affect which entities will be selected. \n_Can only be used if this is SelectionTool_" }, - "draw_resource_selection": { - "name": "draw_resource_selection", - "type": "boolean", - "mode": "[RW]", - "doc": "True by default. Can be used to disable the highlighting of resource patches when they are hovered on the ma" + "speed": { + "name": "speed", + "type": "float", + "mode": "[R]", + "doc": "The repairing speed if this is a repairing tool; otherwise ````\nnil````\n." }, - "enemy_has_vision_on_land_mines": { - "name": "enemy_has_vision_on_land_mines", + "stack_size": { + "name": "stack_size", + "type": "uint", + "mode": "[R]", + "doc": "Maximum stack size of the item specified by this prototype." + }, + "stackable": { + "name": "stackable", "type": "boolean", - "mode": "[RW]", - "doc": "Determines if enemy land mines are completely invisible or no" + "mode": "[R]", + "doc": "Is this item allowed to stack at all?" }, - "entity_prototypes": { - "name": "entity_prototypes", - "type": "custom dictionary string → LuaEntityPrototype", - "mode": "[R]" + "straight_rail": { + "name": "straight_rail", + "type": "LuaEntityPrototype", + "mode": "[R]", + "doc": "The straight rail prototype used for this rail planner prototyp \n_Can only be used if this is RailPlanner_" }, - "equipment_grid_prototypes": { - "name": "equipment_grid_prototypes", - "type": "custom dictionary string → LuaEquipmentGridPrototype", - "mode": "[R]" + "subgroup": { + "name": "subgroup", + "type": "LuaGroup", + "mode": "[R]", + "doc": "The subgroup this prototype belongs to." }, - "equipment_prototypes": { - "name": "equipment_prototypes", - "type": "custom dictionary string → LuaEquipmentPrototype", - "mode": "[R]" + "tier": { + "name": "tier", + "type": "uint", + "mode": "[R]", + "doc": "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 categor \n_Can only be used if this is ModuleItem_" }, - "finished": { - "name": "finished", - "type": "boolean", + "tile_filter_mode": { + "name": "tile_filter_mode", + "type": "string", "mode": "[R]", - "doc": "Is the scenario finishe" + "doc": "The tile filter mode used by this selection too \n_Can only be used if this is SelectionTool_" }, - "fluid_prototypes": { - "name": "fluid_prototypes", - "type": "custom dictionary string → LuaFluidPrototype", - "mode": "[R]" + "tile_filter_slots": { + "name": "tile_filter_slots", + "type": "uint", + "mode": "[R]", + "doc": "The number of tile filters this deconstruction item has or ````\nnil````\nif this isn't a deconstruction item prototyp \n_Can only be used if this is DeconstructionItem_" }, - "force_crc": { - "name": "force_crc", - "doc": "Force a CRC check. Tells all peers to calculate their current map CRC; these CRC are then compar \nagainst each other. If a mismatch is detected, the game is desynced and some peers are forced \nreconnect.", - "type": "function" + "tile_filters": { + "name": "tile_filters", + "type": "dictionary string → LuaTilePrototype", + "mode": "[R]", + "doc": "The tile filters used by this selection tool indexed by tile nam \n_Can only be used if this is SelectionTool_" }, - "forces": { - "name": "forces", - "type": "custom dictionary string → LuaForce", - "mode": "[R]" + "type": { + "name": "type", + "type": "string", + "mode": "[R]", + "doc": "Type of this prototype. E.g. ````\n\"gun\"````\nor ````\n\"mining-tool\"````\n." + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + }, + "wire_count": { + "name": "wire_count", + "type": "uint", + "mode": "[R]", + "doc": "The number of items needed to connect 2 entities with this as wire." + } + }, + "doc": "Does this prototype have a flag enabled?" + }, + "LuaItemStack": { + "name": "LuaItemStack", + "type": "LuaItemStack", + "inherits": [], + "properties": { + "active_index": { + "name": "active_index", + "type": "uint", + "mode": "[RW]", + "doc": "The active blueprint index for this blueprint book. May be ````\nnil```` \n_Can only be used if this is BlueprintBookItem_" }, - "get_active_entities_count": { - "name": "get_active_entities_count", + "add_ammo": { + "name": "add_ammo", + "doc": "Add ammo to this ammo item. \n\n**Parameters** \namount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Amount of ammo to add. \n_Can only be used if this is AmmoItem_", "type": "function", - "doc": "Gets the number of entities that are active (updated each tick \n\n**Parameters** \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If give, only the entities active on this surface are counted. \n\n**Note: ** This is very expensive to calculate.", - "returns": "uint", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If give, only the entities active on this surface are counted." + "amount": { + "name": "amount", + "type": "float", + "doc": "amount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Amount of ammo to add." } } }, - "get_entity_by_tag": { - "name": "get_entity_by_tag", + "add_durability": { + "name": "add_durability", + "doc": "Add durability to this tool item. \n\n**Parameters** \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to add. \n_Can only be used if this is ToolItem_", "type": "function", - "returns": "LuaEntity", "args": { - "tag": { - "name": "tag", - "type": "string", - "doc": "tag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + "amount": { + "name": "amount", + "type": "double", + "doc": "amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to add." } - }, - "doc": "**Parameters** \ntag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + } }, - "get_map_exchange_string": { - "name": "get_map_exchange_string", - "type": "function", - "doc": "Gets the map exchange string for the map generation settings that were used to create this ma", - "returns": "string" + "allow_manual_label_change": { + "name": "allow_manual_label_change", + "type": "boolean", + "mode": "[RW]", + "doc": "If the label for this item can be manually changed. When false the label can only be changed through the AP \n_Can only be used if this is ItemWithLabel_" + }, + "ammo": { + "name": "ammo", + "type": "uint", + "mode": "[RW]", + "doc": "Number of bullets left in the magazin \n_Can only be used if this is AmmoItem_" + }, + "blueprint_absolute_snapping": { + "name": "blueprint_absolute_snapping", + "type": "boolean", + "mode": "[RW]", + "doc": "If absolute snapping is enabled on this blueprint ite \n_Can only be used if this is BlueprintItem_" + }, + "blueprint_icons": { + "name": "blueprint_icons", + "mode": "[RW]", + "doc": "Icons of a blueprint item, blueprint book, deconstruction item or upgrade planne \nAn item that doesn't have icons returns nil on read and throws error on writ \nEvery entry of this array has the following fields: \nsignal :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID): Slot icon to use. The slot will have the icon of the specified signal. This allo \nthe use of any item icon, as well as virtual signal icons. \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the icon in the blueprint icons slots. Has to be in {1, 2, 3, 4}. \n_Can only be used if this is BlueprintItem_", + "type": "array of Icon" + }, + "blueprint_position_relative_to_grid": { + "name": "blueprint_position_relative_to_grid", + "type": "Position", + "mode": "[RW]", + "doc": "The offset from the absolute grid or nil if absolute snapping is not enable \n_Can only be used if this is BlueprintItem_" + }, + "blueprint_snap_to_grid": { + "name": "blueprint_snap_to_grid", + "type": "Position", + "mode": "[RW]", + "doc": "The snapping grid size in this blueprint item or nil if snapping is not enable \n_Can only be used if this is BlueprintItem_" }, - "get_player": { - "name": "get_player", + "build_blueprint": { + "name": "build_blueprint", "type": "function", - "doc": "Gets the given player or returns ````\nnil````\nif no player is foun \n\n**Parameters** \nplayer :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The player index or name. \n\n**Note: ** This is a shortcut for game.players[...]", - "returns": "LuaPlayer", + "doc": "Build this blueprin \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to build on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the building \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to build at \nforce_build :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, anything that can be built is else nothing is built if any one thing can't be built \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction to use when building \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any. If provided [defines.events.on_built_entity](http://lua-api.factorio.com/latest/defines.html#defines.events.on_built_entity) will also be fired on successful entity creation. \nraise_built :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_built](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_built) will be fired on successful entity creation. Note: this is ignored if by_player is provided. \n\n**Return value** \nArray of created ghosts \n\n**Note: ** Built 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.", + "returns": "array of LuaEntity", "args": { - "player": { - "name": "player", - "type": "uint or string", - "doc": "player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The player index or name." + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to build on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the building \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to build at \nforce_build :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, anything that can be built is else nothing is built if any one thing can't be built \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction to use when building \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any. If provided [defines.events.on_built_entity](http://lua-api.factorio.com/latest/defines.html#defines.events.on_built_entity) will also be fired on successful entity creation. \nraise_built :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_built](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_built) will be fired on successful entity creation. Note: this is ignored if by_player is provided." } } }, - "get_surface": { - "name": "get_surface", + "can_set_stack": { + "name": "can_set_stack", "type": "function", - "doc": "Gets the given surface or returns ````\nnil````\nif no surface is foun \n\n**Parameters** \nsurface :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The surface index or name. \n\n**Note: ** This is a shortcut for game.surfaces[...]", - "returns": "LuaSurface", + "doc": "Would a call to [LuaItemStack::set_stack](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack) succeed? \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional): Stack that would be set, possibly ````\nnil````\n.", + "returns": "boolean", "args": { - "surface": { - "name": "surface", - "type": "uint or string", - "doc": "surface :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The surface index or name." + "stack": { + "name": "stack", + "type": "ItemStackSpecification", + "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional): Stack that would be set, possibly ````\nnil````\n." } } }, - "get_train_stops": { - "name": "get_train_stops", + "cancel_deconstruct_area": { + "name": "cancel_deconstruct_area", + "doc": "Cancel deconstruct the given area with this deconstruction ite \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to cancel deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for canceling deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any.", "type": "function", - "doc": "Gets train stops matching the given filter \n\n**Parameters** \nopts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional)", - "returns": "array of LuaEntity", "args": { - "opts": { - "name": "opts", - "type": "string or array of string", - "doc": "opts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional)" + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to cancel deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for canceling deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any." } } }, - "help": { - "name": "help", - "doc": "Internal", + "clear": { + "name": "clear", + "doc": "Clear this item stack.", "type": "function" }, - "is_demo": { - "name": "is_demo", - "type": "function", - "doc": "Is this the demo version of Factori", - "returns": "boolean" + "clear_blueprint": { + "name": "clear_blueprint", + "doc": "Clears this blueprint ite \n_Can only be used if this is BlueprintItem_", + "type": "function" }, - "is_multiplayer": { - "name": "is_multiplayer", - "type": "function", - "doc": "Is the map loaded is multiplaye", - "returns": "boolean" + "clear_deconstruction_item": { + "name": "clear_deconstruction_item", + "doc": "Clears all settings/filters on this deconstruction item resetting it to default value \n_Can only be used if this is DeconstructionItem_", + "type": "function" }, - "is_valid_sound_path": { - "name": "is_valid_sound_path", - "type": "function", - "doc": "Checks if the given sound path is vali \n\n**Parameters**", - "returns": "boolean", - "args": { - "undefined": { - "doc": "" - } - } + "clear_upgrade_item": { + "name": "clear_upgrade_item", + "doc": "Clears all settings/filters on this upgrade item resetting it to default value \n_Can only be used if this is UpgradeItem_", + "type": "function" }, - "item_prototypes": { - "name": "item_prototypes", - "type": "custom dictionary string → LuaItemPrototype", - "mode": "[R]" + "connected_entity": { + "name": "connected_entity", + "mode": "[RW]", + "doc": "If this item is spidertron remote and has spidertron bound to it, the connected spider-vehicle entity is returned, otherwise ````\nnil````\n." + }, + "cost_to_build": { + "name": "cost_to_build", + "type": "dictionary string → uint", + "mode": "[R]", + "doc": "Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype na \nto the required count. \n_Can only be used if this is BlueprintItem_" + }, + "count": { + "name": "count", + "type": "uint", + "mode": "[RW]", + "doc": "Number of items in this stack." }, - "json_to_table": { - "name": "json_to_table", + "create_blueprint": { + "name": "create_blueprint", "type": "function", - "doc": "Convert a JSON string to a table \n\n**Parameters** \njson :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to convert \n\n**Return value** \nThe returned object, or ````\nnil````\nif the json was invalid.", - "returns": "Any", + "doc": "Sets up this blueprint using the found blueprintable entities/tiles on the surface. \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to create from \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the creation \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The bounding box \nalways_include_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area. \ninclude_entities :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, entities are included in the blueprint. Defaults to true. \ninclude_modules :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, modules are included in the blueprint. Defaults to true. \ninclude_station_names :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, station names are included in the blueprint. Defaults to false. \ninclude_trains :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, trains are included in the blueprint. Defaults to false. \ninclude_fuel :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, train fuel is included in the blueprint, Defaults to true. \n\n**Return value** \nThe blueprint entity index to source entity mapping.", + "returns": "dictionary uint → LuaEntity", "args": { - "json": { - "name": "json", - "type": "string", - "doc": "json :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to convert" + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to create from \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the creation \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The bounding box \nalways_include_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area. \ninclude_entities :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, entities are included in the blueprint. Defaults to true. \ninclude_modules :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, modules are included in the blueprint. Defaults to true. \ninclude_station_names :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, station names are included in the blueprint. Defaults to false. \ninclude_trains :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, trains are included in the blueprint. Defaults to false. \ninclude_fuel :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, train fuel is included in the blueprint, Defaults to true." } } }, - "kick_player": { - "name": "kick_player", - "doc": "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 admi \n\n**Parameters** \nPlayerSpecification: The player to kick. \nreason :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The reason given if any.", + "create_grid": { + "name": "create_grid", "type": "function", - "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to kick.", - "type": "PlayerSpecification" - }, - "reason": { - "name": "reason", - "type": "LocalisedString", - "doc": "reason :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The reason given if any." - } - } + "doc": "Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grid \n_Can only be used if this is ItemWithEntityData_", + "returns": "LuaEquipmentGrid" }, - "map_settings": { - "name": "map_settings", - "type": "MapSettings", - "mode": "[R]" + "custom_description": { + "name": "custom_description", + "type": "LocalisedString", + "mode": "[RW]", + "doc": "The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty valu" }, - "merge_forces": { - "name": "merge_forces", - "doc": "Marks two forces to be merge together. All entities in the source force will be reassigned to the target forc \nThe source force will then be destroyed \n\n**Parameters** \nsource :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to remove \ndestination :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to reassign all entities to \n\n**Note: ** The three built-in forces -- player, enemy and neutral -- can't be destroyed. I.e. they can \nbe used as the source argument to this function. \n\n**Note: ** The source force is not merged until the end of the current tick \nif called during the [on_forces_merging](http://lua-api.factorio.com/latest/events.html#on_forces_merging) event or [on_forces_merged](http://lua-api.factorio.com/latest/events.html#on_forces_merged) event the end of the next tick.", + "deconstruct_area": { + "name": "deconstruct_area", + "doc": "Deconstruct the given area with this deconstruction ite \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any.", "type": "function", "args": { - "destination": { - "name": "destination", - "type": "ForceSpecification", - "doc": "destination :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to reassign all entities to" - }, - "source": { - "name": "source", - "type": "ForceSpecification", - "doc": "source :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force to remove" + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any." } } }, - "mod_setting_prototypes": { - "name": "mod_setting_prototypes", - "type": "custom dictionary string → LuaModSettingPrototype", - "mode": "[R]" + "default_icons": { + "name": "default_icons", + "mode": "[R]", + "doc": "The default icons for a blueprint item. Every entry of this array has the following fields : \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the item whose icon to use \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the icon in the blueprint icons slots. Has to be in {1, 2, 3, 4}. \n_Can only be used if this is BlueprintItem_", + "type": "array of Icon" }, - "mute_player": { - "name": "mute_player", - "doc": "Mutes the given player. Does nothing if the player running this isn't an admi \n\n**Parameters** \nPlayerSpecification: The player to mute.", + "drain_ammo": { + "name": "drain_ammo", + "doc": "Remove ammo from this ammo item. \n\n**Parameters** \namount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Amount of ammo to remove. \n_Can only be used if this is AmmoItem_", + "type": "function", "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to mute.", - "type": "PlayerSpecification" + "amount": { + "name": "amount", + "type": "float", + "doc": "amount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Amount of ammo to remove." } - }, - "type": "function" - }, - "named_noise_expressions": { - "name": "named_noise_expressions", - "type": "custom dictionary string → LuaNamedNoiseExpression", - "mode": "[R]" - }, - "noise_layer_prototypes": { - "name": "noise_layer_prototypes", - "type": "custom dictionary string → LuaNoiseLayerPrototype", - "mode": "[R]" - }, - "permissions": { - "name": "permissions", - "type": "LuaPermissionGroups", - "mode": "[R]" + } }, - "play_sound": { - "name": "play_sound", + "drain_durability": { + "name": "drain_durability", + "doc": "Remove durability from this tool item. \n\n**Parameters** \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to remove. \n_Can only be used if this is ToolItem_", "type": "function", - "doc": "Plays a sound for every player in the game on every surface \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive.", - "returns": "boolean", "args": { - "path": { - "name": "path", - "type": "SoundPath", - "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive." + "amount": { + "name": "amount", + "type": "double", + "doc": "amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to remove." } } }, - "player": { - "name": "player", - "type": "LuaPlayer", - "mode": "[R]", - "doc": "The player typing at the console - ````\nnil````\nin all other instances. See [LuaGameScript::players](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) for accessing all players." + "durability": { + "name": "durability", + "type": "double", + "mode": "[RW]", + "doc": "Durability of the contained item. Automatically capped at the item's maximum durabilit \n\n**Note: ** When used on a non-tool item, the value of this attribute is ````\nnil````\n." }, - "players": { - "name": "players", - "type": "custom dictionary uint or string → LuaPlayer", + "entity_filter_count": { + "name": "entity_filter_count", + "type": "uint", "mode": "[R]", - "doc": "**Note: ** This is a sparse table so pairs(), a known player index, or player name should be used to access elements." + "doc": "The number of entity filters this deconstruction item support \n_Can only be used if this is DeconstructionItem_" }, - "pollution_statistics": { - "name": "pollution_statistics", - "type": "LuaFlowStatistics", - "mode": "[R]", - "doc": "The pollution statistics for this map." + "entity_filter_mode": { + "name": "entity_filter_mode", + "type": "defines.deconstruction_item.entity_filter_mode", + "mode": "[RW]", + "doc": "The blacklist/whitelist entity filter mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" }, - "print": { - "name": "print", - "doc": "Print text to the chat console all players. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)", + "entity_filters": { + "name": "entity_filters", + "type": "array of string", + "mode": "[RW]", + "doc": "The entity filters for this deconstruction ite" + }, + "export_stack": { + "name": "export_stack", + "type": "function", + "doc": "Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string \n\n**Return value** \nThe exported string", + "returns": "string" + }, + "extends_inventory": { + "name": "extends_inventory", + "type": "boolean", + "mode": "[RW]", + "doc": "If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). Only callable on items with inventorie \n_Can only be used if this is ItemWithInventory_" + }, + "get_blueprint_entities": { + "name": "get_blueprint_entities", + "doc": "Entities in this blueprint. \n\n**Return value** \nThe fields of an entity table depend on the type of the entity. Eve \nentity has at least the following fields: \nentity_number :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Entity's unique identifier in this blueprint \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction the entity is facing. Only present for entiti \nthat can face in different directions. \nother: Entity-specific fields... \n_Can only be used if this is BlueprintItem_", + "type": "function", + "returns": "array of blueprint entity" + }, + "get_blueprint_entity_count": { + "name": "get_blueprint_entity_count", + "type": "function", + "doc": "Gets the number of entities in this blueprint ite \n_Can only be used if this is BlueprintItem_", + "returns": "uint" + }, + "get_blueprint_entity_tag": { + "name": "get_blueprint_entity_tag", "type": "function", + "doc": "Gets the given tag on the given blueprint entity index in this blueprint ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index \ntag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tag to get \n_Can only be used if this is BlueprintItem_", + "returns": "Any", "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index" }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + "tag": { + "name": "tag", + "type": "string", + "doc": "tag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tag to get" } } }, - "purge_player": { - "name": "purge_player", - "doc": "Purges the given players messages from the game. Does nothing if the player running this isn't an admi \n\n**Parameters** \nPlayerSpecification: The player to purge.", - "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to purge.", - "type": "PlayerSpecification" - } - }, - "type": "function" - }, - "recipe_prototypes": { - "name": "recipe_prototypes", - "type": "custom dictionary string → LuaRecipePrototype", - "mode": "[R]" - }, - "regenerate_entity": { - "name": "regenerate_entity", - "doc": "Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities \n\n**Parameters** \nentities :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nPrototype names of entity or entities to autoplace. \n\n**Note: ** All specified entity prototypes must be autoplacable.", + "get_blueprint_entity_tags": { + "name": "get_blueprint_entity_tags", "type": "function", + "doc": "Gets the tags for the given blueprint entity index in this blueprint ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n_Can only be used if this is BlueprintItem_", + "returns": "Tags", "args": { - "entities": { - "name": "entities", - "type": "string or array of string", - "doc": "entities :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nPrototype names of entity or entities to autoplace." + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "reload_mods": { - "name": "reload_mods", - "doc": "Forces a reload of all mod \n\n**Note: ** This will act like saving and loading from the mod(s) perspective. \n\n**Note: ** This will do nothing if run in multiplayer. \n\n**Note: ** This disables the replay if replay is enabled.", - "type": "function" - }, - "reload_script": { - "name": "reload_script", - "doc": "Forces a reload of the scenario script from the original scenario locatio \n\n**Note: ** This disables the replay if replay is enabled.", - "type": "function" + "get_blueprint_tiles": { + "name": "get_blueprint_tiles", + "doc": "Tiles in this bluepri \n\n**Return value** \nA blueprint tile is a table: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the tile. \n_Can only be used if this is BlueprintItem_", + "type": "function", + "returns": "array of blueprint tile" }, - "remove_offline_players": { - "name": "remove_offline_players", - "doc": "Remove players who are currently not connected from the ma \n\n**Parameters** \nplayers :: array of [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): List of players to remove. If not specifie \nremove all offline players.", + "get_entity_filter": { + "name": "get_entity_filter", "type": "function", + "doc": "Gets the entity filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n_Can only be used if this is DeconstructionItem_", + "returns": "string", "args": { - "players": { - "name": "players", - "type": "array of LuaPlayer or string", - "doc": "players :: array of [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): List of players to remove. If not specifie \nremove all offline players." + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "remove_path": { - "name": "remove_path", - "doc": "Remove file or directory. Given path is taken relative to the script output directory. Can be us \nto remove files created by [LuaGameScript::write_file](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file). \n\n**Parameters** \npath :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Path to remove, relative to the script output directory", + "get_inventory": { + "name": "get_inventory", "type": "function", + "doc": "Access the inner inventory of an item. \n\n**Parameters** \ninventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nIndex of the inventory to access -- currently can only be [defines.inventory.item_main](http://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main). \n\n**Return value** \nor ````\nnil````\nif there is no inventory with the given index.", + "returns": "LuaInventory", "args": { - "path": { - "name": "path", - "type": "string", - "doc": "path :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Path to remove, relative to the script output directory" + "inventory": { + "name": "inventory", + "type": "defines.inventory", + "doc": "inventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nIndex of the inventory to access -- currently can only be [defines.inventory.item_main](http://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main)." } } }, - "save_atlas": { - "name": "save_atlas", - "doc": "Saves the current configuration of Atlas to a file. This will result in huge file containing a \nof the game graphics moved to as small space as possible. \n\n**Note: ** Exists mainly for debugging reasons.", - "type": "function" - }, - "server_save": { - "name": "server_save", - "doc": "Instruct the server to save the ma \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Save name. If not specified, writes into the currently-running save.", + "get_mapper": { + "name": "get_mapper", "type": "function", + "doc": "Gets the filter at the given index for this upgrade ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to read. \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): 'from' or 'to'. \n_Can only be used if this is UpgradeItem_", + "returns": "UpgradeFilter", "args": { - "name": { - "name": "name", + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to read." + }, + "type": { + "name": "type", "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Save name. If not specified, writes into the currently-running save." + "doc": "type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): 'from' or 'to'." } } }, - "set_game_state": { - "name": "set_game_state", - "doc": "Set scenario stat \n\n**Parameters** \nTable with the following fields: \ngame_finished :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nplayer_won :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nnext_level :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \ncan_continue :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nvictorious_force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)", + "get_tag": { + "name": "get_tag", "type": "function", + "doc": "Gets the tag with the given name or returns ````\nnil````\nif it doesn't exis \n\n**Parameters** \ntag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is ItemWithTags_", + "returns": "Any", "args": { - "game_finished": { - "name": "game_finished", - "type": "boolean", - "doc": "Table with the following fields: \ngame_finished :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nplayer_won :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nnext_level :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \ncan_continue :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nvictorious_force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification)" + "tag_name": { + "name": "tag_name", + "type": "string", + "doc": "tag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" } } }, - "set_wait_for_screenshots_to_finish": { - "name": "set_wait_for_screenshots_to_finish", - "doc": "Forces the screenshot saving system to wait until all queued screenshots have been written to disk.", - "type": "function" - }, - "show_message_dialog": { - "name": "show_message_dialog", - "doc": "Show an in-game message dialo \n\n**Parameters** \nTable with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): What the dialog should say \nimage :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to an image to show on the dialog \npoint_to :: [GuiArrowSpecification](http://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) (optional) \nIf specified, dialog will show an arrow pointing to this place. When not specified, the arrow will point to the player's positio \n(Use ````\npoint_to={type=\"nowhere\"}````\nto remove the arrow entirely.) The dialog itself will be placed near the arrow's target. \n\n**Note: ** Can only be used when the map contains exactly one player.", + "get_tile_filter": { + "name": "get_tile_filter", "type": "function", + "doc": "Gets the tile filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n_Can only be used if this is DeconstructionItem_", + "returns": "string", "args": { - "text": { - "name": "text", - "type": "LocalisedString", - "doc": "Table with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): What the dialog should say \nimage :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to an image to show on the dialog \npoint_to :: [GuiArrowSpecification](http://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) (optional) \nIf specified, dialog will show an arrow pointing to this place. When not specified, the arrow will point to the player's positio \n(Use ````\npoint_to={type=\"nowhere\"}````\nto remove the arrow entirely.) The dialog itself will be placed near the arrow's target." + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "speed": { - "name": "speed", + "grid": { + "name": "grid", + "type": "LuaEquipmentGrid", + "mode": "[R]", + "doc": "The equipment grid of this item or ````\nnil````\nif this item doesn't have a grid." + }, + "health": { + "name": "health", "type": "float", "mode": "[RW]", - "doc": "Speed to update the map at. 1.0 is normal speed -- 60 UP \n\n**Note: ** Minimum value is 0.01." - }, - "styles": { - "name": "styles", - "type": "custom dictionary string → string", - "mode": "[R]", - "doc": "The styles that [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) can us" + "doc": "How much health the item has, as a number in range [0, 1]." }, - "surfaces": { - "name": "surfaces", - "type": "custom dictionary uint or string → LuaSurface", - "mode": "[R]" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "table_to_json": { - "name": "table_to_json", + "import_stack": { + "name": "import_stack", "type": "function", - "doc": "Convert a table to a JSON string \n\n**Parameters** \ndata :: [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table)", - "returns": "string", + "doc": "Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string \n\n**Parameters** \ndata :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to import \n\n**Return value** \n0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.", + "returns": "int", "args": { "data": { "name": "data", - "type": "table", - "doc": "data :: [table](http://lua-api.factorio.com/latest/Builtin-Types.html#table)" - } - } - }, - "take_screenshot": { - "name": "take_screenshot", - "doc": "Take a screenshot and save it to a file \n\n**Parameters** \nTable with the following fields: \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional) \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If defined, the screenshot will only be taken for this player. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If defined, the screenshot will be taken on this surface. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): If defined, the screenshot will be centered on this position. \nresolution :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Maximum allowed resolution is 16384x16384 (resp. 8192x8192 when anti_alias is true), but maximum recommended resolution is 4096x4096 (resp. 2048x2048). \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \npath :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to save the screenshot in \nshow_gui :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Include game GUI in the screenshot? \nshow_entity_info :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Include entity info (alt-mode)? \nanti_alias :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Render in double resolution and scale down (including GUI)? \nquality :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The render quality if using jpg format (0-100 inclusive). \n\n**Note: ** If Factorio is running headless, this function will do nothing.", - "type": "function", - "args": { - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "Table with the following fields: \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional) \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If defined, the screenshot will only be taken for this player. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): If defined, the screenshot will be taken on this surface. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): If defined, the screenshot will be centered on this position. \nresolution :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Maximum allowed resolution is 16384x16384 (resp. 8192x8192 when anti_alias is true), but maximum recommended resolution is 4096x4096 (resp. 2048x2048). \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \npath :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to save the screenshot in \nshow_gui :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Include game GUI in the screenshot? \nshow_entity_info :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Include entity info (alt-mode)? \nanti_alias :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Render in double resolution and scale down (including GUI)? \nquality :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The render quality if using jpg format (0-100 inclusive)." + "type": "string", + "doc": "data :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to import" } } }, - "take_technology_screenshot": { - "name": "take_technology_screenshot", - "type": "function", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "Table with the following fields: \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force to use. If not given the ````\n\"player````\n\" force is used. \npath :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to save the screenshot in. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If defined, the screenshot will only be taken for this player. \nselected_technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to highlight. \nskip_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\n, disabled technologies will be skipped. Their successo \nwill be attached to the disabled technology's parents. Defaults to ````\nfalse````\n. \nquality :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The render quality if using jpg format (0-100 inclusive)." - } - }, - "doc": "**Parameters** \nTable with the following fields: \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force to use. If not given the ````\n\"player````\n\" force is used. \npath :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to save the screenshot in. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If defined, the screenshot will only be taken for this player. \nselected_technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to highlight. \nskip_disabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\ntrue````\n, disabled technologies will be skipped. Their successo \nwill be attached to the disabled technology's parents. Defaults to ````\nfalse````\n. \nquality :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The render quality if using jpg format (0-100 inclusive)." - }, - "technology_prototypes": { - "name": "technology_prototypes", - "type": "custom dictionary string → LuaTechnologyPrototype", - "mode": "[R]" - }, - "tick": { - "name": "tick", - "type": "uint", + "is_armor": { + "name": "is_armor", + "type": "boolean", "mode": "[R]", - "doc": "Current map tick." + "doc": "If this is an armor ite" }, - "tick_paused": { - "name": "tick_paused", + "is_blueprint": { + "name": "is_blueprint", "type": "boolean", - "mode": "[RW]", - "doc": "If the tick has been paused. This means that entity update has been paused." - }, - "ticks_played": { - "name": "ticks_played", - "type": "uint", "mode": "[R]", - "doc": "The number of ticks since this game was 'created \nA game is 'created' either by using \"new game\" or \"new game from scenario \n\n**Note: ** This differs over [LuaGameScript::tick](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the [LuaGameScript::tick](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) is > 0. \n\n**Note: ** This value has no relation with [LuaGameScript::tick](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) and can be completely different values." + "doc": "If this is a blueprint ite" }, - "ticks_to_run": { - "name": "ticks_to_run", - "type": "uint", - "mode": "[RW]", - "doc": "The number of ticks to be run while the tick is pause \nWhen [LuaGameScript::tick_paused](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick_paused) is true, ticks_to_run behaves the following wa \nWhile 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." + "is_blueprint_book": { + "name": "is_blueprint_book", + "type": "boolean", + "mode": "[R]", + "doc": "If this is a blueprint book ite" }, - "tile_prototypes": { - "name": "tile_prototypes", - "type": "custom dictionary string → LuaTilePrototype", - "mode": "[R]" + "is_blueprint_setup": { + "name": "is_blueprint_setup", + "type": "function", + "doc": "Is this blueprint item setup? I.e. is it a non-empty blueprint?", + "returns": "boolean" }, - "unban_player": { - "name": "unban_player", - "doc": "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 admi \n\n**Parameters** \nPlayerSpecification: The player to unban.", - "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to unban.", - "type": "PlayerSpecification" - } - }, - "type": "function" - }, - "unmute_player": { - "name": "unmute_player", - "doc": "Unmutes the given player. Does nothing if the player running this isn't an admi \n\n**Parameters** \nPlayerSpecification: The player to unmute.", - "args": { - "PlayerSpecification": { - "name": "PlayerSpecification", - "doc": "PlayerSpecification: The player to unmute.", - "type": "PlayerSpecification" - } - }, - "type": "function" + "is_deconstruction_item": { + "name": "is_deconstruction_item", + "type": "boolean", + "mode": "[R]", + "doc": "If this is a deconstruction tool ite" }, - "virtual_signal_prototypes": { - "name": "virtual_signal_prototypes", - "type": "custom dictionary string → LuaVirtualSignalPrototype", - "mode": "[R]" + "is_item_with_entity_data": { + "name": "is_item_with_entity_data", + "type": "boolean", + "mode": "[R]", + "doc": "If this is an item with entity data ite" }, - "write_file": { - "name": "write_file", - "doc": "Write a string to a file. \n\n**Parameters** \nfilename :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Path to the file to write to. \ndata :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): File content \nappend :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, this will append to the end of the file. Defaults to ````\nfalse````\n, which will overwrite any pre-existing file with the new data. \nfor_player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If given, the file will only be written for this player_index. 0 means only the server if one exists.", - "type": "function", - "args": { - "append": { - "name": "append", - "type": "boolean", - "doc": "append :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, this will append to the end of the file. Defaults to ````\nfalse````\n, which will overwrite any pre-existing file with the new data." - }, - "data": { - "name": "data", - "type": "LocalisedString", - "doc": "data :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): File content" - }, - "filename": { - "name": "filename", - "type": "string", - "doc": "filename :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Path to the file to write to." - }, - "for_player": { - "name": "for_player", - "type": "uint", - "doc": "for_player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If given, the file will only be written for this player_index. 0 means only the server if one exists." - } - } - } - }, - "doc": "Main toplevel type, provides access to most of the API though its members. An instance\n of LuaGameScript is available as the global object named game." - }, - "LuaGenericOnOffControlBehavior": { - "name": "LuaGenericOnOffControlBehavior", - "type": "LuaGenericOnOffControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "circuit_condition": { - "name": "circuit_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" + "is_item_with_inventory": { + "name": "is_item_with_inventory", + "type": "boolean", + "mode": "[R]", + "doc": "If this is an item with inventory ite" }, - "connect_to_logistic_network": { - "name": "connect_to_logistic_network", + "is_item_with_label": { + "name": "is_item_with_label", "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif this should connect to the logistic network." + "mode": "[R]", + "doc": "If this is an item with label ite" }, - "disabled": { - "name": "disabled", + "is_item_with_tags": { + "name": "is_item_with_tags", "type": "boolean", "mode": "[R]", - "doc": "If the entity is currently disabled because of the control behavior." + "doc": "If this is an item with tags ite" }, - "entity": { - "name": "entity", - "type": "LuaEntity", + "is_mining_tool": { + "name": "is_mining_tool", + "type": "boolean", "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "doc": "If this is a mining tool ite" }, - "get_circuit_network": { - "name": "get_circuit_network", - "type": "function", - "returns": "LuaCircuitNetwork", - "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." - } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + "is_module": { + "name": "is_module", + "type": "boolean", + "mode": "[R]", + "doc": "If this is a module ite" }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "is_repair_tool": { + "name": "is_repair_tool", + "type": "boolean", + "mode": "[R]", + "doc": "If this is a repair tool ite" }, - "logistic_condition": { - "name": "logistic_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" + "is_selection_tool": { + "name": "is_selection_tool", + "type": "boolean", + "mode": "[R]", + "doc": "If this is a selection tool ite" }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", + "is_tool": { + "name": "is_tool", + "type": "boolean", "mode": "[R]", - "doc": "The concrete type of this control behavior." + "doc": "If this is a tool ite" }, - "valid": { - "name": "valid", + "is_upgrade_item": { + "name": "is_upgrade_item", "type": "boolean", "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "An abstract base class for behaviors that support switching the entity on or off based on some condition." - }, - "LuaGroup": { - "name": "LuaGroup", - "type": "LuaGroup", - "inherits": [], - "properties": { - "group": { - "name": "group", - "type": "LuaGroup", + "doc": "If this is a upgrade ite" + }, + "item_number": { + "name": "item_number", + "type": "uint", "mode": "[R]", - "doc": "The parent group if any; ````\nnil````\nif none." + "doc": "The unique identifier for this item if it has one, ````\nnil````\notherwise. Note that this ID stays the same no matter where the item is moved t \nOnly these types of items have unique IDs: \n````\n\"armor\"```` \n````\n\"spidertron-remote\"```` \n````\n\"selection-tool\"```` \n````\n\"copy-paste-tool\"```` \n````\n\"upgrade-item\"```` \n````\n\"deconstruction-item\"```` \n````\n\"blueprint\"```` \n````\n\"blueprint-book\"```` \n````\n\"item-with-entity-data\"```` \n````\n\"item-with-inventory\"```` \n````\n\"item-with-tags\"````" }, - "help": { - "name": "help", + "label": { + "name": "label", "type": "string", - "doc": "All methods, and properties that this object supports." + "mode": "[RW]", + "doc": "The current label for this item. Nil when non \n_Can only be used if this is ItemWithLabel_" }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]", - "doc": "Localised name of the grou" + "label_color": { + "name": "label_color", + "type": "Color", + "mode": "[RW]", + "doc": "The current label color for this item. Nil when non \n_Can only be used if this is ItemWithLabel_" }, "name": { "name": "name", "type": "string", - "mode": "[R]" - }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]" - }, - "order_in_recipe": { - "name": "order_in_recipe", - "type": "string", - "mode": "[R]", - "doc": "The additional order value used in recipe orderin \n\n**Note: ** Can only be used on groups, not on subgroups." - }, - "subgroups": { - "name": "subgroups", - "type": "array of LuaGroup", "mode": "[R]", - "doc": "Subgroups of this group. \n\n**Note: ** Can only be used on groups, not on subgroups." + "doc": "Prototype name of the item held in this stack." }, - "type": { - "name": "type", + "object_name": { + "name": "object_name", "type": "string", - "mode": "[R]" - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Item group or subgroup." - }, - "LuaGui": { - "name": "LuaGui", - "type": "LuaGui", - "inherits": [], - "properties": { - "center": { - "name": "center", - "type": "LuaGuiElement", "mode": "[R]", - "doc": "The center part of the GUI. It is a flow elemen" + "doc": "The class name of this object." }, - "children": { - "name": "children", - "type": "dictionary string → LuaGuiElement", - "mode": "[R]", - "doc": "The children GUI elements mapped by name <> elemen" + "prioritize_insertion_mode": { + "name": "prioritize_insertion_mode", + "type": "string", + "mode": "[RW]", + "doc": "The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. Only callable on items with inventorie \n_Can only be used if this is ItemWithInventory_" }, - "goal": { - "name": "goal", - "type": "LuaGuiElement", + "prototype": { + "name": "prototype", + "type": "LuaItemPrototype", "mode": "[R]", - "doc": "The flow used in the objectives window. It is a flow elemen \nThe objectives window is only visible when the flow is not empty or the objective text is se" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "doc": "Prototype of the item held in this stack." }, - "is_valid_sprite_path": { - "name": "is_valid_sprite_path", + "remove_tag": { + "name": "remove_tag", "type": "function", - "doc": "Returns ````\ntrue````\nif sprite_path is valid and contains loaded sprite, otherwise ````\nfalse````\n. Sprite path of type ````\nfile````\ndoesn't validate if file exist \n\n**Parameters** \nsprite_path :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath): Path to a image.", + "doc": "Removes a tag with the given nam \n\n**Parameters** \ntag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n\n**Return value** \nIf the tag existed and was removed. \n_Can only be used if this is ItemWithTags_", "returns": "boolean", "args": { - "sprite_path": { - "name": "sprite_path", - "type": "SpritePath", - "doc": "sprite_path :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath): Path to a image." + "tag": { + "name": "tag", + "type": "string", + "doc": "tag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" } } }, - "left": { - "name": "left", - "type": "LuaGuiElement", - "mode": "[R]", - "doc": "The left part of the GUI. It is a flow elemen" + "set_blueprint_entities": { + "name": "set_blueprint_entities", + "doc": "Set new entities to be a part of this blueprint \n\n**Parameters** \nentities :: array of blueprint entity: New blueprint entities. The format is the same as \n[LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities). \n_Can only be used if this is BlueprintItem_", + "type": "function", + "args": { + "entities": { + "name": "entities", + "type": "array of blueprint entity", + "doc": "entities :: array of blueprint entity: New blueprint entities. The format is the same as \n[LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities)." + } + } }, - "player": { - "name": "player", - "type": "LuaPlayer", - "mode": "[R]", - "doc": "The player who owns this gui." - }, - "top": { - "name": "top", - "type": "LuaGuiElement", - "mode": "[R]", - "doc": "The top part of the GUI. It is a flow elemen" - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "The root of the GUI. This type houses the root elements, top, left, center and goal, to which\n other elements can be added to be displayed on screen." - }, - "LuaGuiElement": { - "name": "LuaGuiElement", - "type": "LuaGuiElement", - "inherits": [], - "properties": { - "add": { - "name": "add", + "set_blueprint_entity_tag": { + "name": "set_blueprint_entity_tag", + "doc": "Sets the given tag on the given blueprint entity index in this blueprint ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index \ntag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tag to set \nvalue :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any): The tag value to set or ````\nnil````\nto clear the tag \n_Can only be used if this is BlueprintItem_", "type": "function", - "doc": "Add a child element. \n\n**Parameters** \nTable with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The kind of the element to add. Has to be one of ````\n\"button\"````\n, ````\n\"sprite-button\"```` \n````\n\"checkbox\"````\n, ````\n\"flow\"````\n, ````\n\"frame\"````\n, ````\n\"label\"````\n, ````\n\"progressbar\"````\n, ````\n\"table\"````\n, ````\n\"textfield\"```` \n````\n\"radiobutton\"````\n, ````\n\"sprite\"````\n, ````\n\"scroll-pane\"````\n, ````\n\"drop-down\"````\n, ````\n\"list-box\"````\n, ````\n\"camera\"```` \n````\n\"choose-elem-button\"````\n, ````\n\"text-box\"````\n, ````\n\"slider\"````\n, ````\n\"minimap\"````\n, or ````\n\"entity-preview\"````\n. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the child element. \ncaption :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text displayed on the child element. For frames, this is the \"heading\". For other elements, like buttons \nlabels, 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. \ntooltip :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): Tooltip of the child element. \nenabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the child element is enabled. \nignored_by_interaction :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the child element is ignored by interaction. \nstyle :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Style of the new element. \nOther attributes may have to be specified, depending on ````\ntype```` \nbutton \nmouse_button_filter :: [MouseButtonFlags](http://lua-api.factorio.com/latest/Concepts.html#MouseButtonFlags) (optional): Which mouse buttons the button responds to. \nflow \ndirection :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The initial direction of the flow's layout. See [LuaGuiElement::direction](http://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). \nframe \ndirection :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The initial direction of the frame's layout. See [LuaGuiElement::direction](http://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). \ntable \ncolumn_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of columns. \ndraw_vertical_lines :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw vertical grid lines. Defaults to ````\nfalse````\nif not given. \ndraw_horizontal_lines :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw horizontal grid lines. Defaults to ````\nfalse````\nif not given. \ndraw_horizontal_line_after_headers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw a horizontal grid line after the headers. Defaults to ````\nfalse````\nif not given. \nvertical_centering :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the fields of this table should be vertically centered. Defaults to ````\ntrue````\nif not given. \ntextfield \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The initial text contained in the textfield. \nprogressbar \nvalue :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Initial value of the progressbar, in range [0, 1]. Defaults to 0 if not given. \ncheckbox \nstate :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the checkbox should be checked by default. \nradiobutton \nstate :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the radiobutton should be checked by default. \nsprite-button \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button. \nhovered_sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button when it is hovered. \nclicked_sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button when it is clicked. \nnumber :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The number shown on the button. \nshow_percent_for_small_numbers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Format small numbers as percentages. Defaults to ````\nfalse````\nif not given. \nmouse_button_filter :: [MouseButtonFlags](http://lua-api.factorio.com/latest/Concepts.html#MouseButtonFlags) (optional): Which mouse buttons the button responds to. \nsprite \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display. \nscroll-pane \nhorizontal_scroll_policy :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Policy of the horizontal scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space\". \nvertical_scroll_policy :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Policy of the vertical scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space\". \ndrop-down \nitems :: array of [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The initial items in the dropdown. \nselected_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The initial selected index. \nlist-box \nitems :: array of [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The initial items in the listbox. \nselected_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The initial selected index. \ncamera \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position the camera centers on. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The surface the camera will render else if not given the players surface is used. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The camera zoom - defaults to 0.75. \nchoose-elem-button \nelem_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"item\", \"tile\", \"entity\", \"signal\", \"fluid\", or \"recipe\". \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"item\" - the default value for the button. \ntile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"tile\" - the default value for the button. \nentity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"entity\" - the default value for the button. \nsignal :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): If type is \"signal\" - the default value for the button. \nfluid :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"fluid\" - the default value for the button. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"recipe\" - the default value for the button. \ntext-box \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The initial text contained in the text-box. \nslider \nminimum_value :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum value for the slider \nmaximum_value :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum value for the slider \nvalue :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The initial value for the slider \nminimap \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): The position the minimap centers on or if not given it will center on the player that owns this element. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The surface the camera will render else if not given the players surface is used. \nchart_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player index the map should use else if not set the player that owns this element is used. \nforce :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The force this minimap should use else if not given the players force that owns this element is used. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The camera zoom - defaults to 0.75. \n\n**Return value** \nThe added GUI element.", - "returns": "LuaGuiElement", "args": { - "type": { - "name": "type", + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index" + }, + "tag": { + "name": "tag", "type": "string", - "doc": "Table with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The kind of the element to add. Has to be one of ````\n\"button\"````\n, ````\n\"sprite-button\"```` \n````\n\"checkbox\"````\n, ````\n\"flow\"````\n, ````\n\"frame\"````\n, ````\n\"label\"````\n, ````\n\"progressbar\"````\n, ````\n\"table\"````\n, ````\n\"textfield\"```` \n````\n\"radiobutton\"````\n, ````\n\"sprite\"````\n, ````\n\"scroll-pane\"````\n, ````\n\"drop-down\"````\n, ````\n\"list-box\"````\n, ````\n\"camera\"```` \n````\n\"choose-elem-button\"````\n, ````\n\"text-box\"````\n, ````\n\"slider\"````\n, ````\n\"minimap\"````\n, or ````\n\"entity-preview\"````\n. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the child element. \ncaption :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text displayed on the child element. For frames, this is the \"heading\". For other elements, like buttons \nlabels, 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. \ntooltip :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): Tooltip of the child element. \nenabled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the child element is enabled. \nignored_by_interaction :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the child element is ignored by interaction. \nstyle :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Style of the new element. \nOther attributes may have to be specified, depending on ````\ntype```` \nbutton \nmouse_button_filter :: [MouseButtonFlags](http://lua-api.factorio.com/latest/Concepts.html#MouseButtonFlags) (optional): Which mouse buttons the button responds to. \nflow \ndirection :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The initial direction of the flow's layout. See [LuaGuiElement::direction](http://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). \nframe \ndirection :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The initial direction of the frame's layout. See [LuaGuiElement::direction](http://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). \ntable \ncolumn_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of columns. \ndraw_vertical_lines :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw vertical grid lines. Defaults to ````\nfalse````\nif not given. \ndraw_horizontal_lines :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw horizontal grid lines. Defaults to ````\nfalse````\nif not given. \ndraw_horizontal_line_after_headers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the table should draw a horizontal grid line after the headers. Defaults to ````\nfalse````\nif not given. \nvertical_centering :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether the fields of this table should be vertically centered. Defaults to ````\ntrue````\nif not given. \ntextfield \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The initial text contained in the textfield. \nprogressbar \nvalue :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Initial value of the progressbar, in range [0, 1]. Defaults to 0 if not given. \ncheckbox \nstate :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the checkbox should be checked by default. \nradiobutton \nstate :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the radiobutton should be checked by default. \nsprite-button \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button. \nhovered_sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button when it is hovered. \nclicked_sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display on the button when it is clicked. \nnumber :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The number shown on the button. \nshow_percent_for_small_numbers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Format small numbers as percentages. Defaults to ````\nfalse````\nif not given. \nmouse_button_filter :: [MouseButtonFlags](http://lua-api.factorio.com/latest/Concepts.html#MouseButtonFlags) (optional): Which mouse buttons the button responds to. \nsprite \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) (optional): Path to the image to display. \nscroll-pane \nhorizontal_scroll_policy :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Policy of the horizontal scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space\". \nvertical_scroll_policy :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Policy of the vertical scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space\". \ndrop-down \nitems :: array of [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The initial items in the dropdown. \nselected_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The initial selected index. \nlist-box \nitems :: array of [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The initial items in the listbox. \nselected_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The initial selected index. \ncamera \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position the camera centers on. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The surface the camera will render else if not given the players surface is used. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The camera zoom - defaults to 0.75. \nchoose-elem-button \nelem_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"item\", \"tile\", \"entity\", \"signal\", \"fluid\", or \"recipe\". \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"item\" - the default value for the button. \ntile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"tile\" - the default value for the button. \nentity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"entity\" - the default value for the button. \nsignal :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): If type is \"signal\" - the default value for the button. \nfluid :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"fluid\" - the default value for the button. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If type is \"recipe\" - the default value for the button. \ntext-box \ntext :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The initial text contained in the text-box. \nslider \nminimum_value :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The minimum value for the slider \nmaximum_value :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The maximum value for the slider \nvalue :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The initial value for the slider \nminimap \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): The position the minimap centers on or if not given it will center on the player that owns this element. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The surface the camera will render else if not given the players surface is used. \nchart_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player index the map should use else if not set the player that owns this element is used. \nforce :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The force this minimap should use else if not given the players force that owns this element is used. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): The camera zoom - defaults to 0.75." + "doc": "tag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tag to set" + }, + "value": { + "name": "value", + "type": "Any", + "doc": "value :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any): The tag value to set or ````\nnil````\nto clear the tag" } } }, - "add_item": { - "name": "add_item", - "doc": "Adds an item at the end or at the given index in this dropdown or listbo \n\n**Parameters** \nLocalisedString: The item. \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The index", + "set_blueprint_entity_tags": { + "name": "set_blueprint_entity_tags", + "doc": "Sets the tags on the given blueprint entity index in this blueprint ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index \ntags :: [Tags](http://lua-api.factorio.com/latest/Concepts.html#Tags) \n_Can only be used if this is BlueprintItem_", "type": "function", "args": { "index": { "name": "index", "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The index" + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The entity index" }, - "LocalisedString": { - "name": "LocalisedString", - "doc": "LocalisedString: The item.", - "type": "LocalisedString" + "tags": { + "name": "tags", + "type": "Tags", + "doc": "tags :: [Tags](http://lua-api.factorio.com/latest/Concepts.html#Tags)" } } }, - "caption": { - "name": "caption", - "type": "LocalisedString", - "mode": "[RW]", - "doc": "The text displayed on the element. For frames, this is the \"heading\". For other elements, like buttons \nlabels, this is the content. \n\n**Note: ** Whilst this attribute may be used on all elements without producing an error, it doesn't make sen \nfor tables and flows as they won't display it." - }, - "children": { - "name": "children", - "type": "array of LuaGuiElement", - "mode": "[R]", - "doc": "The children elemen" - }, - "children_names": { - "name": "children_names", - "type": "array of string", - "mode": "[R]", - "doc": "Names of all the children of this element. These are the identifiers that can be used to access the chi \nas an attribute of this element." - }, - "clear": { - "name": "clear", - "doc": "Remove children of this element. Any [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroy \nelements become invalid after this operation. \n\n**Example** \n````\ngame.player.gui.top.clear()````", - "type": "function" - }, - "clear_items": { - "name": "clear_items", - "doc": "Clears the items in this dropdown or listbox.", - "type": "function" - }, - "clicked_sprite": { - "name": "clicked_sprite", - "type": "SpritePath", - "mode": "[RW]", - "doc": "The image to display on this sprite-button when it is clicked." - }, - "column_count": { - "name": "column_count", - "type": "uint", - "mode": "[R]", - "doc": "The number of columns in this tabl \n_Can only be used if this is table_" - }, - "destroy": { - "name": "destroy", - "doc": "Remove this element, along with its children. Any [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroy \nelements become invalid after this operation. \n\n**Note: ** The top-level GUI elements -- [LuaGui::top](http://lua-api.factorio.com/latest/LuaGui.html#LuaGui.top), [LuaGui::left](http://lua-api.factorio.com/latest/LuaGui.html#LuaGui.left), [LuaGui::center](http://lua-api.factorio.com/latest/LuaGui.html#LuaGui.center) -- can \nbe destroyed. \n\n**Example** \n````\ngame.player.gui.top.greeting.destroy()````", - "type": "function" - }, - "direction": { - "name": "direction", - "type": "string", - "mode": "[R]", - "doc": "Direction of the layout. May be either ````\n\"horizontal\"````\nor ````\n\"vertical\"````\n. \n_Can only be used if this is frame or flow_" - }, - "draw_horizontal_line_after_headers": { - "name": "draw_horizontal_line_after_headers", - "type": "boolean", - "mode": "[RW]", - "doc": "If this table should draw a horizontal grid line after the header \n_Can only be used if this is table_" - }, - "draw_horizontal_lines": { - "name": "draw_horizontal_lines", - "type": "boolean", - "mode": "[RW]", - "doc": "If this table should draw horizontal grid line \n_Can only be used if this is table_" - }, - "draw_vertical_lines": { - "name": "draw_vertical_lines", - "type": "boolean", - "mode": "[RW]", - "doc": "If this table should draw vertical grid line \n_Can only be used if this is table_" - }, - "elem_type": { - "name": "elem_type", - "type": "string", - "mode": "[R]", - "doc": "The elem type of this choose-elem-butto \n_Can only be used if this is choose-elem-button_" - }, - "elem_value": { - "name": "elem_value", - "type": "string or SignalID", - "mode": "[RW]", - "doc": "The elem value of this choose-elem-button or ````\nnil````\nif there is no valu \n\n**Note: ** Types \"item\", \"entity\", and \"tile\" operate with strings. Type \"signal\" operates with [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID). \n_Can only be used if this is choose-elem-button_" - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "If this GUI element is enable" - }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The entity associated with this entity-preview or ````\nnil````\nif no entity is associate \n_Can only be used if this is entity-preview_" - }, - "focus": { - "name": "focus", - "doc": "Focuses this GUI element if possible.", - "type": "function" - }, - "force": { - "name": "force", - "type": "string", - "mode": "[RW]", - "doc": "The force this minimap is using or ````\nnil````\nif no force is se" + "set_blueprint_tiles": { + "name": "set_blueprint_tiles", + "doc": "Set tiles in this bluepri \n\n**Parameters** \ntiles :: array of blueprint tile: Tiles to be a part of the blueprint; the format is the same as \nreturned from the corresponding get function; see [LuaItemStack::get_blueprint_tiles](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_tiles). \n_Can only be used if this is BlueprintItem_", + "type": "function", + "args": { + "tiles": { + "name": "tiles", + "type": "array of blueprint tile", + "doc": "tiles :: array of blueprint tile: Tiles to be a part of the blueprint; the format is the same as \nreturned from the corresponding get function; see [LuaItemStack::get_blueprint_tiles](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_tiles)." + } + } }, - "get_item": { - "name": "get_item", + "set_entity_filter": { + "name": "set_entity_filter", "type": "function", - "doc": "Gets an item at the given index from this dropdown or listbo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get.", - "returns": "LocalisedString", + "doc": "Sets the entity filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Setting to nil erases the filter. \n\n**Return value** \nIf the new filter was set (was valid.) \n_Can only be used if this is DeconstructionItem_", + "returns": "boolean", "args": { + "filter": { + "name": "filter", + "type": "string or LuaEntityPrototype or LuaEntity", + "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Setting to nil erases the filter." + }, "index": { "name": "index", "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get." + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "get_slider_maximum": { - "name": "get_slider_maximum", - "type": "function", - "doc": "Gets this sliders minimum valu", - "returns": "double" - }, - "get_slider_minimum": { - "name": "get_slider_minimum", - "type": "function", - "doc": "Gets this sliders minimum valu", - "returns": "double" - }, - "gui": { - "name": "gui", - "type": "LuaGui", - "mode": "[R]", - "doc": "The GUI this element is a part of." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "horizontal_scroll_policy": { - "name": "horizontal_scroll_policy", - "type": "string", - "mode": "[RW]", - "doc": "Policy of the horizontal scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space \n_Can only be used if this is scroll-pane_" - }, - "hovered_sprite": { - "name": "hovered_sprite", - "type": "SpritePath", - "mode": "[RW]", - "doc": "The image to display on this sprite-button when it is hovere \n_Can only be used if this is sprite-button_" - }, - "ignored_by_interaction": { - "name": "ignored_by_interaction", - "type": "boolean", - "mode": "[RW]", - "doc": "If this GUI element is ignored by interactio \nThis means, that for example, label on a button can't steal the focus or click events of the butto" - }, - "index": { - "name": "index", - "type": "uint", - "mode": "[R]", - "doc": "The unique index of this GUI elemen" - }, - "items": { - "name": "items", - "type": "array of LocalisedString", - "mode": "[RW]", - "doc": "The items in this dropdown or listbo" - }, - "locked": { - "name": "locked", - "type": "boolean", - "mode": "[RW]", - "doc": "If this choose-elem-button can be changed by the playe \n_Can only be used if this is choose-elem-button_" - }, - "minimap_player_index": { - "name": "minimap_player_index", - "type": "uint", - "mode": "[RW]", - "doc": "The player index this minimap is usin \n_Can only be used if this is minimap_" - }, - "mouse_button_filter": { - "name": "mouse_button_filter", - "type": "dictionary string → boolean", - "mode": "[RW]", - "doc": "The mouse button filters for this button or sprite-butto \nThe possible filters ar \n````\n\"left-and-right\"```` \n````\n\"left\"```` \n````\n\"right\"```` \n````\n\"middle\"```` \n````\n\"button-4\"```` \n````\n\"button-5\"```` \n````\n\"button-6\"```` \n````\n\"button-7\"```` \n````\n\"button-8\"```` \n````\n\"button-9\"````" - }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "The name of this element. \n\n**Example** \n````\ngame.player.gui.top.greeting.name == \"greeting\"````" - }, - "number": { - "name": "number", - "type": "double", - "mode": "[RW]", - "doc": "The number to be shown in the right-bottom corner of the sprite-button, or ````\nnil````\nto show nothin" - }, - "operator []": { - "name": "operator []", - "type": "LuaGuiElement", - "mode": "[R]", - "doc": "The indexing operator. Gets children by name." - }, - "parent": { - "name": "parent", - "type": "LuaGuiElement", - "mode": "[R]", - "doc": "The direct parent of this element; ````\nnil````\nif this is a top-level element." - }, - "player_index": { - "name": "player_index", - "type": "uint", - "mode": "[R]", - "doc": "Index into [LuaGameScript::players](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) specifying the player who owns this element." - }, - "position": { - "name": "position", - "type": "Position", - "mode": "[RW]", - "doc": "The position this camera or minimap is focused on if an" - }, - "read_only": { - "name": "read_only", - "type": "boolean", - "mode": "[RW]", - "doc": "If this text-box is read-onl \n_Can only be used if this is text-box_" - }, - "remove_item": { - "name": "remove_item", - "doc": "Removes an item at the given index in this dropdown or listbo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index", + "set_mapper": { + "name": "set_mapper", + "doc": "Sets the module filter at the given index for this upgrade ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to set. \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): ````\nfrom````\nor ````\nto````\n. \nfilter :: [UpgradeFilter](http://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter): The filter to set or ````\nnil```` \n_Can only be used if this is UpgradeItem_", "type": "function", "args": { + "filter": { + "name": "filter", + "type": "UpgradeFilter", + "doc": "filter :: [UpgradeFilter](http://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter): The filter to set or ````\nnil````" + }, "index": { "name": "index", "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index" + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to set." + }, + "type": { + "name": "type", + "type": "string", + "doc": "type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): ````\nfrom````\nor ````\nto````\n." } } }, - "resize_to_sprite": { - "name": "resize_to_sprite", - "type": "boolean", - "mode": "[RW]", - "doc": "Whether should the image widget resize its size according to the sprite in it (true by defaul" - }, - "scroll_to_bottom": { - "name": "scroll_to_bottom", - "doc": "Scrolls the scroll bar to the botto \n_Can only be used if this is scroll-pane or text-box_", - "type": "function" - }, - "scroll_to_element": { - "name": "scroll_to_element", - "doc": "Scrolls the scroll bar such that the specified GUI element is visible to the playe \n\n**Parameters** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element to scroll to. \nscroll_mode :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Where the element should be positioned in the scroll-pane. Must be either: ````\n\"in-view\"````\n, or ````\n\"top-third\"````\n. Defaults to ````\n\"in-view\"````\n. \n_Can only be used if this is scroll-pane_", + "set_stack": { + "name": "set_stack", "type": "function", + "doc": "Set this item stack to another item stack. \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional) \nItem stack to set this one to. Omitting this parameter or passing ````\nnil````\nwill clear this item stack, \nif by calling [LuaItemStack::clear](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear). \n\n**Return value** \nWas the stack set successfully?", + "returns": "boolean", "args": { - "element": { - "name": "element", - "type": "LuaGuiElement", - "doc": "element :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element to scroll to." - }, - "scroll_mode": { - "name": "scroll_mode", - "type": "string", - "doc": "scroll_mode :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Where the element should be positioned in the scroll-pane. Must be either: ````\n\"in-view\"````\n, or ````\n\"top-third\"````\n. Defaults to ````\n\"in-view\"````\n." + "stack": { + "name": "stack", + "type": "ItemStackSpecification", + "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional) \nItem stack to set this one to. Omitting this parameter or passing ````\nnil````\nwill clear this item stack, \nif by calling [LuaItemStack::clear](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear)." } } }, - "scroll_to_left": { - "name": "scroll_to_left", - "doc": "Scrolls the scroll bar to the lef \n_Can only be used if this is scroll-pane or text-box_", - "type": "function" - }, - "scroll_to_right": { - "name": "scroll_to_right", - "doc": "Scrolls the scroll bar to the righ \n_Can only be used if this is scroll-pane or text-box_", - "type": "function" - }, - "scroll_to_top": { - "name": "scroll_to_top", - "doc": "Scrolls the scroll bar to the to \n_Can only be used if this is scroll-pane or text-box_", - "type": "function" - }, - "select": { - "name": "select", - "doc": "Select a range of text in the text bo \n\n**Parameters** \nstart :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int): The index of the first character to select. \nend :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int): The index of the last character to select. \n\n**Example** \nSelect the characters ````\namp````\nfrom ````\nexample```` \n````\ntextbox.select(3, 5)```` \n\n**Example** \nMove the cursor to the start of the text bo \n````\ntextbox.select(1, 0)```` \n_Can only be used if this is textfield or text-box_", + "set_tag": { + "name": "set_tag", "type": "function", + "doc": "Sets the tag with the given name and valu \n\n**Parameters** \ntag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \ntag :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any) \n_Can only be used if this is ItemWithTags_", + "returns": "Any", "args": { - "end": { - "name": "end", - "type": "int", - "doc": "end :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int): The index of the last character to select." + "tag": { + "name": "tag", + "type": "Any", + "doc": "tag :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any)" }, - "start": { - "name": "start", - "type": "int", - "doc": "start :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int): The index of the first character to select." + "tag_name": { + "name": "tag_name", + "type": "string", + "doc": "tag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" } } }, - "select_all": { - "name": "select_all", - "doc": "Select all text in the text bo \n_Can only be used if this is textfield or text-box_", - "type": "function" - }, - "selectable": { - "name": "selectable", - "type": "boolean", - "mode": "[RW]", - "doc": "If the contents of this text-box are selectabl \n_Can only be used if this is text-box_" - }, - "selected_index": { - "name": "selected_index", - "type": "uint", - "mode": "[RW]", - "doc": "The selected index for this dropdown or listbox. 0 if non" - }, - "set_item": { - "name": "set_item", - "doc": "Sets an item at the given index in this dropdown or listbo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index \nLocalisedString: The item.", + "set_tile_filter": { + "name": "set_tile_filter", "type": "function", + "doc": "Sets the tile filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html) or [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): Setting to nil erases the filter. \n\n**Return value** \nIf the new filter was set (was valid.) \n_Can only be used if this is DeconstructionItem_", + "returns": "boolean", "args": { + "filter": { + "name": "filter", + "type": "string or LuaTilePrototype or LuaTile", + "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html) or [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): Setting to nil erases the filter." + }, "index": { "name": "index", "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index" - }, - "LocalisedString": { - "name": "LocalisedString", - "doc": "LocalisedString: The item.", - "type": "LocalisedString" + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "set_slider_minimum_maximum": { - "name": "set_slider_minimum_maximum", - "doc": "Sets this sliders minimum and maximum value \n\n**Parameters** \nminimum :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nmaximum :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n\n**Note: ** The minimum can't be >= the maximum.", + "swap_stack": { + "name": "swap_stack", "type": "function", + "doc": "Swaps this item stack with the given item stack if allowed. \n\n**Parameters** \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) \n\n**Return value** \nif the 2 stacks were swapped successfully.", + "returns": "boolean", "args": { - "maximum": { - "name": "maximum", - "type": "double", - "doc": "maximum :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "minimum": { - "name": "minimum", - "type": "double", - "doc": "minimum :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + "stack": { + "name": "stack", + "type": "LuaItemStack", + "doc": "stack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html)" } } }, - "show_percent_for_small_numbers": { - "name": "show_percent_for_small_numbers", - "type": "boolean", + "tags": { + "name": "tags", + "type": "Tags", "mode": "[RW]", - "doc": "Related to the number to be shown in the right-bottom corner of the sprite-butto \nWhen set to true, numbers that are not 0 and smaller than one are shown as percent rather than the value, \nfor example 0.5 is shown as 50% instea" + "doc": "_Can only be used if this is ItemWithTags_" }, - "slider_value": { - "name": "slider_value", - "type": "double", - "mode": "[RW]", - "doc": "The value of this slider elemen \n_Can only be used if this is slider_" + "tile_filter_count": { + "name": "tile_filter_count", + "type": "uint", + "mode": "[R]", + "doc": "The number of tile filters this deconstruction item support \n_Can only be used if this is DeconstructionItem_" }, - "sprite": { - "name": "sprite", - "type": "SpritePath", + "tile_filter_mode": { + "name": "tile_filter_mode", + "type": "defines.deconstruction_item.tile_filter_mode", "mode": "[RW]", - "doc": "The image to display on this sprite-button or sprite in the default stat" + "doc": "The blacklist/whitelist tile filter mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" }, - "state": { - "name": "state", - "type": "boolean", + "tile_filters": { + "name": "tile_filters", + "type": "array of string", "mode": "[RW]", - "doc": "Is this checkbox checked? \n_Can only be used if this is checkbox_" + "doc": "The tile filters for this deconstruction ite" }, - "style": { - "name": "style", - "type": "LuaStyle or string", + "tile_selection_mode": { + "name": "tile_selection_mode", + "type": "defines.deconstruction_item.tile_selection_mode", "mode": "[RW]", - "doc": "The style of this element. When read, this evaluates to a [LuaStyle](http://lua-api.factorio.com/latest/LuaStyle.html). For writing, it only accep \na string that specifies the textual identifier of the desired style." + "doc": "The tile selection mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" }, - "surface_index": { - "name": "surface_index", - "type": "uint", - "mode": "[RW]", - "doc": "The surface index this camera or minimap is usin" + "transfer_stack": { + "name": "transfer_stack", + "type": "function", + "doc": "Transfers the given item stack into this item stack. \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) \n\n**Return value** \nTrue if the full stack was transferred.", + "returns": "boolean", + "args": { + "stack": { + "name": "stack", + "type": "ItemStackSpecification", + "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification)" + } + } }, - "text": { - "name": "text", - "type": "string", + "trees_and_rocks_only": { + "name": "trees_and_rocks_only", + "type": "boolean", "mode": "[RW]", - "doc": "The text contained in a textfield or text-bo \n_Can only be used if this is textfield or text-box_" - }, - "tooltip": { - "name": "tooltip", - "type": "LocalisedString", - "mode": "[RW]" + "doc": "If this deconstruction item is set to allow trees and rocks onl \n_Can only be used if this is DeconstructionItem_" }, "type": { "name": "type", "type": "string", "mode": "[R]", - "doc": "The type of this GUI elemen" + "doc": "Type of the item prototype." }, "valid": { "name": "valid", @@ -8333,48 +7146,18 @@ "mode": "[R]", "doc": "Is this object valid?" }, - "value": { - "name": "value", - "type": "double", - "mode": "[RW]", - "doc": "How much this progress bar is filled. It is a value in range [0, 1]. \n_Can only be used if this is progressbar_" - }, - "vertical_centering": { - "name": "vertical_centering", - "type": "boolean", - "mode": "[RW]", - "doc": "Whether the fields of this table should be vertically centered. This true by default and overrides [LuaStyle::column_alignments](http://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.column_alignments \n_Can only be used if this is table_" - }, - "vertical_scroll_policy": { - "name": "vertical_scroll_policy", - "type": "string", - "mode": "[RW]", - "doc": "Policy of the vertical scroll bar, possible values are \"auto\" (default), \"never\", \"always\", \"auto-and-reserve-space \n_Can only be used if this is scroll-pane_" - }, - "visible": { - "name": "visible", - "type": "boolean", - "mode": "[RW]", - "doc": "When not visible the GUI element is hidden completely and takes no space in the layou" - }, - "word_wrap": { - "name": "word_wrap", + "valid_for_read": { + "name": "valid_for_read", "type": "boolean", - "mode": "[RW]", - "doc": "If this text-box will word-wrap automaticall \n_Can only be used if this is text-box_" - }, - "zoom": { - "name": "zoom", - "type": "double", - "mode": "[RW]", - "doc": "The zoom this camera or minimap is usin" + "mode": "[R]", + "doc": "Is this valid for reading? Differs from the usual ````\nvalid````\nin that ````\nvalid````\nwill be ````\ntrue````\neven \nthe item stack is blank but the entity that holds it is still valid." } }, - "doc": "An element of the custom GUI. This type is used to represent any kind of a GUI element -- labels as well\n as buttons as well as frames are all instances of this type. Just like LuaEntity, different kinds\n of elements support different attributes; attempting to access an attribute on an element that doesn't support\n it (for instance, trying to access the value of a text field) will result in a run-time error." + "doc": "Is this blueprint item setup? I.e. is it a non-empty blueprint?" }, - "LuaInserterControlBehavior": { - "name": "LuaInserterControlBehavior", - "type": "LuaInserterControlBehavior", + "LuaLampControlBehavior": { + "name": "LuaLampControlBehavior", + "type": "LuaLampControlBehavior", "inherits": [ "Inherited from LuaControlBehavior: get_circuit_network, type, entity", "Inherited from LuaGenericOnOffControlBehavior: disabled, circuit_condition, logistic_condition, connect_to_logistic_network" @@ -8386,35 +7169,11 @@ "mode": "[RW]", "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" }, - "circuit_hand_read_mode": { - "name": "circuit_hand_read_mode", - "type": "defines.control_behavior.inserter.hand_read_mode", - "mode": "[RW]", - "doc": "The hand read mode for the inserter." - }, - "circuit_mode_of_operation": { - "name": "circuit_mode_of_operation", - "type": "defines.control_behavior.inserter.circuit_mode_of_operation", - "mode": "[RW]", - "doc": "The circuit mode of operations for the inserter." - }, - "circuit_read_hand_contents": { - "name": "circuit_read_hand_contents", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif the contents of the inserter hand should be sent to the circuit network" - }, - "circuit_set_stack_size": { - "name": "circuit_set_stack_size", - "type": "boolean", - "mode": "[RW]", - "doc": "If the stack size of the inserter is set through the circuit network or no" - }, - "circuit_stack_control_signal": { - "name": "circuit_stack_control_signal", - "type": "SignalID", - "mode": "[RW]", - "doc": "The signal used to set the stack size of the inserte" + "color": { + "name": "color", + "type": "Color", + "mode": "[R]", + "doc": "The color the lamp is showing or ````\nnil````\nif not using any colo" }, "connect_to_logistic_network": { "name": "connect_to_logistic_network", @@ -8463,12 +7222,24 @@ "mode": "[RW]", "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "type": { "name": "type", "type": "defines.control_behavior.type", "mode": "[R]", "doc": "The concrete type of this control behavior." }, + "use_colors": { + "name": "use_colors", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the lamp should set the color from the circuit network signals." + }, "valid": { "name": "valid", "type": "boolean", @@ -8476,225 +7247,246 @@ "doc": "Is this object valid?" } }, - "doc": "Control behavior for inserters." + "doc": "Control behavior for lamps." }, - "LuaInventory": { - "name": "LuaInventory", - "type": "LuaInventory", + "LuaLazyLoadedValue": { + "name": "LuaLazyLoadedValue", + "type": "LuaLazyLoadedValue", "inherits": [], "properties": { - "can_insert": { - "name": "can_insert", + "get": { + "name": "get", + "doc": "Gets the value of this lazy loaded valu", "type": "function", - "doc": "Can at least some items be inserted? \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted. \n\n**Return value** \n````\ntrue````\nif at least a part of the given items could be inserted into this inventory.", - "returns": "boolean", - "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted." - } - } + "returns": "varies" }, - "can_set_filter": { - "name": "can_set_filter", - "type": "function", - "doc": "If the given inventory slot filter can be set to the given filter \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name of the filter", - "returns": "boolean", - "args": { - "filter": { - "name": "filter", - "type": "string", - "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name of the filter" - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "clear": { - "name": "clear", - "doc": "Make this inventory empty.", - "type": "function" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "entity_owner": { - "name": "entity_owner", - "type": "LuaEntity", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The entity that owns this inventory or ````\nnil````\nif this isn't owned by an entity." + "doc": "Is this object valid?" + } + }, + "doc": "Gets the value of this lazy loaded value." + }, + "LuaLogisticCell": { + "name": "LuaLogisticCell", + "type": "LuaLogisticCell", + "inherits": [], + "properties": { + "charge_approach_distance": { + "name": "charge_approach_distance", + "type": "float", + "mode": "[R]", + "doc": "Radius at which the robots hover when waiting to be charged." }, - "equipment_owner": { - "name": "equipment_owner", - "type": "LuaEntity", + "charging_robot_count": { + "name": "charging_robot_count", + "type": "uint", "mode": "[R]", - "doc": "The equipment that owns this inventory or ````\nnil````\nif this isn't owned by an equipment." + "doc": "Number of robots currently charging." }, - "find_item_stack": { - "name": "find_item_stack", + "charging_robots": { + "name": "charging_robots", + "type": "array of LuaEntity", + "mode": "[R]", + "doc": "Robots currently being charged." + }, + "construction_radius": { + "name": "construction_radius", + "type": "float", + "mode": "[R]", + "doc": "Construction radius of this cell." + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "is_in_construction_range": { + "name": "is_in_construction_range", "type": "function", - "doc": "Gets the first LuaItemStack in the inventory that matches the given item nam \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name to find \n\n**Return value** \nor ````\nnil````\n. \n\n**Note: ** This will also return the stack index if one is found that matches as a second return value.", - "returns": "LuaItemStack", + "doc": "Is a given position within the construction range of this cell? \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)", + "returns": "boolean", "args": { - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item name to find" + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" } } }, - "get_contents": { - "name": "get_contents", - "type": "function", - "doc": "Get counts of all items in this inventory. \n\n**Return value** \nThe counts, indexed by item names.", - "returns": "dictionary string → uint" - }, - "get_filter": { - "name": "get_filter", + "is_in_logistic_range": { + "name": "is_in_logistic_range", "type": "function", - "doc": "Gets the filter for the given item stack index \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \n\n**Return value** \nThe current filter or nil if none.", - "returns": "string", + "doc": "Is a given position within the logistic range of this cell? \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)", + "returns": "boolean", "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" } } }, - "get_item_count": { - "name": "get_item_count", + "is_neighbour_with": { + "name": "is_neighbour_with", "type": "function", - "doc": "Get the number of all or some items in this inventory. \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items.", - "returns": "uint", + "doc": "Are two cells neighbours? \n\n**Parameters** \nother :: [LuaLogisticCell](http://lua-api.factorio.com/latest/LuaLogisticCell.html)", + "returns": "boolean", "args": { - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items." + "other": { + "name": "other", + "type": "LuaLogisticCell", + "doc": "other :: [LuaLogisticCell](http://lua-api.factorio.com/latest/LuaLogisticCell.html)" } } }, - "getbar": { - "name": "getbar", - "type": "function", - "doc": "Get the current bar. This is the index at which the red area starts. \n\n**Note: ** Only useable if this inventory has a bar.", - "returns": "uint" + "logistic_network": { + "name": "logistic_network", + "type": "LuaLogisticNetwork", + "mode": "[R]", + "doc": "The network that owns this cell or ````\nnil````\n." }, - "hasbar": { - "name": "hasbar", - "type": "function", - "doc": "Does this inventory have a bar? Bar is the draggable red thing, found for example on chest \nthat limits the portion of the inventory that may be manipulated by machines \n\n**Note: ** \"Having a bar\" doesn't mean that the bar is set to some nontrivial value. Having a b \nmeans the inventory supports having this limit at all. The character's inventory is \nexample of an inventory without a bar; the wooden chest's inventory is an example of o \nwith a bar.", - "returns": "boolean" + "logistic_radius": { + "name": "logistic_radius", + "type": "float", + "mode": "[R]", + "doc": "Logistic radius of this cell." }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "logistics_connection_distance": { + "name": "logistics_connection_distance", + "type": "float", + "mode": "[R]", + "doc": "Logistic connection distance of this cell." }, - "index": { - "name": "index", - "type": "uint", + "mobile": { + "name": "mobile", + "type": "boolean", "mode": "[R]", - "doc": "The inventory index this inventory uses." + "doc": "````\ntrue````\nif this is a mobile cell. In vanilla, only the logistic cell created by a character's person \nroboport is mobile." }, - "insert": { - "name": "insert", - "type": "function", - "doc": "Insert items into this inventory. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", - "returns": "uint", - "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." - } - } + "neighbours": { + "name": "neighbours", + "type": "array of LuaLogisticCell", + "mode": "[R]", + "doc": "Neighbouring cells." }, - "is_empty": { - "name": "is_empty", - "type": "function", - "doc": "Does this inventory contain nothing?", - "returns": "boolean" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "is_filtered": { - "name": "is_filtered", - "type": "function", - "doc": "If this inventory supports filters and has at least 1 filter se", - "returns": "boolean" + "owner": { + "name": "owner", + "type": "LuaEntity", + "mode": "[R]", + "doc": "This cell's owner." }, - "operator []": { - "name": "operator []", - "type": "LuaItemStack", + "stationed_construction_robot_count": { + "name": "stationed_construction_robot_count", + "type": "uint", "mode": "[R]", - "doc": "The indexing operator \n\n**Example** \nWill get the first item in the player's inventor \n````\ngame.player.get_main_inventory()[1]````" + "doc": "Number of stationed construction robots in this cell." }, - "operator #": { - "name": "operator #", + "stationed_logistic_robot_count": { + "name": "stationed_logistic_robot_count", "type": "uint", "mode": "[R]", - "doc": "Get the number of slots in this inventory \n\n**Example** \nWill print the number of slots in the player's main inventor \n````\ngame.player.print(#game.player.get_main_inventory())````" + "doc": "Number of stationed logistic robots in this cell." }, - "player_owner": { - "name": "player_owner", - "type": "LuaPlayer", + "to_charge_robot_count": { + "name": "to_charge_robot_count", + "type": "uint", "mode": "[R]", - "doc": "The player that owns this inventory or ````\nnil````\nif this isn't owned by a player." + "doc": "Number of robots waiting to charge." }, - "remove": { - "name": "remove", - "type": "function", - "doc": "Remove items from this inventory. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", - "returns": "uint", - "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." - } - } + "to_charge_robots": { + "name": "to_charge_robots", + "type": "array of LuaEntity", + "mode": "[R]", + "doc": "Robots waiting to charge." }, - "set_filter": { - "name": "set_filter", + "transmitting": { + "name": "transmitting", + "type": "boolean", + "mode": "[R]", + "doc": "````\ntrue````\nif this cell is active." + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Is a given position within the logistic range of this cell?" + }, + "LuaLogisticContainerControlBehavior": { + "name": "LuaLogisticContainerControlBehavior", + "type": "LuaLogisticContainerControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], + "properties": { + "circuit_mode_of_operation": { + "name": "circuit_mode_of_operation", + "type": "defines.control_behavior.logistic_container.circuit_mode_of_operation", + "mode": "[RW]", + "doc": "The circuit mode of operations for the logistic container." + }, + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." + }, + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", - "doc": "Sets the filter for the given item stack index \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The new filter or nil to erase the filter \n\n**Return value** \nIf the filter was allowed to be set. \n\n**Note: ** Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).", - "returns": "boolean", + "returns": "LuaCircuitNetwork", "args": { - "filter": { - "name": "filter", - "type": "string", - "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The new filter or nil to erase the filter" + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The item stack index" + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "setbar": { - "name": "setbar", - "doc": "Set the current bar. \n\n**Parameters** \nbar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The new limit. Omitting this parameter will clear the limit. \n\n**Note: ** Only useable if this inventory has a bar.", - "type": "function", - "args": { - "bar": { - "name": "bar", - "type": "uint", - "doc": "bar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The new limit. Omitting this parameter will clear the limit." - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "sort_and_merge": { - "name": "sort_and_merge", - "doc": "Sorts and merges the items in this inventory.", - "type": "function" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "supports_filters": { - "name": "supports_filters", - "type": "function", - "doc": "If this inventory supports filter", - "returns": "boolean" + "type": { + "name": "type", + "type": "defines.control_behavior.type", + "mode": "[R]", + "doc": "The concrete type of this control behavior." }, "valid": { "name": "valid", @@ -8703,335 +7495,509 @@ "doc": "Is this object valid?" } }, - "doc": "A storage of item stacks." + "doc": "Control behavior for logistic chests." }, - "LuaItemPrototype": { - "name": "LuaItemPrototype", - "type": "LuaItemPrototype", + "LuaLogisticNetwork": { + "name": "LuaLogisticNetwork", + "type": "LuaLogisticNetwork", "inherits": [], "properties": { - "alt_entity_filter_mode": { - "name": "alt_entity_filter_mode", - "type": "string", + "active_provider_points": { + "name": "active_provider_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "The alt entity filter mode used by this selection too \n_Can only be used if this is SelectionTool_" + "doc": "All active provider points in this network." }, - "alt_entity_filters": { - "name": "alt_entity_filters", - "type": "dictionary string → LuaEntityPrototype", + "all_construction_robots": { + "name": "all_construction_robots", + "type": "uint", "mode": "[R]", - "doc": "The alt entity filters used by this selection tool indexed by entity nam \n_Can only be used if this is SelectionTool_" + "doc": "The total number of construction robots in the network (idle and active + in roboports)." }, - "alt_entity_type_filters": { - "name": "alt_entity_type_filters", - "type": "dictionary string → boolean", + "all_logistic_robots": { + "name": "all_logistic_robots", + "type": "uint", "mode": "[R]", - "doc": "The alt entity type filters used by this selection tool indexed by entity typ \n\n**Note: ** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary. \n_Can only be used if this is SelectionTool_" + "doc": "The total number of logistic robots in the network (idle and active + in roboports)." }, - "alt_selection_border_color": { - "name": "alt_selection_border_color", - "type": "Color", + "available_construction_robots": { + "name": "available_construction_robots", + "type": "uint", "mode": "[R]", - "doc": "The color used when doing alt selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" + "doc": "Number of construction robots available for a job." }, - "alt_selection_cursor_box_type": { - "name": "alt_selection_cursor_box_type", - "type": "string", + "available_logistic_robots": { + "name": "available_logistic_robots", + "type": "uint", "mode": "[R]", - "doc": "_Can only be used if this is SelectionTool_" + "doc": "Number of logistic robots available for a job." }, - "alt_selection_mode_flags": { - "name": "alt_selection_mode_flags", - "type": "SelectionModeFlags", + "cells": { + "name": "cells", + "type": "array of LuaLogisticCell", "mode": "[R]", - "doc": "Flags that affect which entities will be selected during alternate selection. \n_Can only be used if this is SelectionTool_" + "doc": "All cells in this network." }, - "alt_tile_filter_mode": { - "name": "alt_tile_filter_mode", - "type": "string", + "construction_robots": { + "name": "construction_robots", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The alt tile filter mode used by this selection too \n_Can only be used if this is SelectionTool_" + "doc": "All construction robots in this logistic networ" }, - "alt_tile_filters": { - "name": "alt_tile_filters", - "type": "dictionary string → LuaTilePrototype", + "empty_provider_points": { + "name": "empty_provider_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "The alt tile filters used by this selection tool indexed by tile nam \n_Can only be used if this is SelectionTool_" + "doc": "All things that have empty provider points in this network." }, - "always_include_tiles": { - "name": "always_include_tiles", - "type": "boolean", + "empty_providers": { + "name": "empty_providers", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "If tiles area always included when doing selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" + "doc": "All entities that have empty logistic provider points in this network." }, - "attack_parameters": { - "name": "attack_parameters", - "type": "AttackParameters", - "mode": "[R]", - "doc": "The gun attack parameters or ````\nnil````\nif not a gun item prototyp" + "find_cell_closest_to": { + "name": "find_cell_closest_to", + "type": "function", + "doc": "Find logistic cell closest to a given position. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \n\n**Return value** \nMay be ````\nnil````\nif no cell was found.", + "returns": "LuaLogisticCell", + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + } + } }, - "burnt_result": { - "name": "burnt_result", - "type": "LuaItemPrototype", + "force": { + "name": "force", + "type": "LuaForce", "mode": "[R]", - "doc": "The result of burning this item as fuel or ````\nnil````\n." + "doc": "The force this logistic network belongs t" }, - "can_be_mod_opened": { - "name": "can_be_mod_opened", - "type": "boolean", - "mode": "[R]", - "doc": "If this item can be mod-opene" + "get_contents": { + "name": "get_contents", + "type": "function", + "doc": "Get item counts for the entire networ \n\n**Return value** \nA mapping of item prototype names to the number available in the network. \nSee also \n[LuaInventory::get_contents](http://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents)", + "returns": "dictionary string → uint" }, - "capsule_action": { - "name": "capsule_action", - "type": "CapsuleAction", - "mode": "[R]", - "doc": "The capsule action for this capsule item prototype or ````\nnil````\nif this isn't a capsule item prototyp" + "get_item_count": { + "name": "get_item_count", + "type": "function", + "doc": "Count given or all items in the network or given members \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Item name to count. If not given, gives coun \nof all items in the network. \nmember :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Logistic members to check, must be either ````\n\"storage\"```` \nor ````\n\"providers\"````\n. If not given, gives count in the entire network.", + "returns": "int", + "args": { + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Item name to count. If not given, gives coun \nof all items in the network." + }, + "member": { + "name": "member", + "type": "string", + "doc": "member :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Logistic members to check, must be either ````\n\"storage\"```` \nor ````\n\"providers\"````\n. If not given, gives count in the entire network." + } + } }, - "category": { - "name": "category", + "help": { + "name": "help", "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "insert": { + "name": "insert", + "type": "function", + "doc": "Insert items into the logistic network. This will actually insert the items into so \nlogistic chests. \n\n**Parameters** \nitem :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to insert. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to insert the items to. Must \n````\n\"storage\"````\n, ````\n\"storage-empty\"````\n(storage chests that are completely empty \n````\n\"storage-empty-slot\"````\n(storage chests that have an empty slot), or ````\n\"requester\"````\n. If n \nspecified, inserts items into the logistic network in the usual order. \n\n**Return value** \nNumber of items actually inserted.", + "returns": "uint", + "args": { + "item": { + "name": "item", + "type": "ItemStackSpecification", + "doc": "item :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to insert." + }, + "members": { + "name": "members", + "type": "string", + "doc": "members :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to insert the items to. Must \n````\n\"storage\"````\n, ````\n\"storage-empty\"````\n(storage chests that are completely empty \n````\n\"storage-empty-slot\"````\n(storage chests that have an empty slot), or ````\n\"requester\"````\n. If n \nspecified, inserts items into the logistic network in the usual order." + } + } + }, + "logistic_members": { + "name": "logistic_members", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The module category na \n_Can only be used if this is ModuleItem_" + "doc": "All other entities that have logistic points in this network (inserters mostly)." }, - "curved_rail": { - "name": "curved_rail", - "type": "LuaEntityPrototype", + "logistic_robots": { + "name": "logistic_robots", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The curved rail prototype used for this rail planner prototyp \n_Can only be used if this is RailPlanner_" + "doc": "All logistic robots in this logistic networ" }, - "default_label_color": { - "name": "default_label_color", - "type": "Color", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The default label color used for this item with label. ````\nnil````\nif not defined or if this isn't an item with labe \n_Can only be used if this is ItemWithLabel_" + "doc": "The class name of this object." }, - "default_request_amount": { - "name": "default_request_amount", - "type": "uint", + "passive_provider_points": { + "name": "passive_provider_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "The default request value." + "doc": "All passive provider points in this network." }, - "draw_label_for_cursor_render": { - "name": "draw_label_for_cursor_render", - "type": "boolean", + "provider_points": { + "name": "provider_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "If true, and this item with label has a label it is drawn in place of the normal number when held in the curso \n_Can only be used if this is ItemWithLabel_" + "doc": "All things that have provider points in this network." }, - "durability": { - "name": "durability", - "type": "double", + "providers": { + "name": "providers", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The durability of this tool item or ````\nnil````\nif not a tool ite \n_Can only be used if this is ToolItem_" + "doc": "All entities that have logistic provider points in this network." }, - "durability_description_key": { - "name": "durability_description_key", - "type": "string", + "remove_item": { + "name": "remove_item", + "type": "function", + "doc": "Remove items from the logistic network. This will actually remove the items from so \nlogistic chests. \n\n**Parameters** \nitem :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to remove. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to remove from. Must \n````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\n, or ````\n\"active-provider\"````\n. If not specified, remov \nfrom the network in the usual order. \n\n**Return value** \nNumber of items removed.", + "returns": "uint", + "args": { + "item": { + "name": "item", + "type": "ItemStackSpecification", + "doc": "item :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to remove." + }, + "members": { + "name": "members", + "type": "string", + "doc": "members :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to remove from. Must \n````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\n, or ````\n\"active-provider\"````\n. If not specified, remov \nfrom the network in the usual order." + } + } + }, + "requester_points": { + "name": "requester_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "The durability message key used when displaying the durability of this too \n_Can only be used if this is ToolItem_" + "doc": "All things that have requester points in this network." }, - "entity_filter_mode": { - "name": "entity_filter_mode", - "type": "string", + "requesters": { + "name": "requesters", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The entity filter mode used by this selection too \n_Can only be used if this is SelectionTool_" + "doc": "All entities that have logistic requester points in this network." }, - "entity_filter_slots": { - "name": "entity_filter_slots", + "robot_limit": { + "name": "robot_limit", "type": "uint", "mode": "[R]", - "doc": "The number of entity filters this deconstruction item has or ````\nnil````\nif this isn't a deconstruction item prototyp \n_Can only be used if this is DeconstructionItem_" + "doc": "Maximum number of robots the network can work with. Currently only used for the person \nroboport." }, - "entity_filters": { - "name": "entity_filters", - "type": "dictionary string → LuaEntityPrototype", + "robots": { + "name": "robots", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The entity filters used by this selection tool indexed by entity nam \n_Can only be used if this is SelectionTool_" + "doc": "All robots in this logistic networ" }, - "entity_type_filters": { - "name": "entity_type_filters", - "type": "dictionary string → boolean", - "mode": "[R]", - "doc": "The entity type filters used by this selection tool indexed by entity typ \n\n**Note: ** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary. \n_Can only be used if this is SelectionTool_" + "select_drop_point": { + "name": "select_drop_point", + "type": "function", + "doc": "Find a logistic point to drop the specific item stack. \n\n**Parameters** \nTable with the following fields: \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Name of the item to select. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"storage-empty\"````\n, ````\n\"storage-empty-slot\"````\nor ````\n\"requester\"````\n. If not specified, selects with normal priorities. \n\n**Return value** \nMay be ````\nnil````\nif no point was found.", + "returns": "LuaLogisticPoint", + "args": { + "stack": { + "name": "stack", + "type": "ItemStackSpecification", + "doc": "Table with the following fields: \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Name of the item to select. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"storage-empty\"````\n, ````\n\"storage-empty-slot\"````\nor ````\n\"requester\"````\n. If not specified, selects with normal priorities." + } + } }, - "equipment_grid": { - "name": "equipment_grid", - "type": "LuaEquipmentGridPrototype", - "mode": "[R]", - "doc": "The prototype of this armor equipment grid or ````\nnil````\nif none or this is not an armor ite" + "select_pickup_point": { + "name": "select_pickup_point", + "type": "function", + "doc": "Find the 'best' logistic point with this item ID and from the given position or from given chest type. \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the item to select. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): When given, it will find the storage 'best' storage point from this position. \ninclude_buffers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\nor ````\n\"active-provider\"````\n. If not specified, selects with normal priorities. Not considered if position is specified. \n\n**Return value** \nMay be ````\nnil````\nif no point was found.", + "returns": "LuaLogisticPoint", + "args": { + "name": { + "name": "name", + "type": "string", + "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the item to select. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): When given, it will find the storage 'best' storage point from this position. \ninclude_buffers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\nor ````\n\"active-provider\"````\n. If not specified, selects with normal priorities. Not considered if position is specified." + } + } }, - "extend_inventory_by_default": { - "name": "extend_inventory_by_default", - "type": "boolean", + "storage_points": { + "name": "storage_points", + "type": "array of LuaLogisticPoint", "mode": "[R]", - "doc": "If this item with inventory extends the inventory it resides in by defaul \n_Can only be used if this is ItemWithInventory_" + "doc": "All things that have storage points in this network." }, - "filter_mode": { - "name": "filter_mode", - "type": "string", + "storages": { + "name": "storages", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The filter mode used by this item with inventor \n_Can only be used if this is ItemWithInventory_" + "doc": "All entities that have logistic storage points in this network." }, - "flags": { - "name": "flags", - "type": "dictionary string → boolean", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The item prototype flags for this item prototype. It is a dictionary where the keys are the set fla \nand the value is always ````\ntrue````\n-- if a flag is unset, it isn't present in the dictionary at all. The possible flags ar \n````\n\"hidden\"````\n: If ````\ntrue````\n, the item will be hidden from all crafting menus." - }, - "fuel_acceleration_multiplier": { - "name": "fuel_acceleration_multiplier", - "type": "double", + "doc": "Is this object valid?" + } + }, + "doc": "Count given or all items in the network or given members." + }, + "LuaLogisticPoint": { + "name": "LuaLogisticPoint", + "type": "LuaLogisticPoint", + "inherits": [], + "properties": { + "exact": { + "name": "exact", + "type": "boolean", "mode": "[R]", - "doc": "The acceleration multiplier when this item is used as fuel in a vehicle." + "doc": "If this logistic point is using the exact mode. In exact mode robots never over-deliver request" }, - "fuel_category": { - "name": "fuel_category", + "filters": { + "name": "filters", + "type": "array of LogisticFilter", + "mode": "[R]", + "doc": "The logistic filters for this logistic point or ````\nnil````\nif this doesn't use logistic filter \n\n**Note: ** The returned array will always have an entry for each filter and will be indexed in sequence when not nil." + }, + "force": { + "name": "force", + "type": "LuaForce", + "mode": "[R]", + "doc": "The force of this logistic poin \n\n**Note: ** This will always be the same as the [LuaLogisticPoint::owner](http://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.owner) force." + }, + "help": { + "name": "help", "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "logistic_member_index": { + "name": "logistic_member_index", + "type": "uint", "mode": "[R]", - "doc": "The fuel category or ````\nnil````\n." + "doc": "The Logistic member index of this logistic poin" }, - "fuel_emissions_multiplier": { - "name": "fuel_emissions_multiplier", - "type": "double", + "logistic_network": { + "name": "logistic_network", + "type": "LuaLogisticNetwork", + "mode": "[R]" + }, + "mode": { + "name": "mode", + "type": "defines.logistic_mode", "mode": "[R]", - "doc": "The emissions multiplier if this is used as fuel." + "doc": "The logistic mod" }, - "fuel_top_speed_multiplier": { - "name": "fuel_top_speed_multiplier", - "type": "double", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The fuel top speed multiplier when this item is used as fuel in a vehicle." + "doc": "The class name of this object." }, - "fuel_value": { - "name": "fuel_value", - "type": "float", + "owner": { + "name": "owner", + "type": "LuaEntity", "mode": "[R]", - "doc": "Fuel value when burned." + "doc": "The [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) owner of this [LuaLogisticPoint](http://lua-api.factorio.com/latest/LuaLogisticPoint.html" }, - "get_ammo_type": { - "name": "get_ammo_type", - "type": "function", - "doc": "Type of this ammo prototype or ````\nnil````\nif this is not an ammo prototyp \n\n**Parameters** \nammo_source_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): \"default\", \"player\", \"turret\", or \"vehicle\"", - "returns": "AmmoType", - "args": { - "ammo_source_type": { - "name": "ammo_source_type", - "type": "string", - "doc": "ammo_source_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): \"default\", \"player\", \"turret\", or \"vehicle\"" - } - } + "targeted_items_deliver": { + "name": "targeted_items_deliver", + "type": "dictionary string → uint", + "mode": "[R]", + "doc": "Items targeted to be dropped off into this logistic point by robot" }, - "group": { - "name": "group", - "type": "LuaGroup", + "targeted_items_pickup": { + "name": "targeted_items_pickup", + "type": "dictionary string → uint", "mode": "[R]", - "doc": "The group this prototype belongs to." + "doc": "Items targeted to be picked up from this logistic point by robot" }, - "has_flag": { - "name": "has_flag", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "The LuaEntity owner of this LuaLogisticPoint." + }, + "LuaMiningDrillControlBehavior": { + "name": "LuaMiningDrillControlBehavior", + "type": "LuaMiningDrillControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity", + "Inherited from LuaGenericOnOffControlBehavior: disabled, circuit_condition, logistic_condition, connect_to_logistic_network" + ], + "properties": { + "circuit_condition": { + "name": "circuit_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" + }, + "circuit_enable_disable": { + "name": "circuit_enable_disable", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif this drill is enabled or disabled using the logistics or circuit condition." + }, + "circuit_read_resources": { + "name": "circuit_read_resources", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif this drill should send the resources in the field to the circuit networ \nWhich resources depends on [LuaMiningDrillControlBehavior::resource_read_mode](http://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaMiningDrillControlBehavior.resource_read_mode)" + }, + "connect_to_logistic_network": { + "name": "connect_to_logistic_network", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif this should connect to the logistic network." + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "mode": "[R]", + "doc": "If the entity is currently disabled because of the control behavior." + }, + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." + }, + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", - "doc": "Does this prototype have a flag enable \nAny other value will cause an erro \n\n**Parameters** \nflag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Can be ````\n\"hidden\"````\n, ````\n\"hide-from-bonus-gui\"````\n, or ````\n\"hide-from-fuel-tooltip\"````\n.", - "returns": "boolean", + "returns": "LuaCircuitNetwork", "args": { - "flag": { - "name": "flag", - "type": "string", - "doc": "flag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The flag to check. Can be ````\n\"hidden\"````\n, ````\n\"hide-from-bonus-gui\"````\n, or ````\n\"hide-from-fuel-tooltip\"````\n." + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "infinite": { - "name": "infinite", - "type": "boolean", - "mode": "[R]", - "doc": "If this tool item has infinite durability. ````\nnil````\nif not a tool type ite \n_Can only be used if this is ToolItem_" + "logistic_condition": { + "name": "logistic_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]", + "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" }, - "insertion_priority_mode": { - "name": "insertion_priority_mode", + "object_name": { + "name": "object_name", "type": "string", "mode": "[R]", - "doc": "The insertion priority mode used by this item with inventor \n_Can only be used if this is ItemWithInventory_" + "doc": "The class name of this object." }, - "inventory_size": { - "name": "inventory_size", - "type": "uint", + "resource_read_mode": { + "name": "resource_read_mode", + "type": "defines.control_behavior.mining_drill.resource_read_mode", + "mode": "[RW]", + "doc": "If the mining drill should send just the resources in its area or the entire field it's on to the circuit network." + }, + "resource_read_targets": { + "name": "resource_read_targets", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The main inventory size for item-with-inventory-prototype. ````\nnil````\nif not an item-with-inventory-prototyp \n_Can only be used if this is ItemWithInventoryPrototype_" + "doc": "The resource entities that the mining drill will send information about to the circuit network or an empty array." }, - "inventory_size_bonus": { - "name": "inventory_size_bonus", - "type": "uint", + "type": { + "name": "type", + "type": "defines.control_behavior.type", "mode": "[R]", - "doc": "The inventory size bonus for this armor prototype. ````\nnil````\nif this isn't an armor prototyp \n_Can only be used if this is ArmorPrototype_" + "doc": "The concrete type of this control behavior." }, - "item_filters": { - "name": "item_filters", - "type": "dictionary string → LuaItemPrototype", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "_Can only be used if this is ItemWithInventory_" + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for mining drills." + }, + "LuaModSettingPrototype": { + "name": "LuaModSettingPrototype", + "type": "LuaModSettingPrototype", + "inherits": [], + "properties": { + "allow_blank": { + "name": "allow_blank", + "type": "boolean", + "mode": "[R]", + "doc": "If this string setting allows blank values or ````\nnil````\nif not a string settin" }, - "item_group_filters": { - "name": "item_group_filters", - "type": "dictionary string → LuaGroup", + "allowed_values": { + "name": "allowed_values", + "type": "array of string or array of int or array of double", "mode": "[R]", - "doc": "_Can only be used if this is ItemWithInventory_" + "doc": "The allowed values for this setting or ````\nnil````\nif this setting doesn't use the a fixed set of value" }, - "item_subgroup_filters": { - "name": "item_subgroup_filters", - "type": "dictionary string → LuaGroup", + "auto_trim": { + "name": "auto_trim", + "type": "boolean", "mode": "[R]", - "doc": "_Can only be used if this is ItemWithInventory_" + "doc": "If this string setting auto-trims values or ````\nnil````\nif not a string settin" }, - "limitation_message_key": { - "name": "limitation_message_key", - "type": "string", + "default_value": { + "name": "default_value", + "type": "boolean or double or int or string", "mode": "[R]", - "doc": "The limitation message key used when the player attempts to use this modules in some place it's not allowe \n_Can only be used if this is ModuleItem_" + "doc": "The default value of this settin" }, - "limitations": { - "name": "limitations", - "type": "array of string", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "hidden": { + "name": "hidden", + "type": "boolean", "mode": "[R]", - "doc": "An array of recipe names this module is allowed to work wit \n_Can only be used if this is ModuleItem_" + "doc": "If this setting is hidden from the GU" }, "localised_description": { "name": "localised_description", "type": "LocalisedString", "mode": "[R]" }, - "localised_filter_message": { - "name": "localised_filter_message", - "type": "LocalisedString", - "mode": "[R]", - "doc": "The localised string used when the player attempts to put items into this item with inventory that aren't allowe \n_Can only be used if this is ItemWithInventory_" - }, "localised_name": { "name": "localised_name", "type": "LocalisedString", "mode": "[R]" }, - "magazine_size": { - "name": "magazine_size", - "type": "float", + "maximum_value": { + "name": "maximum_value", + "type": "double or int", "mode": "[R]", - "doc": "Size of full magazine; ````\nnil````\nif this is not an ammo item." + "doc": "The maximum value for this setting or ````\nnil````\nif this setting type doesn't support a maximu" }, - "mapper_count": { - "name": "mapper_count", - "type": "uint", + "minimum_value": { + "name": "minimum_value", + "type": "double or int", "mode": "[R]", - "doc": "How many filters an upgrade item has. ````\nnil````\nif not a upgrade ite \n_Can only be used if this is UpgradeItem_" + "doc": "The minimum value for this setting or ````\nnil````\nif this setting type doesn't support a minimu" }, - "module_effects": { - "name": "module_effects", - "type": "Effects", + "mod": { + "name": "mod", + "type": "string", "mode": "[R]", - "doc": "Effects of this module; ````\nnil````\nif this is not a module. It is a dictionary indexed by the effect typ \n_Can only be used if this is ModuleItem_" + "doc": "The mod that owns this settin" }, "name": { "name": "name", @@ -9039,1802 +8005,1936 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", "mode": "[R]", - "doc": "Order string." + "doc": "Order string of this prototype." }, - "place_as_equipment_result": { - "name": "place_as_equipment_result", - "type": "LuaEquipmentPrototype", - "mode": "[R]", - "doc": "Prototype of the equipment that will be created by placing this item in an equipment grid or ````\nnil````\nif there is no equipment defined." + "setting_type": { + "name": "setting_type", + "type": "string", + "mode": "[R]" }, - "place_as_tile_result": { - "name": "place_as_tile_result", - "type": "PlaceAsTileResult", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The place as tile result if one is defined else ````\nnil````" + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaModuleCategoryPrototype": { + "name": "LuaModuleCategoryPrototype", + "type": "LuaModuleCategoryPrototype", + "inherits": [], + "properties": { + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "place_result": { - "name": "place_result", - "type": "LuaEntityPrototype", - "mode": "[R]", - "doc": "Prototype of the entity that will be created by placing this item, or ````\nnil````\nif there is no su \nentity." + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "reload_time": { - "name": "reload_time", - "type": "float", - "mode": "[R]", - "doc": "Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine or ````\nnil````\nif this is not an ammo item." + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "repair_result": { - "name": "repair_result", - "type": "Trigger", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "The repair result of this repair tool prototype or ````\nnil````\nif this isn't a repair tool prototyp \n_Can only be used if this is RepairTool_" + "doc": "Name of this prototype." }, - "resistances": { - "name": "resistances", - "type": "Resistances", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Resistances of this armour item; ````\nnil````\nif not an armor or the armor has no resistances." + "doc": "The class name of this object." }, - "robot_action": { - "name": "robot_action", - "type": "Trigger", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "The robot action for this capsule item prototype or ````\nnil````\nif this isn't a capsule item prototyp" + "doc": "Order string of this prototype." }, - "rocket_launch_products": { - "name": "rocket_launch_products", - "type": "array of Product", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The results from launching this item in a rocke" - }, - "selection_border_color": { - "name": "selection_border_color", - "type": "Color", + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaNamedNoiseExpression": { + "name": "LuaNamedNoiseExpression", + "type": "LuaNamedNoiseExpression", + "inherits": [], + "properties": { + "expression": { + "name": "expression", + "type": "NoiseExpression", "mode": "[R]", - "doc": "The color used when doing normal selection with this selection tool prototyp \n_Can only be used if this is SelectionTool_" + "doc": "The expression itself." }, - "selection_cursor_box_type": { - "name": "selection_cursor_box_type", + "help": { + "name": "help", "type": "string", - "mode": "[R]", - "doc": "_Can only be used if this is SelectionTool_" + "doc": "All methods, and properties that this object supports." }, - "selection_mode_flags": { - "name": "selection_mode_flags", - "type": "SelectionModeFlags", + "intended_property": { + "name": "intended_property", + "type": "string", "mode": "[R]", - "doc": "Flags that affect which entities will be selected. \n_Can only be used if this is SelectionTool_" + "doc": "Name of the property that this expression is intended to provide a value for, if any." }, - "show_in_library": { - "name": "show_in_library", - "type": "boolean", - "mode": "[R]", - "doc": "Is this selection tool prototype available in the blueprint library. ````\nnil````\nif not selection tool or blueprint boo" + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "speed": { - "name": "speed", - "type": "float", - "mode": "[R]", - "doc": "The repairing speed if this is a repairing tool; otherwise ````\nnil````\n." + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "stack_size": { - "name": "stack_size", - "type": "uint", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "Maximum stack size of the item specified by this prototype." + "doc": "Name of this prototype." }, - "stackable": { - "name": "stackable", - "type": "boolean", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Is this item allowed to stack at all?" + "doc": "The class name of this object." }, - "straight_rail": { - "name": "straight_rail", - "type": "LuaEntityPrototype", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "The straight rail prototype used for this rail planner prototyp \n_Can only be used if this is RailPlanner_" + "doc": "Order string of this prototype." }, - "subgroup": { - "name": "subgroup", - "type": "LuaGroup", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The subgroup this prototype belongs to." + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaNoiseLayerPrototype": { + "name": "LuaNoiseLayerPrototype", + "type": "LuaNoiseLayerPrototype", + "inherits": [], + "properties": { + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "tier": { - "name": "tier", - "type": "float", - "mode": "[R]", - "doc": "The module ti \n_Can only be used if this is ModuleItem_" + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "tile_filter_mode": { - "name": "tile_filter_mode", - "type": "string", - "mode": "[R]", - "doc": "The tile filter mode used by this selection too \n_Can only be used if this is SelectionTool_" + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "tile_filter_slots": { - "name": "tile_filter_slots", - "type": "uint", + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "The number of tile filters this deconstruction item has or ````\nnil````\nif this isn't a deconstruction item prototyp \n_Can only be used if this is DeconstructionItem_" + "doc": "Name of this prototype." }, - "tile_filters": { - "name": "tile_filters", - "type": "dictionary string → LuaTilePrototype", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The tile filters used by this selection tool indexed by tile nam \n_Can only be used if this is SelectionTool_" + "doc": "The class name of this object." }, - "type": { - "name": "type", + "order": { + "name": "order", "type": "string", "mode": "[R]", - "doc": "Type of this prototype. E.g. ````\n\"gun\"````\nor ````\n\"mining-tool\"````\n." + "doc": "Order string of this prototype." }, "valid": { "name": "valid", "type": "boolean", "mode": "[R]", "doc": "Is this object valid?" - }, - "wire_count": { - "name": "wire_count", - "type": "uint", - "mode": "[R]", - "doc": "The number of items needed to connect 2 entities with this as wire." } }, - "doc": "Prototype of an item." + "doc": "" }, - "LuaItemStack": { - "name": "LuaItemStack", - "type": "LuaItemStack", + "LuaParticlePrototype": { + "name": "LuaParticlePrototype", + "type": "LuaParticlePrototype", "inherits": [], "properties": { - "active_index": { - "name": "active_index", + "ended_in_water_trigger_effect": { + "name": "ended_in_water_trigger_effect", + "type": "TriggerEffectItem", + "mode": "[R]" + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "life_time": { + "name": "life_time", "type": "uint", - "mode": "[RW]", - "doc": "The active blueprint index for this blueprint boo \n_Can only be used if this is BlueprintBookItem_" + "mode": "[R]" }, - "add_ammo": { - "name": "add_ammo", - "doc": "Add ammo to this ammo item. \n\n**Parameters** \namount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Amount of ammo to add. \n_Can only be used if this is AmmoItem_", - "type": "function", - "args": { - "amount": { - "name": "amount", - "type": "uint", - "doc": "amount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Amount of ammo to add." - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "add_durability": { - "name": "add_durability", - "doc": "Add durability to this tool item. \n\n**Parameters** \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to add. \n_Can only be used if this is ToolItem_", - "type": "function", - "args": { - "amount": { - "name": "amount", - "type": "double", - "doc": "amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to add." - } - } + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "allow_manual_label_change": { - "name": "allow_manual_label_change", - "type": "boolean", - "mode": "[RW]", - "doc": "If the label for this item can be manually changed. When false the label can only be changed through the AP \n_Can only be used if this is ItemWithLabel_" + "mining_particle_frame_speed": { + "name": "mining_particle_frame_speed", + "type": "float", + "mode": "[R]" }, - "ammo": { - "name": "ammo", + "movement_modifier": { + "name": "movement_modifier", + "type": "float", + "mode": "[R]" + }, + "movement_modifier_when_on_ground": { + "name": "movement_modifier_when_on_ground", + "type": "float", + "mode": "[R]" + }, + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string of this prototype." + }, + "regular_trigger_effect": { + "name": "regular_trigger_effect", + "type": "TriggerEffectItem", + "mode": "[R]" + }, + "regular_trigger_effect_frequency": { + "name": "regular_trigger_effect_frequency", "type": "uint", - "mode": "[RW]", - "doc": "Number of bullets left in the magazin \n_Can only be used if this is AmmoItem_" + "mode": "[R]" }, - "blueprint_icons": { - "name": "blueprint_icons", - "mode": "[RW]", - "doc": "Icons of a blueprint item. Every entry of this array has the following fields: \nsignal :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID): Slot icon to use. The slot will have the icon of the specified signal. This allo \nthe use of any item icon, as well as virtual signal icons. \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the icon in the blueprint icons slots. Has to be in {1, 2, 3, 4}. \n_Can only be used if this is BlueprintItem_", - "type": "array of Icon" + "render_layer": { + "name": "render_layer", + "type": "RenderLayer", + "mode": "[R]" }, - "build_blueprint": { - "name": "build_blueprint", - "type": "function", - "doc": "Build this blueprin \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to build on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the building \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to build at \nforce_build :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, anything that can be built is else nothing is built if any one thing can't be built \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction to use when building \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any. \n\n**Return value** \nArray of created ghosts", - "returns": "array of LuaEntity", - "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to build on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the building \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to build at \nforce_build :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, anything that can be built is else nothing is built if any one thing can't be built \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction to use when building \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any." - } - } + "render_layer_when_on_ground": { + "name": "render_layer_when_on_ground", + "type": "RenderLayer", + "mode": "[R]" }, - "can_set_stack": { - "name": "can_set_stack", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaPermissionGroup": { + "name": "LuaPermissionGroup", + "type": "LuaPermissionGroup", + "inherits": [], + "properties": { + "add_player": { + "name": "add_player", "type": "function", - "doc": "Would a call to [LuaItemStack::set_stack](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack) succeed? \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional): Stack that would be set, possibly ````\nnil````\n.", + "doc": "Adds the given player to this grou \n\n**Parameters** \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) \n\n**Return value** \nIf the player was added.", "returns": "boolean", "args": { - "stack": { - "name": "stack", - "type": "ItemStackSpecification", - "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional): Stack that would be set, possibly ````\nnil````\n." + "player": { + "name": "player", + "type": "PlayerSpecification", + "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification)" } } }, - "cancel_deconstruct_area": { - "name": "cancel_deconstruct_area", - "doc": "Cancel deconstruct the given area with this deconstruction ite \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to cancel deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for canceling deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any.", + "allows_action": { + "name": "allows_action", "type": "function", + "doc": "If this group allows the given actio \n\n**Parameters** \naction: The defines.input_action value.", + "returns": "boolean", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to cancel deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for canceling deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any." + "action": { + "name": "action", + "doc": "action: The defines.input_action value.", + "type": "action" } } }, - "clear": { - "name": "clear", - "doc": "Clear this item stack.", - "type": "function" + "destroy": { + "name": "destroy", + "type": "function", + "doc": "Destroys this grou \n\n**Return value** \nIf the group was destroyed.", + "returns": "boolean" }, - "clear_blueprint": { - "name": "clear_blueprint", - "doc": "Clears this blueprint ite \n_Can only be used if this is BlueprintItem_", - "type": "function" + "group_id": { + "name": "group_id", + "type": "uint", + "mode": "[R]", + "doc": "The group" }, - "clear_deconstruction_item": { - "name": "clear_deconstruction_item", - "doc": "Clears all settings/filters on this deconstruction item resetting it to default value \n_Can only be used if this is DeconstructionItem_", - "type": "function" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "clear_upgrade_item": { - "name": "clear_upgrade_item", - "doc": "Clears all settings/filters on this upgrade item resetting it to default value \n_Can only be used if this is UpgradeItem_", - "type": "function" + "name": { + "name": "name", + "type": "string", + "mode": "[RW]", + "doc": "The name of this grou \n\n**Note: ** Setting to ````\nnil````\nor an empty string sets the name to the default value." }, - "cost_to_build": { - "name": "cost_to_build", - "type": "dictionary string → uint", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype na \nto the required count. \n_Can only be used if this is BlueprintItem_" + "doc": "The class name of this object." }, - "count": { - "name": "count", - "type": "uint", - "mode": "[RW]", - "doc": "Number of items in this stack." + "players": { + "name": "players", + "type": "array of LuaPlayer", + "mode": "[R]", + "doc": "The players in this grou" }, - "create_blueprint": { - "name": "create_blueprint", - "doc": "Sets up this blueprint using the found blueprintable entities/tiles on the surface. \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to create from \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the creation \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The bounding box \nalways_include_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.", + "remove_player": { + "name": "remove_player", "type": "function", + "doc": "Removes the given player from this grou \n\n**Parameters** \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) \n\n**Return value** \nIf the player was removed.", + "returns": "boolean", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to create from \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the creation \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The bounding box \nalways_include_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area." + "player": { + "name": "player", + "type": "PlayerSpecification", + "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification)" } } }, - "custom_description": { - "name": "custom_description", - "type": "LocalisedString", - "mode": "[RW]", - "doc": "The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty valu" - }, - "deconstruct_area": { - "name": "deconstruct_area", - "doc": "Deconstruct the given area with this deconstruction ite \n\n**Parameters** \nTable with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any.", + "set_allows_action": { + "name": "set_allows_action", "type": "function", + "doc": "Sets if the player is allowed to perform the given actio \n\n**Parameters** \naction: The defines.input_action value. \n\n**Return value** \nIf the value was applied.", + "returns": "boolean", "args": { - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "Table with the following fields: \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification): Surface to deconstruct on \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force to use for the deconstruction \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to deconstruct \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nby_player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to use if any." + "action": { + "name": "action", + "doc": "action: The defines.input_action value.", + "type": "action" + }, + "undefined": { + "doc": "" } } }, - "default_icons": { - "name": "default_icons", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "The default icons for a blueprint item. Every entry of this array has the following fields : \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the item whose icon to use \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Index of the icon in the blueprint icons slots. Has to be in {1, 2, 3, 4}. \n_Can only be used if this is BlueprintItem_", - "type": "array of Icon" - }, - "drain_ammo": { - "name": "drain_ammo", - "doc": "Remove ammo from this ammo item. \n\n**Parameters** \namount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Amount of ammo to remove. \n_Can only be used if this is AmmoItem_", + "doc": "Is this object valid?" + } + }, + "doc": "Adds the given player to this group." + }, + "LuaPermissionGroups": { + "name": "LuaPermissionGroups", + "type": "LuaPermissionGroups", + "inherits": [], + "properties": { + "create_group": { + "name": "create_group", "type": "function", + "doc": "Creates a new permission grou \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \n\n**Note: ** May return nil if the calling player doesn't have permission to make groups.", + "returns": "LuaPermissionGroup", "args": { - "amount": { - "name": "amount", - "type": "uint", - "doc": "amount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Amount of ammo to remove." + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)" } } }, - "drain_durability": { - "name": "drain_durability", - "doc": "Remove durability from this tool item. \n\n**Parameters** \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to remove. \n_Can only be used if this is ToolItem_", + "get_group": { + "name": "get_group", "type": "function", + "doc": "Gets the permission group with the given name or group ID or ````\nnil````\nif there is no matching grou \n\n**Parameters** \ngroup :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "returns": "LuaPermissionGroup", "args": { - "amount": { - "name": "amount", - "type": "double", - "doc": "amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Amount of durability to remove." + "group": { + "name": "group", + "type": "string or uint", + "doc": "group :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "durability": { - "name": "durability", - "type": "double", - "mode": "[RW]", - "doc": "Durability of the contained item. Automatically capped at the item's maximum durabilit \n\n**Note: ** When used on a non-tool item, the value of this attribute is ````\nnil````\n." + "groups": { + "name": "groups", + "type": "array of LuaPermissionGroup", + "mode": "[R]", + "doc": "All of the permission group" }, - "entity_filter_count": { - "name": "entity_filter_count", - "type": "uint", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The number of entity filters this deconstruction item support \n_Can only be used if this is DeconstructionItem_" + "doc": "The class name of this object." }, - "entity_filter_mode": { - "name": "entity_filter_mode", - "type": "defines.deconstruction_item.entity_filter_mode", - "mode": "[RW]", - "doc": "The blacklist/whitelist entity filter mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Creates a new permission group." + }, + "LuaPlayer": { + "name": "LuaPlayer", + "type": "LuaPlayer", + "inherits": [ + "Inherited from LuaControl: get_inventory, get_main_inventory, can_insert, insert, set_gui_arrow, clear_gui_arrow, get_item_count, has_items_inside, can_reach_entity, clear_items_inside, remove_item, teleport, update_selected_entity, clear_selected_entity, disable_flashlight, enable_flashlight, is_flashlight_enabled, get_craftable_count, begin_crafting, cancel_crafting, mine_entity, mine_tile, is_player, open_technology_gui, set_personal_logistic_slot, set_vehicle_logistic_slot, get_personal_logistic_slot, get_vehicle_logistic_slot, clear_personal_logistic_slot, clear_vehicle_logistic_slot, is_cursor_blueprint, get_blueprint_entities, surface, position, vehicle, force, selected, opened, crafting_queue_size, crafting_queue_progress, walking_state, riding_state, mining_state, shooting_state, picking_state, repair_state, cursor_stack, cursor_ghost, driving, crafting_queue, following_robots, cheat_mode, character_crafting_speed_modifier, character_mining_speed_modifier, character_additional_mining_categories, character_running_speed_modifier, character_build_distance_bonus, character_item_drop_distance_bonus, character_reach_distance_bonus, character_resource_reach_distance_bonus, character_item_pickup_distance_bonus, character_loot_pickup_distance_bonus, character_inventory_slots_bonus, character_trash_slot_count_bonus, character_maximum_following_robot_count_bonus, character_health_bonus, character_personal_logistic_requests_enabled, vehicle_logistic_requests_enabled, opened_gui_type, build_distance, drop_item_distance, reach_distance, item_pickup_distance, loot_pickup_distance, resource_reach_distance, in_combat, character_running_speed, character_mining_progress" + ], + "properties": { + "activate_paste": { + "name": "activate_paste", + "doc": "Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.", + "type": "function" }, - "entity_filters": { - "name": "entity_filters", - "type": "array of string", - "mode": "[RW]", - "doc": "The entity filters for this deconstruction ite" + "add_alert": { + "name": "add_alert", + "doc": "Adds an alert to this player for the given entity of the given alert typ \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", + "type": "function", + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "type": { + "name": "type", + "type": "defines.alert_type", + "doc": "type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" + } + } }, - "export_stack": { - "name": "export_stack", + "add_custom_alert": { + "name": "add_custom_alert", + "doc": "Adds a custom alert to this playe \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): If the alert is clicked, the map will open at the position of this entity. \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nshow_on_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", "type": "function", - "doc": "Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string \n\n**Return value** \nThe exported string", - "returns": "string" + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): If the alert is clicked, the map will open at the position of this entity." + }, + "icon": { + "name": "icon", + "type": "SignalID", + "doc": "icon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID)" + }, + "message": { + "name": "message", + "type": "LocalisedString", + "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + }, + "show_on_map": { + "name": "show_on_map", + "type": "boolean", + "doc": "show_on_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + } + } }, - "extends_inventory": { - "name": "extends_inventory", + "add_recipe_notification": { + "name": "add_recipe_notification", + "doc": "Adds the given recipe to the list of recipe notifications for this player. \n\n**Parameters** \nstring: Name of the prototype to add", + "args": { + "string": { + "name": "string", + "doc": "string: Name of the prototype to add", + "type": "string" + } + }, + "type": "function" + }, + "add_to_clipboard": { + "name": "add_to_clipboard", + "doc": "Adds the given blueprint to the player's clipboard queue. \n\n**Parameters** \nLuaItemStack: Blueprint to add", + "args": { + "LuaItemStack": { + "name": "LuaItemStack", + "doc": "LuaItemStack: Blueprint to add", + "type": "LuaItemStack" + } + }, + "type": "function" + }, + "admin": { + "name": "admin", "type": "boolean", "mode": "[RW]", - "doc": "If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). Only callable on items with inventorie \n_Can only be used if this is ItemWithInventory_" - }, - "get_blueprint_entities": { - "name": "get_blueprint_entities", - "doc": "Entities in this blueprint. \n\n**Return value** \nThe fields of an entity table depend on the type of the entity. Eve \nentity has at least the following fields: \nentity_number :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Entity's unique identifier in this blueprint \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): The direction the entity is facing. Only present for entiti \nthat can face in different directions. \nother: Entity-specific fields... \n_Can only be used if this is BlueprintItem_", - "type": "function", - "returns": "array of blueprint entity" + "doc": "````\ntrue````\nif the player is an admi \n\n**Note: ** Trying to change player admin status from the console when you aren't an admin does nothing." }, - "get_blueprint_tiles": { - "name": "get_blueprint_tiles", - "doc": "Tiles in this bluepri \n\n**Return value** \nA blueprint tile is a table: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the tile. \n_Can only be used if this is BlueprintItem_", - "type": "function", - "returns": "array of blueprint tile" + "afk_time": { + "name": "afk_time", + "type": "uint", + "mode": "[R]", + "doc": "How many ticks since the last action of this play" }, - "get_entity_filter": { - "name": "get_entity_filter", + "associate_character": { + "name": "associate_character", + "doc": "Associates a character with this playe \n\n**Parameters** \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity. \n\n**Note: ** The character must not be connected to any controller. \n\n**Note: ** If this player is currently disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) the character will be immediately \"logged off\". \n\n**Note: ** See [LuaPlayer::get_associated_characters](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.", "type": "function", - "doc": "Gets the entity filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n_Can only be used if this is DeconstructionItem_", - "returns": "string", "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "character": { + "name": "character", + "type": "LuaEntity", + "doc": "character :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity." } } }, - "get_inventory": { - "name": "get_inventory", + "auto_sort_main_inventory": { + "name": "auto_sort_main_inventory", + "type": "boolean", + "mode": "[R]", + "doc": "If the main inventory will be auto sorte" + }, + "begin_crafting": { + "name": "begin_crafting", "type": "function", - "doc": "Access the inner inventory of an item. \n\n**Parameters** \ninventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nIndex of the inventory to access -- currently can only be [defines.inventory.item_main](http://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main). \n\n**Return value** \nor ````\nnil````\nif there is no inventory with the given index.", - "returns": "LuaInventory", + "doc": "Begins crafting the given count of the given recip \n\n**Parameters** \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to craft. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe to craft. \nsilent :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false and the recipe can't be crafted the requested number of times printing the failure is skipped. \n\n**Return value** \nThe count that was actually started crafting.", + "returns": "uint", "args": { - "inventory": { - "name": "inventory", - "type": "defines.inventory", - "doc": "inventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nIndex of the inventory to access -- currently can only be [defines.inventory.item_main](http://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main)." + "count": { + "name": "count", + "type": "uint", + "doc": "count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to craft. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe to craft. \nsilent :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false and the recipe can't be crafted the requested number of times printing the failure is skipped." } } }, - "get_mapper": { - "name": "get_mapper", + "blueprint_to_setup": { + "name": "blueprint_to_setup", + "type": "LuaItemStack", + "mode": "[R]", + "doc": "The item stack containing a blueprint to be setu" + }, + "build_distance": { + "name": "build_distance", + "type": "uint", + "mode": "[R]", + "doc": "The build distance of this character or max uint when not a character or player connected to a characte" + }, + "build_from_cursor": { + "name": "build_from_cursor", + "doc": "Builds what ever is in the cursor on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \n\n**Note: ** Anything built will fire normal player-built events. \n\n**Note: ** The cursor stack will automatically be reduced as if the player built normally.", "type": "function", - "doc": "Gets the filter at the given index for this upgrade ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to read. \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): 'from' or 'to'. \n_Can only be used if this is UpgradeItem_", - "returns": "UpgradeFilter", "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to read." - }, - "type": { - "name": "type", - "type": "string", - "doc": "type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): 'from' or 'to'." + "position": { + "name": "position", + "type": "Position", + "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped." } } }, - "get_tag": { - "name": "get_tag", + "can_build_from_cursor": { + "name": "can_build_from_cursor", "type": "function", - "doc": "Gets the tag with the given name or returns ````\nnil````\nif it doesn't exis \n\n**Parameters** \ntag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is ItemWithTags_", - "returns": "Any", + "doc": "Checks if this player can build what ever is in the cursor on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped.", + "returns": "boolean", "args": { - "tag_name": { - "name": "tag_name", - "type": "string", - "doc": "tag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + "position": { + "name": "position", + "type": "Position", + "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped." } } }, - "get_tile_filter": { - "name": "get_tile_filter", + "can_insert": { + "name": "can_insert", "type": "function", - "doc": "Gets the tile filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n_Can only be used if this is DeconstructionItem_", - "returns": "string", + "doc": "Can at least some items be inserted? \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted. \n\n**Return value** \n````\ntrue````\nif at least a part of the given items could be inserted into this inventory.", + "returns": "boolean", "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted." } } }, - "grid": { - "name": "grid", - "type": "LuaEquipmentGrid", - "mode": "[R]", - "doc": "The equipment grid of this item or ````\nnil````\nif this item doesn't have a grid." - }, - "health": { - "name": "health", - "type": "float", - "mode": "[RW]", - "doc": "How much health the item has, as a number in range [0, 1]." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "import_stack": { - "name": "import_stack", + "can_place_entity": { + "name": "can_place_entity", "type": "function", - "doc": "Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string \n\n**Parameters** \ndata :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to import \n\n**Return value** \n0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.", - "returns": "int", + "doc": "Checks if this player can build the give entity at the given location on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed", + "returns": "boolean", "args": { - "data": { - "name": "data", + "name": { + "name": "name", "type": "string", - "doc": "data :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The string to import" + "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed" } } }, - "is_armor": { - "name": "is_armor", - "type": "boolean", - "mode": "[R]", - "doc": "If this is an armor ite" - }, - "is_blueprint": { - "name": "is_blueprint", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a blueprint ite" - }, - "is_blueprint_book": { - "name": "is_blueprint_book", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a blueprint book ite" + "can_reach_entity": { + "name": "can_reach_entity", + "type": "function", + "doc": "Can a given entity be opened or accessed? \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", + "returns": "boolean", + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + } + } }, - "is_blueprint_setup": { - "name": "is_blueprint_setup", + "cancel_crafting": { + "name": "cancel_crafting", + "doc": "Cancels crafting the given count of the given crafting queue index \n\n**Parameters** \noptions: : \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to cancel crafting.", "type": "function", - "doc": "Is this blueprint item setup? I.e. is it a non-empty blueprint?", - "returns": "boolean" + "args": { + "options": { + "name": "options", + "type": "uint", + "doc": "options: : \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to cancel crafting." + } + } }, - "is_deconstruction_item": { - "name": "is_deconstruction_item", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a deconstruction tool ite" + "character": { + "name": "character", + "type": "LuaEntity", + "mode": "[RW]", + "doc": "The character attached to this player, or ````\nnil````\nif no character. \n\n**Note: ** Will also return ````\nnil````\nwhen the player is disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected))." }, - "is_item_with_entity_data": { - "name": "is_item_with_entity_data", - "type": "boolean", - "mode": "[R]", - "doc": "If this is an item with entity data ite" + "character_additional_mining_categories": { + "name": "character_additional_mining_categories", + "type": "array of string", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_item_with_inventory": { - "name": "is_item_with_inventory", - "type": "boolean", - "mode": "[R]", - "doc": "If this is an item with inventory ite" + "character_build_distance_bonus": { + "name": "character_build_distance_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_item_with_label": { - "name": "is_item_with_label", - "type": "boolean", - "mode": "[R]", - "doc": "If this is an item with label ite" + "character_crafting_speed_modifier": { + "name": "character_crafting_speed_modifier", + "type": "double", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_item_with_tags": { - "name": "is_item_with_tags", - "type": "boolean", - "mode": "[R]", - "doc": "If this is an item with tags ite" + "character_health_bonus": { + "name": "character_health_bonus", + "type": "float", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_mining_tool": { - "name": "is_mining_tool", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a mining tool ite" + "character_inventory_slots_bonus": { + "name": "character_inventory_slots_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_module": { - "name": "is_module", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a module ite" + "character_item_drop_distance_bonus": { + "name": "character_item_drop_distance_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_repair_tool": { - "name": "is_repair_tool", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a repair tool ite" + "character_item_pickup_distance_bonus": { + "name": "character_item_pickup_distance_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_selection_tool": { - "name": "is_selection_tool", - "type": "boolean", - "mode": "[R]", - "doc": "If this is a selection tool ite" + "character_loot_pickup_distance_bonus": { + "name": "character_loot_pickup_distance_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "is_tool": { - "name": "is_tool", - "type": "boolean", + "character_maximum_following_robot_count_bonus": { + "name": "character_maximum_following_robot_count_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + }, + "character_mining_progress": { + "name": "character_mining_progress", + "type": "double", "mode": "[R]", - "doc": "If this is a tool ite" + "doc": "Gets the current mining progress between 0 and 1 of this character, or 0 if they aren't minin" }, - "is_upgrade_item": { - "name": "is_upgrade_item", + "character_mining_speed_modifier": { + "name": "character_mining_speed_modifier", + "type": "double", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + }, + "character_personal_logistic_requests_enabled": { + "name": "character_personal_logistic_requests_enabled", "type": "boolean", - "mode": "[R]", - "doc": "If this is a upgrade ite" + "mode": "[RW]", + "doc": "If personal logistic requests are enabled for this character or players character." }, - "item_number": { - "name": "item_number", + "character_reach_distance_bonus": { + "name": "character_reach_distance_bonus", "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + }, + "character_resource_reach_distance_bonus": { + "name": "character_resource_reach_distance_bonus", + "type": "uint", + "mode": "[RW]", + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + }, + "character_running_speed": { + "name": "character_running_speed", + "type": "double", "mode": "[R]", - "doc": "The unique ID for this item if it has a unique ID or ````\nnil```` \nThe following item types have unique ID \n````\n\"armor\"```` \n````\n\"blueprint\"```` \n````\n\"blueprint-book\"```` \n````\n\"deconstruction-item\"```` \n````\n\"item-with-entity-data\"```` \n````\n\"item-with-inventory\"```` \n````\n\"selection-tool\"```` \n````\n\"item-with-tags\"````" + "doc": "Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shootin" }, - "label": { - "name": "label", - "type": "string", + "character_running_speed_modifier": { + "name": "character_running_speed_modifier", + "type": "double", "mode": "[RW]", - "doc": "The current label for this item. Nil when non \n_Can only be used if this is ItemWithLabel_" + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "label_color": { - "name": "label_color", - "type": "Color", + "character_trash_slot_count_bonus": { + "name": "character_trash_slot_count_bonus", + "type": "uint", "mode": "[RW]", - "doc": "The current label color for this item. Nil when non \n_Can only be used if this is ItemWithLabel_" + "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Prototype name of the item held in this stack." + "chat_color": { + "name": "chat_color", + "type": "Color", + "mode": "[RW]", + "doc": "The color used when this player talks in game." }, - "prioritize_insertion_mode": { - "name": "prioritize_insertion_mode", - "type": "string", + "cheat_mode": { + "name": "cheat_mode", + "type": "boolean", "mode": "[RW]", - "doc": "The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. Only callable on items with inventorie \n_Can only be used if this is ItemWithInventory_" + "doc": "When ````\ntrue````\nhand crafting is free and instant" }, - "prototype": { - "name": "prototype", - "type": "LuaItemPrototype", - "mode": "[R]", - "doc": "Prototype of the item held in this stack." + "clear_console": { + "name": "clear_console", + "doc": "Clear the chat console.", + "type": "function" }, - "remove_tag": { - "name": "remove_tag", + "clear_cursor": { + "name": "clear_cursor", "type": "function", - "doc": "Removes a tag with the given nam \n\n**Parameters** \ntag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n\n**Return value** \nIf the tag existed and was removed. \n_Can only be used if this is ItemWithTags_", - "returns": "boolean", - "args": { - "tag": { - "name": "tag", - "type": "string", - "doc": "tag :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" - } - } + "doc": "Invokes the \"clear cursor\" action on the player as if the user pressed i \n\n**Return value** \nIf the cursor is now empty.", + "returns": "boolean" }, - "set_blueprint_entities": { - "name": "set_blueprint_entities", - "doc": "Set new entities to be a part of this blueprint \n\n**Parameters** \nentities :: array of blueprint entity: New blueprint entities. The format is the same as \n[LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities). \n_Can only be used if this is BlueprintItem_", + "clear_gui_arrow": { + "name": "clear_gui_arrow", + "doc": "Removes the arrow created by ````\nset_gui_arrow````\n.", + "type": "function" + }, + "clear_items_inside": { + "name": "clear_items_inside", + "doc": "Remove all items from this entity.", + "type": "function" + }, + "clear_personal_logistic_slot": { + "name": "clear_personal_logistic_slot", "type": "function", "args": { - "entities": { - "name": "entities", - "type": "array of blueprint entity", - "doc": "entities :: array of blueprint entity: New blueprint entities. The format is the same as \n[LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities)." + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." } - } + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if personal logistics are not researched." }, - "set_blueprint_tiles": { - "name": "set_blueprint_tiles", - "doc": "Set tiles in this bluepri \n\n**Parameters** \ntiles :: array of blueprint tile: Tiles to be a part of the blueprint; the format is the same as \nreturned from the corresponding get function; see [LuaItemStack::get_blueprint_tiles](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_tiles). \n_Can only be used if this is BlueprintItem_", + "clear_recipe_notifications": { + "name": "clear_recipe_notifications", + "doc": "Clears all the recipe notifications for this player", + "type": "function" + }, + "clear_selected_entity": { + "name": "clear_selected_entity", + "doc": "Unselect any selected entity.", + "type": "function" + }, + "clear_vehicle_logistic_slot": { + "name": "clear_vehicle_logistic_slot", "type": "function", "args": { - "tiles": { - "name": "tiles", - "type": "array of blueprint tile", - "doc": "tiles :: array of blueprint tile: Tiles to be a part of the blueprint; the format is the same as \nreturned from the corresponding get function; see [LuaItemStack::get_blueprint_tiles](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_tiles)." + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear." } - } + }, + "doc": "**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to clear. \n\n**Note: ** This will silently fail if the vehicle does not use logistics." }, - "set_entity_filter": { - "name": "set_entity_filter", + "close_map": { + "name": "close_map", + "doc": "Queues request to switch to the normal game view from the map or zoom to world vie \nRender mode change requests are processed before rendering of the next frame.", + "type": "function" + }, + "color": { + "name": "color", + "type": "Color", + "mode": "[RW]", + "doc": "The color associated with the player. This will be used to tint the player's character as well as the \nbuildings and vehicles." + }, + "connect_to_server": { + "name": "connect_to_server", + "doc": "Asks the player if they would like to connect to the given serve \n\n**Parameters** \nTable with the following fields: \naddress :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The server (address:port) if port is not given the default Factorio port is used. \nname :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The name of the server. \ndescription :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional) \npassword :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The password if different from the one used to join this gam \nNote, if the current password is not empty but the one required to join the new server \nan empty string should be given for this field. \n\n**Note: ** This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.", "type": "function", - "doc": "Sets the entity filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Setting to nil erases the filter. \n\n**Return value** \nIf the new filter was set (was valid.) \n_Can only be used if this is DeconstructionItem_", - "returns": "boolean", "args": { - "filter": { - "name": "filter", - "type": "string or LuaEntityPrototype or LuaEntity", - "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Setting to nil erases the filter." - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "address": { + "name": "address", + "type": "string", + "doc": "Table with the following fields: \naddress :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The server (address:port) if port is not given the default Factorio port is used. \nname :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The name of the server. \ndescription :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional) \npassword :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The password if different from the one used to join this gam \nNote, if the current password is not empty but the one required to join the new server \nan empty string should be given for this field." } } }, - "set_mapper": { - "name": "set_mapper", - "doc": "Sets the module filter at the given index for this upgrade ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to set. \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): ````\nfrom````\nor ````\nto````\n. \nfilter :: [UpgradeFilter](http://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter): The filter to set or ````\nnil```` \n_Can only be used if this is UpgradeItem_", + "connected": { + "name": "connected", + "type": "boolean", + "mode": "[R]", + "doc": "````\ntrue````\nif the player is currently connected to the game." + }, + "controller_type": { + "name": "controller_type", + "type": "defines.controllers", + "mode": "[R]" + }, + "crafting_queue": { + "name": "crafting_queue", + "mode": "[R]", + "doc": "Gets the current crafting queue items. Each CraftingQueueItem is a table: \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The recipe. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count being crafted.", + "type": "array of CraftingQueueItem" + }, + "crafting_queue_progress": { + "name": "crafting_queue_progress", + "type": "double", + "mode": "[R]", + "doc": "The crafting queue progress [0- \n0 when no recipe is being crafte" + }, + "crafting_queue_size": { + "name": "crafting_queue_size", + "type": "uint", + "mode": "[R]", + "doc": "Size of the crafting queue." + }, + "create_character": { + "name": "create_character", "type": "function", + "doc": "Creates and attaches a character entity to this playe \n\n**Parameters** \ncharacter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The character to create else the default is used. \n\n**Return value** \nWhether the character was created. \n\n**Note: ** The player must not have a character already connected and must be online (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).", + "returns": "boolean", "args": { - "filter": { - "name": "filter", - "type": "UpgradeFilter", - "doc": "filter :: [UpgradeFilter](http://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter): The filter to set or ````\nnil````" - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the mapper to set." - }, - "type": { - "name": "type", + "character": { + "name": "character", "type": "string", - "doc": "type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): ````\nfrom````\nor ````\nto````\n." + "doc": "character :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The character to create else the default is used." } } }, - "set_stack": { - "name": "set_stack", + "create_local_flying_text": { + "name": "create_local_flying_text", + "doc": "Spawn a flying text that is only visible to this playe \n\n**Parameters** \nTable with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ncreate_at_cursor :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Movement per second \n\n**Note: ** Local flying text is not saved, this means it will disappear after save/load. \n\n**Note: ** position or create_at_cursor is required. \n\n**Note: ** when create_at_cursor is true all values except 'text' are ignored.", "type": "function", - "doc": "Set this item stack to another item stack. \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional) \nItem stack to set this one to. Omitting this parameter or passing ````\nnil````\nwill clear this item stack, \nif by calling [LuaItemStack::clear](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear). \n\n**Return value** \nWas the stack set successfully?", - "returns": "boolean", "args": { - "stack": { - "name": "stack", - "type": "ItemStackSpecification", - "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) (optional) \nItem stack to set this one to. Omitting this parameter or passing ````\nnil````\nwill clear this item stack, \nif by calling [LuaItemStack::clear](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear)." + "text": { + "name": "text", + "type": "LocalisedString", + "doc": "Table with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ncreate_at_cursor :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Movement per second" } } }, - "set_tag": { - "name": "set_tag", + "cursor_ghost": { + "name": "cursor_ghost", + "type": "ItemPrototypeSpecification", + "mode": "[RW]", + "doc": "The ghost prototype in the player's curso \n\n**Note: ** When read, it will be a [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html). \n\n**Note: ** Items in the cursor stack will take priority over the cursor ghost." + }, + "cursor_stack": { + "name": "cursor_stack", + "type": "LuaItemStack", + "mode": "[R]", + "doc": "The player's cursor stack, or ````\nnil````\nif the player controller is a spectator. Even though this property is marked as read-only, it returns a [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html), meaning it can be manipulated like so: \n\n**Example** \n````\nplayer.cursor_stack.clear()````" + }, + "cutscene_character": { + "name": "cutscene_character", + "type": "LuaEntity", + "mode": "[R]", + "doc": "When in a cutscene; the character this player would be using once the cutscene is ove \n\n**Note: ** Will also return ````\nnil````\nwhen the player is disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected))." + }, + "disable_alert": { + "name": "disable_alert", "type": "function", - "doc": "Sets the tag with the given name and valu \n\n**Parameters** \ntag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \ntag :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any) \n_Can only be used if this is ItemWithTags_", - "returns": "Any", + "doc": "Disables alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was disabled (false if it was already disabled).", + "returns": "boolean", "args": { - "tag": { - "name": "tag", - "type": "Any", - "doc": "tag :: [Any](http://lua-api.factorio.com/latest/Concepts.html#Any)" - }, - "tag_name": { - "name": "tag_name", - "type": "string", - "doc": "tag_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" } } }, - "set_tile_filter": { - "name": "set_tile_filter", + "disable_flashlight": { + "name": "disable_flashlight", + "doc": "Disable the flashlight.", + "type": "function" + }, + "disable_recipe_groups": { + "name": "disable_recipe_groups", + "doc": "Disable recipe groups.", + "type": "function" + }, + "disable_recipe_subgroups": { + "name": "disable_recipe_subgroups", + "doc": "Disable recipe subgroups.", + "type": "function" + }, + "disassociate_character": { + "name": "disassociate_character", + "doc": "Disassociates a character from this playe \nThis is functionally the same as setting [LuaEntity::associated_player](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player) to ````\nnil```` \n\n**Parameters** \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity \n\n**Note: ** See [LuaPlayer::get_associated_characters](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.", "type": "function", - "doc": "Sets the tile filter at the given index for this deconstruction ite \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html) or [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): Setting to nil erases the filter. \n\n**Return value** \nIf the new filter was set (was valid.) \n_Can only be used if this is DeconstructionItem_", - "returns": "boolean", "args": { - "filter": { - "name": "filter", - "type": "string or LuaTilePrototype or LuaTile", - "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html) or [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): Setting to nil erases the filter." - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "character": { + "name": "character", + "type": "LuaEntity", + "doc": "character :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity" } } }, - "swap_stack": { - "name": "swap_stack", + "display_resolution": { + "name": "display_resolution", + "type": "DisplayResolution", + "mode": "[R]", + "doc": "The display resolution for this playe" + }, + "display_scale": { + "name": "display_scale", + "type": "double", + "mode": "[R]", + "doc": "The display scale for this playe" + }, + "drag_wire": { + "name": "drag_wire", "type": "function", - "doc": "Swaps this item stack with the given item stack if allowed. \n\n**Parameters** \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) \n\n**Return value** \nif the 2 stacks were swapped successfully.", + "doc": "Start/end wire dragging at the specified location, wire type is based on the cursor conten \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position at which cursor was clicked. Used only to decide which si \nof arithmetic combinator, decider combinator or power switch is to be connected. Entity itse \nto be connected is based on the player's selected entity. \n\n**Return value** \n````\ntrue````\nif the action did something", "returns": "boolean", "args": { - "stack": { - "name": "stack", - "type": "LuaItemStack", - "doc": "stack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html)" + "position": { + "name": "position", + "type": "Position", + "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position at which cursor was clicked. Used only to decide which si \nof arithmetic combinator, decider combinator or power switch is to be connected. Entity itse \nto be connected is based on the player's selected entity." } } }, - "tags": { - "name": "tags", - "type": "dictionary string → Any", + "driving": { + "name": "driving", + "type": "boolean", "mode": "[RW]", - "doc": "_Can only be used if this is ItemWithTags_" + "doc": "````\ntrue````\nif the player is in a vehicle. Writing to this attribute puts the player in or out of \nvehicle." }, - "tile_filter_count": { - "name": "tile_filter_count", + "drop_item_distance": { + "name": "drop_item_distance", "type": "uint", "mode": "[R]", - "doc": "The number of tile filters this deconstruction item support \n_Can only be used if this is DeconstructionItem_" - }, - "tile_filter_mode": { - "name": "tile_filter_mode", - "type": "defines.deconstruction_item.tile_filter_mode", - "mode": "[RW]", - "doc": "The blacklist/whitelist tile filter mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" - }, - "tile_filters": { - "name": "tile_filters", - "type": "array of string", - "mode": "[RW]", - "doc": "The tile filters for this deconstruction ite" - }, - "tile_selection_mode": { - "name": "tile_selection_mode", - "type": "defines.deconstruction_item.tile_selection_mode", - "mode": "[RW]", - "doc": "The tile selection mode for this deconstruction ite \n_Can only be used if this is DeconstructionItem_" + "doc": "The item drop distance of this character or max uint when not a character or player connected to a characte" }, - "transfer_stack": { - "name": "transfer_stack", + "enable_alert": { + "name": "enable_alert", "type": "function", - "doc": "Transfers the given item stack into this item stack. \n\n**Parameters** \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification) \n\n**Return value** \nTrue if the full stack was transferred.", + "doc": "Enables alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was enabled (false if it was already enabled).", "returns": "boolean", "args": { - "stack": { - "name": "stack", - "type": "ItemStackSpecification", - "doc": "stack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification)" + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" } } }, - "trees_and_rocks_only": { - "name": "trees_and_rocks_only", - "type": "boolean", - "mode": "[RW]", - "doc": "If this deconstruction item is set to allow trees and rocks onl \n_Can only be used if this is DeconstructionItem_" + "enable_flashlight": { + "name": "enable_flashlight", + "doc": "Enable the flashlight.", + "type": "function" }, - "type": { - "name": "type", - "type": "string", - "mode": "[R]", - "doc": "Type of the item prototype." + "enable_recipe_groups": { + "name": "enable_recipe_groups", + "doc": "Enable recipe groups.", + "type": "function" }, - "valid": { - "name": "valid", - "type": "boolean", + "enable_recipe_subgroups": { + "name": "enable_recipe_subgroups", + "doc": "Enable recipe subgroups.", + "type": "function" + }, + "entity_copy_source": { + "name": "entity_copy_source", + "type": "LuaEntity", "mode": "[R]", - "doc": "Is this object valid?" + "doc": "The source entity used during entity settings copy-paste if an \n````\nnil````\nif there isn't currently a source entity." }, - "valid_for_read": { - "name": "valid_for_read", - "type": "boolean", - "mode": "[R]", - "doc": "Is this valid for reading? Differs from the usual ````\nvalid````\nin that ````\nvalid````\nwill be ````\ntrue````\neven \nthe item stack is blank but the entity that holds it is still valid." - } - }, - "doc": "A reference to an item and count owned by some external entity." - }, - "LuaLampControlBehavior": { - "name": "LuaLampControlBehavior", - "type": "LuaLampControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity", - "Inherited from LuaGenericOnOffControlBehavior: disabled, circuit_condition, logistic_condition, connect_to_logistic_network" - ], - "properties": { - "circuit_condition": { - "name": "circuit_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" + "exit_cutscene": { + "name": "exit_cutscene", + "doc": "Exit the current cutscene. Errors if not in a cutscene.", + "type": "function" }, - "color": { - "name": "color", - "type": "Color", + "following_robots": { + "name": "following_robots", + "type": "array of LuaEntity", "mode": "[R]", - "doc": "The color the lamp is showing or ````\nnil````\nif not using any colo" + "doc": "The current combat robots following the charact \n\n**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character(see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." }, - "connect_to_logistic_network": { - "name": "connect_to_logistic_network", - "type": "boolean", + "force": { + "name": "force", + "type": "ForceSpecification", "mode": "[RW]", - "doc": "````\ntrue````\nif this should connect to the logistic network." - }, - "disabled": { - "name": "disabled", - "type": "boolean", - "mode": "[R]", - "doc": "If the entity is currently disabled because of the control behavior." + "doc": "The force of this entity. Reading will always give a [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html), but it is possible \nassign either [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) to this attribute to change the forc" }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "game_view_settings": { + "name": "game_view_settings", + "type": "GameViewSettings", + "mode": "[RW]", + "doc": "The player's game view settings." }, - "get_circuit_network": { - "name": "get_circuit_network", + "get_active_quick_bar_page": { + "name": "get_active_quick_bar_page", "type": "function", - "returns": "LuaCircuitNetwork", + "doc": "Gets which quick bar page is being used for the given screen page or ````\nnil````\nif not know \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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.", + "returns": "uint8", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_alerts": { + "name": "get_alerts", + "type": "function", + "doc": "Gets all alerts matching the given filters or if no filters are given all alerts are returne \nA mapping of surface index to an array of arrays of alerts indexed by the alert typ \nAn alert is a table: \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The tick this alert was created \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): The SignalID used for a custom alert. Only present for custom alerts. \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The message for a custom alert. Only present for custom alerts. \n\n**Parameters** \nTable with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", + "returns": "dictionary uint → dictionary defines.alert_type → array of alert", + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "Table with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" + } + } }, - "logistic_condition": { - "name": "logistic_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" + "get_associated_characters": { + "name": "get_associated_characters", + "type": "function", + "doc": "The characters associated with this playe \n\n**Note: ** The array will always be empty when the player is disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) regardless of there being associated characters. \n\n**Note: ** Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.", + "returns": "array of LuaEntity" }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." + "get_blueprint_entities": { + "name": "get_blueprint_entities", + "doc": "Returns the same type of data as [LuaItemStack::get_blueprint_entities](http://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities), but works for the currently selected blueprin \nregardless of it being in a blueprint book or picked from the blueprint library.", + "type": "function", + "returns": "array of blueprint entity" }, - "use_colors": { - "name": "use_colors", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif the lamp should set the color from the circuit network signals." + "get_craftable_count": { + "name": "get_craftable_count", + "type": "function", + "doc": "Gets the count of the given recipe that can be crafted \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe. \n\n**Return value** \nThe count that can be crafted.", + "returns": "uint", + "args": { + "recipe": { + "name": "recipe", + "type": "string or LuaRecipe", + "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe." + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for lamps." - }, - "LuaLogisticCell": { - "name": "LuaLogisticCell", - "type": "LuaLogisticCell", - "inherits": [], - "properties": { - "charge_approach_distance": { - "name": "charge_approach_distance", - "type": "float", - "mode": "[R]", - "doc": "Radius at which the robots hover when waiting to be charged." + "get_goal_description": { + "name": "get_goal_description", + "type": "function", + "doc": "Get the current goal description, as a localised string.", + "returns": "LocalisedString" }, - "charging_robot_count": { - "name": "charging_robot_count", - "type": "uint", - "mode": "[R]", - "doc": "Number of robots currently charging." + "get_infinity_inventory_filter": { + "name": "get_infinity_inventory_filter", + "type": "function", + "doc": "Gets the filter for this map editor infinity filters at the given index or ````\nnil````\nif the filter index doesn't exist or is empt \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get.", + "returns": "InfinityInventoryFilter", + "args": { + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to get." + } + } }, - "charging_robots": { - "name": "charging_robots", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "Robots currently being charged." + "get_inventory": { + "name": "get_inventory", + "type": "function", + "doc": "Get an inventory belonging to this entity. This can be either the \"main\" inventory or some auxilia \none, like the module slots or logistic trash slot \n\n**Parameters** \ninventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \n\n**Return value** \nor ````\nnil````\nif this entity doesn't have an inventory with the given index. \n\n**Note: ** A given [defines.inventory](http://lua-api.factorio.com/latest/defines.html#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](http://lua-api.factorio.com/latest/defines.html#defines.inventory) it's almost guaranteed to not be the inventory asked for.", + "returns": "LuaInventory", + "args": { + "inventory": { + "name": "inventory", + "type": "defines.inventory", + "doc": "inventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory)" + } + } }, - "construction_radius": { - "name": "construction_radius", - "type": "float", - "mode": "[R]", - "doc": "Construction radius of this cell." + "get_item_count": { + "name": "get_item_count", + "type": "function", + "doc": "Get the number of all or some items in this entity. \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items.", + "returns": "uint", + "args": { + "item": { + "name": "item", + "type": "string", + "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items." + } + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_main_inventory": { + "name": "get_main_inventory", + "type": "function", + "doc": "Gets the main inventory for this character or player if this is a character or player. \n\n**Return value** \nor ````\nnil````\nif this entity is not a character or player.", + "returns": "LuaInventory" }, - "is_in_construction_range": { - "name": "is_in_construction_range", + "get_personal_logistic_slot": { + "name": "get_personal_logistic_slot", "type": "function", - "doc": "Is a given position within the construction range of this cell? \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)", - "returns": "boolean", + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if personal logistics aren't researched yet.", + "returns": "PersonalLogisticParameters", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." } } }, - "is_in_logistic_range": { - "name": "is_in_logistic_range", + "get_quick_bar_slot": { + "name": "get_quick_bar_slot", "type": "function", - "doc": "Is a given position within the logistic range of this cell? \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)", - "returns": "boolean", + "doc": "Gets the quick bar filter for the given slot or ````\nnil```` \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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.", + "returns": "LuaItemPrototype", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." } } }, - "is_neighbour_with": { - "name": "is_neighbour_with", + "get_vehicle_logistic_slot": { + "name": "get_vehicle_logistic_slot", "type": "function", - "doc": "Are two cells neighbours? \n\n**Parameters** \nother :: [LuaLogisticCell](http://lua-api.factorio.com/latest/LuaLogisticCell.html)", - "returns": "boolean", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get. \n\n**Note: ** This will silently return an empty value (.name will be nil) if the vehicle does not use logistics.", + "returns": "PersonalLogisticParameters", "args": { - "other": { - "name": "other", - "type": "LuaLogisticCell", - "doc": "other :: [LuaLogisticCell](http://lua-api.factorio.com/latest/LuaLogisticCell.html)" + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to get." } } }, - "logistic_network": { - "name": "logistic_network", - "type": "LuaLogisticNetwork", - "mode": "[R]", - "doc": "The network that owns this cell or ````\nnil````\n." + "gui": { + "name": "gui", + "type": "LuaGui", + "mode": "[R]" }, - "logistic_radius": { - "name": "logistic_radius", - "type": "float", - "mode": "[R]", - "doc": "Logistic radius of this cell." - }, - "logistics_connection_distance": { - "name": "logistics_connection_distance", - "type": "float", - "mode": "[R]", - "doc": "Logistic connection distance of this cell." - }, - "mobile": { - "name": "mobile", - "type": "boolean", - "mode": "[R]", - "doc": "````\ntrue````\nif this is a mobile cell. In vanilla, only the logistic cell created by a character's person \nroboport is mobile." - }, - "neighbours": { - "name": "neighbours", - "type": "array of LuaLogisticCell", - "mode": "[R]", - "doc": "Neighbouring cells." - }, - "owner": { - "name": "owner", - "type": "LuaEntity", - "mode": "[R]", - "doc": "This cell's owner." - }, - "stationed_construction_robot_count": { - "name": "stationed_construction_robot_count", - "type": "uint", - "mode": "[R]", - "doc": "Number of stationed construction robots in this cell." - }, - "stationed_logistic_robot_count": { - "name": "stationed_logistic_robot_count", - "type": "uint", - "mode": "[R]", - "doc": "Number of stationed logistic robots in this cell." - }, - "to_charge_robot_count": { - "name": "to_charge_robot_count", - "type": "uint", - "mode": "[R]", - "doc": "Number of robots waiting to charge." - }, - "to_charge_robots": { - "name": "to_charge_robots", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "Robots waiting to charge." - }, - "transmitting": { - "name": "transmitting", - "type": "boolean", - "mode": "[R]", - "doc": "````\ntrue````\nif this cell is active." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Logistic cell of a particular LuaEntity. A \"Logistic Cell\" is the given name for\n settings and properties used by what would normally be seen as a \"Roboport\". A logistic\n cell however doesn't have to be attached to the roboport entity (the character has one for\n the personal roboport)." - }, - "LuaLogisticContainerControlBehavior": { - "name": "LuaLogisticContainerControlBehavior", - "type": "LuaLogisticContainerControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "circuit_mode_of_operation": { - "name": "circuit_mode_of_operation", - "type": "defines.control_behavior.logistic_container.circuit_mode_of_operation", + "hand_location": { + "name": "hand_location", + "type": "ItemStackLocation", "mode": "[RW]", - "doc": "The circuit mode of operations for the logistic container." - }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "doc": "The original location of the item in the cursor, marked with a han \nWhen writing, the specified inventory slot must be empty and the cursor stack must not be empt" }, - "get_circuit_network": { - "name": "get_circuit_network", + "has_items_inside": { + "name": "has_items_inside", "type": "function", - "returns": "LuaCircuitNetwork", - "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." - } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + "doc": "Does this entity have any item inside it?", + "returns": "boolean" }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." - }, - "valid": { - "name": "valid", + "in_combat": { + "name": "in_combat", "type": "boolean", "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for logistic chests." - }, - "LuaLogisticNetwork": { - "name": "LuaLogisticNetwork", - "type": "LuaLogisticNetwork", - "inherits": [], - "properties": { - "active_provider_points": { - "name": "active_provider_points", - "type": "array of LuaLogisticPoint", - "mode": "[R]", - "doc": "All active provider points in this network." - }, - "all_construction_robots": { - "name": "all_construction_robots", - "type": "uint", - "mode": "[R]", - "doc": "The total number of construction robots in the network (idle and active + in roboports)." - }, - "all_logistic_robots": { - "name": "all_logistic_robots", - "type": "uint", - "mode": "[R]", - "doc": "The total number of logistic robots in the network (idle and active + in roboports)." - }, - "available_construction_robots": { - "name": "available_construction_robots", - "type": "uint", - "mode": "[R]", - "doc": "Number of construction robots available for a job." + "doc": "If this character entity is in comba" }, - "available_logistic_robots": { - "name": "available_logistic_robots", + "index": { + "name": "index", "type": "uint", "mode": "[R]", - "doc": "Number of logistic robots available for a job." - }, - "cells": { - "name": "cells", - "type": "array of LuaLogisticCell", - "mode": "[R]", - "doc": "All cells in this network." + "doc": "This player's index in [LuaGameScript::players](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players)." }, - "construction_robots": { - "name": "construction_robots", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "All construction robots in this logistic networ" + "infinity_inventory_filters": { + "name": "infinity_inventory_filters", + "type": "array of InfinityInventoryFilter", + "mode": "[RW]", + "doc": "The filters for this map editor infinity inventory setting" }, - "empty_provider_points": { - "name": "empty_provider_points", - "type": "array of LuaLogisticPoint", - "mode": "[R]", - "doc": "All things that have empty provider points in this network." + "insert": { + "name": "insert", + "type": "function", + "doc": "Insert items into this entity. This works the same way as inserters or shift-clicking: the \"bes \ninventory is chosen automatically. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", + "returns": "uint", + "args": { + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." + } + } }, - "empty_providers": { - "name": "empty_providers", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "All entities that have empty logistic provider points in this network." + "is_alert_enabled": { + "name": "is_alert_enabled", + "type": "function", + "doc": "If the given alert type is currently enable \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", + "returns": "boolean", + "args": { + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" + } + } }, - "find_cell_closest_to": { - "name": "find_cell_closest_to", + "is_alert_muted": { + "name": "is_alert_muted", "type": "function", - "doc": "Find logistic cell closest to a given position. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \n\n**Return value** \nMay be ````\nnil````\nif no cell was found.", - "returns": "LuaLogisticCell", + "doc": "If the given alert type is currently mute \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", + "returns": "boolean", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" } } }, - "force": { - "name": "force", - "type": "LuaForce", - "mode": "[R]", - "doc": "The force this logistic network belongs t" + "is_cursor_blueprint": { + "name": "is_cursor_blueprint", + "type": "function", + "doc": "Returns whether the player is holding a blueprint, it takes into account a blueprint as an item as well as bluepri \nfrom the blueprint record from the blueprint librar \nNote that the is_cursor_blueprint and get_cursor_blueprint_entities refer to the currently selected blueprint, \nit returns blueprint related information also when holding a blueprint book with a blueprint being selected in it.", + "returns": "boolean" }, - "get_contents": { - "name": "get_contents", + "is_flashlight_enabled": { + "name": "is_flashlight_enabled", + "doc": "Is the flashlight enabled.", + "type": "function" + }, + "is_player": { + "name": "is_player", "type": "function", - "doc": "Get item counts for the entire networ \n\n**Return value** \nA mapping of item prototype names to the number available in the network. \nSee also \n[LuaInventory::get_contents](http://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents)", - "returns": "dictionary string → uint" + "doc": "When ````\ntrue````\ncontrol adapter is a LuaPlayer object, ````\nfalse````\nfor entities including characters with players", + "returns": "boolean" }, - "get_item_count": { - "name": "get_item_count", + "is_shortcut_available": { + "name": "is_shortcut_available", "type": "function", - "doc": "Count given or all items in the network or given members \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Item name to count. If not given, gives coun \nof all items in the network. \nmember :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Logistic members to check, must be either ````\n\"storage\"```` \nor ````\n\"providers\"````\n. If not given, gives count in the entire network.", - "returns": "int", + "doc": "Is a custom Lua shortcut currently availabl \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut.", + "returns": "boolean", "args": { - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Item name to count. If not given, gives coun \nof all items in the network." - }, - "member": { - "name": "member", + "prototype_name": { + "name": "prototype_name", "type": "string", - "doc": "member :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Logistic members to check, must be either ````\n\"storage\"```` \nor ````\n\"providers\"````\n. If not given, gives count in the entire network." + "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." } } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "insert": { - "name": "insert", + "is_shortcut_toggled": { + "name": "is_shortcut_toggled", "type": "function", - "doc": "Insert items into the logistic network. This will actually insert the items into so \nlogistic chests. \n\n**Parameters** \nitem :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to insert. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to insert the items to. Must \n````\n\"storage\"````\n, ````\n\"storage-empty\"````\n(storage chests that are completely empty \n````\n\"storage-empty-slot\"````\n(storage chests that have an empty slot), or ````\n\"requester\"````\n. If n \nspecified, inserts items into the logistic network in the usual order. \n\n**Return value** \nNumber of items actually inserted.", - "returns": "uint", + "doc": "Is a custom Lua shortcut currently toggle \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut.", + "returns": "boolean", "args": { - "item": { - "name": "item", - "type": "ItemStackSpecification", - "doc": "item :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to insert." - }, - "members": { - "name": "members", + "prototype_name": { + "name": "prototype_name", "type": "string", - "doc": "members :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to insert the items to. Must \n````\n\"storage\"````\n, ````\n\"storage-empty\"````\n(storage chests that are completely empty \n````\n\"storage-empty-slot\"````\n(storage chests that have an empty slot), or ````\n\"requester\"````\n. If n \nspecified, inserts items into the logistic network in the usual order." + "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." } } }, - "logistic_members": { - "name": "logistic_members", - "type": "array of LuaEntity", + "item_pickup_distance": { + "name": "item_pickup_distance", + "type": "double", "mode": "[R]", - "doc": "All other entities that have logistic points in this network (inserters mostly)." + "doc": "The item pickup distance of this character or max double when not a character or player connected to a characte" }, - "logistic_robots": { - "name": "logistic_robots", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "All logistic robots in this logistic networ" + "jump_to_cutscene_waypoint": { + "name": "jump_to_cutscene_waypoint", + "doc": "Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscen \n\n**Parameters** \nwaypoint_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", + "type": "function", + "args": { + "waypoint_index": { + "name": "waypoint_index", + "type": "uint", + "doc": "waypoint_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + } + } }, - "passive_provider_points": { - "name": "passive_provider_points", - "type": "array of LuaLogisticPoint", + "last_online": { + "name": "last_online", + "type": "uint", "mode": "[R]", - "doc": "All passive provider points in this network." + "doc": "At what tick this player was last onlin" }, - "provider_points": { - "name": "provider_points", - "type": "array of LuaLogisticPoint", - "mode": "[R]", - "doc": "All things that have provider points in this network." + "log_active_entity_chunk_counts": { + "name": "log_active_entity_chunk_counts", + "doc": "Logs a dictionary of chunks -> active entities for the surface this player is on.", + "type": "function" }, - "providers": { - "name": "providers", - "type": "array of LuaEntity", + "log_active_entity_counts": { + "name": "log_active_entity_counts", + "doc": "Logs a dictionary of active entities -> count for the surface this player is on.", + "type": "function" + }, + "loot_pickup_distance": { + "name": "loot_pickup_distance", + "type": "double", "mode": "[R]", - "doc": "All entities that have logistic provider points in this network." + "doc": "The loot pickup distance of this character or max double when not a character or player connected to a characte" }, - "remove_item": { - "name": "remove_item", + "map_view_settings": { + "name": "map_view_settings", + "type": "MapViewSettings", + "mode": "[W]", + "doc": "The player's map view settings. To write to this, use a table containing the fields that should be change" + }, + "mine_entity": { + "name": "mine_entity", "type": "function", - "doc": "Remove items from the logistic network. This will actually remove the items from so \nlogistic chests. \n\n**Parameters** \nitem :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to remove. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to remove from. Must \n````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\n, or ````\n\"active-provider\"````\n. If not specified, remov \nfrom the network in the usual order. \n\n**Return value** \nNumber of items removed.", - "returns": "uint", + "doc": "Mines the given entity as if this player (or character) mined i \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player. \n\n**Return value** \nIf the mining succeeded.", + "returns": "boolean", "args": { - "item": { - "name": "item", - "type": "ItemStackSpecification", - "doc": "item :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): What to remove." + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine" }, - "members": { - "name": "members", - "type": "string", - "doc": "members :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Which logistic members to remove from. Must \n````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\n, or ````\n\"active-provider\"````\n. If not specified, remov \nfrom the network in the usual order." + "force": { + "name": "force", + "type": "boolean", + "doc": "force :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player." } } }, - "requester_points": { - "name": "requester_points", - "type": "array of LuaLogisticPoint", + "mine_tile": { + "name": "mine_tile", + "type": "function", + "doc": "Mines the given tile as if this player (or character) mined i \n\n**Parameters** \ntile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine. \n\n**Return value** \nIf the mining succeeded.", + "returns": "boolean", + "args": { + "tile": { + "name": "tile", + "type": "LuaTile", + "doc": "tile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine." + } + } + }, + "minimap_enabled": { + "name": "minimap_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the minimap is visible." + }, + "mining_state": { + "name": "mining_state", + "type": "table", + "mode": "[RW]", + "doc": "Current mining stat \nIt is a table with two fields: \nmining :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the player is mining at all \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor). \n\n**Note: ** When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected) and [LuaControl::update_selected_entity](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity)." + }, + "mod_settings": { + "name": "mod_settings", + "type": "CustomDictionary string → ModSetting", "mode": "[R]", - "doc": "All things that have requester points in this network." + "doc": "**Note: ** This can become invalid if during operation this player becomes invalid." }, - "requesters": { - "name": "requesters", - "type": "array of LuaEntity", + "mute_alert": { + "name": "mute_alert", + "type": "function", + "doc": "Mutes alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was muted (false if it was already muted).", + "returns": "boolean", + "args": { + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" + } + } + }, + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "All entities that have logistic requester points in this network." + "doc": "The player's username." }, - "robot_limit": { - "name": "robot_limit", - "type": "uint", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "Maximum number of robots the network can work with. Currently only used for the person \nroboport." + "doc": "The class name of this object." }, - "robots": { - "name": "robots", - "type": "array of LuaEntity", + "online_time": { + "name": "online_time", + "type": "uint", "mode": "[R]", - "doc": "All robots in this logistic networ" + "doc": "How many ticks did this player spend playing this save (all sessions combine" }, - "select_drop_point": { - "name": "select_drop_point", + "open_map": { + "name": "open_map", + "doc": "Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position (and scale \nRender mode change requests are processed before rendering of the next fram \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)", "type": "function", - "doc": "Find a logistic point to drop the specific item stack. \n\n**Parameters** \nTable with the following fields: \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Name of the item to select. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"storage-empty\"````\n, ````\n\"storage-empty-slot\"````\nor ````\n\"requester\"````\n. If not specified, selects with normal priorities. \n\n**Return value** \nMay be ````\nnil````\nif no point was found.", - "returns": "LuaLogisticPoint", "args": { - "stack": { - "name": "stack", - "type": "ItemStackSpecification", - "doc": "Table with the following fields: \nstack :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Name of the item to select. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"storage-empty\"````\n, ````\n\"storage-empty-slot\"````\nor ````\n\"requester\"````\n. If not specified, selects with normal priorities." + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + }, + "scale": { + "name": "scale", + "type": "double", + "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)" } } }, - "select_pickup_point": { - "name": "select_pickup_point", + "open_technology_gui": { + "name": "open_technology_gui", + "doc": "Open the technology GUI and select a given technolog \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI.", "type": "function", - "doc": "Find the 'best' logistic point with this item ID and from the given position or from given chest type. \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the item to select. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): When given, it will find the storage 'best' storage point from this position. \ninclude_buffers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\nor ````\n\"active-provider\"````\n. If not specified, selects with normal priorities. Not considered if position is specified. \n\n**Return value** \nMay be ````\nnil````\nif no point was found.", - "returns": "LuaLogisticPoint", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the item to select. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): When given, it will find the storage 'best' storage point from this position. \ninclude_buffers :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position. \nmembers :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When given, it will find from only the specific type of member. Must be ````\n\"storage\"````\n, ````\n\"passive-provider\"````\n, ````\n\"buffer\"````\nor ````\n\"active-provider\"````\n. If not specified, selects with normal priorities. Not considered if position is specified." + "technology": { + "name": "technology", + "type": "TechnologySpecification", + "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI." } } }, - "storage_points": { - "name": "storage_points", - "type": "array of LuaLogisticPoint", - "mode": "[R]", - "doc": "All things that have storage points in this network." + "opened": { + "name": "opened", + "type": "LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type", + "mode": "[RW]", + "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, equipment-grid, player, element or nil." }, - "storages": { - "name": "storages", - "type": "array of LuaEntity", + "opened_gui_type": { + "name": "opened_gui_type", + "type": "defines.gui_type", "mode": "[R]", - "doc": "All entities that have logistic storage points in this network." + "doc": "Returns the [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type) or ````\nnil````\n." }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "A single logistic network of a given force on a given surface." - }, - "LuaLogisticPoint": { - "name": "LuaLogisticPoint", - "type": "LuaLogisticPoint", - "inherits": [], - "properties": { - "exact": { - "name": "exact", + "opened_self": { + "name": "opened_self", "type": "boolean", "mode": "[R]", - "doc": "If this logistic point is using the exact mode. In exact mode robots never over-deliver request" + "doc": "````\ntrue````\nif the player opened itself. I.e. if they opened the character or god-controller GUI." }, - "filters": { - "name": "filters", - "type": "array of LogisticFilter", - "mode": "[R]", - "doc": "The logistic filters for this logistic point or ````\nnil````\nif this doesn't use logistic filter \n\n**Note: ** The returned array will always have an entry for each filter and will be indexed in sequence when not nil." + "permission_group": { + "name": "permission_group", + "type": "LuaPermissionGroup", + "mode": "[RW]", + "doc": "The permission group this player is part of or ````\nnil````\nif not part of any grou" }, - "force": { - "name": "force", - "type": "LuaForce", - "mode": "[R]", - "doc": "The force of this logistic poin \n\n**Note: ** This will always be the same as the [LuaLogisticPoint::owner](http://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.owner) force." + "picking_state": { + "name": "picking_state", + "type": "boolean", + "mode": "[RW]", + "doc": "Current item-picking stat" }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "logistic_member_index": { - "name": "logistic_member_index", - "type": "uint", - "mode": "[R]", - "doc": "The Logistic member index of this logistic poin" + "pipette_entity": { + "name": "pipette_entity", + "type": "function", + "doc": "Invokes the \"smart pipette\" action on the player as if the user pressed i \n\n**Parameters** \nentity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) \n\n**Return value** \nIf the smart pipette found something to place", + "returns": "boolean", + "args": { + "entity": { + "name": "entity", + "type": "string or LuaEntity or LuaEntityPrototype", + "doc": "entity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html)" + } + } }, - "logistic_network": { - "name": "logistic_network", - "type": "LuaLogisticNetwork", - "mode": "[R]" + "play_sound": { + "name": "play_sound", + "type": "function", + "doc": "Plays a sound for this playe \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive. \noverride_sound_type :: [SoundType](http://lua-api.factorio.com/latest/Concepts.html#SoundType) (optional): Which volume mixer to play the sound through. Uses the default mixer for the sound type if not specified.", + "returns": "boolean", + "args": { + "path": { + "name": "path", + "type": "SoundPath", + "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive. \noverride_sound_type :: [SoundType](http://lua-api.factorio.com/latest/Concepts.html#SoundType) (optional): Which volume mixer to play the sound through. Uses the default mixer for the sound type if not specified." + } + } }, - "mode": { - "name": "mode", - "type": "defines.logistic_mode", + "position": { + "name": "position", + "type": "Position", "mode": "[R]", - "doc": "The logistic mod" + "doc": "Current position of the entity." }, - "owner": { - "name": "owner", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) owner of this [LuaLogisticPoint](http://lua-api.factorio.com/latest/LuaLogisticPoint.html" + "print": { + "name": "print", + "doc": "Print text to the chat console. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \n\n**Note: ** Messages that are identical to a message sent in the last 60 ticks are not printed again.", + "type": "function", + "args": { + "color": { + "name": "color", + "type": "Color", + "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" + }, + "message": { + "name": "message", + "type": "LocalisedString", + "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + } + } }, - "targeted_items_deliver": { - "name": "targeted_items_deliver", - "type": "dictionary string → uint", - "mode": "[R]", - "doc": "Items targeted to be dropped off into this logistic point by robot" + "print_entity_statistics": { + "name": "print_entity_statistics", + "doc": "Print entity statistics to the player's consol \n\n**Parameters** \nentities :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Entity prototypes to get statistics for. If not specified or empt \ndisplay statistics for all entities.", + "type": "function", + "args": { + "entities": { + "name": "entities", + "type": "array of string", + "doc": "entities :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Entity prototypes to get statistics for. If not specified or empt \ndisplay statistics for all entities." + } + } }, - "targeted_items_pickup": { - "name": "targeted_items_pickup", - "type": "dictionary string → uint", - "mode": "[R]", - "doc": "Items targeted to be picked up from this logistic point by robot" + "print_lua_object_statistics": { + "name": "print_lua_object_statistics", + "doc": "Print LuaObject counts per mod.", + "type": "function" }, - "valid": { - "name": "valid", - "type": "boolean", + "print_robot_jobs": { + "name": "print_robot_jobs", + "doc": "Print construction robot job counts to the players console.", + "type": "function" + }, + "reach_distance": { + "name": "reach_distance", + "type": "uint", "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Logistic point of a particular LuaEntity. A \"Logistic point\" is the name given for\n settings and properties used by requester, provider, and storage points in a given logistic network.\n These \"points\" don't have to be a logistic container but often are. One other entity that can own several\n points is the \"character\" character type entity." - }, - "LuaMiningDrillControlBehavior": { - "name": "LuaMiningDrillControlBehavior", - "type": "LuaMiningDrillControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity", - "Inherited from LuaGenericOnOffControlBehavior: disabled, circuit_condition, logistic_condition, connect_to_logistic_network" - ], - "properties": { - "circuit_condition": { - "name": "circuit_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The circuit condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the circuit condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 cha \nsignal \n````\na_behavior.circuit_condition = {condition={comparator=\">\", \n                                           first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                           constant=4}}````" + "doc": "The reach distance of this character or max uint when not a character or player connected to a characte" }, - "circuit_enable_disable": { - "name": "circuit_enable_disable", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif this drill is enabled or disabled using the logistics or circuit condition." + "remove_alert": { + "name": "remove_alert", + "doc": "Removes all alerts matching the given filters or if an empty filters table is given all alerts are remove \n\n**Parameters** \nTable with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional)", + "type": "function", + "args": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "doc": "Table with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional)" + } + } }, - "circuit_read_resources": { - "name": "circuit_read_resources", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif this drill should send the resources in the field to the circuit networ \nWhich resources depends on [LuaMiningDrillControlBehavior::resource_read_mode](http://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaMiningDrillControlBehavior.resource_read_mode)" + "remove_item": { + "name": "remove_item", + "type": "function", + "doc": "Remove items from this entity. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", + "returns": "uint", + "args": { + "items": { + "name": "items", + "type": "ItemStackSpecification", + "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." + } + } }, - "connect_to_logistic_network": { - "name": "connect_to_logistic_network", + "remove_unfiltered_items": { + "name": "remove_unfiltered_items", "type": "boolean", "mode": "[RW]", - "doc": "````\ntrue````\nif this should connect to the logistic network." + "doc": "If items not included in this map editor infinity inventory filters should be remove" }, - "disabled": { - "name": "disabled", - "type": "boolean", + "render_mode": { + "name": "render_mode", + "type": "defines.render_mode", "mode": "[R]", - "doc": "If the entity is currently disabled because of the control behavior." + "doc": "The render mode of the player, like map or zoom to worl \nThe render mode can be set using [LuaPlayer::open_map](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.open_map), [LuaPlayer::zoom_to_world](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom_to_world) and [LuaPlayer::close_map](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.close_map" }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "repair_state": { + "name": "repair_state", + "type": "table", + "mode": "[RW]", + "doc": "Current repair stat \nIt is a table with two fields: \nrepairing :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being repaired" }, - "get_circuit_network": { - "name": "get_circuit_network", + "request_translation": { + "name": "request_translation", "type": "function", - "returns": "LuaCircuitNetwork", + "doc": "Requests a translation for the given localised strin \nIf the request is successful the [on_string_translated](http://lua-api.factorio.com/latest/events.html#on_string_translated) event will be fired at a later time with the result \n\n**Parameters** \nlocalised_string :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \n\n**Return value** \nIf the request was sent or not. \n\n**Note: ** Does nothing if this player is not connected. (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).", + "returns": "boolean", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + "localised_string": { + "name": "localised_string", + "type": "LocalisedString", + "doc": "localised_string :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "resource_reach_distance": { + "name": "resource_reach_distance", + "type": "double", + "mode": "[R]", + "doc": "The resource reach distance of this character or max double when not a character or player connected to a characte" }, - "logistic_condition": { - "name": "logistic_condition", - "type": "CircuitConditionSpecification", + "riding_state": { + "name": "riding_state", + "type": "RidingState", "mode": "[RW]", - "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" + "doc": "Current riding state of this car or the vehicle this player is riding i" }, - "resource_read_mode": { - "name": "resource_read_mode", - "type": "defines.control_behavior.mining_drill.resource_read_mode", + "selected": { + "name": "selected", + "type": "LuaEntity", "mode": "[RW]", - "doc": "If the mining drill should send just the resources in its area or the entire field it's on to the circuit network." + "doc": "The currently selected entity; ````\nnil````\nif none. Assigning an entity will select it if selectable otherwise clears selection." }, - "resource_read_targets": { - "name": "resource_read_targets", - "type": "array of LuaEntity", - "mode": "[R]", - "doc": "The resource entities that the mining drill will send information about to the circuit network or an empty array." + "set_active_quick_bar_page": { + "name": "set_active_quick_bar_page", + "doc": "Sets which quick bar page is being used for the given screen pag \n\n**Parameters** \nscreen_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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. \npage_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The new quick bar page.", + "type": "function", + "args": { + "page_index": { + "name": "page_index", + "type": "uint", + "doc": "page_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The new quick bar page." + }, + "screen_index": { + "name": "screen_index", + "type": "uint", + "doc": "screen_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." + "set_controller": { + "name": "set_controller", + "doc": "Set the controller type of the player. \n\n**Parameters** \nTable with the following fields: \ntype :: [defines.controllers](http://lua-api.factorio.com/latest/defines.html#defines.controllers): Which controller to use \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity to control. Mandatory when ````\ntype```` \n[defines.controllers.character](http://lua-api.factorio.com/latest/defines.html#defines.controllers.character), ignored otherwise. \nwaypoints (optional): List of waypoints for the cutscene controller. This parameter is mandatory wh \n````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene). Each waypoint is a tabl \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Position to pan the camera to. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html) (optional): Entity or unit group to pan the camera to. \ntransition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): How many ticks it will take to reach this waypoint from the previous one. \ntime_to_wait :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Time in ticks to wait before moving to the next waypoint. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Zoom level to be set when the waypoint is reached. When not specified, t \nprevious waypoint's zoom is used. \nstart_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe cutscene will start at this position. If not given the start position will be the player position. \nstart_zoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe cutscene will start at this zoom level. If not given the start zoom will be the players zoom. \nfinal_transition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nit is the time in ticks it will take for the camera to pan from the final waypoint back to the starti \nposition. If not given the camera will not pan back to the start position/zoom. \nchart_mode_cutoff :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value. \n\n**Note: ** Setting a player to [defines.controllers.editor](http://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) auto promotes the player to admin and enables cheat mode. \n\n**Note: ** Setting a player to [defines.controllers.editor](http://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) also requires the calling player be an admin.", + "type": "function", + "args": { + "type": { + "name": "type", + "type": "defines.controllers", + "doc": "Table with the following fields: \ntype :: [defines.controllers](http://lua-api.factorio.com/latest/defines.html#defines.controllers): Which controller to use \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity to control. Mandatory when ````\ntype```` \n[defines.controllers.character](http://lua-api.factorio.com/latest/defines.html#defines.controllers.character), ignored otherwise. \nwaypoints (optional): List of waypoints for the cutscene controller. This parameter is mandatory wh \n````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene). Each waypoint is a tabl \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Position to pan the camera to. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html) (optional): Entity or unit group to pan the camera to. \ntransition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): How many ticks it will take to reach this waypoint from the previous one. \ntime_to_wait :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Time in ticks to wait before moving to the next waypoint. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Zoom level to be set when the waypoint is reached. When not specified, t \nprevious waypoint's zoom is used. \nstart_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe cutscene will start at this position. If not given the start position will be the player position. \nstart_zoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe cutscene will start at this zoom level. If not given the start zoom will be the players zoom. \nfinal_transition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nit is the time in ticks it will take for the camera to pan from the final waypoint back to the starti \nposition. If not given the camera will not pan back to the start position/zoom. \nchart_mode_cutoff :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified and ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nthe game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value." + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for mining drills." - }, - "LuaModSettingPrototype": { - "name": "LuaModSettingPrototype", - "type": "LuaModSettingPrototype", - "inherits": [], - "properties": { - "allow_blank": { - "name": "allow_blank", - "type": "boolean", - "mode": "[R]", - "doc": "If this string setting allows blank values or ````\nnil````\nif not a string settin" + "set_ending_screen_data": { + "name": "set_ending_screen_data", + "doc": "Setup the screen to be shown when the game is finished. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): Message to be shown. \nfile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to image to be shown.", + "type": "function", + "args": { + "file": { + "name": "file", + "type": "string", + "doc": "file :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to image to be shown." + }, + "message": { + "name": "message", + "type": "LocalisedString", + "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): Message to be shown." + } + } }, - "allowed_values": { - "name": "allowed_values", - "type": "array of string or array of int or array of double", - "mode": "[R]", - "doc": "The allowed values for this setting or ````\nnil````\nif this setting doesn't use the a fixed set of value" + "set_goal_description": { + "name": "set_goal_description", + "doc": "Set the text in the goal window (top left). \n\n**Parameters** \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text to display. \\n can be used to delimit lines. Passing emp \nstring or omitting this parameter entirely will make the goal window disappear. \nonly_update :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, won't play the \"goal updated\" sound.", + "type": "function", + "args": { + "only_update": { + "name": "only_update", + "type": "boolean", + "doc": "only_update :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, won't play the \"goal updated\" sound." + }, + "text": { + "name": "text", + "type": "LocalisedString", + "doc": "text :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text to display. \\n can be used to delimit lines. Passing emp \nstring or omitting this parameter entirely will make the goal window disappear." + } + } }, - "auto_trim": { - "name": "auto_trim", - "type": "boolean", - "mode": "[R]", - "doc": "If this string setting auto-trims values or ````\nnil````\nif not a string settin" + "set_gui_arrow": { + "name": "set_gui_arrow", + "doc": "Create an arrow which points at this entity. This is used in the tutorial. For examples, see ````\ncontrol.lua```` \nin the campaign missions. \n\n**Parameters** \nTable with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n.", + "type": "function", + "args": { + "type": { + "name": "type", + "type": "string", + "doc": "Table with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n." + } + } }, - "default_value": { - "name": "default_value", - "type": "boolean or double or int or string", - "mode": "[R]", - "doc": "The default value of this settin" + "set_infinity_inventory_filter": { + "name": "set_infinity_inventory_filter", + "doc": "Sets the filter for this map editor infinity filters at the given inde \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to set. \nfilter :: [InfinityInventoryFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter): The new filter or ````\nnil````\nto clear the filter. \n_Can only be used if this is InfinityContainer_", + "type": "function", + "args": { + "filter": { + "name": "filter", + "type": "InfinityInventoryFilter", + "doc": "filter :: [InfinityInventoryFilter](http://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter): The new filter or ````\nnil````\nto clear the filter." + }, + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index to set." + } + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "set_personal_logistic_slot": { + "name": "set_personal_logistic_slot", + "type": "function", + "doc": "Sets the personal request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if personal logistics are not researched.", + "returns": "boolean", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" + } + } }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" + "set_quick_bar_slot": { + "name": "set_quick_bar_slot", + "doc": "Sets the quick bar filter for the given slo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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. \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) or [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The filter or ````\nnil````\n.", + "type": "function", + "args": { + "filter": { + "name": "filter", + "type": "string or LuaItemPrototype or LuaItemStack", + "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) or [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The filter or ````\nnil````\n." + }, + "index": { + "name": "index", + "type": "uint", + "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." + } + } }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]" + "set_shortcut_available": { + "name": "set_shortcut_available", + "doc": "Make a custom Lua shortcut available or unavailabl \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut. \navailable :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", + "type": "function", + "args": { + "available": { + "name": "available", + "type": "boolean", + "doc": "available :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + }, + "prototype_name": { + "name": "prototype_name", + "type": "string", + "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." + } + } }, - "maximum_value": { - "name": "maximum_value", - "type": "double or int", - "mode": "[R]", - "doc": "The maximum value for this setting or ````\nnil````\nif this setting type doesn't support a maximu" + "set_shortcut_toggled": { + "name": "set_shortcut_toggled", + "doc": "Toggle or untoggle a custom Lua shortc \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut. \ntoggled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", + "type": "function", + "args": { + "prototype_name": { + "name": "prototype_name", + "type": "string", + "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." + }, + "toggled": { + "name": "toggled", + "type": "boolean", + "doc": "toggled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + } + } }, - "minimum_value": { - "name": "minimum_value", - "type": "double or int", - "mode": "[R]", - "doc": "The minimum value for this setting or ````\nnil````\nif this setting type doesn't support a minimu" + "set_vehicle_logistic_slot": { + "name": "set_vehicle_logistic_slot", + "type": "function", + "doc": "Sets the vehicle logistic request and trash to the given value \n\n**Parameters** \nslot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/ \nvalue :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n) \n\n**Return value** \nIf the slot was set. \n\n**Note: ** This will silently fail if the spider does not use logistics.", + "returns": "boolean", + "args": { + "slot_index": { + "name": "slot_index", + "type": "uint", + "doc": "slot_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The slot to set/" + }, + "value": { + "name": "value", + "type": "PersonalLogisticParameters", + "doc": "value :: [PersonalLogistic\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#PersonalLogistic\n\n**Parameters** \n)" + } + } }, - "mod": { - "name": "mod", - "type": "string", - "mode": "[R]", - "doc": "The mod that owns this settin" + "shooting_state": { + "name": "shooting_state", + "type": "table", + "mode": "[RW]", + "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this prototype." + "spectator": { + "name": "spectator", + "type": "boolean", + "mode": "[RW]", + "doc": "If ````\ntrue````\n, zoom-to-world noise effect will be disabled and environmental sounds will be bas \non zoom-to-world view instead of position of player's character." }, - "order": { - "name": "order", - "type": "string", + "stashed_controller_type": { + "name": "stashed_controller_type", + "type": "defines.controllers", "mode": "[R]", - "doc": "Order string of this prototype." - }, - "setting_type": { - "name": "setting_type", - "type": "string", - "mode": "[R]" + "doc": "The stashed controller type or ````\nnil````\nif no controller is stashe \n\n**Note: ** This is mainly useful when a player is in the map editor." }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Prototype of a mod setting." - }, - "LuaNamedNoiseExpression": { - "name": "LuaNamedNoiseExpression", - "type": "LuaNamedNoiseExpression", - "inherits": [], - "properties": { - "expression": { - "name": "expression", - "type": "NoiseExpression", + "surface": { + "name": "surface", + "type": "LuaSurface", "mode": "[R]", - "doc": "The expression itself." + "doc": "The surface this entity is currently on." }, - "help": { - "name": "help", + "tag": { + "name": "tag", "type": "string", - "doc": "All methods, and properties that this object supports." + "mode": "[RW]", + "doc": "The tag that is shown after the player in chat and on the map." }, - "intended_property": { - "name": "intended_property", - "type": "string", - "mode": "[R]", - "doc": "Name of the property that this expression is intended to provide a value for, if any." + "teleport": { + "name": "teleport", + "type": "function", + "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, transport bel \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", + "returns": "boolean", + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to." + }, + "surface": { + "name": "surface", + "type": "SurfaceSpecification", + "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface." + } + } }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" + "ticks_to_respawn": { + "name": "ticks_to_respawn", + "type": "uint", + "mode": "[RW]", + "doc": "The number of ticks until this player will respawn or ````\nnil````\nif not waiting to respaw \n\n**Note: ** Set to ````\nnil````\nto immediately respawn the player. \n\n**Note: ** Set to any positive value to trigger the respawn state for this player." }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]" + "toggle_map_editor": { + "name": "toggle_map_editor", + "doc": "Toggles this player into or out of the map edito \nDoes nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.", + "type": "function" }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this prototype." - }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]", - "doc": "Order string of this prototype." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Prototype of a named noise expression." - }, - "LuaNoiseLayerPrototype": { - "name": "LuaNoiseLayerPrototype", - "type": "LuaNoiseLayerPrototype", - "inherits": [], - "properties": { - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" - }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]" - }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this prototype." - }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]", - "doc": "Order string of this prototype." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Prototype of a noise layer." - }, - "LuaPermissionGroup": { - "name": "LuaPermissionGroup", - "type": "LuaPermissionGroup", - "inherits": [], - "properties": { - "add_player": { - "name": "add_player", + "unlock_achievement": { + "name": "unlock_achievement", + "doc": "Unlock the achievements of the given playe \nThis 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 \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): name of the achievement to unlock", "type": "function", - "doc": "Adds the given player to this grou \n\n**Parameters** \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) \n\n**Return value** \nIf the player was added.", - "returns": "boolean", "args": { - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification)" + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): name of the achievement to unlock" } } }, - "allows_action": { - "name": "allows_action", + "unmute_alert": { + "name": "unmute_alert", "type": "function", - "doc": "If this group allows the given actio \n\n**Parameters** \naction: The defines.input_action value.", + "doc": "Unmutes alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was unmuted (false if it was wasn't muted).", "returns": "boolean", "args": { - "action": { - "name": "action", - "doc": "action: The defines.input_action value.", - "type": "action" + "alert_type": { + "name": "alert_type", + "type": "defines.alert_type", + "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" } } }, - "destroy": { - "name": "destroy", - "type": "function", - "doc": "Destroys this grou \n\n**Return value** \nIf the group was destroyed.", - "returns": "boolean" - }, - "group_id": { - "name": "group_id", - "type": "uint", - "mode": "[R]", - "doc": "The group" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "name": { - "name": "name", - "type": "string", - "mode": "[RW]", - "doc": "The name of this grou \n\n**Note: ** Setting to ````\nnil````\nor an empty string sets the name to the default value." - }, - "players": { - "name": "players", - "type": "array of LuaPlayer", - "mode": "[R]", - "doc": "The players in this grou" - }, - "remove_player": { - "name": "remove_player", + "update_selected_entity": { + "name": "update_selected_entity", + "doc": "Select an entity, as if by hovering the mouse above it. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select", "type": "function", - "doc": "Removes the given player from this grou \n\n**Parameters** \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) \n\n**Return value** \nIf the player was removed.", - "returns": "boolean", "args": { - "player": { - "name": "player", - "type": "PlayerSpecification", - "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification)" + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select" } } }, - "set_allows_action": { - "name": "set_allows_action", + "use_from_cursor": { + "name": "use_from_cursor", + "doc": "Uses the current item in the cursor if it's a capsule or does nothing if no \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the item would be used.", "type": "function", - "doc": "Sets if the player is allowed to perform the given actio \n\n**Parameters** \naction: The defines.input_action value. \n\n**Return value** \nIf the value was applied.", - "returns": "boolean", "args": { - "action": { - "name": "action", - "doc": "action: The defines.input_action value.", - "type": "action" - }, - "undefined": { - "doc": "" + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the item would be used." } } }, @@ -10843,52 +9943,106 @@ "type": "boolean", "mode": "[R]", "doc": "Is this object valid?" + }, + "vehicle": { + "name": "vehicle", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The vehicle the player is currently sitting in; ````\nnil````\nif none." + }, + "vehicle_logistic_requests_enabled": { + "name": "vehicle_logistic_requests_enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "If personal logistic requests are enabled for this vehicle (spidertron)." + }, + "walking_state": { + "name": "walking_state", + "type": "table", + "mode": "[RW]", + "doc": "Current walking stat \nIt is a table with two fields: \nwalking :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If ````\nfalse````\n, the player is currently not walking; otherwise it's going somewhere \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): Direction where the player is walking \n\n**Example** \nMake the player go north. Note that a one-shot action like this will only make the player walk for one tic \n````\ngame.player.walking_state = {walking = true, direction = defines.direction.north}````" + }, + "zoom": { + "name": "zoom", + "type": "double", + "mode": "[W]", + "doc": "The player's zoom-level." + }, + "zoom_to_world": { + "name": "zoom_to_world", + "doc": "Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position (and scale \nRender mode change requests are processed before rendering of the next fram \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)", + "type": "function", + "args": { + "position": { + "name": "position", + "type": "Position", + "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" + }, + "scale": { + "name": "scale", + "type": "double", + "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)" + } + } } }, - "doc": "A permission group that defines what players in this group are allowed to do." + "doc": "Setup the screen to be shown when the game is finished." }, - "LuaPermissionGroups": { - "name": "LuaPermissionGroups", - "type": "LuaPermissionGroups", + "LuaProfiler": { + "name": "LuaProfiler", + "type": "LuaProfiler", "inherits": [], "properties": { - "create_group": { - "name": "create_group", + "add": { + "name": "add", + "doc": "Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at onc \n\n**Parameters** \nother :: [LuaProfiler](http://lua-api.factorio.com/latest/LuaProfiler.html): The timer to add to this timer. \n\n**Note: ** If other is running, the time to now will be added.", "type": "function", - "doc": "Creates a new permission grou \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \n\n**Note: ** May return nil if the calling player doesn't have permission to make groups.", - "returns": "LuaPermissionGroup", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)" + "other": { + "name": "other", + "type": "LuaProfiler", + "doc": "other :: [LuaProfiler](http://lua-api.factorio.com/latest/LuaProfiler.html): The timer to add to this timer." } } }, - "get_group": { - "name": "get_group", + "divide": { + "name": "divide", + "doc": "Divides the current duration by a set value. Useful for calculating the average of many iteration \n\n**Parameters** \nnumber :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The number to divide by. Must be > 0. \n\n**Note: ** Does nothing if this isn't stopped.", "type": "function", - "doc": "Gets the permission group with the given name or group ID or ````\nnil````\nif there is no matching grou \n\n**Parameters** \ngroup :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "returns": "LuaPermissionGroup", "args": { - "group": { - "name": "group", - "type": "string or uint", - "doc": "group :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "number": { + "name": "number", + "type": "double", + "doc": "number :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The number to divide by. Must be > 0." } } }, - "groups": { - "name": "groups", - "type": "array of LuaPermissionGroup", - "mode": "[R]", - "doc": "All of the permission group" - }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "reset": { + "name": "reset", + "doc": "Resets the clock, also restarting it.", + "type": "function" + }, + "restart": { + "name": "restart", + "doc": "Start the clock again, without resetting it.", + "type": "function" + }, + "stop": { + "name": "stop", + "doc": "Stops the clock.", + "type": "function" + }, "valid": { "name": "valid", "type": "boolean", @@ -10896,2010 +10050,1607 @@ "doc": "Is this object valid?" } }, - "doc": "All permission groups." + "doc": "Resets the clock, also restarting it." }, - "LuaPlayer": { - "name": "LuaPlayer", - "type": "LuaPlayer", + "LuaProgrammableSpeakerControlBehavior": { + "name": "LuaProgrammableSpeakerControlBehavior", + "type": "LuaProgrammableSpeakerControlBehavior", "inherits": [ - "Inherited from LuaControl: get_inventory, get_main_inventory, can_insert, insert, set_gui_arrow, clear_gui_arrow, get_item_count, has_items_inside, can_reach_entity, clear_items_inside, remove_item, teleport, update_selected_entity, clear_selected_entity, disable_flashlight, enable_flashlight, get_craftable_count, begin_crafting, cancel_crafting, mine_entity, mine_tile, is_player, open_technology_gui, surface, position, vehicle, force, selected, opened, crafting_queue_size, walking_state, riding_state, mining_state, shooting_state, picking_state, repair_state, cursor_stack, cursor_ghost, driving, crafting_queue, following_robots, cheat_mode, character_crafting_speed_modifier, character_mining_speed_modifier, character_additional_mining_categories, character_running_speed_modifier, character_build_distance_bonus, character_item_drop_distance_bonus, character_reach_distance_bonus, character_resource_reach_distance_bonus, character_item_pickup_distance_bonus, character_loot_pickup_distance_bonus, character_inventory_slots_bonus, character_logistic_slot_count_bonus, character_trash_slot_count_bonus, character_maximum_following_robot_count_bonus, character_health_bonus, auto_trash_filters, opened_gui_type, build_distance, drop_item_distance, reach_distance, item_pickup_distance, loot_pickup_distance, resource_reach_distance, in_combat, character_running_speed" + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" ], "properties": { - "add_alert": { - "name": "add_alert", - "doc": "Adds an alert to this player for the given entity of the given alert typ \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", - "type": "function", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "type": { - "name": "type", - "type": "defines.alert_type", - "doc": "type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" - } - } - }, - "add_custom_alert": { - "name": "add_custom_alert", - "doc": "Adds a custom alert to this playe \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nshow_on_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "function", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "icon": { - "name": "icon", - "type": "SignalID", - "doc": "icon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID)" - }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" - }, - "show_on_map": { - "name": "show_on_map", - "type": "boolean", - "doc": "show_on_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - } - } + "circuit_condition": { + "name": "circuit_condition", + "type": "CircuitConditionSpecification", + "mode": "[RW]" }, - "admin": { - "name": "admin", - "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif the player is an admi \n\n**Note: ** Trying to change player admin status from the console when you aren't an admin does nothing." + "circuit_parameters": { + "name": "circuit_parameters", + "type": "ProgrammableSpeakerCircuitParameters", + "mode": "[RW]" }, - "afk_time": { - "name": "afk_time", - "type": "uint", + "entity": { + "name": "entity", + "type": "LuaEntity", "mode": "[R]", - "doc": "How many ticks since the last action of this play" + "doc": "The entity this control behavior belongs to." }, - "associate_character": { - "name": "associate_character", - "doc": "Associates a character with this playe \n\n**Parameters** \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity. \n\n**Note: ** The character must not be connected to any controller. \n\n**Note: ** If this player is currently disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) the character will be immediately \"logged off\". \n\n**Note: ** See [LuaPlayer::get_associated_characters](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.", + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", + "returns": "LuaCircuitNetwork", "args": { - "character": { - "name": "character", - "type": "LuaEntity", - "doc": "character :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity." + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } - }, - "auto_trash_filters": { - "name": "auto_trash_filters", - "type": "dictionary string → uint", - "mode": "[RW]", - "doc": "The auto-trash filters. The keys are item prototype names, the values are the slot values. \n\n**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)). \n\n**Example** \nThis will set the auto-trash slots to keep only at most 20 iron plates and 42 copper wires in the player \ninventor \n````\ngame.player.auto_trash_filters = {[\"iron-plate\"] = 20, [\"copper-cable\"] = 42}````" + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "begin_crafting": { - "name": "begin_crafting", - "type": "function", - "doc": "Begins crafting the given count of the given recip \n\n**Parameters** \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to craft. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe to craft. \nsilent :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false and the recipe can't be crafted the requested number of times printing the failure is skipped. \n\n**Return value** \nThe count that was actually started crafting.", - "returns": "uint", - "args": { - "count": { - "name": "count", - "type": "uint", - "doc": "count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to craft. \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe to craft. \nsilent :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false and the recipe can't be crafted the requested number of times printing the failure is skipped." - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "blueprint_to_setup": { - "name": "blueprint_to_setup", - "type": "LuaItemStack", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The item stack containing a blueprint to be setu" + "doc": "The class name of this object." }, - "build_distance": { - "name": "build_distance", - "type": "uint", + "type": { + "name": "type", + "type": "defines.control_behavior.type", "mode": "[R]", - "doc": "The build distance of this character or max uint when not a character or player connected to a characte" + "doc": "The concrete type of this control behavior." }, - "build_from_cursor": { - "name": "build_from_cursor", - "doc": "Builds what ever is in the cursor on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \n\n**Note: ** Anything built will fire normal player-built events. \n\n**Note: ** The cursor stack will automatically be reduced as if the player built normally.", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped." - } - } + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for programmable speakers." + }, + "LuaRCON": { + "name": "LuaRCON", + "type": "LuaRCON", + "inherits": [], + "properties": { + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "This object's nam" }, - "can_build_from_cursor": { - "name": "can_build_from_cursor", + "print": { + "name": "print", + "doc": "Print text to the calling RCON interface if an \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)", "type": "function", - "doc": "Checks if this player can build what ever is in the cursor on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped.", - "returns": "boolean", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If alt build should be used instead of normal build. Defaults to normal. \nterrain_building_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The size for building terrain if building terrain. Defaults to 2. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped." + "message": { + "name": "message", + "type": "LocalisedString", + "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" } } + } + }, + "doc": "Print text to the calling RCON interface if any." + }, + "LuaRailChainSignalControlBehavior": { + "name": "LuaRailChainSignalControlBehavior", + "type": "LuaRailChainSignalControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], + "properties": { + "blue_signal": { + "name": "blue_signal", + "type": "SignalID", + "mode": "[RW]" }, - "can_insert": { - "name": "can_insert", - "type": "function", - "doc": "Can at least some items be inserted? \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted. \n\n**Return value** \n````\ntrue````\nif at least a part of the given items could be inserted into this inventory.", - "returns": "boolean", - "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items that would be inserted." - } - } + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." }, - "can_place_entity": { - "name": "can_place_entity", + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", - "doc": "Checks if this player can build the give entity at the given location on the surface the player is on \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed", - "returns": "boolean", + "returns": "LuaCircuitNetwork", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed" + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "can_reach_entity": { - "name": "can_reach_entity", - "type": "function", - "doc": "Can a given entity be opened or accessed? \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "returns": "boolean", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - } - } + "green_signal": { + "name": "green_signal", + "type": "SignalID", + "mode": "[RW]" }, - "cancel_crafting": { - "name": "cancel_crafting", - "doc": "Cancels crafting the given count of the given crafting queue index \n\n**Parameters** \noptions: : \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to cancel crafting.", - "type": "function", - "args": { - "options": { - "name": "options", - "type": "uint", - "doc": "options: : \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count to cancel crafting." - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "character": { - "name": "character", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The character attached to this player, or ````\nnil````\nif no character. \n\n**Note: ** Will also return ````\nnil````\nwhen the player is disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected))." + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "character_additional_mining_categories": { - "name": "character_additional_mining_categories", - "type": "array of string", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "orange_signal": { + "name": "orange_signal", + "type": "SignalID", + "mode": "[RW]" }, - "character_build_distance_bonus": { - "name": "character_build_distance_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_crafting_speed_modifier": { - "name": "character_crafting_speed_modifier", - "type": "double", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_health_bonus": { - "name": "character_health_bonus", - "type": "float", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_inventory_slots_bonus": { - "name": "character_inventory_slots_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_item_drop_distance_bonus": { - "name": "character_item_drop_distance_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_item_pickup_distance_bonus": { - "name": "character_item_pickup_distance_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "red_signal": { + "name": "red_signal", + "type": "SignalID", + "mode": "[RW]" }, - "character_logistic_slot_count_bonus": { - "name": "character_logistic_slot_count_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "type": { + "name": "type", + "type": "defines.control_behavior.type", + "mode": "[R]", + "doc": "The concrete type of this control behavior." }, - "character_loot_pickup_distance_bonus": { - "name": "character_loot_pickup_distance_bonus", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for rail chain signals." + }, + "LuaRailPath": { + "name": "LuaRailPath", + "type": "LuaRailPath", + "inherits": [], + "properties": { + "current": { + "name": "current", "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "mode": "[R]", + "doc": "The current rail inde" }, - "character_maximum_following_robot_count_bonus": { - "name": "character_maximum_following_robot_count_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "character_mining_speed_modifier": { - "name": "character_mining_speed_modifier", - "type": "double", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "character_reach_distance_bonus": { - "name": "character_reach_distance_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "rails": { + "name": "rails", + "type": "CustomDictionary uint → LuaEntity", + "mode": "[R]", + "doc": "The rails this path travel" }, - "character_resource_reach_distance_bonus": { - "name": "character_resource_reach_distance_bonus", + "size": { + "name": "size", "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "mode": "[R]", + "doc": "The total number of rails in this pat" }, - "character_running_speed": { - "name": "character_running_speed", + "total_distance": { + "name": "total_distance", "type": "double", "mode": "[R]", - "doc": "Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shootin" + "doc": "The total path distanc" }, - "character_running_speed_modifier": { - "name": "character_running_speed_modifier", + "travelled_distance": { + "name": "travelled_distance", "type": "double", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." - }, - "character_trash_slot_count_bonus": { - "name": "character_trash_slot_count_bonus", - "type": "uint", - "mode": "[RW]", - "doc": "**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "mode": "[R]", + "doc": "The total distance travelle" }, - "chat_color": { - "name": "chat_color", - "type": "Color", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "The total number of rails in this path." + }, + "LuaRailSignalControlBehavior": { + "name": "LuaRailSignalControlBehavior", + "type": "LuaRailSignalControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], + "properties": { + "circuit_condition": { + "name": "circuit_condition", + "type": "CircuitConditionSpecification", "mode": "[RW]", - "doc": "The color used when this player talks in game." + "doc": "The circuit condition when controlling the signal through the circuit networ" }, - "cheat_mode": { - "name": "cheat_mode", + "close_signal": { + "name": "close_signal", "type": "boolean", "mode": "[RW]", - "doc": "When ````\ntrue````\nhand crafting is free and instant" - }, - "clean_cursor": { - "name": "clean_cursor", - "type": "function", - "doc": "Invokes the \"clean cursor\" action on the player as if the user pressed i \n\n**Return value** \nIf the cursor is now empty.", - "returns": "boolean" + "doc": "If this will close the rail signal based off the circuit conditio" }, - "clear_console": { - "name": "clear_console", - "doc": "Clear the chat console.", - "type": "function" + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." }, - "clear_gui_arrow": { - "name": "clear_gui_arrow", - "doc": "Removes the arrow created by ````\nset_gui_arrow````\n.", - "type": "function" + "get_circuit_network": { + "name": "get_circuit_network", + "type": "function", + "returns": "LuaCircuitNetwork", + "args": { + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." + }, + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "clear_items_inside": { - "name": "clear_items_inside", - "doc": "Remove all items from this entity.", - "type": "function" + "green_signal": { + "name": "green_signal", + "type": "SignalID", + "mode": "[RW]" }, - "clear_selected_entity": { - "name": "clear_selected_entity", - "doc": "Unselect any selected entity.", - "type": "function" + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "close_map": { - "name": "close_map", - "doc": "Queues request to switch to the normal game view from the map or zoom to world vie \nRender mode change requests are processed before rendering of the next frame.", - "type": "function" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "color": { - "name": "color", - "type": "Color", - "mode": "[RW]", - "doc": "The color associated with the player. This will be used to tint the player's character as well as the \nbuildings and vehicles." + "orange_signal": { + "name": "orange_signal", + "type": "SignalID", + "mode": "[RW]" }, - "connected": { - "name": "connected", + "read_signal": { + "name": "read_signal", "type": "boolean", - "mode": "[R]", - "doc": "````\ntrue````\nif the player is currently connected to the game." + "mode": "[RW]", + "doc": "If this will read the rail signal stat" }, - "controller_type": { - "name": "controller_type", - "type": "defines.controllers", - "mode": "[R]" + "red_signal": { + "name": "red_signal", + "type": "SignalID", + "mode": "[RW]" }, - "crafting_queue": { - "name": "crafting_queue", + "type": { + "name": "type", + "type": "defines.control_behavior.type", "mode": "[R]", - "doc": "Gets the current crafting queue items. Each CraftingQueueItem is a table: \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The crafting queue index \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The recipe. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count being crafted.", - "type": "array of CraftingQueueItem" + "doc": "The concrete type of this control behavior." }, - "crafting_queue_size": { - "name": "crafting_queue_size", - "type": "uint", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "Size of the crafting queue." - }, - "create_character": { - "name": "create_character", - "type": "function", - "doc": "Creates and attaches a character entity to this playe \n\n**Parameters** \ncharacter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The character to create else the default is used. \n\n**Return value** \nWhether the character was created. \n\n**Note: ** The player must not have a character already connected and must be online (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).", - "returns": "boolean", - "args": { - "character": { - "name": "character", - "type": "string", - "doc": "character :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The character to create else the default is used." - } - } - }, - "create_local_flying_text": { - "name": "create_local_flying_text", - "doc": "Spawn a flying text that is only visible to this playe \n\n**Parameters** \nTable with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Movement per second \n\n**Note: ** Local flying text is not saved, this means it will disappear after save/load.", + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for rail signals." + }, + "LuaRandomGenerator": { + "name": "LuaRandomGenerator", + "type": "LuaRandomGenerator", + "inherits": [], + "properties": { + "()": { + "name": "()", "type": "function", + "doc": "Generates a random numbe \nIf no parameters are given a number in the [0, 1) range is returne \nIf a single parameter is given a floored number in the [1, N] range is returne \nIf 2 parameters are given a floored number in the [N1, N2] range is returne \n\n**Parameters** \nlower :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): Inclusive lower bound on the result \nupper :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): Inclusive upper bound on the result", + "returns": "double", "args": { - "text": { - "name": "text", - "type": "LocalisedString", - "doc": "Table with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Movement per second" + "lower": { + "name": "lower", + "type": "int", + "doc": "lower :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): Inclusive lower bound on the result" + }, + "upper": { + "name": "upper", + "type": "int", + "doc": "upper :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): Inclusive upper bound on the result" } } }, - "cursor_ghost": { - "name": "cursor_ghost", - "type": "ItemPrototypeSpecification", - "mode": "[RW]", - "doc": "The ghost prototype in the player's curso \n\n**Note: ** When read, it will be a [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html). \n\n**Note: ** Items in the cursor stack will take priority over the cursor ghost." + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "cursor_stack": { - "name": "cursor_stack", - "type": "LuaItemStack", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The player's cursor stack." + "doc": "The class name of this object." }, - "disable_alert": { - "name": "disable_alert", + "re_seed": { + "name": "re_seed", + "doc": "Re-seeds the random generator with the given valu \n\n**Parameters** \nseed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Note: ** Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.", "type": "function", - "doc": "Disables alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was disabled (false if it was already disabled).", - "returns": "boolean", "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" + "seed": { + "name": "seed", + "type": "uint", + "doc": "seed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "disable_flashlight": { - "name": "disable_flashlight", - "doc": "Disable the flashlight.", - "type": "function" + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Generates a random number.\n If no parameters are given a number in the [0, 1) range is returned.\n If a single parameter is given a floored number in the [1, N] range is returned.\n If 2 parameters are given a floored number in the [N1, N2] range is returned." + }, + "LuaRecipe": { + "name": "LuaRecipe", + "type": "LuaRecipe", + "inherits": [], + "properties": { + "category": { + "name": "category", + "type": "string", + "mode": "[R]", + "doc": "Category of the recip" }, - "disable_recipe_groups": { - "name": "disable_recipe_groups", - "doc": "Disable recipe groups.", - "type": "function" + "enabled": { + "name": "enabled", + "type": "boolean", + "mode": "[RW]", + "doc": "Can the recipe be use" }, - "disable_recipe_subgroups": { - "name": "disable_recipe_subgroups", - "doc": "Disable recipe subgroups.", - "type": "function" + "energy": { + "name": "energy", + "type": "double", + "mode": "[R]", + "doc": "Energy required to execute this recipe. This directly affects the crafting time: Recipe's ener \nis exactly its crafting time in seconds, when crafted in an assembling machine with crafting spe \nexactly equal to one." }, - "disassociate_character": { - "name": "disassociate_character", - "doc": "Disassociates a character from this playe \nThis is functionally the same as setting [LuaEntity::associated_player](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player) to ````\nnil```` \n\n**Parameters** \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity \n\n**Note: ** See [LuaPlayer::get_associated_characters](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.", - "type": "function", - "args": { - "character": { - "name": "character", - "type": "LuaEntity", - "doc": "character :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The character entity" - } - } + "force": { + "name": "force", + "type": "LuaForce", + "mode": "[R]", + "doc": "The force that owns this recip" }, - "display_resolution": { - "name": "display_resolution", - "type": "DisplayResolution", + "group": { + "name": "group", + "type": "LuaGroup", "mode": "[R]", - "doc": "The display resolution for this playe" + "doc": "Group of this recip" }, - "display_scale": { - "name": "display_scale", - "type": "double", + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "hidden": { + "name": "hidden", + "type": "boolean", "mode": "[R]", - "doc": "The display scale for this playe" + "doc": "Is the recipe hidden? Hidden recipe don't show up in the crafting men" }, - "driving": { - "name": "driving", + "hidden_from_flow_stats": { + "name": "hidden_from_flow_stats", "type": "boolean", "mode": "[RW]", - "doc": "````\ntrue````\nif the player is in a vehicle. Writing to this attribute puts the player in or out of \nvehicle." + "doc": "Is the recipe hidden from flow statistic" }, - "drop_item_distance": { - "name": "drop_item_distance", - "type": "uint", + "ingredients": { + "name": "ingredients", + "type": "array of Ingredient", "mode": "[R]", - "doc": "The item drop distance of this character or max uint when not a character or player connected to a characte" + "doc": "Ingredients for this recip \n\n**Example** \nWhat the \"steel-chest\" recipe would retu \n````\n{ {type=\"item\", name=\"steel-plate\", amount=8} }```` \n\n**Example** \nWhat the \"advanced-oil-processing\" recipe would retu \n````\n{ {type=\"fluid\", name=\"crude-oil\", amount=10}, {type=\"fluid\", name=\"water\", amount=5} }````" }, - "enable_alert": { - "name": "enable_alert", - "type": "function", - "doc": "Enables alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was enabled (false if it was already enabled).", - "returns": "boolean", - "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "enable_flashlight": { - "name": "enable_flashlight", - "doc": "Enable the flashlight.", - "type": "function" + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]", + "doc": "Localised name of the recip" }, - "enable_recipe_groups": { - "name": "enable_recipe_groups", - "doc": "Enable recipe groups.", - "type": "function" + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of the recipe. This can be different than the name of the result items as there cou \nbe more recipes to make the same ite" }, - "enable_recipe_subgroups": { - "name": "enable_recipe_subgroups", - "doc": "Enable recipe subgroups.", - "type": "function" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "entity_copy_source": { - "name": "entity_copy_source", - "type": "LuaEntity", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "The source entity used during entity settings copy-paste if an \n````\nnil````\nif there isn't currently a source entity." + "doc": "Order string. This is used to sort the crafting men" }, - "exit_cutscene": { - "name": "exit_cutscene", - "doc": "Exit the current cutscene. Errors if not in a cutscene.", - "type": "function" + "products": { + "name": "products", + "type": "array of Product", + "mode": "[R]", + "doc": "The results of this recipe." }, - "following_robots": { - "name": "following_robots", - "type": "array of LuaEntity", + "prototype": { + "name": "prototype", + "type": "LuaRecipePrototype", "mode": "[R]", - "doc": "The current combat robots following the charact \n\n**Note: ** When called on a [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character(see [LuaPlayer::character](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character))." + "doc": "The prototype for this recip" }, - "force": { - "name": "force", - "type": "ForceSpecification", - "mode": "[RW]", - "doc": "The force of this entity. Reading will always give a [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html), but it is possible \nassign either [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) to this attribute to change the forc" + "reload": { + "name": "reload", + "doc": "Reload the recipe from the prototype.", + "type": "function" }, - "game_view_settings": { - "name": "game_view_settings", - "type": "GameViewSettings", - "mode": "[RW]", - "doc": "The player's game view settings." + "subgroup": { + "name": "subgroup", + "type": "LuaGroup", + "mode": "[R]", + "doc": "Subgroup of this recip" }, - "get_active_quick_bar_page": { - "name": "get_active_quick_bar_page", - "type": "function", - "doc": "Gets which quick bar page is being used for the given screen page or ````\nnil````\nif not know \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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.", - "returns": "uint8", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." - } - } + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Reload the recipe from the prototype." + }, + "LuaRecipeCategoryPrototype": { + "name": "LuaRecipeCategoryPrototype", + "type": "LuaRecipeCategoryPrototype", + "inherits": [], + "properties": { + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "get_alerts": { - "name": "get_alerts", - "type": "function", - "doc": "Gets all alerts matching the given filters or if no filters are given all alerts are returne \nA mapping of surface index to an array of arrays of alerts indexed by the alert typ \nAn alert is a table: \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntick :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The tick this alert was created \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional): The SignalID used for a custom alert. Only present for custom alerts. \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The message for a custom alert. Only present for custom alerts. \n\n**Parameters** \nTable with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)", - "returns": "dictionary uint → dictionary defines.alert_type → array of alert", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "Table with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional)" - } - } - }, - "get_associated_characters": { - "name": "get_associated_characters", - "type": "function", - "doc": "The characters associated with this playe \n\n**Note: ** The array will always be empty when the player is disconnected (see [LuaPlayer::connected](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) regardless of there being associated characters. \n\n**Note: ** Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.", - "returns": "array of LuaEntity" - }, - "get_craftable_count": { - "name": "get_craftable_count", - "type": "function", - "doc": "Gets the count of the given recipe that can be crafted \n\n**Parameters** \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe. \n\n**Return value** \nThe count that can be crafted.", - "returns": "uint", - "args": { - "recipe": { - "name": "recipe", - "type": "string or LuaRecipe", - "doc": "recipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe." - } - } - }, - "get_goal_description": { - "name": "get_goal_description", - "type": "function", - "doc": "Get the current goal description, as a localised string.", - "returns": "LocalisedString" - }, - "get_inventory": { - "name": "get_inventory", - "type": "function", - "doc": "Get an inventory belonging to this entity. This can be either the \"main\" inventory or some auxilia \none, like the module slots or logistic trash slot \n\n**Parameters** \ninventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \n\n**Return value** \nor ````\nnil````\nif this entity doesn't have an inventory with the given index. \n\n**Note: ** A given [defines.inventory](http://lua-api.factorio.com/latest/defines.html#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](http://lua-api.factorio.com/latest/defines.html#defines.inventory) it's almost guaranteed to not be the inventory asked for.", - "returns": "LuaInventory", - "args": { - "inventory": { - "name": "inventory", - "type": "defines.inventory", - "doc": "inventory :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory)" - } - } - }, - "get_item_count": { - "name": "get_item_count", - "type": "function", - "doc": "Get the number of all or some items in this entity. \n\n**Parameters** \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items.", - "returns": "uint", - "args": { - "item": { - "name": "item", - "type": "string", - "doc": "item :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Prototype name of the item to count. If not specified, count all items." - } - } - }, - "get_main_inventory": { - "name": "get_main_inventory", - "type": "function", - "doc": "Gets the main inventory for this character or player if this is a character or player. \n\n**Return value** \nor ````\nnil````\nif this entity is not a character or player.", - "returns": "LuaInventory" - }, - "get_quick_bar_slot": { - "name": "get_quick_bar_slot", - "type": "function", - "doc": "Gets the quick bar filter for the given slot or ````\nnil```` \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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.", - "returns": "LuaItemPrototype", - "args": { - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "gui": { - "name": "gui", - "type": "LuaGui", + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", "mode": "[R]" }, - "has_items_inside": { - "name": "has_items_inside", - "type": "function", - "doc": "Does this entity have any item inside it?", - "returns": "boolean" + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." }, - "help": { - "name": "help", + "object_name": { + "name": "object_name", "type": "string", - "doc": "All methods, and properties that this object supports." + "mode": "[R]", + "doc": "The class name of this object." }, - "in_combat": { - "name": "in_combat", - "type": "boolean", + "order": { + "name": "order", + "type": "string", "mode": "[R]", - "doc": "If this character entity is in comba" + "doc": "Order string of this prototype." }, - "index": { - "name": "index", - "type": "uint", + "valid": { + "name": "valid", + "type": "boolean", "mode": "[R]", - "doc": "This player's index in [LuaGameScript::players](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players)." + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaRecipePrototype": { + "name": "LuaRecipePrototype", + "type": "LuaRecipePrototype", + "inherits": [], + "properties": { + "allow_as_intermediate": { + "name": "allow_as_intermediate", + "type": "boolean", + "mode": "[R]", + "doc": "If this recipe is enabled for the purpose of intermediate hand-craftin" }, - "insert": { - "name": "insert", - "type": "function", - "doc": "Insert items into this entity. This works the same way as inserters or shift-clicking: the \"bes \ninventory is chosen automatically. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert. \n\n**Return value** \nNumber of items actually inserted.", - "returns": "uint", - "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to insert." - } - } + "allow_decomposition": { + "name": "allow_decomposition", + "type": "boolean", + "mode": "[R]", + "doc": "Is this recipe allowed to be broken down for the recipe tooltip \"Total raw\" calculation" }, - "is_alert_enabled": { - "name": "is_alert_enabled", - "type": "function", - "doc": "If the given alert type is currently enable \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", - "returns": "boolean", - "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" - } - } + "allow_inserter_overload": { + "name": "allow_inserter_overload", + "type": "boolean", + "mode": "[R]", + "doc": "If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size" }, - "is_alert_muted": { - "name": "is_alert_muted", - "type": "function", - "doc": "If the given alert type is currently mute \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)", - "returns": "boolean", - "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" - } - } + "allow_intermediates": { + "name": "allow_intermediates", + "type": "boolean", + "mode": "[R]", + "doc": "If this recipe is allowed to use intermediate recipes when hand-craftin" }, - "is_player": { - "name": "is_player", - "type": "function", - "doc": "When ````\ntrue````\ncontrol adapter is a LuaPlayer object, ````\nfalse````\nfor entities including characters with players", - "returns": "boolean" + "always_show_made_in": { + "name": "always_show_made_in", + "type": "boolean", + "mode": "[R]", + "doc": "Should this recipe always show \"Made in\" in the toolti" }, - "is_shortcut_available": { - "name": "is_shortcut_available", - "type": "function", - "doc": "Is a custom shortcut currently availabl \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut.", - "returns": "boolean", - "args": { - "prototype_name": { - "name": "prototype_name", - "type": "string", - "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." - } - } + "always_show_products": { + "name": "always_show_products", + "type": "boolean", + "mode": "[R]", + "doc": "If the products are always shown in the recipe toolti" }, - "is_shortcut_toggled": { - "name": "is_shortcut_toggled", - "type": "function", - "doc": "Is a custom shortcut currently toggle \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut.", - "returns": "boolean", - "args": { - "prototype_name": { - "name": "prototype_name", - "type": "string", - "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." - } - } + "category": { + "name": "category", + "type": "string", + "mode": "[R]", + "doc": "Category of the recip" }, - "item_pickup_distance": { - "name": "item_pickup_distance", + "emissions_multiplier": { + "name": "emissions_multiplier", "type": "double", "mode": "[R]", - "doc": "The item pickup distance of this character or max double when not a character or player connected to a characte" - }, - "jump_to_cutscene_waypoint": { - "name": "jump_to_cutscene_waypoint", - "doc": "Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscen \n\n**Parameters** \nwaypoint_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "function", - "args": { - "waypoint_index": { - "name": "waypoint_index", - "type": "uint", - "doc": "waypoint_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } + "doc": "The emissions multiplier for this recip" }, - "last_online": { - "name": "last_online", - "type": "uint", + "enabled": { + "name": "enabled", + "type": "boolean", "mode": "[R]", - "doc": "At what tick this player was last onlin" + "doc": "If this recipe prototype is enabled by default (enabled at the beginning of a game" }, - "loot_pickup_distance": { - "name": "loot_pickup_distance", + "energy": { + "name": "energy", "type": "double", "mode": "[R]", - "doc": "The loot pickup distance of this character or max double when not a character or player connected to a characte" + "doc": "Energy required to execute this recipe. This directly affects the crafting time: Recipe's ener \nis exactly its crafting time in seconds, when crafted in an assembling machine with crafting spe \nexactly equal to one." }, - "map_view_settings": { - "name": "map_view_settings", - "type": "MapViewSettings", - "mode": "[W]", - "doc": "The player's map view settings. To write to this, use a table containing the fields that should be change" + "group": { + "name": "group", + "type": "LuaGroup", + "mode": "[R]", + "doc": "Group of this recip" }, - "mine_entity": { - "name": "mine_entity", - "type": "function", - "doc": "Mines the given entity as if this player (or character) mined i \n\n**Parameters** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine \nforce :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player. \n\n**Return value** \nIf the mining succeeded.", - "returns": "boolean", - "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity to mine" - }, - "force": { - "name": "force", - "type": "boolean", - "doc": "force :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Forces mining the entity even if the items can't fit in the player." - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "mine_tile": { - "name": "mine_tile", - "type": "function", - "doc": "Mines the given tile as if this player (or character) mined i \n\n**Parameters** \ntile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine. \n\n**Return value** \nIf the mining succeeded.", - "returns": "boolean", - "args": { - "tile": { - "name": "tile", - "type": "LuaTile", - "doc": "tile :: [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tile to mine." - } - } + "hidden": { + "name": "hidden", + "type": "boolean", + "mode": "[R]", + "doc": "Is the recipe hidden? Hidden recipe don't show up in the crafting men" }, - "minimap_enabled": { - "name": "minimap_enabled", + "hidden_from_flow_stats": { + "name": "hidden_from_flow_stats", "type": "boolean", - "mode": "[RW]", - "doc": "````\ntrue````\nif the minimap is visible." + "mode": "[R]", + "doc": "Is the recipe hidden from flow statistics (item/fluid production statistics" }, - "mining_state": { - "name": "mining_state", - "type": "table", - "mode": "[RW]", - "doc": "Current mining stat \nIt is a table with two fields: \nmining :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Whether the player is mining at all \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor). \n\n**Note: ** When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected) and [LuaControl::update_selected_entity](http://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity)." + "hidden_from_player_crafting": { + "name": "hidden_from_player_crafting", + "type": "boolean", + "mode": "[R]", + "doc": "Is the recipe hidden from player crafting? The recipe will still show up for selection in machine" }, - "mod_settings": { - "name": "mod_settings", + "ingredients": { + "name": "ingredients", + "type": "array of Ingredient", "mode": "[R]", - "doc": "**Note: ** This can become invalid if during operation this player becomes invalid." + "doc": "Ingredients for this recip" }, - "mute_alert": { - "name": "mute_alert", - "type": "function", - "doc": "Mutes alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was muted (false if it was already muted).", - "returns": "boolean", - "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]", + "doc": "Localised name of the recip" + }, + "main_product": { + "name": "main_product", + "type": "Product", + "mode": "[R]", + "doc": "The main product of this recipe, ````\nnil````\nif no main product is defined." }, "name": { "name": "name", "type": "string", - "mode": "[RW]", - "doc": "The player's username." + "mode": "[R]", + "doc": "Name of the recipe. This can be different than the name of the result items as there cou \nbe more recipes to make the same ite" }, - "online_time": { - "name": "online_time", - "type": "uint", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "How many ticks did this player spend playing this save (all sessions combine" + "doc": "The class name of this object." }, - "open_map": { - "name": "open_map", - "doc": "Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position (and scale \nRender mode change requests are processed before rendering of the next fram \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - }, - "scale": { - "name": "scale", - "type": "double", - "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)" - } - } + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string. This is used to sort the crafting men" }, - "open_technology_gui": { - "name": "open_technology_gui", - "doc": "Open the technology GUI and select a given technolog \n\n**Parameters** \ntechnology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI.", - "type": "function", - "args": { - "technology": { - "name": "technology", - "type": "TechnologySpecification", - "doc": "technology :: [TechnologySpecification](http://lua-api.factorio.com/latest/Concepts.html#TechnologySpecification) (optional): The technology to select after opening the GUI." - } - } + "overload_multiplier": { + "name": "overload_multiplier", + "type": "uint", + "mode": "[R]", + "doc": "Used to determine how many extra items are put into an assembling machine before it's considered \"full enough" }, - "opened": { - "name": "opened", - "type": "LuaEntity or LuaItemStack or LuaEquipment or LuaEquipmentGrid or LuaPlayer or LuaGuiElement or defines.gui_type", - "mode": "[RW]", - "doc": "The GUI target the player currently has open; ````\nnil````\nif non \n\n**Note: ** Write supports any of the types. Read will return the entity, equipment, element or nil." + "products": { + "name": "products", + "type": "array of Product", + "mode": "[R]", + "doc": "The results of this recipe." }, - "opened_gui_type": { - "name": "opened_gui_type", - "type": "defines.gui_type", + "request_paste_multiplier": { + "name": "request_paste_multiplier", + "type": "uint", "mode": "[R]", - "doc": "Returns the [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type) or ````\nnil````\n." + "doc": "The multiplier used when this recipe is copied from an assembling machine to a requester ches \nFor each item in the recipe the item count * this value is set in the requester ches" }, - "opened_self": { - "name": "opened_self", + "show_amount_in_title": { + "name": "show_amount_in_title", "type": "boolean", "mode": "[R]", - "doc": "````\ntrue````\nif the player opened itself. I.e. if they opened the character or god-controller GUI." + "doc": "If the amount is shown in the recipe tooltip title when the recipe produces more than 1 produc" }, - "permission_group": { - "name": "permission_group", - "type": "LuaPermissionGroup", - "mode": "[RW]", - "doc": "The permission group this player is part of or ````\nnil````\nif not part of any grou" + "subgroup": { + "name": "subgroup", + "type": "LuaGroup", + "mode": "[R]", + "doc": "Subgroup of this recip" }, - "picking_state": { - "name": "picking_state", + "unlock_results": { + "name": "unlock_results", "type": "boolean", - "mode": "[RW]", - "doc": "Current item-picking stat" + "mode": "[R]", + "doc": "Is this recipe unlocks the result item(s) so they're shown in filter-select GUI" }, - "pipette_entity": { - "name": "pipette_entity", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "If this recipe prototype is enabled by default (enabled at the beginning of a game)." + }, + "LuaRemote": { + "name": "LuaRemote", + "type": "LuaRemote", + "inherits": [], + "properties": { + "add_interface": { + "name": "add_interface", + "doc": "Add a remote interface \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface. \nfunctions :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → function: List of functions that are members of the new interface. \n\n**Note: ** It is an error if the given interface ````\nname````\nis already registered.", "type": "function", - "doc": "Invokes the \"smart pipette\" action on the player as if the user pressed i \n\n**Parameters** \nentity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) \n\n**Return value** \nIf the smart pipette found something to place", - "returns": "boolean", "args": { - "entity": { - "name": "entity", - "type": "string or LuaEntity or LuaEntityPrototype", - "doc": "entity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html)" + "functions": { + "name": "functions", + "type": "dictionary string → function", + "doc": "functions :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → function: List of functions that are members of the new interface." + }, + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface." } } }, - "play_sound": { - "name": "play_sound", + "call": { + "name": "call", + "doc": "Call a function of an interface. \n\n**Parameters** \ninterface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Interface to look up ````\nfunction````\nin. \nfunction :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Function name that belongs to ````\ninterface````\n. \n...: Arguments to pass to the called function. \n\n**Return value** \nAnything, including most LuaObjects.", "type": "function", - "doc": "Plays a sound for this playe \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive.", - "returns": "boolean", + "returns": "Anything", "args": { - "path": { - "name": "path", - "type": "SoundPath", - "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive." + "...": { + "name": "...", + "doc": "...: Arguments to pass to the called function.", + "type": "..." + }, + "function": { + "name": "function", + "type": "string", + "doc": "function :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Function name that belongs to ````\ninterface````\n." + }, + "interface": { + "name": "interface", + "type": "string", + "doc": "interface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Interface to look up ````\nfunction````\nin." } } }, - "position": { - "name": "position", - "type": "Position", + "interfaces": { + "name": "interfaces", + "type": "dictionary string → dictionary string → boolean", "mode": "[R]", - "doc": "Current position of the entity." + "doc": "List of all registered interfaces. For each interface name, ````\nremote.interfaces[name]````\nis a dictiona \nmapping the interface's registered functions to the value ````\ntrue````\n. \n\n**Example** \nAssuming the \"human interactor\" interface is registered as abo \n````\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"hello\"]))        -- prints true \ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"nonexistent\"]))  -- prints nil````" }, - "print": { - "name": "print", - "doc": "Print text to the chat console. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)", + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "This object's nam" + }, + "remove_interface": { + "name": "remove_interface", "type": "function", + "doc": "Removes an interface with the given nam \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface. \n\n**Return value** \nIf the interface was removed. ````\nFalse````\nif the interface didn't exist.", + "returns": "boolean", "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" - }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + "name": { + "name": "name", + "type": "string", + "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface." } } - }, - "print_entity_statistics": { - "name": "print_entity_statistics", - "doc": "Print entity statistics to the player's consol \n\n**Parameters** \nentities :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Entity prototypes to get statistics for. If not specified or empt \ndisplay statistics for all entities.", + } + }, + "doc": "Add a remote interface." + }, + "LuaRendering": { + "name": "LuaRendering", + "type": "LuaRendering", + "inherits": [], + "properties": { + "bring_to_front": { + "name": "bring_to_front", + "doc": "Reorder this object so that it is drawn in front of the already existing object \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", "type": "function", "args": { - "entities": { - "name": "entities", - "type": "array of string", - "doc": "entities :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Entity prototypes to get statistics for. If not specified or empt \ndisplay statistics for all entities." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "print_lua_object_statistics": { - "name": "print_lua_object_statistics", - "doc": "Print LuaObject counts per mod.", - "type": "function" - }, - "print_robot_jobs": { - "name": "print_robot_jobs", - "doc": "Print construction robot job counts to the players console.", - "type": "function" - }, - "reach_distance": { - "name": "reach_distance", - "type": "uint", - "mode": "[R]", - "doc": "The reach distance of this character or max uint when not a character or player connected to a characte" - }, - "remove_alert": { - "name": "remove_alert", - "doc": "Removes all alerts matching the given filters or if an empty filters table is given all alerts are remove \n\n**Parameters** \nTable with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional)", + "clear": { + "name": "clear", + "doc": "Destroys all render object \n\n**Parameters** \nmod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, only the render objects created by this mod are destroyed.", "type": "function", "args": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "doc": "Table with the following fields: \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \ntype :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) (optional) \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \nicon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) (optional) \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional)" + "mod_name": { + "name": "mod_name", + "type": "string", + "doc": "mod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, only the render objects created by this mod are destroyed." } } }, - "remove_item": { - "name": "remove_item", + "destroy": { + "name": "destroy", + "doc": "Destroy the object with the given i \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", "type": "function", - "doc": "Remove items from this entity. \n\n**Parameters** \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove. \n\n**Return value** \nNumber of items actually removed.", - "returns": "uint", "args": { - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to remove." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "render_mode": { - "name": "render_mode", - "type": "defines.render_mode", - "mode": "[R]", - "doc": "The render mode of the player, like map or zoom to worl \nThe render mode can be set using [LuaPlayer::open_map](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.open_map), [LuaPlayer::zoom_to_world](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom_to_world) and [LuaPlayer::close_map](http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.close_map" - }, - "repair_state": { - "name": "repair_state", - "type": "table", - "mode": "[RW]", - "doc": "Current repair stat \nIt is a table with two fields: \nrepairing :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being repaired" - }, - "resource_reach_distance": { - "name": "resource_reach_distance", - "type": "double", - "mode": "[R]", - "doc": "The resource reach distance of this character or max double when not a character or player connected to a characte" - }, - "riding_state": { - "name": "riding_state", - "type": "RidingState", - "mode": "[RW]", - "doc": "Current riding state of this car or the vehicle this player is riding i" - }, - "selected": { - "name": "selected", - "type": "LuaEntity", - "mode": "[RW]", - "doc": "The currently selected entity; ````\nnil````\nif none. Assigning an entity will select it if selectable otherwise clears selection." - }, - "set_active_quick_bar_page": { - "name": "set_active_quick_bar_page", - "doc": "Sets which quick bar page is being used for the given screen pag \n\n**Parameters** \nscreen_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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. \npage_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The new quick bar page.", + "draw_animation": { + "name": "draw_animation", "type": "function", + "doc": "Create an animatio \n\n**Parameters** \nTable with the following fields: \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of an animation prototype. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the animation. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the animation. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the animation. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How many frames the animation goes forward per tick. Default is 1. \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Offset of the animation in frames. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the animation. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the animation if ````\norientation_target````\nis given. This offset will rotate together with the animation. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the animation. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", + "returns": "uint64", "args": { - "page_index": { - "name": "page_index", - "type": "uint", - "doc": "page_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The new quick bar page." - }, - "screen_index": { - "name": "screen_index", - "type": "uint", - "doc": "screen_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." + "animation": { + "name": "animation", + "type": "string", + "doc": "Table with the following fields: \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of an animation prototype. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the animation. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the animation. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the animation. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How many frames the animation goes forward per tick. Default is 1. \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Offset of the animation in frames. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the animation. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the animation if ````\norientation_target````\nis given. This offset will rotate together with the animation. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the animation. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_controller": { - "name": "set_controller", - "doc": "Set the controller type of the player. \n\n**Parameters** \nTable with the following fields: \ntype :: [defines.controllers](http://lua-api.factorio.com/latest/defines.html#defines.controllers): Which controller to use \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity to control. Mandatory when ````\ntype```` \n[defines.controllers.character](http://lua-api.factorio.com/latest/defines.html#defines.controllers.character), ignored otherwise. \nwaypoints (optional): List of waypoints for the cutscene controller. This parameter is mandatory wh \n````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene). Each waypoint is a tabl \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Position to pan the camera to. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html) (optional): Entity or unit group to pan the camera to. \ntransition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): How many ticks it will take to reach this waypoint from the previous one. \ntime_to_wait :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Time in ticks to wait before moving to the next waypoint. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Zoom level to be set when the waypoint is reached. When not specified, t \nprevious waypoint's zoom is used. \nchart_mode_cutoff :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified, the game will switch to chart-mode (map zoomed ou \nrendering when the zoom level is less than this value. \nfinal_transition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory when ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nIt is the time in ticks it will take for the camera to pan from the final waypoint back to the starti \nposition. \n\n**Note: ** Setting a player to [defines.controllers.editor](http://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) auto promotes the player to admin and enables cheat mode. \n\n**Note: ** Setting a player to [defines.controllers.editor](http://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) also requires the calling player be an admin.", + "draw_arc": { + "name": "draw_arc", "type": "function", + "doc": "Create an ar \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the outer edge of the arc, in tiles. \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the inner edge of the arc, in tiles. \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Where the arc starts, in radian. \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The angle of the arc, in radian. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", + "returns": "uint64", "args": { - "type": { - "name": "type", - "type": "defines.controllers", - "doc": "Table with the following fields: \ntype :: [defines.controllers](http://lua-api.factorio.com/latest/defines.html#defines.controllers): Which controller to use \ncharacter :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity to control. Mandatory when ````\ntype```` \n[defines.controllers.character](http://lua-api.factorio.com/latest/defines.html#defines.controllers.character), ignored otherwise. \nwaypoints (optional): List of waypoints for the cutscene controller. This parameter is mandatory wh \n````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene). Each waypoint is a tabl \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Position to pan the camera to. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) or [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html) (optional): Entity or unit group to pan the camera to. \ntransition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): How many ticks it will take to reach this waypoint from the previous one. \ntime_to_wait :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Time in ticks to wait before moving to the next waypoint. \nzoom :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Zoom level to be set when the waypoint is reached. When not specified, t \nprevious waypoint's zoom is used. \nchart_mode_cutoff :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If specified, the game will switch to chart-mode (map zoomed ou \nrendering when the zoom level is less than this value. \nfinal_transition_time :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Mandatory when ````\ntype````\nis [defines.controllers.cutscene](http://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene \nIt is the time in ticks it will take for the camera to pan from the final waypoint back to the starti \nposition." + "color": { + "name": "color", + "type": "Color", + "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the outer edge of the arc, in tiles. \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the inner edge of the arc, in tiles. \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Where the arc starts, in radian. \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The angle of the arc, in radian. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_ending_screen_data": { - "name": "set_ending_screen_data", - "doc": "Setup the screen to be shown when the game is finished. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): Message to be shown. \nfile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to image to be shown.", + "draw_circle": { + "name": "draw_circle", "type": "function", + "doc": "Create a circl \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): In tiles. \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the circle should be filled. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", + "returns": "uint64", "args": { - "file": { - "name": "file", - "type": "string", - "doc": "file :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Path to image to be shown." - }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): Message to be shown." + "color": { + "name": "color", + "type": "Color", + "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): In tiles. \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the circle should be filled. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_goal_description": { - "name": "set_goal_description", - "doc": "Set the text in the goal window (top left). \n\n**Parameters** \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text to display. \\n can be used to delimit lines. Passing emp \nstring or omitting this parameter entirely will make the goal window disappear. \nonly_update :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, won't play the \"goal updated\" sound.", + "draw_light": { + "name": "draw_light", "type": "function", + "doc": "Create a ligh \n\n**Parameters** \nTable with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the light. Default is 0. \nscale :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The minimum darkness at which this light is rendered. Default is 0. \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this light has the same orientation as the entity target, default is false. Note that ````\norientation````\nis still applied to the sprite. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Defaults to white (no tint). \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the light. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Note: ** The base game uses the utility sprites ````\nlight_medium````\nand ````\nlight_small````\nfor lights.", + "returns": "uint64", "args": { - "only_update": { - "name": "only_update", - "type": "boolean", - "doc": "only_update :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When ````\ntrue````\n, won't play the \"goal updated\" sound." - }, - "text": { - "name": "text", - "type": "LocalisedString", - "doc": "text :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) (optional): The text to display. \\n can be used to delimit lines. Passing emp \nstring or omitting this parameter entirely will make the goal window disappear." + "sprite": { + "name": "sprite", + "type": "SpritePath", + "doc": "Table with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the light. Default is 0. \nscale :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The minimum darkness at which this light is rendered. Default is 0. \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this light has the same orientation as the entity target, default is false. Note that ````\norientation````\nis still applied to the sprite. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Defaults to white (no tint). \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the light. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_gui_arrow": { - "name": "set_gui_arrow", - "doc": "Create an arrow which points at this entity. This is used in the tutorial. For examples, see ````\ncontrol.lua```` \nin the campaign missions. \n\n**Parameters** \nTable with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n.", + "draw_line": { + "name": "draw_line", "type": "function", + "doc": "Create a lin \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): In pixels (32 per tile). \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the gaps that this line has, in tiles. Default is 0. \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the dashes that this line has. Used only if gap_length > 0. Default is 0. \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nfrom````\nis a LuaEntity. \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nto````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Example** \nDraw a white and 2 pixel wide line from {0, 0} to {2, 2 \n````\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2}```` \n\n**Example** \nDraw a red and 3 pixel wide line from {0, 0} to {0, 5}. The line has 1 tile long dashes and gap \n````\nrendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {0, 5}, color = {r = 1}, width = 3, gap_length = 1, dash_length = 1}````", + "returns": "uint64", "args": { - "type": { - "name": "type", - "type": "string", - "doc": "Table with the following fields: \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Where to point to. This field determines what other fields are mandator \nMay be ````\n\"nowhere\"````\n, ````\n\"goal\"````\n, ````\n\"entity_info\"````\n, ````\n\"active_window\"````\n, ````\n\"entity\"````\n, ````\n\"position\"```` \n````\n\"crafting_queue\"````\n, or ````\n\"item_stack\"````\n. \nAdditional ````\ntype````\n-specific parameters \nentity \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nposition \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncrafting_queue \ncrafting_queueindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitem_stack \ninventory_index :: [defines.inventory](http://lua-api.factorio.com/latest/defines.html#defines.inventory) \nitem_stack_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): May be either ````\n\"player\"````\nor ````\n\"target\"````\n." + "color": { + "name": "color", + "type": "Color", + "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): In pixels (32 per tile). \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the gaps that this line has, in tiles. Default is 0. \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the dashes that this line has. Used only if gap_length > 0. Default is 0. \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nfrom````\nis a LuaEntity. \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nto````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_quick_bar_slot": { - "name": "set_quick_bar_slot", - "doc": "Sets the quick bar filter for the given slo \n\n**Parameters** \nindex :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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. \nfilter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) or [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The filter or ````\nnil````\n.", + "draw_polygon": { + "name": "draw_polygon", "type": "function", + "doc": "Create a triangle mesh defined by a triangle stri \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nvertices :: array of CustomScriptRenderTarget \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Acts like an offset applied to all vertices that are not set to an entity. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation applied to all vertices. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that ````\norientation````\nis still applied. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", + "returns": "uint64", "args": { - "filter": { - "name": "filter", - "type": "string or LuaItemPrototype or LuaItemStack", - "doc": "filter :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) or [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The filter or ````\nnil````\n." - }, - "index": { - "name": "index", - "type": "uint", - "doc": "index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): 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." + "color": { + "name": "color", + "type": "Color", + "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nvertices :: array of CustomScriptRenderTarget \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Acts like an offset applied to all vertices that are not set to an entity. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation applied to all vertices. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that ````\norientation````\nis still applied. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_shortcut_available": { - "name": "set_shortcut_available", - "doc": "Make a custom shortcut available or unavailabl \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut. \navailable :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", + "draw_rectangle": { + "name": "draw_rectangle", "type": "function", + "doc": "Create a rectangl \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the rectangle should be filled. \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nleft_top````\nis a LuaEntity. \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nright_bottom````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", + "returns": "uint64", "args": { - "available": { - "name": "available", - "type": "boolean", - "doc": "available :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - }, - "prototype_name": { - "name": "prototype_name", - "type": "string", - "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." + "color": { + "name": "color", + "type": "Color", + "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the rectangle should be filled. \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nleft_top````\nis a LuaEntity. \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nright_bottom````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "set_shortcut_toggled": { - "name": "set_shortcut_toggled", - "doc": "Toggle or untoggle a custom shortc \n\n**Parameters** \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut. \ntoggled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", + "draw_sprite": { + "name": "draw_sprite", "type": "function", + "doc": "Create a sprit \n\n**Parameters** \nTable with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the sprite. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the sprite. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the sprite. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the sprite rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the sprite if ````\norientation_target````\nis given. This offset will rotate together with the sprite. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the sprite. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Example** \nThis will draw an iron plate icon at the character's feet. The sprite will move together with the characte \n````\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = game.player.character, surface = game.player.surface}```` \n\n**Example** \nThis will draw an iron plate icon at the character's head. The sprite will move together with the characte \n````\nrendering.draw_sprite{sprite = \"item.iron-plate\", target = game.player.character, target_offset = {0, -2}, surface = game.player.surface}````", + "returns": "uint64", "args": { - "prototype_name": { - "name": "prototype_name", - "type": "string", - "doc": "prototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the custom shortcut." - }, - "toggled": { - "name": "toggled", - "type": "boolean", - "doc": "toggled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + "sprite": { + "name": "sprite", + "type": "SpritePath", + "doc": "Table with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the sprite. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the sprite. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the sprite. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the sprite rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the sprite if ````\norientation_target````\nis given. This offset will rotate together with the sprite. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the sprite. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "shooting_state": { - "name": "shooting_state", - "type": "table", - "mode": "[RW]", - "doc": "Current shooting stat \nIt is a table with two fields: \nstate :: [defines.shooting](http://lua-api.factorio.com/latest/defines.html#defines.shooting): The current state \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position being shot at" - }, - "spectator": { - "name": "spectator", - "type": "boolean", - "mode": "[RW]", - "doc": "If ````\ntrue````\n, zoom-to-world noise effect will be disabled and environmental sounds will be bas \non zoom-to-world view instead of position of player's character." - }, - "surface": { - "name": "surface", - "type": "LuaSurface", - "mode": "[R]", - "doc": "The surface this entity is currently on." - }, - "tag": { - "name": "tag", - "type": "string", - "mode": "[RW]", - "doc": "The tag that is shown after the player in chat and on the map." - }, - "teleport": { - "name": "teleport", + "draw_text": { + "name": "draw_text", "type": "function", - "doc": "Teleport the entity to a given position, possibly on another surface \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface. \n\n**Return value** \n````\ntrue````\nwhen the entity was successfully teleported. \n\n**Note: ** Some entities may not be teleported. For instance, rail signa \nwon't allow teleportation and this method will always return ````\nfalse````\nwhen used on any such entity. \n\n**Note: ** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinat \n````\n'teleport(0, 1)'````\nto move the entity 1 tile positive \n````\n'teleport(4)'````\nto move the entity 4 tiles to the positive x.", - "returns": "boolean", + "doc": "Create a tex \n\n**Parameters** \nTable with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The text to display. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Name of font to use. Defaults to the same font as flying-text. \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the text. Default is 0. \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Defaults to \"left\". Other options are \"right\" and \"center\". \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Note: ** Not all fonts support scaling.", + "returns": "uint64", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to teleport to." - }, - "surface": { - "name": "surface", - "type": "SurfaceSpecification", - "doc": "surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional): Surface to teleport to. If not given, will telepo \nto the entity's current surface." + "text": { + "name": "text", + "type": "LocalisedString", + "doc": "Table with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The text to display. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Name of font to use. Defaults to the same font as flying-text. \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the text. Default is 0. \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Defaults to \"left\". Other options are \"right\" and \"center\". \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." } } }, - "ticks_to_respawn": { - "name": "ticks_to_respawn", - "type": "uint", - "mode": "[RW]", - "doc": "The number of ticks until this player will respawn or ````\nnil````\nif not waiting to respaw \n\n**Note: ** Set to ````\nnil````\nto immediately respawn the player. \n\n**Note: ** Set to any positive value to trigger the respawn state for this player." + "get_alignment": { + "name": "get_alignment", + "type": "function", + "doc": "Get the alignment of the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", + "returns": "string", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "unlock_achievement": { - "name": "unlock_achievement", - "doc": "Unlock the achievements of the given playe \nThis 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 \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): name of the achievement to unlock", + "get_all_ids": { + "name": "get_all_ids", "type": "function", + "doc": "Gets an array of all valid object id \n\n**Parameters** \nmod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, get only the render objects created by this mod.", + "returns": "array of uint64", "args": { - "name": { - "name": "name", + "mod_name": { + "name": "mod_name", "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): name of the achievement to unlock" + "doc": "mod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, get only the render objects created by this mod." } } }, - "unmute_alert": { - "name": "unmute_alert", + "get_angle": { + "name": "get_angle", "type": "function", - "doc": "Unmutes alerts for the given alert categor \n\n**Parameters** \nalert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type) \n\n**Return value** \nIf the alert type was unmuted (false if it was wasn't muted).", - "returns": "boolean", + "doc": "Get the angle of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nangle in radian \n_Can only be used if this is Arc_", + "returns": "float", "args": { - "alert_type": { - "name": "alert_type", - "type": "defines.alert_type", - "doc": "alert_type :: [defines.alert_type](http://lua-api.factorio.com/latest/defines.html#defines.alert_type)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "update_selected_entity": { - "name": "update_selected_entity", - "doc": "Select an entity, as if by hovering the mouse above it. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select", + "get_animation": { + "name": "get_animation", "type": "function", + "doc": "Get the animation prototype name of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Animation_", + "returns": "string", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position of the entity to select" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "use_from_cursor": { - "name": "use_from_cursor", - "doc": "Uses the current item in the cursor if it's a capsule or does nothing if no \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the item would be used.", + "get_animation_offset": { + "name": "get_animation_offset", "type": "function", + "doc": "Get the animation offset of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nAnimation offset in frames. \n_Can only be used if this is Animation_", + "returns": "double", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the item would be used." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - }, - "vehicle": { - "name": "vehicle", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The vehicle the player is currently sitting in; ````\nnil````\nif none." + "get_animation_speed": { + "name": "get_animation_speed", + "type": "function", + "doc": "Get the animation speed of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nAnimation speed in frames per tick. \n_Can only be used if this is Animation_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "walking_state": { - "name": "walking_state", - "type": "table", - "mode": "[RW]", - "doc": "Current walking stat \nIt is a table with two fields: \nwalking :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If ````\nfalse````\n, the player is currently not walking; otherwise it's going somewhere \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): Direction where the player is walking \n\n**Example** \nMake the player go north. Note that a one-shot action like this will only make the player walk for one tic \n````\ngame.player.walking_state = {walking = true, direction = defines.direction.north}````" + "get_color": { + "name": "get_color", + "type": "function", + "doc": "Get the color or tint of the object with this i \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nor ````\nnil````\nif the object does not support color. \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light, or Animation_", + "returns": "Color", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "zoom": { - "name": "zoom", - "type": "double", - "mode": "[W]", - "doc": "The player's zoom-level." + "get_dash_length": { + "name": "get_dash_length", + "type": "function", + "doc": "Get the dash length of the line with this id or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "zoom_to_world": { - "name": "zoom_to_world", - "doc": "Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position (and scale \nRender mode change requests are processed before rendering of the next fram \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)", + "get_draw_on_ground": { + "name": "get_draw_on_ground", "type": "function", + "doc": "Get whether this is being drawn on the ground, under most entities and sprite \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, or Polygon_", + "returns": "boolean", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - }, - "scale": { - "name": "scale", - "type": "double", - "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } - } - }, - "doc": "A player in the game. Pay attention that a player may or may not have a character, which is the\n LuaEntity of the little guy running around the world doing things." - }, - "LuaProfiler": { - "name": "LuaProfiler", - "type": "LuaProfiler", - "inherits": [], - "properties": { - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." }, - "reset": { - "name": "reset", - "doc": "Resets the clock, also restarting it.", - "type": "function" + "get_filled": { + "name": "get_filled", + "type": "function", + "doc": "Get if the circle or rectangle with this id is filled or ````\nnil````\nif the object is not a circle or rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Circle or Rectangle_", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "restart": { - "name": "restart", - "doc": "Start the clock again, without resetting it.", - "type": "function" + "get_font": { + "name": "get_font", + "type": "function", + "doc": "Get the font of the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", + "returns": "string", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "stop": { - "name": "stop", - "doc": "Stops the clock.", - "type": "function" + "get_forces": { + "name": "get_forces", + "type": "function", + "doc": "Get the forces that the object with this id is rendered to or ````\nnil````\nif visible to all force \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "array of LuaForce", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "An object used to measure script performance." - }, - "LuaProgrammableSpeakerControlBehavior": { - "name": "LuaProgrammableSpeakerControlBehavior", - "type": "LuaProgrammableSpeakerControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "circuit_condition": { - "name": "circuit_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]" + "get_from": { + "name": "get_from", + "type": "function", + "doc": "Get from where the line with this id is drawn or ````\nnil````\nif this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", + "returns": "ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "circuit_parameters": { - "name": "circuit_parameters", - "type": "ProgrammableSpeakerCircuitParameters", - "mode": "[RW]" + "get_gap_length": { + "name": "get_gap_length", + "type": "function", + "doc": "Get the length of the gaps in the line with this id or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "get_intensity": { + "name": "get_intensity", + "type": "function", + "doc": "Get the intensity of the light with this id or ````\nnil````\nif the object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", + "returns": "float", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "get_circuit_network": { - "name": "get_circuit_network", + "get_left_top": { + "name": "get_left_top", "type": "function", - "returns": "LuaCircuitNetwork", + "doc": "Get where top left corner of the rectangle with this id is drawn or ````\nnil````\nif the object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Rectangle_", + "returns": "ScriptRenderTarget", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_max_radius": { + "name": "get_max_radius", + "type": "function", + "doc": "Get the radius of the outer edge of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Arc_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." + "get_min_radius": { + "name": "get_min_radius", + "type": "function", + "doc": "Get the radius of the inner edge of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Arc_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for programmable speakers." - }, - "LuaRCON": { - "name": "LuaRCON", - "type": "LuaRCON", - "inherits": [], - "properties": { - "print": { - "name": "print", - "doc": "Print text to the calling RCON interface if an \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)", + "get_minimum_darkness": { + "name": "get_minimum_darkness", "type": "function", + "doc": "Get the minimum darkness at which the light with this id is rendered or ````\nnil````\nif the object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", + "returns": "float", "args": { - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } - } - }, - "doc": "An interface to send messages to the calling RCON interface." - }, - "LuaRailChainSignalControlBehavior": { - "name": "LuaRailChainSignalControlBehavior", - "type": "LuaRailChainSignalControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "blue_signal": { - "name": "blue_signal", - "type": "SignalID", - "mode": "[RW]" }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." + "get_only_in_alt_mode": { + "name": "get_only_in_alt_mode", + "type": "function", + "doc": "Get whether this is only rendered in alt-mod \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "get_circuit_network": { - "name": "get_circuit_network", + "get_orientation": { + "name": "get_orientation", "type": "function", - "returns": "LuaCircuitNetwork", + "doc": "Get the orientation of the object with this id or ````\nnil````\nif the object is not a text, polygon, sprite, light or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Text, Polygon, Sprite, Light, or Animation_", + "returns": "float", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." + } }, - "green_signal": { - "name": "green_signal", - "type": "SignalID", - "mode": "[RW]" + "get_orientation_target": { + "name": "get_orientation_target", + "type": "function", + "doc": "The object rotates so that it faces this target. Note that ````\norientation````\nis still applied to the objec \nGet the orientation_target of the object with this id or ````\nnil````\nif no target or if this object is not a polygon, sprite, or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Polygon, Sprite, or Animation_", + "returns": "ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_oriented": { + "name": "get_oriented", + "type": "function", + "doc": "Get if the light with this id is rendered has the same orientation as the target entity or ````\nnil````\nif the object is not a ligh \nNote that ````\norientation````\nis still applied to the sprit \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "orange_signal": { - "name": "orange_signal", - "type": "SignalID", - "mode": "[RW]" + "get_oriented_offset": { + "name": "get_oriented_offset", + "type": "function", + "doc": "Offsets the center of the sprite or animation if ````\norientation_target````\nis given. This offset will rotate together with the sprite or animatio \nGet the oriented_offset of the sprite or animation with this id or ````\nnil````\nif this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", + "returns": "Vector", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "red_signal": { - "name": "red_signal", - "type": "SignalID", - "mode": "[RW]" + "get_players": { + "name": "get_players", + "type": "function", + "doc": "Get the players that the object with this id is rendered to or ````\nnil````\nif visible to all player \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "array of LuaPlayer", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for rail chain signals." - }, - "LuaRailPath": { - "name": "LuaRailPath", - "type": "LuaRailPath", - "inherits": [], - "properties": { - "current": { - "name": "current", - "type": "uint", - "mode": "[R]", - "doc": "The current rail inde" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "rails": { - "name": "rails", - "type": "custom dictionary uint → LuaEntity", - "mode": "[R]", - "doc": "The rails this path travel" - }, - "size": { - "name": "size", - "type": "uint", - "mode": "[R]", - "doc": "The total number of rails in this pat" - }, - "total_distance": { - "name": "total_distance", - "type": "double", - "mode": "[R]", - "doc": "The total path distanc" - }, - "travelled_distance": { - "name": "travelled_distance", - "type": "double", - "mode": "[R]", - "doc": "The total distance travelle" - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "A rail path." - }, - "LuaRailSignalControlBehavior": { - "name": "LuaRailSignalControlBehavior", - "type": "LuaRailSignalControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "circuit_condition": { - "name": "circuit_condition", - "type": "CircuitConditionSpecification", - "mode": "[RW]", - "doc": "The circuit condition when controlling the signal through the circuit networ" - }, - "close_signal": { - "name": "close_signal", - "type": "boolean", - "mode": "[RW]", - "doc": "If this will close the rail signal based off the circuit conditio" - }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." - }, - "get_circuit_network": { - "name": "get_circuit_network", + "get_radius": { + "name": "get_radius", "type": "function", - "returns": "LuaCircuitNetwork", + "doc": "Get the radius of the circle with this id or ````\nnil````\nif the object is not a circl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Circle_", + "returns": "double", "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." - }, - "green_signal": { - "name": "green_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "orange_signal": { - "name": "orange_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "read_signal": { - "name": "read_signal", - "type": "boolean", - "mode": "[RW]", - "doc": "If this will read the rail signal stat" + } }, - "red_signal": { - "name": "red_signal", - "type": "SignalID", - "mode": "[RW]" + "get_render_layer": { + "name": "get_render_layer", + "type": "function", + "doc": "Get the render layer of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", + "returns": "RenderLayer", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." + "get_right_bottom": { + "name": "get_right_bottom", + "type": "function", + "doc": "Get where bottom right corner of the rectangle with this id is drawn or ````\nnil````\nif the object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Rectangle_", + "returns": "ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for rail signals." - }, - "LuaRandomGenerator": { - "name": "LuaRandomGenerator", - "type": "LuaRandomGenerator", - "inherits": [], - "properties": { - "()": { - "name": "()", + "get_scale": { + "name": "get_scale", "type": "function", - "doc": "Generates a random numbe \nIf no parameters are given a number in the [0, 1) range is returne \nIf a single parameter is given a floored number in the [0, N] range is returne \nIf 2 parameters are given a floored number in the [N1, N2] range is returne \n\n**Parameters** \nlower :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Inclusive lower bound on the result \nupper :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Inclusive upper bound on the result", + "doc": "Get the scale of the text or light with this id or ````\nnil````\nif the object is not a text or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text or Light_", "returns": "double", "args": { - "lower": { - "name": "lower", - "type": "double", - "doc": "lower :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Inclusive lower bound on the result" - }, - "upper": { - "name": "upper", - "type": "double", - "doc": "upper :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Inclusive upper bound on the result" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_scale_with_zoom": { + "name": "get_scale_with_zoom", + "type": "function", + "doc": "Get if the text with this id scales with player zoom or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "re_seed": { - "name": "re_seed", - "doc": "Re-seeds the random generator with the given valu \n\n**Parameters** \nseed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Note: ** Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.", + "get_sprite": { + "name": "get_sprite", "type": "function", + "doc": "Get the sprite of the sprite or light with this id or ````\nnil````\nif the object is not a sprite or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Light_", + "returns": "SpritePath", "args": { - "seed": { - "name": "seed", - "type": "uint", - "doc": "seed :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will.\n This random generator can be saved and loaded and will maintain its state.\n Note this is entirely different from calling math.random() and you should be sure you actually want to use this over calling math.random().\n If you aren't sure if you need to use this over calling math.random() then you probably don't need to use this." - }, - "LuaRecipe": { - "name": "LuaRecipe", - "type": "LuaRecipe", - "inherits": [], - "properties": { - "category": { - "name": "category", - "type": "string", - "mode": "[R]", - "doc": "Category of the recip" + "get_start_angle": { + "name": "get_start_angle", + "type": "function", + "doc": "Get where the arc with this id starts or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nangle in radian \n_Can only be used if this is Arc_", + "returns": "float", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "enabled": { - "name": "enabled", - "type": "boolean", - "mode": "[RW]", - "doc": "Can the recipe be use" + "get_surface": { + "name": "get_surface", + "type": "function", + "doc": "The surface the object with this id is rendered o \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "LuaSurface", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "energy": { - "name": "energy", - "type": "double", - "mode": "[R]", - "doc": "Energy required to execute this recipe. This directly affects the crafting time: Recipe's ener \nis exactly its crafting time in seconds, when crafted in an assembling machine with crafting spe \nexactly equal to one." + "get_target": { + "name": "get_target", + "type": "function", + "doc": "Get where the object with this id is drawn or ````\nnil````\nif the object does not support targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light, or Animation_", + "returns": "ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "force": { - "name": "force", - "type": "LuaForce", - "mode": "[R]", - "doc": "The force that owns this recip" + "get_text": { + "name": "get_text", + "type": "function", + "doc": "Get the text that is displayed by the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", + "returns": "LocalisedString", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "group": { - "name": "group", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Group of this recip" + "get_time_to_live": { + "name": "get_time_to_live", + "type": "function", + "doc": "Get the time to live of the object with this id. This will be 0 if the object does not expir \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "uint", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." + "get_to": { + "name": "get_to", + "type": "function", + "doc": "Get where the line with this id is drawn to or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", + "returns": "ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "hidden": { - "name": "hidden", - "type": "boolean", - "mode": "[R]", - "doc": "Is the recipe hidden? Hidden recipe don't show up in the crafting men" + "get_type": { + "name": "get_type", + "type": "function", + "doc": "Gets the type of the given object. The types are \"text\", \"line\", \"circle\", \"rectangle\", \"arc\", \"polygon\", \"sprite\", \"light\" and \"animation \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "string", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "hidden_from_flow_stats": { - "name": "hidden_from_flow_stats", - "type": "boolean", - "mode": "[RW]", - "doc": "Is the recipe hidden from flow statistic" + "get_vertices": { + "name": "get_vertices", + "type": "function", + "doc": "Get the vertices of the polygon with this id or ````\nnil````\nif the object is not a polygo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Polygon_", + "returns": "array of ScriptRenderTarget", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "ingredients": { - "name": "ingredients", - "type": "array of Ingredient", - "mode": "[R]", - "doc": "Ingredients for this recip \n\n**Example** \nWhat the \"steel-chest\" recipe would retu \n````\n{ {type=\"item\", name=\"steel-plate\", amount=8} }```` \n\n**Example** \nWhat the \"advanced-oil-processing\" recipe would retu \n````\n{ {type=\"fluid\", name=\"crude-oil\", amount=10}, {type=\"fluid\", name=\"water\", amount=5} }````" + "get_visible": { + "name": "get_visible", + "type": "function", + "doc": "Get whether this is rendered to anyone at al \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" + "get_width": { + "name": "get_width", + "type": "function", + "doc": "Get the width of the object with this id. Value is in pixels (32 per tile \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nor ````\nnil````\nif the object does not support width. \n_Can only be used if this is Line, Circle, or Rectangle_", + "returns": "float", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]", - "doc": "Localised name of the recip" + "get_x_scale": { + "name": "get_x_scale", + "type": "function", + "doc": "Get the horizontal scale of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of the recipe. This can be different than the name of the result items as there cou \nbe more recipes to make the same ite" + "get_y_scale": { + "name": "get_y_scale", + "type": "function", + "doc": "Get the vertical scale of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", + "returns": "double", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]", - "doc": "Order string. This is used to sort the crafting men" + "is_font_valid": { + "name": "is_font_valid", + "type": "function", + "doc": "Does a font with this name exis \n\n**Parameters** \nfont_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)", + "returns": "boolean", + "args": { + "font_name": { + "name": "font_name", + "type": "string", + "doc": "font_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + } + } }, - "products": { - "name": "products", - "type": "array of Product", - "mode": "[R]", - "doc": "The results of this recipe." + "is_valid": { + "name": "is_valid", + "type": "function", + "doc": "Does a valid object with this id exis \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "returns": "boolean", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "prototype": { - "name": "prototype", - "type": "LuaRecipePrototype", + "object_name": { + "name": "object_name", + "type": "string", "mode": "[R]", - "doc": "The prototype for this recip" - }, - "reload": { - "name": "reload", - "doc": "Reload the recipe from the prototype.", - "type": "function" + "doc": "This object's nam" }, - "subgroup": { - "name": "subgroup", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Subgroup of this recip" + "set_alignment": { + "name": "set_alignment", + "doc": "Set the alignment of the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"left\", \"right\" or \"center\". \n_Can only be used if this is Text_", + "type": "function", + "args": { + "alignment": { + "name": "alignment", + "type": "string", + "doc": "alignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"left\", \"right\" or \"center\"." + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "A crafting recipe. Recipes belong to forces (see LuaForce) because some recipes\n are unlocked by research, and researches are per-force." - }, - "LuaRecipePrototype": { - "name": "LuaRecipePrototype", - "type": "LuaRecipePrototype", - "inherits": [], - "properties": { - "allow_as_intermediate": { - "name": "allow_as_intermediate", - "type": "boolean", - "mode": "[R]", - "doc": "If this recipe is enabled for the purpose of intermediate hand-craftin" - }, - "allow_decomposition": { - "name": "allow_decomposition", - "type": "boolean", - "mode": "[R]", - "doc": "If this recipe is allowed to be broken down for \"total-raw\" calculation" - }, - "allow_intermediates": { - "name": "allow_intermediates", - "type": "boolean", - "mode": "[R]", - "doc": "If this recipe is allowed to use intermediate recipes when hand-craftin" - }, - "always_show_made_in": { - "name": "always_show_made_in", - "type": "boolean", - "mode": "[R]", - "doc": "Should this recipe always show \"made-in\" in the toolti" - }, - "always_show_products": { - "name": "always_show_products", - "type": "boolean", - "mode": "[R]", - "doc": "If the products are always shown in the recipe toolti" - }, - "category": { - "name": "category", - "type": "string", - "mode": "[R]", - "doc": "Category of the recip" - }, - "emissions_multiplier": { - "name": "emissions_multiplier", - "type": "double", - "mode": "[R]", - "doc": "The emissions multiplier for this recip" - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "mode": "[R]", - "doc": "If this recipe prototype is enabled by default (enabled at the beginning of a game" - }, - "energy": { - "name": "energy", - "type": "double", - "mode": "[R]", - "doc": "Energy required to execute this recipe. This directly affects the crafting time: Recipe's ener \nis exactly its crafting time in seconds, when crafted in an assembling machine with crafting spe \nexactly equal to one." - }, - "group": { - "name": "group", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Group of this recip" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "hidden": { - "name": "hidden", - "type": "boolean", - "mode": "[R]", - "doc": "Is the recipe hidden? Hidden recipe don't show up in the crafting men" - }, - "hidden_from_flow_stats": { - "name": "hidden_from_flow_stats", - "type": "boolean", - "mode": "[R]", - "doc": "Is the recipe hidden from flow statistic" - }, - "ingredients": { - "name": "ingredients", - "type": "array of Ingredient", - "mode": "[R]", - "doc": "Ingredients for this recip" - }, - "localised_description": { - "name": "localised_description", - "type": "LocalisedString", - "mode": "[R]" - }, - "localised_name": { - "name": "localised_name", - "type": "LocalisedString", - "mode": "[R]", - "doc": "Localised name of the recip" - }, - "main_product": { - "name": "main_product", - "type": "Product", - "mode": "[R]", - "doc": "The main product of this recipe, ````\nnil````\nif no main product is defined." - }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of the recipe. This can be different than the name of the result items as there cou \nbe more recipes to make the same ite" - }, - "order": { - "name": "order", - "type": "string", - "mode": "[R]", - "doc": "Order string. This is used to sort the crafting men" - }, - "overload_multiplier": { - "name": "overload_multiplier", - "type": "uint", - "mode": "[R]", - "doc": "Used to determine how many extra items are put into an assembling machine before it's considered \"full enough" - }, - "products": { - "name": "products", - "type": "array of Product", - "mode": "[R]", - "doc": "The results of this recipe." - }, - "request_paste_multiplier": { - "name": "request_paste_multiplier", - "type": "uint", - "mode": "[R]", - "doc": "The multiplier used when this recipe is copied from an assembling machine to a requester ches \nFor each item in the recipe the item count * this value is set in the requester ches" - }, - "show_amount_in_title": { - "name": "show_amount_in_title", - "type": "boolean", - "mode": "[R]", - "doc": "If the amount is shown in the recipe tooltip title when the recipe produces more than 1 produc" - }, - "subgroup": { - "name": "subgroup", - "type": "LuaGroup", - "mode": "[R]", - "doc": "Subgroup of this recip" - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "A crafting recipe prototype." - }, - "LuaRemote": { - "name": "LuaRemote", - "type": "LuaRemote", - "inherits": [], - "properties": { - "add_interface": { - "name": "add_interface", - "doc": "Add a remote interface \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface. \nfunctions :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → function: List of functions that are members of the new interface. \n\n**Note: ** It is an error if the given interface ````\nname````\nis already registered.", + "set_angle": { + "name": "set_angle", + "doc": "Set the angle of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian \n_Can only be used if this is Arc_", "type": "function", "args": { - "functions": { - "name": "functions", - "type": "dictionary string → function", - "doc": "functions :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → function: List of functions that are members of the new interface." + "angle": { + "name": "angle", + "type": "float", + "doc": "angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian" }, - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "call": { - "name": "call", - "doc": "Call a function of an interface. \n\n**Parameters** \ninterface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Interface to look up ````\nfunction````\nin. \nfunction :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Function name that belongs to ````\ninterface````\n. \n...: Arguments to pass to the called function. \n\n**Return value** \nAnything, including most LuaObjects.", + "set_animation": { + "name": "set_animation", + "doc": "Set the animation prototype name of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is Animation_", "type": "function", - "returns": "Anything", "args": { - "...": { - "name": "...", - "doc": "...: Arguments to pass to the called function.", - "type": "..." - }, - "function": { - "name": "function", + "animation": { + "name": "animation", "type": "string", - "doc": "function :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Function name that belongs to ````\ninterface````\n." + "doc": "animation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" }, - "interface": { - "name": "interface", - "type": "string", - "doc": "interface :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Interface to look up ````\nfunction````\nin." - } - } - }, - "interfaces": { - "name": "interfaces", - "type": "dictionary string → dictionary string → boolean", - "mode": "[R]", - "doc": "List of all registered interfaces. For each interface name, ````\nremote.interfaces[name]````\nis a dictiona \nmapping the interface's registered functions to the value ````\ntrue````\n. \n\n**Example** \nAssuming the \"human interactor\" interface is registered as abo \n````\ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"hello\"]))        -- prints true \ngame.player.print(tostring(remote.interfaces[\"human interactor\"][\"nonexistent\"]))  -- prints nil````" - }, - "remove_interface": { - "name": "remove_interface", - "type": "function", - "doc": "Removes an interface with the given nam \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface. \n\n**Return value** \nIf the interface was removed. ````\nFalse````\nif the interface didn't exist.", - "returns": "boolean", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the interface." - } - } - } - }, - "doc": "Registry of interfaces between scripts. An interface is simply a dictionary mapping names to functions. A\n script or mod can then register an interface with LuaRemote, after that any script can call the\n registered functions, provided it knows the interface name and the desired function name. An instance of\n LuaRemote is available through the global object named remote." - }, - "LuaRendering": { - "name": "LuaRendering", - "type": "LuaRendering", - "inherits": [], - "properties": { - "clear": { - "name": "clear", - "doc": "Destroys all render object \n\n**Parameters** \nmod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, only the render objects created by this mod are destroyed.", - "type": "function", - "args": { - "mod_name": { - "name": "mod_name", - "type": "string", - "doc": "mod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, only the render objects created by this mod are destroyed." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "destroy": { - "name": "destroy", - "doc": "Destroy the object with the given i \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", + "set_animation_offset": { + "name": "set_animation_offset", + "doc": "Set the animation offset of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation offset in frames. \n_Can only be used if this is Animation_", "type": "function", "args": { + "animation_offset": { + "name": "animation_offset", + "type": "double", + "doc": "animation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation offset in frames." + }, "id": { "name": "id", "type": "uint64", @@ -12907,129 +11658,138 @@ } } }, - "draw_animation": { - "name": "draw_animation", - "type": "function", - "doc": "Create an animatio \n\n**Parameters** \nTable with the following fields: \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of an \"animation\" prototype. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the animation. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the animation. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the animation. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How many frames the animation goes forward per tick. Default is 1. \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Offset of the animation in frames. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the animation. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the animation if ````\norientation_target````\nis given. This offset will rotate together with the animation. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the animation. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", - "args": { - "animation": { - "name": "animation", - "type": "string", - "doc": "Table with the following fields: \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of an \"animation\" prototype. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the animation. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the animation. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the animation. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How many frames the animation goes forward per tick. Default is 1. \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Offset of the animation in frames. Default is 0. \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the animation. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the animation if ````\norientation_target````\nis given. This offset will rotate together with the animation. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the animation. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." - } - } - }, - "draw_arc": { - "name": "draw_arc", - "type": "function", - "doc": "Create an ar \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the outer edge of the arc, in tiles. \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the inner edge of the arc, in tiles. \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Where the arc starts, in radian. \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The angle of the arc, in radian. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", - "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the outer edge of the arc, in tiles. \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The radius of the inner edge of the arc, in tiles. \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): Where the arc starts, in radian. \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): The angle of the arc, in radian. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." - } - } - }, - "draw_circle": { - "name": "draw_circle", - "type": "function", - "doc": "Create a circl \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): In tiles. \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the circle should be filled. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", - "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): In tiles. \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the circle should be filled. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." - } - } - }, - "draw_light": { - "name": "draw_light", + "set_animation_speed": { + "name": "set_animation_speed", + "doc": "Set the animation speed of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation speed in frames per tick. \n_Can only be used if this is Animation_", "type": "function", - "doc": "Create a ligh \n\n**Parameters** \nTable with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the light. Default is 0. \nscale :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The minimum darkness at which this light is rendered. Default is 0. \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this light has the same orientation as the entity target, default is false. Note that ````\norientation````\nis still applied to the sprite. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Defaults to white (no tint). \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the light. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Note: ** The base game uses the utility sprites ````\nlight_medium````\nand ````\nlight_small````\nfor lights.", - "returns": "uint64", "args": { - "sprite": { - "name": "sprite", - "type": "SpritePath", - "doc": "Table with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the light. Default is 0. \nscale :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Default is 1. \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The minimum darkness at which this light is rendered. Default is 0. \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this light has the same orientation as the entity target, default is false. Note that ````\norientation````\nis still applied to the sprite. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Defaults to white (no tint). \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the light. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "animation_speed": { + "name": "animation_speed", + "type": "double", + "doc": "animation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation speed in frames per tick." + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "draw_line": { - "name": "draw_line", + "set_color": { + "name": "set_color", + "doc": "Set the color or tint of the object with this id. Does nothing if this object does not support colo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light, or Animation_", "type": "function", - "doc": "Create a lin \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): In pixels (32 per tile). \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the gaps that this line has, in tiles. Default is 0. \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the dashes that this line has. Used only if gap_length > 0. Default is 0. \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nfrom````\nis a LuaEntity. \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nto````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", "args": { "color": { "name": "color", "type": "Color", - "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): In pixels (32 per tile). \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the gaps that this line has, in tiles. Default is 0. \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Length of the dashes that this line has. Used only if gap_length > 0. Default is 0. \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nfrom````\nis a LuaEntity. \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nto````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color)" + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "draw_polygon": { - "name": "draw_polygon", + "set_corners": { + "name": "set_corners", + "doc": "Set the corners of the rectangle with this id. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \n_Can only be used if this is Rectangle_", "type": "function", - "doc": "Create a polygo \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nvertices :: array of ScriptRenderTarget \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nvertices :: array of ScriptRenderTarget \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "left_top": { + "name": "left_top", + "type": "Position or LuaEntity", + "doc": "left_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "left_top_offset": { + "name": "left_top_offset", + "type": "Vector", + "doc": "left_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" + }, + "right_bottom": { + "name": "right_bottom", + "type": "Position or LuaEntity", + "doc": "right_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "right_bottom_offset": { + "name": "right_bottom_offset", + "type": "Vector", + "doc": "right_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" } } }, - "draw_rectangle": { - "name": "draw_rectangle", + "set_dash_length": { + "name": "set_dash_length", + "doc": "Set the dash length of the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", "type": "function", - "doc": "Create a rectangl \n\n**Parameters** \nTable with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the rectangle should be filled. \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nleft_top````\nis a LuaEntity. \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nright_bottom````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "Table with the following fields: \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): Width of the outline, used only if filled = false. Value is in pixels (32 per tile). \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the rectangle should be filled. \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nleft_top````\nis a LuaEntity. \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\nright_bottom````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "dash_length": { + "name": "dash_length", + "type": "double", + "doc": "dash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "draw_sprite": { - "name": "draw_sprite", + "set_dashes": { + "name": "set_dashes", + "doc": "Set the length of the dashes and the length of the gaps in the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", "type": "function", - "doc": "Create a sprit \n\n**Parameters** \nTable with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the sprite. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the sprite. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the sprite. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the sprite rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the sprite if ````\norientation_target````\nis given. This offset will rotate together with the sprite. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the sprite. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object", - "returns": "uint64", "args": { - "sprite": { - "name": "sprite", - "type": "SpritePath", - "doc": "Table with the following fields: \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the sprite. Default is 0. \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Horizontal scale of the sprite. Default is 1. \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Vertical scale of the sprite. Default is 1. \ntint :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) (optional) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): If given, the sprite rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite. \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\norientation_target````\nis a LuaEntity. \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Offsets the center of the sprite if ````\norientation_target````\nis given. This offset will rotate together with the sprite. \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): Center of the sprite. \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "dash_length": { + "name": "dash_length", + "type": "double", + "doc": "dash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + }, + "gap_length": { + "name": "gap_length", + "type": "double", + "doc": "gap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "draw_text": { - "name": "draw_text", + "set_draw_on_ground": { + "name": "set_draw_on_ground", + "doc": "Set whether this is being drawn on the ground, under most entities and sprite \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, or Polygon_", "type": "function", - "doc": "Create a tex \n\n**Parameters** \nTable with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The text to display. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Name of font to use. Defaults to the same font as flying-text. \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the text. Default is 0. \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Defaults to \"left\". Other options are \"right\" and \"center\". \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false. \n\n**Return value** \nId of the render object \n\n**Note: ** Not all fonts support scaling.", - "returns": "uint64", "args": { - "text": { - "name": "text", - "type": "LocalisedString", - "doc": "Table with the following fields: \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The text to display. \nsurface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Only used if ````\ntarget````\nis a LuaEntity. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Name of font to use. Defaults to the same font as flying-text. \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): In ticks. Defaults to living forever. \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The forces that this object is rendered to. \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The players that this object is rendered to. \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this is rendered to anyone at all. Defaults to true. \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should be drawn below sprites and entities. \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) (optional): The orientation of the text. Default is 0. \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Defaults to \"left\". Other options are \"right\" and \"center\". \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If this should only be rendered in alt mode. Defaults to false." + "draw_on_ground": { + "name": "draw_on_ground", + "type": "boolean", + "doc": "draw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "get_alignment": { - "name": "get_alignment", + "set_filled": { + "name": "set_filled", + "doc": "Set if the circle or rectangle with this id is filled. Does nothing if this object is not a circle or rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Circle or Rectangle_", "type": "function", - "doc": "Get the alignment of the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", - "returns": "string", "args": { + "filled": { + "name": "filled", + "type": "boolean", + "doc": "filled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + }, "id": { "name": "id", "type": "uint64", @@ -13037,25 +11797,33 @@ } } }, - "get_all_ids": { - "name": "get_all_ids", + "set_font": { + "name": "set_font", + "doc": "Set the font of the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is Text_", "type": "function", - "doc": "Gets an array of all valid object id \n\n**Parameters** \nmod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, get only the render objects created by this mod.", - "returns": "array of uint64", "args": { - "mod_name": { - "name": "mod_name", + "font": { + "name": "font", "type": "string", - "doc": "mod_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): If provided, get only the render objects created by this mod." + "doc": "font :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" + }, + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" } } }, - "get_angle": { - "name": "get_angle", + "set_forces": { + "name": "set_forces", + "doc": "Set the forces that the object with this id is rendered t \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Providing an empty array will set the object to be visible to all forces.", "type": "function", - "doc": "Get the angle of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nangle in radian \n_Can only be used if this is Arc_", - "returns": "float", "args": { + "forces": { + "name": "forces", + "type": "array of ForceSpecification", + "doc": "forces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Providing an empty array will set the object to be visible to all forces." + }, "id": { "name": "id", "type": "uint64", @@ -13063,12 +11831,21 @@ } } }, - "get_animation": { - "name": "get_animation", + "set_from": { + "name": "set_from", + "doc": "Set from where the line with this id is drawn. Does nothing if the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Line_", "type": "function", - "doc": "Get the animation prototype name of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Animation_", - "returns": "string", "args": { + "from": { + "name": "from", + "type": "Position or LuaEntity", + "doc": "from :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "from_offset": { + "name": "from_offset", + "type": "Vector", + "doc": "from_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" + }, "id": { "name": "id", "type": "uint64", @@ -13076,12 +11853,16 @@ } } }, - "get_animation_offset": { - "name": "get_animation_offset", + "set_gap_length": { + "name": "set_gap_length", + "doc": "Set the length of the gaps in the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", "type": "function", - "doc": "Get the animation offset of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nAnimation offset in frames. \n_Can only be used if this is Animation_", - "returns": "double", "args": { + "gap_length": { + "name": "gap_length", + "type": "double", + "doc": "gap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + }, "id": { "name": "id", "type": "uint64", @@ -13089,2734 +11870,1171 @@ } } }, - "get_animation_speed": { - "name": "get_animation_speed", + "set_intensity": { + "name": "set_intensity", + "doc": "Set the intensity of the light with this id. Does nothing if this object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Light_", "type": "function", - "doc": "Get the animation speed of the animation with this id or ````\nnil````\nif the object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nAnimation speed in frames per tick. \n_Can only be used if this is Animation_", - "returns": "double", "args": { "id": { "name": "id", "type": "uint64", "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "intensity": { + "name": "intensity", + "type": "float", + "doc": "intensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" } } }, - "get_color": { - "name": "get_color", + "set_left_top": { + "name": "set_left_top", + "doc": "Set where top left corner of the rectangle with this id is drawn. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Rectangle_", "type": "function", - "doc": "Get the color or tint of the object with this i \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nor ````\nnil````\nif the object does not support color. \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light, or Animation_", - "returns": "Color", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_dash_length": { - "name": "get_dash_length", - "type": "function", - "doc": "Get the dash length of the line with this id or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_draw_on_ground": { - "name": "get_draw_on_ground", - "type": "function", - "doc": "Get whether this is being drawn on the ground, under most entities and sprite \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, or Polygon_", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_filled": { - "name": "get_filled", - "type": "function", - "doc": "Get if the circle or rectangle with this id is filled or ````\nnil````\nif the object is not a circle or rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Circle or Rectangle_", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_font": { - "name": "get_font", - "type": "function", - "doc": "Get the font of the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", - "returns": "string", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_forces": { - "name": "get_forces", - "type": "function", - "doc": "Get the forces that the object with this id is rendered to or ````\nnil````\nif visible to all force \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "array of LuaForce", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_from": { - "name": "get_from", - "type": "function", - "doc": "Get from where the line with this id is drawn or ````\nnil````\nif this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_gap_length": { - "name": "get_gap_length", - "type": "function", - "doc": "Get the length of the gaps in the line with this id or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_intensity": { - "name": "get_intensity", - "type": "function", - "doc": "Get the intensity of the light with this id or ````\nnil````\nif the object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", - "returns": "float", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_left_top": { - "name": "get_left_top", - "type": "function", - "doc": "Get where top left corner of the rectangle with this id is drawn or ````\nnil````\nif the object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Rectangle_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_max_radius": { - "name": "get_max_radius", - "type": "function", - "doc": "Get the radius of the outer edge of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Arc_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_min_radius": { - "name": "get_min_radius", - "type": "function", - "doc": "Get the radius of the inner edge of the arc with this id or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Arc_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_minimum_darkness": { - "name": "get_minimum_darkness", - "type": "function", - "doc": "Get the minimum darkness at which the light with this id is rendered or ````\nnil````\nif the object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", - "returns": "float", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_only_in_alt_mode": { - "name": "get_only_in_alt_mode", - "type": "function", - "doc": "Get whether this is only rendered in alt-mod \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_orientation": { - "name": "get_orientation", - "type": "function", - "doc": "Get the orientation of the text, sprite, light or animation with this id or ````\nnil````\nif the object is not a text, sprite, light or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text, Sprite, Light, or Animation_", - "returns": "float", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_orientation_target": { - "name": "get_orientation_target", - "type": "function", - "doc": "The sprite or animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite or animatio \nGet the orientation_target of the sprite or animation with this id or ````\nnil````\nif no target or if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_oriented": { - "name": "get_oriented", - "type": "function", - "doc": "Get if the light with this id is rendered has the same orientation as the target entity or ````\nnil````\nif the object is not a ligh \nNote that ````\norientation````\nis still applied to the sprit \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Light_", - "returns": "boolean", "args": { "id": { "name": "id", "type": "uint64", "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "left_top": { + "name": "left_top", + "type": "Position or LuaEntity", + "doc": "left_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "left_top_offset": { + "name": "left_top_offset", + "type": "Vector", + "doc": "left_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" } } }, - "get_oriented_offset": { - "name": "get_oriented_offset", + "set_max_radius": { + "name": "set_max_radius", + "doc": "Set the radius of the outer edge of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Arc_", "type": "function", - "doc": "Offsets the center of the sprite or animation if ````\norientation_target````\nis given. This offset will rotate together with the sprite or animatio \nGet the oriented_offset of the sprite or animation with this id or ````\nnil````\nif this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", - "returns": "Vector", "args": { "id": { "name": "id", "type": "uint64", "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "max_radius": { + "name": "max_radius", + "type": "double", + "doc": "max_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } } }, - "get_players": { - "name": "get_players", + "set_min_radius": { + "name": "set_min_radius", + "doc": "Set the radius of the inner edge of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Arc_", "type": "function", - "doc": "Get the players that the object with this id is rendered to or ````\nnil````\nif visible to all player \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "array of LuaPlayer", "args": { "id": { "name": "id", "type": "uint64", "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "min_radius": { + "name": "min_radius", + "type": "double", + "doc": "min_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } } }, - "get_radius": { - "name": "get_radius", + "set_minimum_darkness": { + "name": "set_minimum_darkness", + "doc": "Set the minimum darkness at which the light with this id is rendered. Does nothing if this object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Light_", "type": "function", - "doc": "Get the radius of the circle with this id or ````\nnil````\nif the object is not a circl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Circle_", - "returns": "double", "args": { "id": { "name": "id", "type": "uint64", "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_render_layer": { - "name": "get_render_layer", - "type": "function", - "doc": "Get the render layer of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", - "returns": "RenderLayer", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_right_bottom": { - "name": "get_right_bottom", - "type": "function", - "doc": "Get where bottom right corner of the rectangle with this id is drawn or ````\nnil````\nif the object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Rectangle_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_scale": { - "name": "get_scale", - "type": "function", - "doc": "Get the scale of the text or light with this id or ````\nnil````\nif the object is not a text or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text or Light_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_scale_with_zoom": { - "name": "get_scale_with_zoom", - "type": "function", - "doc": "Get if the text with this id scales with player zoom or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_sprite": { - "name": "get_sprite", - "type": "function", - "doc": "Get the sprite of the sprite or light with this id or ````\nnil````\nif the object is not a sprite or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Light_", - "returns": "SpritePath", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_start_angle": { - "name": "get_start_angle", - "type": "function", - "doc": "Get where the arc with this id starts or ````\nnil````\nif the object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nangle in radian \n_Can only be used if this is Arc_", - "returns": "float", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_surface": { - "name": "get_surface", - "type": "function", - "doc": "The surface the object with this id is rendered o \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "LuaSurface", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_target": { - "name": "get_target", - "type": "function", - "doc": "Get where the object with this id is drawn or ````\nnil````\nif the object does not support targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text, Circle, Arc, Sprite, Light, or Animation_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_text": { - "name": "get_text", - "type": "function", - "doc": "Get the text that is displayed by the text with this id or ````\nnil````\nif the object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Text_", - "returns": "LocalisedString", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_time_to_live": { - "name": "get_time_to_live", - "type": "function", - "doc": "Get the time to live of the object with this id. This will be 0 if the object does not expir \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "uint", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_to": { - "name": "get_to", - "type": "function", - "doc": "Get where the line with this id is drawn to or ````\nnil````\nif the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Line_", - "returns": "ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_type": { - "name": "get_type", - "type": "function", - "doc": "Gets the type of the given object. The types are \"text\", \"line\", \"circle\", \"rectangle\", \"arc\", \"polygon\", \"sprite\", \"light\" and \"animation \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "string", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_vertices": { - "name": "get_vertices", - "type": "function", - "doc": "Get the vertices of the polygon with this id or ````\nnil````\nif the object is not a polygo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Polygon_", - "returns": "array of ScriptRenderTarget", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_visible": { - "name": "get_visible", - "type": "function", - "doc": "Get whether this is rendered to anyone at al \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_width": { - "name": "get_width", - "type": "function", - "doc": "Get the width of the object with this id. Value is in pixels (32 per tile \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n\n**Return value** \nor ````\nnil````\nif the object does not support width. \n_Can only be used if this is Line, Circle, or Rectangle_", - "returns": "float", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_x_scale": { - "name": "get_x_scale", - "type": "function", - "doc": "Get the horizontal scale of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "get_y_scale": { - "name": "get_y_scale", - "type": "function", - "doc": "Get the vertical scale of the sprite or animation with this id or ````\nnil````\nif the object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \n_Can only be used if this is Sprite or Animation_", - "returns": "double", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "is_font_valid": { - "name": "is_font_valid", - "type": "function", - "doc": "Does a font with this name exis \n\n**Parameters** \nfont_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)", - "returns": "boolean", - "args": { - "font_name": { - "name": "font_name", - "type": "string", - "doc": "font_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" - } - } - }, - "is_valid": { - "name": "is_valid", - "type": "function", - "doc": "Does a valid object with this id exis \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)", - "returns": "boolean", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_alignment": { - "name": "set_alignment", - "doc": "Set the alignment of the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nalignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"left\", \"right\" or \"center\". \n_Can only be used if this is Text_", - "type": "function", - "args": { - "alignment": { - "name": "alignment", - "type": "string", - "doc": "alignment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): \"left\", \"right\" or \"center\"." - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_angle": { - "name": "set_angle", - "doc": "Set the angle of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nangle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian \n_Can only be used if this is Arc_", - "type": "function", - "args": { - "angle": { - "name": "angle", - "type": "float", - "doc": "angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_animation": { - "name": "set_animation", - "doc": "Set the animation prototype name of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is Animation_", - "type": "function", - "args": { - "animation": { - "name": "animation", - "type": "string", - "doc": "animation :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_animation_offset": { - "name": "set_animation_offset", - "doc": "Set the animation offset of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation offset in frames. \n_Can only be used if this is Animation_", - "type": "function", - "args": { - "animation_offset": { - "name": "animation_offset", - "type": "double", - "doc": "animation_offset :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation offset in frames." - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_animation_speed": { - "name": "set_animation_speed", - "doc": "Set the animation speed of the animation with this id. Does nothing if this object is not an animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nanimation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation speed in frames per tick. \n_Can only be used if this is Animation_", - "type": "function", - "args": { - "animation_speed": { - "name": "animation_speed", - "type": "double", - "doc": "animation_speed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Animation speed in frames per tick." - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_color": { - "name": "set_color", - "doc": "Set the color or tint of the object with this id. Does nothing if this object does not support colo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light, or Animation_", - "type": "function", - "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_corners": { - "name": "set_corners", - "doc": "Set the corners of the rectangle with this id. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \n_Can only be used if this is Rectangle_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "left_top": { - "name": "left_top", - "type": "Position or LuaEntity", - "doc": "left_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "left_top_offset": { - "name": "left_top_offset", - "type": "Vector", - "doc": "left_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" - }, - "right_bottom": { - "name": "right_bottom", - "type": "Position or LuaEntity", - "doc": "right_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "right_bottom_offset": { - "name": "right_bottom_offset", - "type": "Vector", - "doc": "right_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" - } - } - }, - "set_dash_length": { - "name": "set_dash_length", - "doc": "Set the dash length of the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", - "type": "function", - "args": { - "dash_length": { - "name": "dash_length", - "type": "double", - "doc": "dash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_dashes": { - "name": "set_dashes", - "doc": "Set the length of the dashes and the length of the gaps in the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", - "type": "function", - "args": { - "dash_length": { - "name": "dash_length", - "type": "double", - "doc": "dash_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "gap_length": { - "name": "gap_length", - "type": "double", - "doc": "gap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_draw_on_ground": { - "name": "set_draw_on_ground", - "doc": "Set whether this is being drawn on the ground, under most entities and sprite \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ndraw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Text, Line, Circle, Rectangle, Arc, or Polygon_", - "type": "function", - "args": { - "draw_on_ground": { - "name": "draw_on_ground", - "type": "boolean", - "doc": "draw_on_ground :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_filled": { - "name": "set_filled", - "doc": "Set if the circle or rectangle with this id is filled. Does nothing if this object is not a circle or rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfilled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Circle or Rectangle_", - "type": "function", - "args": { - "filled": { - "name": "filled", - "type": "boolean", - "doc": "filled :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_font": { - "name": "set_font", - "doc": "Set the font of the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfont :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \n_Can only be used if this is Text_", - "type": "function", - "args": { - "font": { - "name": "font", - "type": "string", - "doc": "font :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_forces": { - "name": "set_forces", - "doc": "Set the forces that the object with this id is rendered t \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nforces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Providing an empty array will set the object to be visible to all forces.", - "type": "function", - "args": { - "forces": { - "name": "forces", - "type": "array of ForceSpecification", - "doc": "forces :: array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Providing an empty array will set the object to be visible to all forces." - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_from": { - "name": "set_from", - "doc": "Set from where the line with this id is drawn. Does nothing if the object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nfrom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Line_", - "type": "function", - "args": { - "from": { - "name": "from", - "type": "Position or LuaEntity", - "doc": "from :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "from_offset": { - "name": "from_offset", - "type": "Vector", - "doc": "from_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_gap_length": { - "name": "set_gap_length", - "doc": "Set the length of the gaps in the line with this id. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ngap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Line_", - "type": "function", - "args": { - "gap_length": { - "name": "gap_length", - "type": "double", - "doc": "gap_length :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - }, - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - } - } - }, - "set_intensity": { - "name": "set_intensity", - "doc": "Set the intensity of the light with this id. Does nothing if this object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nintensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Light_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "intensity": { - "name": "intensity", - "type": "float", - "doc": "intensity :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" - } - } - }, - "set_left_top": { - "name": "set_left_top", - "doc": "Set where top left corner of the rectangle with this id is drawn. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nleft_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nleft_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Rectangle_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "left_top": { - "name": "left_top", - "type": "Position or LuaEntity", - "doc": "left_top :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "left_top_offset": { - "name": "left_top_offset", - "type": "Vector", - "doc": "left_top_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - } - } - }, - "set_max_radius": { - "name": "set_max_radius", - "doc": "Set the radius of the outer edge of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nmax_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Arc_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "max_radius": { - "name": "max_radius", - "type": "double", - "doc": "max_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - }, - "set_min_radius": { - "name": "set_min_radius", - "doc": "Set the radius of the inner edge of the arc with this id. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nmin_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Arc_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "min_radius": { - "name": "min_radius", - "type": "double", - "doc": "min_radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - }, - "set_minimum_darkness": { - "name": "set_minimum_darkness", - "doc": "Set the minimum darkness at which the light with this id is rendered. Does nothing if this object is not a ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nminimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Light_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "minimum_darkness": { - "name": "minimum_darkness", - "type": "float", - "doc": "minimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" - } - } - }, - "set_only_in_alt_mode": { - "name": "set_only_in_alt_mode", - "doc": "Set whether this is only rendered in alt-mod \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "only_in_alt_mode": { - "name": "only_in_alt_mode", - "type": "boolean", - "doc": "only_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - } - } - }, - "set_orientation": { - "name": "set_orientation", - "doc": "Set the orientation of the text, sprite, light or animation with this id. Does nothing if this object is not a text, sprite, light or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Text, Sprite, Light, or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "orientation": { - "name": "orientation", - "type": "float", - "doc": "orientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" - } - } - }, - "set_orientation_target": { - "name": "set_orientation_target", - "doc": "The sprite or animation rotates so that it faces this target. Note that ````\norientation````\nis still applied to the sprite or animatio \nSet the orientation_target of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \nSet to ````\nnil````\nif the sprite or animation should not have an orientation_targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Sprite or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "orientation_target": { - "name": "orientation_target", - "type": "Position or LuaEntity", - "doc": "orientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "orientation_target_offset": { - "name": "orientation_target_offset", - "type": "Vector", - "doc": "orientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - } - } - }, - "set_oriented": { - "name": "set_oriented", - "doc": "Set if the light with this id is rendered has the same orientation as the target entity. Does nothing if this object is not a ligh \nNote that ````\norientation````\nis still applied to the sprit \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Light_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "oriented": { - "name": "oriented", - "type": "boolean", - "doc": "oriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - } - } - }, - "set_oriented_offset": { - "name": "set_oriented_offset", - "doc": "Offsets the center of the sprite or animation if ````\norientation_target````\nis given. This offset will rotate together with the sprite or animatio \nSet the oriented_offset of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \n_Can only be used if this is Sprite or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "oriented_offset": { - "name": "oriented_offset", - "type": "Vector", - "doc": "oriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" - } - } - }, - "set_players": { - "name": "set_players", - "doc": "Set the players that the object with this id is rendered t \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification): Providing an empty array will set the object to be visible to all players.", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "players": { - "name": "players", - "type": "array of PlayerSpecification", - "doc": "players :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification): Providing an empty array will set the object to be visible to all players." - } - } - }, - "set_radius": { - "name": "set_radius", - "doc": "Set the radius of the circle with this id. Does nothing if this object is not a circl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Circle_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "radius": { - "name": "radius", - "type": "double", - "doc": "radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - }, - "set_render_layer": { - "name": "set_render_layer", - "doc": "Set the render layer of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) \n_Can only be used if this is Sprite or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "render_layer": { - "name": "render_layer", - "type": "RenderLayer", - "doc": "render_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer)" - } - } - }, - "set_right_bottom": { - "name": "set_right_bottom", - "doc": "Set where top bottom right of the rectangle with this id is drawn. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Rectangle_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "right_bottom": { - "name": "right_bottom", - "type": "Position or LuaEntity", - "doc": "right_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "right_bottom_offset": { - "name": "right_bottom_offset", - "type": "Vector", - "doc": "right_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - } - } - }, - "set_scale": { - "name": "set_scale", - "doc": "Set the scale of the text or light with this id. Does nothing if this object is not a text or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Text or Light_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "scale": { - "name": "scale", - "type": "double", - "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - }, - "set_scale_with_zoom": { - "name": "set_scale_with_zoom", - "doc": "Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world change \nDoes nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Text_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "scale_with_zoom": { - "name": "scale_with_zoom", - "type": "boolean", - "doc": "scale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - } - } - }, - "set_sprite": { - "name": "set_sprite", - "doc": "Set the sprite of the sprite or light with this id. Does nothing if this object is not a sprite or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \n_Can only be used if this is Sprite or Light_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "sprite": { - "name": "sprite", - "type": "SpritePath", - "doc": "sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath)" - } - } - }, - "set_start_angle": { - "name": "set_start_angle", - "doc": "Set where the arc with this id starts. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian \n_Can only be used if this is Arc_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "start_angle": { - "name": "start_angle", - "type": "float", - "doc": "start_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian" - } - } - }, - "set_target": { - "name": "set_target", - "doc": "Set where the object with this id is drawn. Does nothing if this object does not support targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Text, Circle, Arc, Sprite, Light, or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "target": { - "name": "target", - "type": "Position or LuaEntity", - "doc": "target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "target_offset": { - "name": "target_offset", - "type": "Vector", - "doc": "target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - } - } - }, - "set_text": { - "name": "set_text", - "doc": "Set the text that is displayed by the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \n_Can only be used if this is Text_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "text": { - "name": "text", - "type": "LocalisedString", - "doc": "text :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" - } - } - }, - "set_time_to_live": { - "name": "set_time_to_live", - "doc": "Set the time to live of the object with this id. Set to 0 if the object should not expir \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "time_to_live": { - "name": "time_to_live", - "type": "uint", - "doc": "time_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" - } - } - }, - "set_to": { - "name": "set_to", - "doc": "Set where the line with this id is drawn to. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Line_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "to": { - "name": "to", - "type": "Position or LuaEntity", - "doc": "to :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" - }, - "to_offset": { - "name": "to_offset", - "type": "Vector", - "doc": "to_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" - } - } - }, - "set_vertices": { - "name": "set_vertices", - "doc": "Set the vertices of the polygon with this id. Does nothing if this object is not a polygo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nvertices :: array of [ScriptRenderTarget](http://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) \n_Can only be used if this is Polygon_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "vertices": { - "name": "vertices", - "type": "array of ScriptRenderTarget", - "doc": "vertices :: array of [ScriptRenderTarget](http://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget)" - } - } - }, - "set_visible": { - "name": "set_visible", - "doc": "Set whether this is rendered to anyone at al \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "visible": { - "name": "visible", - "type": "boolean", - "doc": "visible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" - } - } - }, - "set_width": { - "name": "set_width", - "doc": "Set the width of the object with this id. Does nothing if this object does not support width. Value is in pixels (32 per tile \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Line, Circle, or Rectangle_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "width": { - "name": "width", - "type": "float", - "doc": "width :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" - } - } - }, - "set_x_scale": { - "name": "set_x_scale", - "doc": "Set the horizontal scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Sprite or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "x_scale": { - "name": "x_scale", - "type": "double", - "doc": "x_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - }, - "set_y_scale": { - "name": "set_y_scale", - "doc": "Set the vertical scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Sprite or Animation_", - "type": "function", - "args": { - "id": { - "name": "id", - "type": "uint64", - "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" - }, - "y_scale": { - "name": "y_scale", - "type": "double", - "doc": "y_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" - } - } - } - }, - "doc": "Allows rendering of geometric shapes, text and sprites in the game world. Each render object is identified by an id that is universally unique for the lifetime of a whole game." - }, - "LuaRoboportControlBehavior": { - "name": "LuaRoboportControlBehavior", - "type": "LuaRoboportControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "available_construction_output_signal": { - "name": "available_construction_output_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "available_logistic_output_signal": { - "name": "available_logistic_output_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." - }, - "get_circuit_network": { - "name": "get_circuit_network", - "type": "function", - "returns": "LuaCircuitNetwork", - "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." - } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "mode_of_operations": { - "name": "mode_of_operations", - "type": "defines.control_behavior.roboport.circuit_mode_of_operation", - "mode": "[RW]" - }, - "total_construction_output_signal": { - "name": "total_construction_output_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "total_logistic_output_signal": { - "name": "total_logistic_output_signal", - "type": "SignalID", - "mode": "[RW]" - }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for roboports." - }, - "LuaSettings": { - "name": "LuaSettings", - "type": "LuaSettings", - "inherits": [], - "properties": { - "get_player_settings": { - "name": "get_player_settings", - "type": "function", - "args": { - "player": { - "name": "player", - "type": "LuaPlayer", - "doc": "player :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html)" - } - }, - "doc": "**Parameters** \nplayer :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) \n\n**Note: ** This can become invalid if during operation if the given player becomes invalid." - }, - "global": { - "name": "global", - "type": "custom dictionary string → ModSetting", - "mode": "[R]" - }, - "player": { - "name": "player", - "type": "custom dictionary string → ModSetting", - "mode": "[R]" - }, - "startup": { - "name": "startup", - "type": "custom dictionary string → ModSetting", - "mode": "[R]" - } - }, - "doc": "Runtime settings can be changed through console commands and by the mod that owns the settings." - }, - "LuaStorageTankControlBehavior": { - "name": "LuaStorageTankControlBehavior", - "type": "LuaStorageTankControlBehavior", - "inherits": [ - "Inherited from LuaControlBehavior: get_circuit_network, type, entity" - ], - "properties": { - "entity": { - "name": "entity", - "type": "LuaEntity", - "mode": "[R]", - "doc": "The entity this control behavior belongs to." - }, - "get_circuit_network": { - "name": "get_circuit_network", - "type": "function", - "returns": "LuaCircuitNetwork", - "args": { - "circuit_connector": { - "name": "circuit_connector", - "type": "defines.circuit_connector_id", - "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." - }, - "wire": { - "name": "wire", - "type": "defines.wire_type", - "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." - } - }, - "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "type": { - "name": "type", - "type": "defines.control_behavior.type", - "mode": "[R]", - "doc": "The concrete type of this control behavior." - }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" - } - }, - "doc": "Control behavior for storage tanks." - }, - "LuaStyle": { - "name": "LuaStyle", - "type": "LuaStyle", - "inherits": [], - "properties": { - "bottom_cell_padding": { - "name": "bottom_cell_padding", - "type": "int", - "mode": "[RW]", - "doc": "Space between the table cell contents bottom and borde \n_Can only be used if this is LuaTableStyle_" - }, - "bottom_margin": { - "name": "bottom_margin", - "type": "int", - "mode": "[RW]" - }, - "bottom_padding": { - "name": "bottom_padding", - "type": "int", - "mode": "[RW]" - }, - "cell_padding": { - "name": "cell_padding", - "type": "int", - "mode": "[W]", - "doc": "Space between the table cell contents and border. (Sets top/right/bottom/left paddings to this valu \n_Can only be used if this is LuaTableStyle_" - }, - "clicked_font_color": { - "name": "clicked_font_color", - "type": "Color", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaButtonStyle_" - }, - "clicked_vertical_offset": { - "name": "clicked_vertical_offset", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaButtonStyle_" - }, - "color": { - "name": "color", - "type": "Color", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaProgressBarStyle_" - }, - "column_alignments": { - "name": "column_alignments", - "type": "custom array of Alignment", - "mode": "[R]", - "doc": "Alignments of columns of the table" - }, - "disabled_font_color": { - "name": "disabled_font_color", - "type": "Color", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaButtonStyle_" - }, - "extra_bottom_margin_when_activated": { - "name": "extra_bottom_margin_when_activated", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is ScrollPaneStyle_" - }, - "extra_left_margin_when_activated": { - "name": "extra_left_margin_when_activated", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is ScrollPaneStyle_" - }, - "extra_padding_when_activated": { - "name": "extra_padding_when_activated", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is ScrollPaneStyle_" - }, - "extra_right_margin_when_activated": { - "name": "extra_right_margin_when_activated", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is ScrollPaneStyle_" - }, - "extra_top_margin_when_activated": { - "name": "extra_top_margin_when_activated", - "type": "int", - "mode": "[RW]", - "doc": "_Can only be used if this is ScrollPaneStyle_" - }, - "font": { - "name": "font", - "type": "string", - "mode": "[RW]" - }, - "font_color": { - "name": "font_color", - "type": "Color", - "mode": "[RW]" - }, - "gui": { - "name": "gui", - "type": "LuaGui", - "mode": "[R]", - "doc": "Gui of the [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) of this style." - }, - "height": { - "name": "height", - "type": "int", - "mode": "[W]", - "doc": "Sets both minimal and maximal height to the given value" - }, - "help": { - "name": "help", - "type": "string", - "doc": "All methods, and properties that this object supports." - }, - "horizontal_align": { - "name": "horizontal_align", - "type": "string", - "mode": "[RW]", - "doc": "Horizontal align of the inner content of the widget, possible values are \"left\", \"center\" or \"righ" - }, - "horizontal_spacing": { - "name": "horizontal_spacing", - "type": "int", - "mode": "[RW]", - "doc": "Horizontal space between individual cell \n_Can only be used if this is LuaTableStyle, LuaFlowStyle, or LuaHorizontalFlow_" - }, - "horizontally_squashable": { - "name": "horizontally_squashable", - "type": "boolean", - "mode": "[RW]", - "doc": "If the GUI element can be squashed (by maximal with of some parent element) horizontall \nThis is mainly meant to be used for scroll-pane The default value is fals" - }, - "horizontally_stretchable": { - "name": "horizontally_stretchable", - "type": "boolean", - "mode": "[RW]", - "doc": "If the GUI element stretches its size horizontally to other element" - }, - "hovered_font_color": { - "name": "hovered_font_color", - "type": "Color", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaButtonStyle_" - }, - "left_cell_padding": { - "name": "left_cell_padding", - "type": "int", - "mode": "[RW]", - "doc": "Space between the table cell contents left and borde \n_Can only be used if this is LuaTableStyle_" - }, - "left_margin": { - "name": "left_margin", - "type": "int", - "mode": "[RW]" - }, - "left_padding": { - "name": "left_padding", - "type": "int", - "mode": "[RW]" - }, - "maximal_height": { - "name": "maximal_height", - "type": "int", - "mode": "[RW]" - }, - "maximal_width": { - "name": "maximal_width", - "type": "int", - "mode": "[RW]" - }, - "minimal_height": { - "name": "minimal_height", - "type": "int", - "mode": "[RW]" - }, - "minimal_width": { - "name": "minimal_width", - "type": "int", - "mode": "[RW]" - }, - "name": { - "name": "name", - "type": "string", - "mode": "[R]", - "doc": "Name of this style." - }, - "natural_height": { - "name": "natural_height", - "type": "int", - "mode": "[RW]" - }, - "natural_width": { - "name": "natural_width", - "type": "int", - "mode": "[RW]" - }, - "pie_progress_color": { - "name": "pie_progress_color", - "type": "Color", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaButtonStyle_" - }, - "right_cell_padding": { - "name": "right_cell_padding", - "type": "int", - "mode": "[RW]", - "doc": "Space between the table cell contents right and borde \n_Can only be used if this is LuaTableStyle_" - }, - "right_margin": { - "name": "right_margin", - "type": "int", - "mode": "[RW]" - }, - "right_padding": { - "name": "right_padding", - "type": "int", - "mode": "[RW]" - }, - "single_line": { - "name": "single_line", - "type": "boolean", - "mode": "[RW]", - "doc": "_Can only be used if this is LabelStyle_" - }, - "stretch_image_to_widget_size": { - "name": "stretch_image_to_widget_size", - "type": "boolean", - "mode": "[RW]", - "doc": "_Can only be used if this is ImageStyle_" - }, - "top_cell_padding": { - "name": "top_cell_padding", - "type": "int", - "mode": "[RW]", - "doc": "Space between the table cell contents top and borde \n_Can only be used if this is LuaTableStyle_" - }, - "top_margin": { - "name": "top_margin", - "type": "int", - "mode": "[RW]" - }, - "top_padding": { - "name": "top_padding", - "type": "int", - "mode": "[RW]" + }, + "minimum_darkness": { + "name": "minimum_darkness", + "type": "float", + "doc": "minimum_darkness :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" + } + } }, - "use_header_filler": { - "name": "use_header_filler", - "type": "boolean", - "mode": "[RW]", - "doc": "_Can only be used if this is LuaFrameStyle_" + "set_only_in_alt_mode": { + "name": "set_only_in_alt_mode", + "doc": "Set whether this is only rendered in alt-mod \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nonly_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "only_in_alt_mode": { + "name": "only_in_alt_mode", + "type": "boolean", + "doc": "only_in_alt_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + } + } }, - "valid": { - "name": "valid", - "type": "boolean", - "mode": "[R]", - "doc": "Is this object valid?" + "set_orientation": { + "name": "set_orientation", + "doc": "Set the orientation of the object with this id. Does nothing if this object is not a text, polygon, sprite, light or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \norientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Text, Polygon, Sprite, Light, or Animation_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "orientation": { + "name": "orientation", + "type": "float", + "doc": "orientation :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" + } + } }, - "vertical_align": { - "name": "vertical_align", - "type": "string", - "mode": "[RW]", - "doc": "Vertical align of the inner content of the widget, possible values are \"top\", \"center\" or \"botto" + "set_orientation_target": { + "name": "set_orientation_target", + "doc": "The object rotates so that it faces this target. Note that ````\norientation````\nis still applied to the objec \nSet the orientation_target of the object with this id. Does nothing if this object is not a polygon, sprite, or animatio \nSet to ````\nnil````\nif the object should not have an orientation_targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \norientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \norientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Polygon, Sprite, or Animation_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "orientation_target": { + "name": "orientation_target", + "type": "Position or LuaEntity", + "doc": "orientation_target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "orientation_target_offset": { + "name": "orientation_target_offset", + "type": "Vector", + "doc": "orientation_target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" + } + } }, - "vertical_spacing": { - "name": "vertical_spacing", - "type": "int", - "mode": "[RW]", - "doc": "Vertical space between individual cell \n_Can only be used if this is LuaTableStyle, LuaFlowStyle, or LuaVerticalFlow_" + "set_oriented": { + "name": "set_oriented", + "doc": "Set if the light with this id is rendered has the same orientation as the target entity. Does nothing if this object is not a ligh \nNote that ````\norientation````\nis still applied to the sprit \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \noriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Light_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "oriented": { + "name": "oriented", + "type": "boolean", + "doc": "oriented :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + } + } }, - "vertically_squashable": { - "name": "vertically_squashable", - "type": "boolean", - "mode": "[RW]", - "doc": "If the GUI element can be squashed (by maximal height of some parent element) verticall \nThis is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwis" + "set_oriented_offset": { + "name": "set_oriented_offset", + "doc": "Offsets the center of the sprite or animation if ````\norientation_target````\nis given. This offset will rotate together with the sprite or animatio \nSet the oriented_offset of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \noriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \n_Can only be used if this is Sprite or Animation_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "oriented_offset": { + "name": "oriented_offset", + "type": "Vector", + "doc": "oriented_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector)" + } + } }, - "vertically_stretchable": { - "name": "vertically_stretchable", - "type": "boolean", - "mode": "[RW]", - "doc": "If the GUI element stretches its size vertically to other element" + "set_players": { + "name": "set_players", + "doc": "Set the players that the object with this id is rendered t \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nplayers :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification): Providing an empty array will set the object to be visible to all players.", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "players": { + "name": "players", + "type": "array of PlayerSpecification", + "doc": "players :: array of [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification): Providing an empty array will set the object to be visible to all players." + } + } }, - "want_ellipsis": { - "name": "want_ellipsis", - "type": "boolean", - "mode": "[RW]", - "doc": "_Can only be used if this is LabelStyle_" + "set_radius": { + "name": "set_radius", + "doc": "Set the radius of the circle with this id. Does nothing if this object is not a circl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Circle_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "radius": { + "name": "radius", + "type": "double", + "doc": "radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" + } + } }, - "width": { - "name": "width", - "type": "int", - "mode": "[W]", - "doc": "Sets both minimal and maximal width to the given value" - } - }, - "doc": "Style of a GUI element. All of the attributes listed here may be nil if not available for a\n particular GUI element." - }, - "LuaSurface": { - "name": "LuaSurface", - "type": "LuaSurface", - "inherits": [], - "properties": { - "always_day": { - "name": "always_day", - "type": "boolean", - "mode": "[RW]", - "doc": "When set to true, the sun will always shin" + "set_render_layer": { + "name": "set_render_layer", + "doc": "Set the render layer of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nrender_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer) \n_Can only be used if this is Sprite or Animation_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "render_layer": { + "name": "render_layer", + "type": "RenderLayer", + "doc": "render_layer :: [RenderLayer](http://lua-api.factorio.com/latest/Concepts.html#RenderLayer)" + } + } }, - "build_enemy_base": { - "name": "build_enemy_base", - "doc": "Send a group to build a new base \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Location of the new base. \nunit_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of biters to send for the base-building task. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force the new base will belong to. Defaults to enemy. \n\n**Note: ** The specified force must be AI-controlled; i.e. ````\nforce.ai_controllable````\nmust be ````\ntrue````\n.", + "set_right_bottom": { + "name": "set_right_bottom", + "doc": "Set where top bottom right of the rectangle with this id is drawn. Does nothing if this object is not a rectangl \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nright_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nright_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Rectangle_", "type": "function", "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force the new base will belong to. Defaults to enemy." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Location of the new base." + "right_bottom": { + "name": "right_bottom", + "type": "Position or LuaEntity", + "doc": "right_bottom :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" }, - "unit_count": { - "name": "unit_count", - "type": "uint", - "doc": "unit_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of biters to send for the base-building task." + "right_bottom_offset": { + "name": "right_bottom_offset", + "type": "Vector", + "doc": "right_bottom_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" } } }, - "can_fast_replace": { - "name": "can_fast_replace", + "set_scale": { + "name": "set_scale", + "doc": "Set the scale of the text or light with this id. Does nothing if this object is not a text or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nscale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Text or Light_", "type": "function", - "doc": "If there exists an entity at the given location that can be fast-replaced with the given entity parameter \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force that would place the entit \nIf not specified, the enemy force is assumed.", - "returns": "boolean", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force that would place the entit \nIf not specified, the enemy force is assumed." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "scale": { + "name": "scale", + "type": "double", + "doc": "scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } } }, - "can_place_entity": { - "name": "can_place_entity", + "set_scale_with_zoom": { + "name": "set_scale_with_zoom", + "doc": "Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world change \nDoes nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nscale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \n_Can only be used if this is Text_", "type": "function", - "doc": "Check for collisions with terrain or other entities \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force that would place the entity. If not specified, the enemy force is assumed. \nbuild_check_type :: [defines.build_check_type](http://lua-api.factorio.com/latest/defines.html#defines.build_check_type) (optional): What check type should be done. \nforced :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If [defines.build_check_type](http://lua-api.factorio.com/latest/defines.html#defines.build_check_type) is \"ghost_place\" and this is true things that can be marked for deconstruction are ignored.", - "returns": "boolean", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Name of the entity to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the entity would be placed \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Direction the entity would be placed \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force that would place the entity. If not specified, the enemy force is assumed. \nbuild_check_type :: [defines.build_check_type](http://lua-api.factorio.com/latest/defines.html#defines.build_check_type) (optional): What check type should be done. \nforced :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If [defines.build_check_type](http://lua-api.factorio.com/latest/defines.html#defines.build_check_type) is \"ghost_place\" and this is true things that can be marked for deconstruction are ignored." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "scale_with_zoom": { + "name": "scale_with_zoom", + "type": "boolean", + "doc": "scale_with_zoom :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" + } + } + }, + "set_sprite": { + "name": "set_sprite", + "doc": "Set the sprite of the sprite or light with this id. Does nothing if this object is not a sprite or ligh \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nsprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath) \n_Can only be used if this is Sprite or Light_", + "type": "function", + "args": { + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "sprite": { + "name": "sprite", + "type": "SpritePath", + "doc": "sprite :: [SpritePath](http://lua-api.factorio.com/latest/Concepts.html#SpritePath)" } } }, - "cancel_deconstruct_area": { - "name": "cancel_deconstruct_area", - "doc": "Cancel a deconstruction orde \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to cancel deconstruction orders in. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose deconstruction orders to cancel. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The deconstruction item to use if any.", + "set_start_angle": { + "name": "set_start_angle", + "doc": "Set where the arc with this id starts. Does nothing if this object is not a ar \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nstart_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian \n_Can only be used if this is Arc_", "type": "function", "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to cancel deconstruction orders in. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose deconstruction orders to cancel. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The deconstruction item to use if any." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "start_angle": { + "name": "start_angle", + "type": "float", + "doc": "start_angle :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float): angle in radian" } } }, - "cancel_upgrade_area": { - "name": "cancel_upgrade_area", - "doc": "Cancel a upgrade orde \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to cancel upgrade orders in. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose upgrade orders to cancel. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The upgrade item to use if any.", + "set_target": { + "name": "set_target", + "doc": "Set where the object with this id is drawn. Does nothing if this object does not support targe \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntarget :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n\n**Note: ** Polygon vertices that are set to an entity will ignore this. \n_Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light, or Animation_", "type": "function", "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to cancel upgrade orders in. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose upgrade orders to cancel. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The upgrade item to use if any." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "target": { + "name": "target", + "type": "Position or LuaEntity", + "doc": "target :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "target_offset": { + "name": "target_offset", + "type": "Vector", + "doc": "target_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" } } }, - "clear": { - "name": "clear", - "doc": "Clears this surface deleting all entities and chunks on i \n\n**Note: ** This won't clear the surface immediately. It will be cleared at the end of the current tick.", - "type": "function" - }, - "clear_pollution": { - "name": "clear_pollution", - "doc": "Clears all pollution on this surface.", - "type": "function" - }, - "clone_area": { - "name": "clone_area", - "doc": "Clones the given are \n\n**Parameters** \nTable with the following fields: \nsource_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \ndestination_force :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nclone_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If tiles should be cloned \nclone_entities :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If entities should be cloned \nclone_decoratives :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If decoratives should be cloned \nclear_destination :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the destination entities should be cleared \nexpand_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the destination surface should be expanded when destination_area is outside current bounds. Default false. \n\n**Note: ** [defines.events.on_entity_cloned](http://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_cloned) is raised for each entity, and then [defines.events.on_area_cloned](http://lua-api.factorio.com/latest/defines.html#defines.events.on_area_cloned) is raised. \n\n**Note: ** Entities are cloned in an order such that they can always be created, eg rails before trains.", + "set_text": { + "name": "set_text", + "doc": "Set the text that is displayed by the text with this id. Does nothing if this object is not a tex \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \n_Can only be used if this is Text_", "type": "function", "args": { - "source_area": { - "name": "source_area", - "type": "BoundingBox", - "doc": "Table with the following fields: \nsource_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \ndestination_force :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nclone_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If tiles should be cloned \nclone_entities :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If entities should be cloned \nclone_decoratives :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If decoratives should be cloned \nclear_destination :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the destination entities should be cleared \nexpand_map :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the destination surface should be expanded when destination_area is outside current bounds. Default false." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "text": { + "name": "text", + "type": "LocalisedString", + "doc": "text :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" } } }, - "clone_entities": { - "name": "clone_entities", - "doc": "Clones the given entitie \n\n**Parameters** \nTable with the following fields: \nentities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ndestination_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \ndestination_surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \ndestination_force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nsnap_to_grid :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \n\n**Note: ** [defines.events.on_entity_cloned](http://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_cloned) is raised for each entity. \n\n**Note: ** Entities are cloned in an order such that they can always be created, eg rails before trains.", + "set_time_to_live": { + "name": "set_time_to_live", + "doc": "Set the time to live of the object with this id. Set to 0 if the object should not expir \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", "type": "function", "args": { - "entities": { - "name": "entities", - "type": "array of LuaEntity", - "doc": "Table with the following fields: \nentities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ndestination_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \ndestination_surface :: [SurfaceSpecification](http://lua-api.factorio.com/latest/Concepts.html#SurfaceSpecification) (optional) \ndestination_force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nsnap_to_grid :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "time_to_live": { + "name": "time_to_live", + "type": "uint", + "doc": "time_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)" } } }, - "count_entities_filtered": { - "name": "count_entities_filtered", + "set_to": { + "name": "set_to", + "doc": "Set where the line with this id is drawn to. Does nothing if this object is not a lin \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nto :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nto_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional) \n_Can only be used if this is Line_", "type": "function", - "doc": "Count entities of given type or name in a given area. Works just li \n[LuaSurface::find_entities_filtered](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered), except this only returns the count. As it doesn \nconstruct all the wrapper objects, this is more efficient if one is only interested in t \nnumber of entities. If no area and no position are given, then the entire surface is searche \nIf both area and position are specified, counts only entities matching the positio \nIf position and radius are given, counts only entities within that radius of the position \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will count all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) or array of [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) or array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted.", - "returns": "uint", "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will count all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) or array of [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) or array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "to": { + "name": "to", + "type": "Position or LuaEntity", + "doc": "to :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) or [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)" + }, + "to_offset": { + "name": "to_offset", + "type": "Vector", + "doc": "to_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional)" } } }, - "count_tiles_filtered": { - "name": "count_tiles_filtered", + "set_vertices": { + "name": "set_vertices", + "doc": "Set the vertices of the polygon with this id. Does nothing if this object is not a polygo \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nvertices :: array of [ScriptRenderTarget](http://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) \n_Can only be used if this is Polygon_", "type": "function", - "doc": "Count tiles of a given name in a given area. Works just li \n[LuaSurface::find_tiles_filtered](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered), except this only returns the count. As it doesn \nconstruct all the wrapper objects, this is more efficient if one is only interested in t \nnumber of tiles. If no area is given, then the entire surface is searche \nIf position and radius are given, only tiles within the radius of the position are counted \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Ignored if not given with radius. \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhas_hidden_tile :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional)", - "returns": "uint", "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Ignored if not given with radius. \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhas_hidden_tile :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "vertices": { + "name": "vertices", + "type": "array of ScriptRenderTarget", + "doc": "vertices :: array of [ScriptRenderTarget](http://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget)" } } }, - "create_decoratives": { - "name": "create_decoratives", - "doc": "Adds the given decoratives to the surfac \nEach Decorative \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \namount :: [uint8](http://lua-api.factorio.com/latest/Builtin-Types.html#uint8) \n\n**Parameters** \nTable with the following fields: \ncheck_collision :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If collision should be checked against entities/tiles. \ndecoratives :: array of Decorative \n\n**Note: ** This will merge decoratives of the same type that already exist effectively increasing the \"amount\" field.", + "set_visible": { + "name": "set_visible", + "doc": "Set whether this is rendered to anyone at al \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nvisible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", "type": "function", "args": { - "check_collision": { - "name": "check_collision", + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "visible": { + "name": "visible", "type": "boolean", - "doc": "Table with the following fields: \ncheck_collision :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If collision should be checked against entities/tiles. \ndecoratives :: array of Decorative" + "doc": "visible :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)" } } }, - "create_entity": { - "name": "create_entity", + "set_width": { + "name": "set_width", + "doc": "Set the width of the object with this id. Does nothing if this object does not support width. Value is in pixels (32 per tile \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nwidth :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \n_Can only be used if this is Line, Circle, or Rectangle_", "type": "function", - "doc": "Create an entity on this surface \n\n**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The entity prototype name to create. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to create the entity. \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Desired orientation of the entity after creation. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the entity, default is enemy. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity with health for the new entity to target. \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Source entity. Used for beams. \nfast_replace :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, building will attempt to simulate fast-replace building. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If given set the last_user to this player. If fast_replace is true simulate fast replace using this player. \nspill :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nraise_built :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_built](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_built) will be fired on successful entity creation. \ncreate_build_effect_smoke :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false, the building effect smoke will not be shown around the new entity. \nAdditional entity-specific parameters \nassembling-machine \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nbeam \ntarget_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined). \nsource_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined). \nmax_length :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If set, beam will be destroyed when distance between source and target is greater than this value. \nduration :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If set, beam will be destroyed after this value of ticks. \nsource_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Source position will be offset by this value when rendering the beam. \ncontainer \nbar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Inventory index where the red limiting bar should be set. \nflying-text \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The string to show. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Color of the displayed text. \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nentity-ghost \ninner_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name of the entity contained in the ghost. \nexpires :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\nfalse````\nthe ghost entity will not expire. Default is ````\nfalse````\n. \nfire \ninitial_ground_flame_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): With how many small flames should the fire on ground be created. \ninserter \nconditions: Table with the following fields: \ncircuit :: [CircuitCondition](http://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) (optional) \nlogistics :: [CircuitCondition](http://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) (optional) \nfilters :: array of [Filter](http://lua-api.factorio.com/latest/Concepts.html#Filter) \nitem-entity \nstack :: [SimpleItemStack](http://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack): The stack of items to create. \nitem-request-proxy \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The target items are to be delivered to. \nmodules :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The stacks of items to be delivered to target entity from logistic network. \nlogistic-container \nrequest_filters :: array of [Filter](http://lua-api.factorio.com/latest/Concepts.html#Filter) (optional) \nparticle \nmovement :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nheight :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nvertical_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nframe_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nprojectile \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nmax_range :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nresource \namount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nenable_tree_removal :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true. \nenable_cliff_removal :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If colliding cliffs are removed. Default is true. \nunderground-belt \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): ````\n\"output\"````\nor ````\n\"input\"````\n; default is ````\n\"input\"````\n. \nprogrammable-speaker \nparameters :: [ProgrammableSpeaker\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeaker\n\n**Parameters** \n) (optional) \nalert_parameters :: [ProgrammableSpeakerAlert\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlert\n\n**Parameters** \n) (optional) \ncharacter-corpse \ninventory_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhighlight-box \nbounding_box :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nbox_type :: [CursorBoxRenderType](http://lua-api.factorio.com/latest/Concepts.html#CursorBoxRenderType) (optional) \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nblink_interval :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nsimple-entity-with-owner & simple-entity-with-force \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \n\n**Return value** \nThe created entity or ````\nnil````\nif the creation failed. \n\n**Example** \n````\nasm = game.surfaces[1].create_entity{name = \"assembling-machine-1\", position = {15, 3}, force = game.forces.player, recipe = \"iron-stick\"}```` \n\n**Example** \nCreates a filter inserter with circuit conditions and a filt \n````\ngame.surfaces[1].create_entity{ \n  name = \"filter-inserter\", position = {20, 15}, force = game.player.force, \n  conditions = {red = {name = \"wood\", count = 3, operator = \">\"}, \n              green = {name = \"iron-ore\", count = 1, operator = \n  logistics = {name = \"wood\", count = 3, operator = \"=\"}}, \n  filters = {{index = 1, name = \"iron-ore\"}} \n}```` \n\n**Example** \nCreates a requester chest already set to request 128 iron plate \n````\ngame.surfaces[1].create_entity{ \n  name = \"logistic-chest-requester\", 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\n**Example** \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**Example** \nCreates a basic inserter at the player's location facing nor \n````\ngame.surfaces[1].create_entity{name = \"inserter\", position = game.player.position, direction = defines.direction.north}````", - "returns": "LuaEntity", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The entity prototype name to create. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to create the entity. \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional): Desired orientation of the entity after creation. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the entity, default is enemy. \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Entity with health for the new entity to target. \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): Source entity. Used for beams. \nfast_replace :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true, building will attempt to simulate fast-replace building. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): If given set the last_user to this player. If fast_replace is true simulate fast replace using this player. \nspill :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): 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. \nraise_built :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If true; [defines.events.script_raised_built](http://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_built) will be fired on successful entity creation. \ncreate_build_effect_smoke :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If false, the building effect smoke will not be shown around the new entity. \nAdditional entity-specific parameters \nassembling-machine \nrecipe :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nbeam \ntarget_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined). \nsource_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined). \nmax_length :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If set, beam will be destroyed when distance between source and target is greater than this value. \nduration :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If set, beam will be destroyed after this value of ticks. \nsource_offset :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) (optional): Source position will be offset by this value when rendering the beam. \ncontainer \nbar :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Inventory index where the red limiting bar should be set. \nflying-text \ntext :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString): The string to show. \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional): Color of the displayed text. \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nentity-ghost \ninner_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The prototype name of the entity contained in the ghost. \nexpires :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\nfalse````\nthe ghost entity will not expire. Default is ````\nfalse````\n. \nfire \ninitial_ground_flame_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): With how many small flames should the fire on ground be created. \ninserter \nconditions: Table with the following fields: \ncircuit :: [CircuitCondition](http://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) (optional) \nlogistics :: [CircuitCondition](http://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) (optional) \nfilters :: array of [Filter](http://lua-api.factorio.com/latest/Concepts.html#Filter) \nitem-entity \nstack :: [SimpleItemStack](http://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack): The stack of items to create. \nitem-request-proxy \ntarget :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The target items are to be delivered to. \nmodules :: dictionary [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) → [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The stacks of items to be delivered to target entity from logistic network. \nlogistic-container \nrequest_filters :: array of [Filter](http://lua-api.factorio.com/latest/Concepts.html#Filter) (optional) \nparticle \nmovement :: [Vector](http://lua-api.factorio.com/latest/Concepts.html#Vector) \nheight :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nvertical_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nframe_speed :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nprojectile \nspeed :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nmax_range :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \nresource \namount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nenable_tree_removal :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true. \nenable_cliff_removal :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If colliding cliffs are removed. Default is true. \nunderground-belt \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): ````\n\"output\"````\nor ````\n\"input\"````\n; default is ````\n\"input\"````\n. \nprogrammable-speaker \nparameters :: [ProgrammableSpeaker\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeaker\n\n**Parameters** \n) (optional) \nalert_parameters :: [ProgrammableSpeakerAlert\n\n**Parameters** \n](http://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlert\n\n**Parameters** \n) (optional) \ncharacter-corpse \ninventory_size :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhighlight-box \nbounding_box :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nbox_type :: [CursorBoxRenderType](http://lua-api.factorio.com/latest/Concepts.html#CursorBoxRenderType) (optional) \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nblink_interval :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ntime_to_live :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nsimple-entity-with-owner & simple-entity-with-force \nrender_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)" + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "width": { + "name": "width", + "type": "float", + "doc": "width :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float)" } } }, - "create_trivial_smoke": { - "name": "create_trivial_smoke", + "set_x_scale": { + "name": "set_x_scale", + "doc": "Set the horizontal scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \nx_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Sprite or Animation_", "type": "function", "args": { - "name": { - "name": "name", - "type": "string", - "doc": "Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The smoke prototype name to create. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to create the smoke." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "x_scale": { + "name": "x_scale", + "type": "double", + "doc": "x_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } - }, - "doc": "**Parameters** \nTable with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The smoke prototype name to create. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to create the smoke." + } }, - "create_unit_group": { - "name": "create_unit_group", + "set_y_scale": { + "name": "set_y_scale", + "doc": "Set the vertical scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animatio \n\n**Parameters** \nid :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64) \ny_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) \n_Can only be used if this is Sprite or Animation_", "type": "function", - "doc": "Create a new unit group at a given position \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Initial position of the new unit group. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the new unit group. Defaults to ````\n\"enemy\"````\n.", - "returns": "LuaUnitGroup", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Initial position of the new unit group. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the new unit group. Defaults to ````\n\"enemy\"````\n." + "id": { + "name": "id", + "type": "uint64", + "doc": "id :: [uint64](http://lua-api.factorio.com/latest/Builtin-Types.html#uint64)" + }, + "y_scale": { + "name": "y_scale", + "type": "double", + "doc": "y_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double)" } } + } + }, + "doc": "Create a line." + }, + "LuaResourceCategoryPrototype": { + "name": "LuaResourceCategoryPrototype", + "type": "LuaResourceCategoryPrototype", + "inherits": [], + "properties": { + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "darkness": { - "name": "darkness", - "type": "float", + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" + }, + "name": { + "name": "name", + "type": "string", "mode": "[R]", - "doc": "Amount of darkness at the current time." + "doc": "Name of this prototype." }, - "dawn": { - "name": "dawn", - "type": "double", - "mode": "[RW]", - "doc": "The daytime when dawn start" + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "daytime": { - "name": "daytime", - "type": "float", - "mode": "[RW]", - "doc": "Current time of day, as a number in range [0, 1)." + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string of this prototype." }, - "deconstruct_area": { - "name": "deconstruct_area", - "doc": "Place a deconstruction reques \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to mark for deconstruction. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose bots should perform the deconstruction. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The deconstruction item to use if any.", - "type": "function", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to mark for deconstruction. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose bots should perform the deconstruction. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The deconstruction item to use if any." - } - } + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaRoboportControlBehavior": { + "name": "LuaRoboportControlBehavior", + "type": "LuaRoboportControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], + "properties": { + "available_construction_output_signal": { + "name": "available_construction_output_signal", + "type": "SignalID", + "mode": "[RW]" + }, + "available_logistic_output_signal": { + "name": "available_logistic_output_signal", + "type": "SignalID", + "mode": "[RW]" + }, + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." }, - "decorative_prototype_collides": { - "name": "decorative_prototype_collides", + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", + "returns": "LuaCircuitNetwork", "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to check" + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." }, - "prototype": { - "name": "prototype", - "type": "string", - "doc": "prototype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The decorative prototype to check" + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } }, - "doc": "**Parameters** \nprototype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The decorative prototype to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to check" + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "delete_chunk": { - "name": "delete_chunk", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to delete" - } - }, - "doc": "**Parameters** \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk position to delete \n\n**Note: ** This won't delete the chunk immediately. Chunks are deleted at the end of the current tick." + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "destroy_decoratives": { - "name": "destroy_decoratives", - "doc": "Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched. \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition) (optional) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) or array of [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted.", - "type": "function", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition) (optional) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) or array of [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted." - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "dusk": { - "name": "dusk", - "type": "double", + "read_logistics": { + "name": "read_logistics", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the roboport should report the logistics network content to the circuit network." + }, + "read_robot_stats": { + "name": "read_robot_stats", + "type": "boolean", "mode": "[RW]", - "doc": "The daytime when dusk start" + "doc": "````\ntrue````\nif the roboport should report the robot statistics to the circuit network." + }, + "total_construction_output_signal": { + "name": "total_construction_output_signal", + "type": "SignalID", + "mode": "[RW]" + }, + "total_logistic_output_signal": { + "name": "total_logistic_output_signal", + "type": "SignalID", + "mode": "[RW]" + }, + "type": { + "name": "type", + "type": "defines.control_behavior.type", + "mode": "[R]", + "doc": "The concrete type of this control behavior." }, - "entity_prototype_collides": { - "name": "entity_prototype_collides", + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for roboports." + }, + "LuaSettings": { + "name": "LuaSettings", + "type": "LuaSettings", + "inherits": [], + "properties": { + "get_player_settings": { + "name": "get_player_settings", "type": "function", + "returns": "CustomDictionary string → ModSetting", "args": { - "direction": { - "name": "direction", - "type": "defines.direction", - "doc": "direction :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional)" - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to check" - }, - "prototype": { - "name": "prototype", - "type": "EntityPrototypeSpecification", - "doc": "prototype :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification): The entity prototype to check" - }, - "use_map_generation_bounding_box": { - "name": "use_map_generation_bounding_box", - "type": "boolean", - "doc": "use_map_generation_bounding_box :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the map generation bounding box should be used instead of the collision bounding box" + "player": { + "name": "player", + "type": "PlayerSpecification", + "doc": "player :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification)" } }, - "doc": "**Parameters** \nprototype :: [EntityPrototypeSpecification](http://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeSpecification): The entity prototype to check \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position to check \nuse_map_generation_bounding_box :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the map generation bounding box should be used instead of the collision bounding box \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional)" + "doc": "**Parameters** \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) \n\n**Note: ** This can become invalid if during operation if the given player becomes invalid." }, - "evening": { - "name": "evening", - "type": "double", - "mode": "[RW]", - "doc": "The daytime when evening start" + "global": { + "name": "global", + "type": "CustomDictionary string → ModSetting", + "mode": "[R]" }, - "find_decoratives_filtered": { - "name": "find_decoratives_filtered", - "doc": "Find decoratives of a given name in a given area. If no filters are given, returns all decoratives in the search are \nIf multiple filters are specified, returns only decoratives matching all given filters. If no area and no position are given, then the entire surface is searched \nEach DecorativeResult is a table: \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition) \ndecorative :: [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) \namount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition) (optional) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) or array of [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted. \n\n**Example** \n````\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````", - "type": "function", - "returns": "array of DecorativeResult", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition) (optional) \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) or array of [LuaDecorativePrototype](http://lua-api.factorio.com/latest/LuaDecorativePrototype.html) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted." - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "This object's nam" }, - "find_enemy_units": { - "name": "find_enemy_units", - "type": "function", - "doc": "Find enemy units of a given force within an area \n\n**Parameters** \ncenter :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Radius of the circular search area \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Force to find enemies of. If not give \nuses the player force. \n\n**Note: ** This is more efficient than [LuaSurface::find_entities](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities). \n\n**Example** \nFind all units who would be interested to attack the player, within 100-tile are \n````\nlocal enemies = game.player.surface.find_enemy_units(game.player.position, 100)````", - "returns": "array of LuaEntity", - "args": { - "center": { - "name": "center", - "type": "Position", - "doc": "center :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area" - }, - "force": { - "name": "force", - "type": "LuaForce or string", - "doc": "force :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): Force to find enemies of. If not give \nuses the player force." - }, - "radius": { - "name": "radius", - "type": "double", - "doc": "radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Radius of the circular search area" - } - } + "player": { + "name": "player", + "type": "CustomDictionary string → ModSetting", + "mode": "[R]" }, - "find_entities": { - "name": "find_entities", - "type": "function", - "doc": "Find entities in a given area. If no area is given all entities on the surface are returned \n\n**Parameters** \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \n\n**Example** \nWill evaluate to a list of all entities within given are \n````\ngame.surfaces[\"nauvis\"].find_entities({{-10, -10}, {10, 10}})````", - "returns": "array of LuaEntity", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional)" - } - } + "startup": { + "name": "startup", + "type": "CustomDictionary string → ModSetting", + "mode": "[R]" + } + }, + "doc": "" + }, + "LuaShortcutPrototype": { + "name": "LuaShortcutPrototype", + "type": "LuaShortcutPrototype", + "inherits": [], + "properties": { + "action": { + "name": "action", + "type": "string", + "mode": "[R]" }, - "find_entities_filtered": { - "name": "find_entities_filtered", - "type": "function", - "doc": "Find entities of given type or name in a given area. If no filters (````\nname````\n, ````\ntype````\n, or ````\nforce````\n) are given, returns all entities in the search are \nIf multiple filters are specified, returns only entities matching all given filters. If no area and no position are given, then the entire surface is searche \nIf both area and position are specified, returns only entities matching the positio \nIf position and radius are given, returns only entities within that radius of the position \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) or array of [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) or array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted. \n\n**Example** \n````\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].````", - "returns": "array of LuaEntity", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ntype :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nghost_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) or array of [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) or array of [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \ninvert :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the filters should be inverted." - } - } + "associated_control_input": { + "name": "associated_control_input", + "type": "string", + "mode": "[R]" }, - "find_entity": { - "name": "find_entity", - "type": "function", - "doc": "Find a specific entity at a specific position \n\n**Parameters** \nentity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Entity to look for \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Coordinates to look at \n\n**Return value** \nWill be ````\nnil````\nif no such entity is found. \n\n**Example** \n````\ngame.player.selected.surface.find_entity('filter-inserter', {0,0})````", - "returns": "LuaEntity", - "args": { - "entity": { - "name": "entity", - "type": "string", - "doc": "entity :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Entity to look for" - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Coordinates to look at" - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "find_logistic_network_by_position": { - "name": "find_logistic_network_by_position", - "type": "function", - "doc": "Find the logistic network that covers a given position. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force the logistic network should belong to. \n\n**Return value** \nThe found network or ````\nnil````\nif no such network was found.", - "returns": "LuaLogisticNetwork", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force the logistic network should belong to." - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "item_to_spawn": { + "name": "item_to_spawn", + "type": "LuaItemPrototype", + "mode": "[R]" }, - "find_logistic_networks_by_construction_area": { - "name": "find_logistic_networks_by_construction_area", - "type": "function", - "doc": "Finds all of the logistics networks whose construction area intersects with the given position. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force the logistic networks should belong to.", - "returns": "array of LuaLogisticNetwork", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): Force the logistic networks should belong to." - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" }, - "find_nearest_enemy": { - "name": "find_nearest_enemy", - "type": "function", - "doc": "Find the enemy unit closest to the given position \n\n**Parameters** \nTable with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area. \nmax_distance :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Radius of the circular search area. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force the result will be an enemy o \nUses the player force if not specified. \n\n**Return value** \nThe nearest enemy unit or ````\nnil````\nif no enemy could be found within t \ngiven area.", - "returns": "LuaEntity", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "Table with the following fields: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area. \nmax_distance :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Radius of the circular search area. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): The force the result will be an enemy o \nUses the player force if not specified." - } - } + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" }, - "find_non_colliding_position": { - "name": "find_non_colliding_position", - "type": "function", - "doc": "Find a non-colliding position within a given radius \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity to find a position for. (The boundi \nbox for the collision checking is taken from this prototype.) \ncenter :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area. \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Max distance from ````\ncenter````\nto search in. ````\n0````\nfor infinitely-lar \nsearch area. \nprecision :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The step length from the given position as it searches, in tiles. Minimum value is 0.01. \nforce_to_tile_center :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Will only check tile centers. This can be useful when your intent is to place a building at the resulting positio \nas they must generally be placed at tile centers. Default false. \n\n**Return value** \nThe non-colliding position. May be ````\nnil````\nif no suitable position was found.", - "returns": "Position", - "args": { - "center": { - "name": "center", - "type": "Position", - "doc": "center :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the search area." - }, - "force_to_tile_center": { - "name": "force_to_tile_center", - "type": "boolean", - "doc": "force_to_tile_center :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Will only check tile centers. This can be useful when your intent is to place a building at the resulting positio \nas they must generally be placed at tile centers. Default false." - }, - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity to find a position for. (The boundi \nbox for the collision checking is taken from this prototype.)" - }, - "precision": { - "name": "precision", - "type": "double", - "doc": "precision :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The step length from the given position as it searches, in tiles. Minimum value is 0.01." - }, - "radius": { - "name": "radius", - "type": "double", - "doc": "radius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): Max distance from ````\ncenter````\nto search in. ````\n0````\nfor infinitely-lar \nsearch area." - } - } + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string of this prototype." + }, + "technology_to_unlock": { + "name": "technology_to_unlock", + "type": "LuaTechnologyPrototype", + "mode": "[R]" + }, + "toggleable": { + "name": "toggleable", + "type": "boolean", + "mode": "[R]" + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" + }, + "LuaStorageTankControlBehavior": { + "name": "LuaStorageTankControlBehavior", + "type": "LuaStorageTankControlBehavior", + "inherits": [ + "Inherited from LuaControlBehavior: get_circuit_network, type, entity" + ], + "properties": { + "entity": { + "name": "entity", + "type": "LuaEntity", + "mode": "[R]", + "doc": "The entity this control behavior belongs to." }, - "find_non_colliding_position_in_box": { - "name": "find_non_colliding_position_in_box", + "get_circuit_network": { + "name": "get_circuit_network", "type": "function", - "doc": "Find a non-colliding position within a given rectangle \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity to find a position for. (The boundi \nbox for the collision checking is taken from this prototype.) \nsearch_space :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The rectangle to search inside. \nprecision :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The step length from the given position as it searches, in tiles. Minimum value is 0.01. \nforce_to_tile_center :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Will only check tile centers. This can be useful when your intent is to place a building at the resulting positio \nas they must generally be placed at tile centers. Default false. \n\n**Return value** \nThe non-colliding position. May be ````\nnil````\nif no suitable position was found.", - "returns": "Position", + "returns": "LuaCircuitNetwork", "args": { - "force_to_tile_center": { - "name": "force_to_tile_center", - "type": "boolean", - "doc": "force_to_tile_center :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Will only check tile centers. This can be useful when your intent is to place a building at the resulting positio \nas they must generally be placed at tile centers. Default false." - }, - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Prototype name of the entity to find a position for. (The boundi \nbox for the collision checking is taken from this prototype.)" - }, - "precision": { - "name": "precision", - "type": "double", - "doc": "precision :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The step length from the given position as it searches, in tiles. Minimum value is 0.01." + "circuit_connector": { + "name": "circuit_connector", + "type": "defines.circuit_connector_id", + "doc": "circuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector." }, - "search_space": { - "name": "search_space", - "type": "BoundingBox", - "doc": "search_space :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The rectangle to search inside." + "wire": { + "name": "wire", + "type": "defines.wire_type", + "doc": "wire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity." } - } + }, + "doc": "**Parameters** \nwire :: [defines.wire_type](http://lua-api.factorio.com/latest/defines.html#defines.wire_type): Wire color of the network connected to this entity. \ncircuit_connector :: [defines.circuit_connector_id](http://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) (optional): The connector to get circuit network fo \nMust be specified for entities with more than one circuit network connector. \n\n**Return value** \nThe circuit network or nil." }, - "find_tiles_filtered": { - "name": "find_tiles_filtered", - "type": "function", - "doc": "Find tiles of a given name in a given area. If no filters are given returns all tiles in the search area. If no area is given, then the entire surface is searche \nIf position and radius are given, only tiles within the radius of the position are included \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Ignored if not given with radius. \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhas_hidden_tile :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional)", - "returns": "array of LuaTile", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) (optional) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Ignored if not given with radius. \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): If given with position, will return all entities within the radius of the position. \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nlimit :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nhas_hidden_tile :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional) \ncollision_mask :: [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) or array of [CollisionMaskLayer](http://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) (optional)" - } - } + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." }, - "find_units": { - "name": "find_units", - "type": "function", - "doc": "Find units of a given force and force condition within a given area \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): Box to find units within. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Force performing the search. \ncondition :: [ForceCondition](http://lua-api.factorio.com/latest/Concepts.html#ForceCondition): Only forces which meet the condition will be included in the search. \n\n**Note: ** This is more efficient than [LuaSurface::find_entities](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities). \n\n**Example** \nFind friendly units to \"player\" for \n````\nlocal friendly_units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"friend\")```` \n\n**Example** \nFind units of \"player\" for \n````\nlocal units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = \"player\", condition = \"same\")````", - "returns": "array of LuaEntity", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): Box to find units within. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Force performing the search. \ncondition :: [ForceCondition](http://lua-api.factorio.com/latest/Concepts.html#ForceCondition): Only forces which meet the condition will be included in the search." - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "force_generate_chunk_requests": { - "name": "force_generate_chunk_requests", - "doc": "Blocks and generates all chunks that have been requested using all available threads.", - "type": "function" + "type": { + "name": "type", + "type": "defines.control_behavior.type", + "mode": "[R]", + "doc": "The concrete type of this control behavior." }, - "freeze_daytime": { - "name": "freeze_daytime", + "valid": { + "name": "valid", "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "Control behavior for storage tanks." + }, + "LuaStyle": { + "name": "LuaStyle", + "type": "LuaStyle", + "inherits": [], + "properties": { + "badge_font": { + "name": "badge_font", + "type": "string", "mode": "[RW]", - "doc": "True if daytime is currently froze" + "doc": "_Can only be used if this is TabStyle_" }, - "get_chunks": { - "name": "get_chunks", - "type": "function", - "doc": "Get an iterator going over every chunk on this surface.", - "returns": "LuaChunkIterator" + "badge_horizontal_spacing": { + "name": "badge_horizontal_spacing", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is TabStyle_" }, - "get_closest": { - "name": "get_closest", - "type": "function", - "doc": "Gets the closest entity in the list to this positio \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nentities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The Entities to check", - "returns": "LuaEntity", - "args": { - "entities": { - "name": "entities", - "type": "array of LuaEntity", - "doc": "entities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The Entities to check" - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "bottom_cell_padding": { + "name": "bottom_cell_padding", + "type": "int", + "mode": "[RW]", + "doc": "Space between the table cell contents bottom and borde \n_Can only be used if this is LuaTableStyle_" }, - "get_connected_tiles": { - "name": "get_connected_tiles", - "type": "function", - "doc": "Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile positio \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The tile position to start at. \ntiles :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tiles to search for. \n\n**Return value** \nThe resulting set of tiles. \n\n**Note: ** This won't find tiles in non-generated chunks.", - "returns": "array of Position", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The tile position to start at." - }, - "tiles": { - "name": "tiles", - "type": "array of string", - "doc": "tiles :: array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The tiles to search for." - } - } + "bottom_margin": { + "name": "bottom_margin", + "type": "int", + "mode": "[RW]" }, - "get_hidden_tile": { - "name": "get_hidden_tile", - "type": "function", - "doc": "The hidden tile name or ````\nnil````\nif there isn't one for the given position. \n\n**Parameters** \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition): The tile position.", - "returns": "string", - "args": { - "position": { - "name": "position", - "type": "TilePosition", - "doc": "position :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition): The tile position." - } - } + "bottom_padding": { + "name": "bottom_padding", + "type": "int", + "mode": "[RW]" }, - "get_map_exchange_string": { - "name": "get_map_exchange_string", - "type": "function", - "doc": "Gets the map exchange string for the current map generation settings of this surfac", - "returns": "string" + "cell_padding": { + "name": "cell_padding", + "type": "int", + "mode": "[W]", + "doc": "Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this valu \n_Can only be used if this is LuaTableStyle_" }, - "get_pollution": { - "name": "get_pollution", - "type": "function", - "doc": "Get the pollution for a given positio \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \n\n**Note: ** Pollution is stored per chunk, so this will return the same value for all positions in one chunk. \n\n**Example** \n````\ngame.surfaces[1].get_pollution({1,2})````", - "returns": "double", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "clicked_font_color": { + "name": "clicked_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "get_random_chunk": { - "name": "get_random_chunk", - "type": "function", - "doc": "Gets a random generated chunk position or 0,0 if no chunks have been generated on this surfac", - "returns": "ChunkPosition" + "clicked_vertical_offset": { + "name": "clicked_vertical_offset", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "get_resource_counts": { - "name": "get_resource_counts", - "type": "function", - "doc": "Gets the resource amount of all resources on this surfa", - "returns": "dictionary string → uint" + "color": { + "name": "color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaProgressBarStyle_" }, - "get_script_areas": { - "name": "get_script_areas", - "type": "function", - "doc": "Gets the script areas that match the given name or if no name is given all areas are returne \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)", - "returns": "array of ScriptArea", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)" - } - } + "column_alignments": { + "name": "column_alignments", + "type": "CustomArray of Alignment", + "mode": "[R]", + "doc": "Alignment for every column of this table. Even though this property is marked as read-only, the alignment can be changed by indexing this CustomArray, like so: \n\n**Example** \n````\ntable_element.style.column_alignments[1] = \"center\"````" }, - "get_script_positions": { - "name": "get_script_positions", - "type": "function", - "doc": "Gets the script positions that match the given name or if no name is given all positions are returne \n\n**Parameters** \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)", - "returns": "array of ScriptPosition", - "args": { - "name": { - "name": "name", - "type": "string", - "doc": "name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional)" - } - } + "default_badge_font_color": { + "name": "default_badge_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is TabStyle_" }, - "get_starting_area_radius": { - "name": "get_starting_area_radius", - "type": "function", - "doc": "Gets the starting area radius of this surfac", - "returns": "double" + "disabled_badge_font_color": { + "name": "disabled_badge_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is TabStyle_" }, - "get_tile": { - "name": "get_tile", - "type": "function", - "doc": "Get the tile at a given position. \n\n**Parameters** \nx :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) \ny :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) \n\n**Note: ** The input position params can also be a single tile position.", - "returns": "LuaTile", - "args": { - "x": { - "name": "x", - "type": "int", - "doc": "x :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int)" - }, - "y": { - "name": "y", - "type": "int", - "doc": "y :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int)" - } - } + "disabled_font_color": { + "name": "disabled_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle or LuaTabStyle_" }, - "get_total_pollution": { - "name": "get_total_pollution", - "type": "function", - "doc": "Gets the total amount of pollution on the surface by iterating over all of the chunks containing pollutio", - "returns": "double" + "extra_bottom_margin_when_activated": { + "name": "extra_bottom_margin_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" }, - "get_train_stops": { - "name": "get_train_stops", - "type": "function", - "doc": "Gets train stops matching the given filter \n\n**Parameters** \nopts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional)", - "returns": "array of LuaEntity", - "args": { - "opts": { - "name": "opts", - "type": "string or array of string", - "doc": "opts (optional): Table with the following fields: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional)" - } - } + "extra_bottom_padding_when_activated": { + "name": "extra_bottom_padding_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" }, - "get_trains": { - "name": "get_trains", - "type": "function", - "returns": "array of LuaTrain", - "args": { - "force": { - "name": "force", - "type": "ForceSpecification", - "doc": "force :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): If given only trains matching this force are returned." - } - }, - "doc": "**Parameters** \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): If given only trains matching this force are returned." + "extra_left_margin_when_activated": { + "name": "extra_left_margin_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "extra_left_padding_when_activated": { + "name": "extra_left_padding_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "extra_margin_when_activated": { + "name": "extra_margin_when_activated", + "type": "int or array of int", + "mode": "[W]", + "doc": "Sets extra_top/right/bottom/left_margin_when_activated to this valu \nAn array with two values sets top/bottom margin to the first value and left/right margin to the second valu \nAn array with four values sets top, right, bottom, left margin respectively." + }, + "extra_padding_when_activated": { + "name": "extra_padding_when_activated", + "type": "int or array of int", + "mode": "[W]", + "doc": "Sets extra_top/right/bottom/left_padding_when_actived to this valu \nAn array with two values sets top/bottom padding to the first value and left/right padding to the second valu \nAn array with four values sets top, right, bottom, left padding respectively." + }, + "extra_right_margin_when_activated": { + "name": "extra_right_margin_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "extra_right_padding_when_activated": { + "name": "extra_right_padding_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "extra_top_margin_when_activated": { + "name": "extra_top_margin_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "extra_top_padding_when_activated": { + "name": "extra_top_padding_when_activated", + "type": "int", + "mode": "[RW]", + "doc": "_Can only be used if this is ScrollPaneStyle_" + }, + "font": { + "name": "font", + "type": "string", + "mode": "[RW]" + }, + "font_color": { + "name": "font_color", + "type": "Color", + "mode": "[RW]" + }, + "gui": { + "name": "gui", + "type": "LuaGui", + "mode": "[R]", + "doc": "Gui of the [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) of this style." + }, + "height": { + "name": "height", + "type": "int", + "mode": "[W]", + "doc": "Sets both minimal and maximal height to the given value." }, "help": { "name": "help", "type": "string", "doc": "All methods, and properties that this object supports." }, - "index": { - "name": "index", - "type": "uint", - "mode": "[R]", - "doc": "Unique ID associated with this surface." + "horizontal_align": { + "name": "horizontal_align", + "type": "string", + "mode": "[RW]", + "doc": "Horizontal align of the inner content of the widget, possible values are \"left\", \"center\" or \"righ" }, - "is_chunk_generated": { - "name": "is_chunk_generated", - "type": "function", - "doc": "Is a given chunk generated? \n\n**Parameters** \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk's position.", - "returns": "boolean", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk's position." - } - } + "horizontal_spacing": { + "name": "horizontal_spacing", + "type": "int", + "mode": "[RW]", + "doc": "Horizontal space between individual cell \n_Can only be used if this is LuaTableStyle, LuaFlowStyle, or LuaHorizontalFlow_" }, - "map_gen_settings": { - "name": "map_gen_settings", - "type": "MapGenSettings", + "horizontally_squashable": { + "name": "horizontally_squashable", + "type": "boolean", "mode": "[RW]", - "doc": "The generation settings for the surfac \ncan be used to adjust the surface after changing generation settings. \n\n**Note: ** When changing settings runtime the game will not retroactively change anything. \n\n**Note: ** [LuaSurface::regenerate_entity](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_entity), [LuaSurface::regenerate_decorative](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_decorative), and [LuaSurface::delete_chunk](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk)" + "doc": "If the GUI element can be squashed (by maximal width of some parent element) horizontall \nThis is mainly meant to be used for scroll-pane The default value is fals" }, - "min_brightness": { - "name": "min_brightness", - "type": "double", + "horizontally_stretchable": { + "name": "horizontally_stretchable", + "type": "boolean", "mode": "[RW]", - "doc": "The minimal brightness during the night. Default is ````\n0.15````" + "doc": "If the GUI element stretches its size horizontally to other element" }, - "morning": { - "name": "morning", - "type": "double", + "hovered_font_color": { + "name": "hovered_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" + }, + "left_cell_padding": { + "name": "left_cell_padding", + "type": "int", + "mode": "[RW]", + "doc": "Space between the table cell contents left and borde \n_Can only be used if this is LuaTableStyle_" + }, + "left_margin": { + "name": "left_margin", + "type": "int", + "mode": "[RW]" + }, + "left_padding": { + "name": "left_padding", + "type": "int", + "mode": "[RW]" + }, + "margin": { + "name": "margin", + "type": "int or array of int", + "mode": "[W]", + "doc": "Sets top/right/bottom/left margins to this valu \nAn array with two values sets top/bottom margin to the first value and left/right margin to the second valu \nAn array with four values sets top, right, bottom, left margin respectively." + }, + "maximal_height": { + "name": "maximal_height", + "type": "int", "mode": "[RW]", - "doc": "The daytime when morning start" + "doc": "Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigge" + }, + "maximal_width": { + "name": "maximal_width", + "type": "int", + "mode": "[RW]", + "doc": "Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigge" + }, + "minimal_height": { + "name": "minimal_height", + "type": "int", + "mode": "[RW]", + "doc": "Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smalle" + }, + "minimal_width": { + "name": "minimal_width", + "type": "int", + "mode": "[RW]", + "doc": "Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smalle" }, "name": { "name": "name", "type": "string", + "mode": "[R]", + "doc": "Name of this style." + }, + "natural_height": { + "name": "natural_height", + "type": "int", "mode": "[RW]", - "doc": "The name of this surface. Names are unique among surface \n\n**Note: ** the default surface can't be renamed." + "doc": "Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger siz" }, - "peaceful_mode": { - "name": "peaceful_mode", - "type": "boolean", + "natural_width": { + "name": "natural_width", + "type": "int", "mode": "[RW]", - "doc": "Is peaceful mode enabled on this surface?" + "doc": "Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger siz" }, - "play_sound": { - "name": "play_sound", - "type": "function", - "doc": "Plays a sound on this surface \n\n**Parameters** \nTable with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive.", - "returns": "boolean", - "args": { - "path": { - "name": "path", - "type": "SoundPath", - "doc": "Table with the following fields: \npath :: [SoundPath](http://lua-api.factorio.com/latest/Concepts.html#SoundPath): The sound to play \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) (optional): Where the sound should be played. If not given it's played 'everywhere'. \nvolume_modifier :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): Must be between 0 and 1 inclusive." - } - } + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." }, - "pollute": { - "name": "pollute", - "doc": "Spawn pollution at the given position. \n\n**Parameters** \nsource :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to spawn the pollution. \namount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): How much pollution to add.", - "type": "function", - "args": { - "amount": { - "name": "amount", - "type": "double", - "doc": "amount :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): How much pollution to add." - }, - "source": { - "name": "source", - "type": "Position", - "doc": "source :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to spawn the pollution." - } - } + "padding": { + "name": "padding", + "type": "int or array of int", + "mode": "[W]", + "doc": "Sets top/right/bottom/left paddings to this valu \nAn array with two values sets top/bottom padding to the first value and left/right padding to the second valu \nAn array with four values sets top, right, bottom, left padding respectively." }, - "print": { - "name": "print", - "doc": "Print text to the chat console of all players on this surface. \n\n**Parameters** \nmessage :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString) \ncolor :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)", - "type": "function", - "args": { - "color": { - "name": "color", - "type": "Color", - "doc": "color :: [Color](http://lua-api.factorio.com/latest/Concepts.html#Color) (optional)" - }, - "message": { - "name": "message", - "type": "LocalisedString", - "doc": "message :: [LocalisedString](http://lua-api.factorio.com/latest/Concepts.html#LocalisedString)" - } - } + "pie_progress_color": { + "name": "pie_progress_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "regenerate_decorative": { - "name": "regenerate_decorative", - "doc": "Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives \n\n**Parameters** \ndecoratives :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nPrototype names of decorative or decoratives to autoplace. When ````\nnil````\nall decoratives with an autoplace are used. \nchunks :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) (optional) \nThe chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored. \n\n**Note: ** All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.", - "type": "function", - "args": { - "chunks": { - "name": "chunks", - "type": "array of ChunkPosition", - "doc": "chunks :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) (optional) \nThe chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored." - }, - "decoratives": { - "name": "decoratives", - "type": "string or array of string", - "doc": "decoratives :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nPrototype names of decorative or decoratives to autoplace. When ````\nnil````\nall decoratives with an autoplace are used." - } - } + "rich_text_setting": { + "name": "rich_text_setting", + "type": "defines.rich_text_setting", + "mode": "[RW]", + "doc": "How this GUI element handles rich tex \n_Can only be used if this is LuaLabelStyle, LuaTextBoxStyle, or LuaTextFieldStyle_" }, - "regenerate_entity": { - "name": "regenerate_entity", - "doc": "Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities \n\n**Parameters** \nentities :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nPrototype names of entity or entities to autoplace. When ````\nnil````\nall entities with an autoplace are used. \nchunks :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) (optional) \nThe chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored. \n\n**Note: ** All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.", - "type": "function", - "args": { - "chunks": { - "name": "chunks", - "type": "array of ChunkPosition", - "doc": "chunks :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) (optional) \nThe chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored." - }, - "entities": { - "name": "entities", - "type": "string or array of string", - "doc": "entities :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional) \nPrototype names of entity or entities to autoplace. When ````\nnil````\nall entities with an autoplace are used." - } - } + "right_cell_padding": { + "name": "right_cell_padding", + "type": "int", + "mode": "[RW]", + "doc": "Space between the table cell contents right and borde \n_Can only be used if this is LuaTableStyle_" }, - "request_path": { - "name": "request_path", - "type": "function", - "doc": "Starts a path find request without actually ordering a unit to mov \nResult is ultimately returned asynchronously via [defines.events.on_script_path_request_finished](http://lua-api.factorio.com/latest/defines.html#defines.events.on_script_path_request_finished \n\n**Parameters** \nTable with the following fields: \nbounding_box :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ncollision_mask :: [CollisionMask](http://lua-api.factorio.com/latest/Concepts.html#CollisionMask) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nstart :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ngoal :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How close we need to get to the goal. Default 1. \npathfind_flags :: [PathFindFlags](http://lua-api.factorio.com/latest/Concepts.html#PathFindFlags) (optional): Flags to affect the pathfinder. \ncan_open_gates :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the path request can open gates. Default false. \npath_resolution_modifier :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The resolution modifier of the pathing. Defaults to 0. \n\n**Return value** \nA unique handle to identify this call when [defines.events.on_script_path_request_finished](http://lua-api.factorio.com/latest/defines.html#defines.events.on_script_path_request_finished) fires.", - "returns": "uint", - "args": { - "bounding_box": { - "name": "bounding_box", - "type": "BoundingBox", - "doc": "Table with the following fields: \nbounding_box :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ncollision_mask :: [CollisionMask](http://lua-api.factorio.com/latest/Concepts.html#CollisionMask) or array of [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nstart :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ngoal :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nradius :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double) (optional): How close we need to get to the goal. Default 1. \npathfind_flags :: [PathFindFlags](http://lua-api.factorio.com/latest/Concepts.html#PathFindFlags) (optional): Flags to affect the pathfinder. \ncan_open_gates :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If the path request can open gates. Default false. \npath_resolution_modifier :: [int](http://lua-api.factorio.com/latest/Builtin-Types.html#int) (optional): The resolution modifier of the pathing. Defaults to 0." - } - } + "right_margin": { + "name": "right_margin", + "type": "int", + "mode": "[RW]" }, - "request_to_generate_chunks": { - "name": "request_to_generate_chunks", - "doc": "Request that the game's map generator generate chunks at the given positi \nfor the given radius on this surface. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to generate the new chunks. \nradius :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The chunk radius from ````\nposition````\nto generate new chunks in.", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where to generate the new chunks." - }, - "radius": { - "name": "radius", - "type": "uint", - "doc": "radius :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The chunk radius from ````\nposition````\nto generate new chunks in." - } - } + "right_padding": { + "name": "right_padding", + "type": "int", + "mode": "[RW]" }, - "set_chunk_generated_status": { - "name": "set_chunk_generated_status", - "doc": "Set generated status of a chunk. Useful when copying chunks. \n\n**Parameters** \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk's position. \nstatus :: [defines.chunk_generated_status](http://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status): The chunk's new status.", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "ChunkPosition", - "doc": "position :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunk's position." - }, - "status": { - "name": "status", - "type": "defines.chunk_generated_status", - "doc": "status :: [defines.chunk_generated_status](http://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status): The chunk's new status." - } - } + "selected_badge_font_color": { + "name": "selected_badge_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is TabStyle_" }, - "set_hidden_tile": { - "name": "set_hidden_tile", - "type": "function", - "args": { - "position": { - "name": "position", - "type": "TilePosition", - "doc": "position :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition): The tile position." - }, - "tile": { - "name": "tile", - "type": "string or LuaTilePrototype", - "doc": "tile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html): The new hidden tile or ````\nnil````\nto clear the hidden tile." - } - }, - "doc": "**Parameters** \nposition :: [TilePosition](http://lua-api.factorio.com/latest/Concepts.html#TilePosition): The tile position. \ntile :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html): The new hidden tile or ````\nnil````\nto clear the hidden tile." + "selected_clicked_font_color": { + "name": "selected_clicked_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "set_multi_command": { - "name": "set_multi_command", - "type": "function", - "doc": "Give a command to multiple units. This will automatically select suitable units for t \ntask \n\n**Parameters** \nTable with the following fields: \ncommand :: [Command](http://lua-api.factorio.com/latest/Concepts.html#Command) \nunit_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of units to give the command to. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the units this command is to be given t \nIf not specified, uses the enemy force. \nunit_search_distance :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Radius to search for units. The search area is centered \nthe destination of the command. \n\n**Return value** \nNumber of units actually sent. May be less than ````\ncount````\nif not enough units we \navailable.", - "returns": "uint", - "args": { - "command": { - "name": "command", - "type": "Command", - "doc": "Table with the following fields: \ncommand :: [Command](http://lua-api.factorio.com/latest/Concepts.html#Command) \nunit_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Number of units to give the command to. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification) (optional): Force of the units this command is to be given t \nIf not specified, uses the enemy force. \nunit_search_distance :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): Radius to search for units. The search area is centered \nthe destination of the command." - } - } + "selected_font_color": { + "name": "selected_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "set_tiles": { - "name": "set_tiles", - "doc": "Set tiles at specified locations. Automatically corrects the edges around modified tiles. \n\n**Parameters** \ntiles :: array of Tile: Each Tile is a table: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \ncorrect_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\nfalse````\n, the correction logic is not done on the changed tile \nDefaults to ````\ntrue````\n. \n\n**Note: ** It is recommended to call this method once for all the tiles you want to change rath \nthan calling it individually for every tile. As the tile correction is used after eve \nstep, calling it one by one could cause the tile correction logic to redo some of t \nchanges, and it is also much performance heavy.", - "type": "function", - "args": { - "correct_tiles": { - "name": "correct_tiles", - "type": "boolean", - "doc": "correct_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If ````\nfalse````\n, the correction logic is not done on the changed tile \nDefaults to ````\ntrue````\n." - }, - "tiles": { - "name": "tiles", - "type": "array of Tile", - "doc": "tiles :: array of Tile: Each Tile is a table: \nname :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position)" - } - } + "selected_hovered_font_color": { + "name": "selected_hovered_font_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "solar_power_multiplier": { - "name": "solar_power_multiplier", - "type": "double", + "single_line": { + "name": "single_line", + "type": "boolean", "mode": "[RW]", - "doc": "The multiplier of solar power on this surface. Cannot be less than \n\n**Note: ** Solar equipment is still limited to its maximum power output." + "doc": "_Can only be used if this is LabelStyle_" }, - "spill_item_stack": { - "name": "spill_item_stack", - "doc": "Spill items on the ground centered at a given location. \n\n**Parameters** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the spillage \nitems :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to spill \nenable_looted :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, each created item will be flagged with the [LuaEntity::to_be_looted](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When provided (and not ````\nnil````\n) the items will be marked for deconstruction by this force. \nallow_belts :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether items can be spilled onto belts. Defaults to ````\ntrue````\n.", - "type": "function", - "args": { - "allow_belts": { - "name": "allow_belts", - "type": "boolean", - "doc": "allow_belts :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): Whether items can be spilled onto belts. Defaults to ````\ntrue````\n." - }, - "enable_looted": { - "name": "enable_looted", - "type": "boolean", - "doc": "enable_looted :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): When true, each created item will be flagged with the [LuaEntity::to_be_looted](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag." - }, - "force": { - "name": "force", - "type": "LuaForce or string", - "doc": "force :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) or [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): When provided (and not ````\nnil````\n) the items will be marked for deconstruction by this force." - }, - "items": { - "name": "items", - "type": "ItemStackSpecification", - "doc": "items :: [ItemStackSpecification](http://lua-api.factorio.com/latest/Concepts.html#ItemStackSpecification): Items to spill" - }, - "position": { - "name": "position", - "type": "Position", - "doc": "position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Center of the spillage" - } - } + "size": { + "name": "size", + "type": "int or array of int", + "mode": "[W]", + "doc": "Sets both width and height to the given valu \nAlso accepts an array with two values, setting width to the first and height to the second one." + }, + "stretch_image_to_widget_size": { + "name": "stretch_image_to_widget_size", + "type": "boolean", + "mode": "[RW]", + "doc": "_Can only be used if this is ImageStyle_" + }, + "strikethrough_color": { + "name": "strikethrough_color", + "type": "Color", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaButtonStyle_" }, - "ticks_per_day": { - "name": "ticks_per_day", - "type": "uint", + "top_cell_padding": { + "name": "top_cell_padding", + "type": "int", "mode": "[RW]", - "doc": "The number of ticks per day for this surfac" + "doc": "Space between the table cell contents top and borde \n_Can only be used if this is LuaTableStyle_" }, - "upgrade_area": { - "name": "upgrade_area", - "doc": "Place an upgrade reques \n\n**Parameters** \nTable with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to mark for upgrade. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose bots should perform the upgrade. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The upgrade item to use.", - "type": "function", - "args": { - "area": { - "name": "area", - "type": "BoundingBox", - "doc": "Table with the following fields: \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area to mark for upgrade. \nforce :: [ForceSpecification](http://lua-api.factorio.com/latest/Concepts.html#ForceSpecification): The force whose bots should perform the upgrade. \nplayer :: [PlayerSpecification](http://lua-api.factorio.com/latest/Concepts.html#PlayerSpecification) (optional): The player to set the last_user to if any. \nskip_fog_of_war :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) (optional): If chunks covered by fog-of-war are skipped. \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The upgrade item to use." - } - } + "top_margin": { + "name": "top_margin", + "type": "int", + "mode": "[RW]" + }, + "top_padding": { + "name": "top_padding", + "type": "int", + "mode": "[RW]" + }, + "use_header_filler": { + "name": "use_header_filler", + "type": "boolean", + "mode": "[RW]", + "doc": "_Can only be used if this is LuaFrameStyle_" }, "valid": { "name": "valid", @@ -15824,26 +13042,44 @@ "mode": "[R]", "doc": "Is this object valid?" }, - "wind_orientation": { - "name": "wind_orientation", - "type": "float", + "vertical_align": { + "name": "vertical_align", + "type": "string", + "mode": "[RW]", + "doc": "Vertical align of the inner content of the widget, possible values are \"top\", \"center\" or \"botto" + }, + "vertical_spacing": { + "name": "vertical_spacing", + "type": "int", "mode": "[RW]", - "doc": "Current wind direction." + "doc": "Vertical space between individual cell \n_Can only be used if this is LuaTableStyle, LuaFlowStyle, LuaVerticalFlowStyle, or LuaTabbedPaneStyle_" }, - "wind_orientation_change": { - "name": "wind_orientation_change", - "type": "float", + "vertically_squashable": { + "name": "vertically_squashable", + "type": "boolean", "mode": "[RW]", - "doc": "Change in wind orientation per tick." + "doc": "If the GUI element can be squashed (by maximal height of some parent element) verticall \nThis is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwis" }, - "wind_speed": { - "name": "wind_speed", - "type": "float", + "vertically_stretchable": { + "name": "vertically_stretchable", + "type": "boolean", "mode": "[RW]", - "doc": "Current wind speed." + "doc": "If the GUI element stretches its size vertically to other element" + }, + "width": { + "name": "width", + "type": "int", + "mode": "[W]", + "doc": "Sets both minimal and maximal width to the given value." } }, - "doc": "A \"domain\" of the world. Surfaces can only be created and deleted through the API. Surfaces\n are uniquely identified by their name. Every game contains at least the surface \"nauvis\"." + "doc": "" + }, + "LuaSurface": { + "name": "LuaSurface", + "type": "LuaSurface", + "inherits": [], + "properties": {} }, "LuaTechnology": { "name": "LuaTechnology", @@ -15896,6 +13132,12 @@ "mode": "[R]", "doc": "Name of this technology." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -15923,13 +13165,13 @@ "name": "research_unit_count", "type": "uint", "mode": "[R]", - "doc": "Number of research units required for this technolog \nSee also \n[LuaTechnology::research_unit_ingredients](http://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_ingredients)" + "doc": "Number of research units required for this technolog \n\n**Note: ** This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](http://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier) is ````\ntrue````\n. \nSee also \n[LuaTechnology::research_unit_ingredients](http://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_ingredients)" }, "research_unit_count_formula": { "name": "research_unit_count_formula", "type": "string", "mode": "[R]", - "doc": "The count formula used for this infinite research or nil if this isn't an infinite researc" + "doc": "The count formula used for this infinite research or nil if this isn't an infinite researc \nSee also \n[LuaGameScript::evaluate_expression](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.evaluate_expression)" }, "research_unit_energy": { "name": "research_unit_energy", @@ -15968,7 +13210,7 @@ "doc": "If this technology will be visible in the research GUI even though it is disabled." } }, - "doc": "One research item." + "doc": "Reload this technology from its prototype." }, "LuaTechnologyPrototype": { "name": "LuaTechnologyPrototype", @@ -15998,6 +13240,12 @@ "mode": "[R]", "doc": "If this technology prototype is hidde" }, + "ignore_tech_cost_multiplier": { + "name": "ignore_tech_cost_multiplier", + "type": "boolean", + "mode": "[R]", + "doc": "If this technology ignores the technology cost multiplier settin \n\n**Note: ** [LuaTechnologyPrototype::research_unit_count](http://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count) will already take this setting into account." + }, "level": { "name": "level", "type": "uint", @@ -16027,6 +13275,12 @@ "mode": "[R]", "doc": "Name of this technology." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -16043,13 +13297,13 @@ "name": "research_unit_count", "type": "uint", "mode": "[R]", - "doc": "Number of research units required for this technolog \nSee also \n[LuaTechnologyPrototype::research_unit_ingredients](http://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_ingredients)" + "doc": "Number of research units required for this technolog \n\n**Note: ** This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](http://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier) is ````\ntrue````\n. \nSee also \n[LuaTechnologyPrototype::research_unit_ingredients](http://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_ingredients)" }, "research_unit_count_formula": { "name": "research_unit_count_formula", "type": "string", "mode": "[R]", - "doc": "The count formula used for this infinite research or nil if this isn't an infinite researc" + "doc": "The count formula used for this infinite research or nil if this isn't an infinite researc \nSee also \n[LuaGameScript::evaluate_expression](http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.evaluate_expression)" }, "research_unit_energy": { "name": "research_unit_energy", @@ -16082,7 +13336,7 @@ "doc": "If this technology will be visible in the research GUI even though it is disable" } }, - "doc": "A Technology prototype." + "doc": "" }, "LuaTile": { "name": "LuaTile", @@ -16135,6 +13389,12 @@ "mode": "[R]", "doc": "Prototype name of this tile. E.g. ````\n\"sand-3\"````\nor ````\n\"grass-2\"````\n." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order_deconstruction": { "name": "order_deconstruction", "type": "function", @@ -16164,6 +13424,18 @@ "type": "LuaTilePrototype", "mode": "[R]" }, + "surface": { + "name": "surface", + "type": "LuaSurface", + "mode": "[R]", + "doc": "The surface this tile is o" + }, + "to_be_deconstructed": { + "name": "to_be_deconstructed", + "type": "function", + "doc": "Is this tile marked for deconstructio", + "returns": "boolean" + }, "valid": { "name": "valid", "type": "boolean", @@ -16171,7 +13443,7 @@ "doc": "Is this object valid?" } }, - "doc": "A single \"square\" on the map." + "doc": "What type of things can collide with this tile?" }, "LuaTilePrototype": { "name": "LuaTilePrototype", @@ -16202,9 +13474,14 @@ }, "collision_mask": { "name": "collision_mask", - "type": "dictionary string → boolean", + "type": "CollisionMask", "mode": "[R]", - "doc": "The collision mask this tile us \nThe boolean values for each item are meaningless and will always be ````\ntrue````\n. \n\n**Note: ** This is a dictionary of the collision masks this tile uses to allow quick lookup of any value." + "doc": "The collision mask this tile uses" + }, + "collision_mask_with_flags": { + "name": "collision_mask_with_flags", + "type": "CollisionMaskWithFlags", + "mode": "[R]" }, "decorative_removal_probability": { "name": "decorative_removal_probability", @@ -16216,7 +13493,7 @@ "name": "emissions_per_second", "type": "double", "mode": "[R]", - "doc": "Amount of pollution emissions per tick this tile will absorb." + "doc": "Amount of pollution emissions per second this tile will absorb." }, "help": { "name": "help", @@ -16273,6 +13550,12 @@ "mode": "[R]", "doc": "The next direction of this tile or ````\nnil````\n- used when a tile has multiple directions (such as hazard concret" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -16296,7 +13579,7 @@ "mode": "[R]" } }, - "doc": "Prototype of a tile." + "doc": "" }, "LuaTrain": { "name": "LuaTrain", @@ -16443,11 +13726,13 @@ "insert_fluid": { "name": "insert_fluid", "type": "function", - "doc": "Inserts the given fluid into the first available location in this trai \n\n**Parameters** \n\n**Return value** \nThe amount inserted.", + "doc": "Inserts the given fluid into the first available location in this trai \n\n**Parameters** \nfluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid) \n\n**Return value** \nThe amount inserted.", "returns": "double", "args": { - "undefined": { - "doc": "" + "fluid": { + "name": "fluid", + "type": "Fluid", + "doc": "fluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid)" } } }, @@ -16487,6 +13772,12 @@ "mode": "[R]", "doc": "Current max speed when moving forward, depends on locomotive prototype and fuel." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "passengers": { "name": "passengers", "type": "array of LuaPlayer", @@ -16537,13 +13828,13 @@ "remove_fluid": { "name": "remove_fluid", "type": "function", - "doc": "Remove some fluid from the trai \n\n**Parameters** \nfluid: A table with type and amount \n\n**Return value** \nThe amount of fluid actually removed.", + "doc": "Remove some fluid from the trai \n\n**Parameters** \nfluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid) \n\n**Return value** \nThe amount of fluid actually removed.", "returns": "double", "args": { "fluid": { "name": "fluid", - "doc": "fluid: A table with type and amount", - "type": "fluid" + "type": "Fluid", + "doc": "fluid :: [Fluid](http://lua-api.factorio.com/latest/Concepts.html#Fluid)" } } }, @@ -16570,7 +13861,7 @@ "name": "schedule", "type": "TrainSchedule", "mode": "[RW]", - "doc": "The trains current schedule. Set to ````\nnil````\nto clea \n\n**Note: ** The schedule can't be changed by modifying the returned table. Instead, changes mu \nbe made by assigning a new table to this attribute." + "doc": "The trains current schedule or ````\nnil````\nif empty. Set to ````\nnil````\nto clea \n\n**Note: ** The schedule can't be changed by modifying the returned table. Instead, changes mu \nbe made by assigning a new table to this attribute." }, "signal": { "name": "signal", @@ -16609,7 +13900,7 @@ "doc": "The weight of this train." } }, - "doc": "A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons." + "doc": "Get the amount of a particular item stored in the train." }, "LuaTrainStopControlBehavior": { "name": "LuaTrainStopControlBehavior", @@ -16678,6 +13969,12 @@ "mode": "[RW]", "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "read_from_train": { "name": "read_from_train", "type": "boolean", @@ -16690,18 +13987,42 @@ "mode": "[RW]", "doc": "````\ntrue````\nif the train stop should send the stopped train id to the circuit network." }, + "read_trains_count": { + "name": "read_trains_count", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the train stop should send amount of incoming trains to the circuit network." + }, "send_to_train": { "name": "send_to_train", "type": "boolean", "mode": "[RW]", "doc": "````\ntrue````\nif the train stop should send the circuit network contents to the train to use." }, + "set_trains_limit": { + "name": "set_trains_limit", + "type": "boolean", + "mode": "[RW]", + "doc": "````\ntrue````\nif the trains_limit_signal is used to set a limit of trains incoming for train stop." + }, "stopped_train_signal": { "name": "stopped_train_signal", "type": "SignalID", "mode": "[RW]", "doc": "The signal that will be sent when using the send-train-id optio" }, + "trains_count_signal": { + "name": "trains_count_signal", + "type": "SignalID", + "mode": "[RW]", + "doc": "The signal that will be sent when using the read-trains-count optio" + }, + "trains_limit_signal": { + "name": "trains_limit_signal", + "type": "SignalID", + "mode": "[RW]", + "doc": "The signal to be used by set-trains-limit to limit amount of incoming trai" + }, "type": { "name": "type", "type": "defines.control_behavior.type", @@ -16784,6 +14105,12 @@ "mode": "[RW]", "doc": "The logistic condition \n\n**Note: ** ````\ncondition````\nmay be ````\nnil````\nin order to clear the logistic condition. \n\n**Example** \nTell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more th \n4 chain signal \n````\na_behavior.logistic_condition = {condition={comparator=\">\", \n                                            first_signal={type=\"item\", name=\"rail-chain-signal\"}, \n                                            constant=4}}````" }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "read_contents": { "name": "read_contents", "type": "boolean", @@ -16914,6 +14241,12 @@ } } }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "operator []": { "name": "operator []", "type": "LuaItemStack", @@ -16958,7 +14291,124 @@ "doc": "Is this object valid?" } }, - "doc": "One line on a transport belt." + "doc": "Remove all items from this transport line." + }, + "LuaTrivialSmokePrototype": { + "name": "LuaTrivialSmokePrototype", + "type": "LuaTrivialSmokePrototype", + "inherits": [], + "properties": { + "affected_by_wind": { + "name": "affected_by_wind", + "type": "boolean", + "mode": "[R]" + }, + "color": { + "name": "color", + "type": "Color", + "mode": "[R]" + }, + "cyclic": { + "name": "cyclic", + "type": "boolean", + "mode": "[R]" + }, + "duration": { + "name": "duration", + "type": "uint", + "mode": "[R]" + }, + "end_scale": { + "name": "end_scale", + "type": "double", + "mode": "[R]" + }, + "fade_away_duration": { + "name": "fade_away_duration", + "type": "uint", + "mode": "[R]" + }, + "fade_in_duration": { + "name": "fade_in_duration", + "type": "uint", + "mode": "[R]" + }, + "glow_animation": { + "name": "glow_animation", + "type": "boolean", + "mode": "[R]" + }, + "glow_fade_away_duration": { + "name": "glow_fade_away_duration", + "type": "uint", + "mode": "[R]" + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "localised_description": { + "name": "localised_description", + "type": "LocalisedString", + "mode": "[R]" + }, + "localised_name": { + "name": "localised_name", + "type": "LocalisedString", + "mode": "[R]" + }, + "movement_slow_down_factor": { + "name": "movement_slow_down_factor", + "type": "double", + "mode": "[R]" + }, + "name": { + "name": "name", + "type": "string", + "mode": "[R]", + "doc": "Name of this prototype." + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "order": { + "name": "order", + "type": "string", + "mode": "[R]", + "doc": "Order string of this prototype." + }, + "render_layer": { + "name": "render_layer", + "type": "RenderLayer", + "mode": "[R]" + }, + "show_when_smoke_off": { + "name": "show_when_smoke_off", + "type": "boolean", + "mode": "[R]" + }, + "spread_duration": { + "name": "spread_duration", + "type": "uint", + "mode": "[R]" + }, + "start_scale": { + "name": "start_scale", + "type": "double", + "mode": "[R]" + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" }, "LuaUnitGroup": { "name": "LuaUnitGroup", @@ -16977,11 +14427,23 @@ } } }, + "command": { + "name": "command", + "type": "Command", + "mode": "[R]", + "doc": "The command given to this group or ````\nnil````\nis the group has no comman" + }, "destroy": { "name": "destroy", "doc": "Dissolve this group. Its members won't be destroyed, they will be merely unlinked fr \nthis group.", "type": "function" }, + "distraction_command": { + "name": "distraction_command", + "type": "Command", + "mode": "[R]", + "doc": "The distraction command given to this group or ````\nnil````\nis the group currently isn't distracte" + }, "force": { "name": "force", "type": "LuaForce", @@ -16999,12 +14461,24 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "is_script_driven": { + "name": "is_script_driven", + "type": "boolean", + "mode": "[R]", + "doc": "Whether this unit group is controlled by a script or by the game engin \nSee also \n[LuaUnitGroup::set_autonomous](http://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.set_autonomous)" + }, "members": { "name": "members", "type": "array of LuaEntity", "mode": "[R]", "doc": "Members of this group." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "position": { "name": "position", "type": "Position", @@ -17013,7 +14487,7 @@ }, "set_autonomous": { "name": "set_autonomous", - "doc": "Make this group autonomous. Autonomous groups will automatically attack polluted areas.", + "doc": "Make this group autonomous. Autonomous groups will automatically attack polluted areas. Autonomous grou \naren't considered to be script driv \nSee also \n[LuaUnitGroup::is_script_driven](http://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.is_script_driven)", "type": "function" }, "set_command": { @@ -17052,7 +14526,7 @@ "doc": "Is this object valid?" } }, - "doc": "A collection of units moving and attacking together. The engine creates autonomous unit groups to attack\n polluted areas. The script can create and control such groups as well. Groups can accept commands in the\n same manner as regular units." + "doc": "Make a unit a member of this group. Has the same effect as giving a group_command with this\n group to the unit." }, "LuaVirtualSignalPrototype": { "name": "LuaVirtualSignalPrototype", @@ -17080,6 +14554,12 @@ "mode": "[R]", "doc": "Name of this prototype." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "order": { "name": "order", "type": "string", @@ -17104,7 +14584,47 @@ "doc": "Is this object valid?" } }, - "doc": "Prototype of a virtual signal." + "doc": "" + }, + "LuaVoidEnergySourcePrototype": { + "name": "LuaVoidEnergySourcePrototype", + "type": "LuaVoidEnergySourcePrototype", + "inherits": [], + "properties": { + "emissions": { + "name": "emissions", + "type": "double", + "mode": "[R]" + }, + "help": { + "name": "help", + "type": "string", + "doc": "All methods, and properties that this object supports." + }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, + "render_no_network_icon": { + "name": "render_no_network_icon", + "type": "boolean", + "mode": "[R]" + }, + "render_no_power_icon": { + "name": "render_no_power_icon", + "type": "boolean", + "mode": "[R]" + }, + "valid": { + "name": "valid", + "type": "boolean", + "mode": "[R]", + "doc": "Is this object valid?" + } + }, + "doc": "" }, "LuaWallControlBehavior": { "name": "LuaWallControlBehavior", @@ -17148,6 +14668,12 @@ "type": "string", "doc": "All methods, and properties that this object supports." }, + "object_name": { + "name": "object_name", + "type": "string", + "mode": "[R]", + "doc": "The class name of this object." + }, "open_gate": { "name": "open_gate", "type": "boolean", diff --git a/data/defines.json b/data/defines.json index c761ea2..f5fb01d 100644 --- a/data/defines.json +++ b/data/defines.json @@ -37,10 +37,6 @@ "train_out_of_fuel": { "type": "define", "name": "defines.alert_type.train_out_of_fuel" - }, - "fluid_mixing": { - "type": "define", - "name": "defines.alert_type.fluid_mixing" } } }, @@ -76,9 +72,17 @@ "type": "define", "name": "defines.build_check_type.manual" }, - "ghost_place": { + "manual_ghost": { + "type": "define", + "name": "defines.build_check_type.manual_ghost" + }, + "script_ghost": { + "type": "define", + "name": "defines.build_check_type.script_ghost" + }, + "blueprint_ghost": { "type": "define", - "name": "defines.build_check_type.ghost_place" + "name": "defines.build_check_type.blueprint_ghost" }, "ghost_revive": { "type": "define", @@ -248,47 +252,47 @@ "attack": { "type": "define", "name": "defines.command.attack", - "doc": "Attack another entity." + "doc": " Attack another entity." }, "go_to_location": { "type": "define", "name": "defines.command.go_to_location", - "doc": "Go to a specific position." + "doc": " Go to a specific position." }, "compound": { "type": "define", "name": "defines.command.compound", - "doc": "Chain commands together, see defines.compound_command." + "doc": " Chain commands together, see defines.compound_command." }, "group": { "type": "define", "name": "defines.command.group", - "doc": "Do what your group wants you to do." + "doc": " Do what your group wants you to do." }, "attack_area": { "type": "define", "name": "defines.command.attack_area", - "doc": "Go to a place and attack what you see." + "doc": " Go to a place and attack what you see." }, "wander": { "type": "define", "name": "defines.command.wander", - "doc": "Chill." + "doc": " Chill." }, "flee": { "type": "define", "name": "defines.command.flee", - "doc": "Flee from another entity." + "doc": " Flee from another entity." }, "stop": { "type": "define", "name": "defines.command.stop", - "doc": "Stop moving and stay where you are." + "doc": " Stop moving and stay where you are." }, "build_base": { "type": "define", "name": "defines.command.build_base", - "doc": "Go to a position and build a base there." + "doc": " Go to a position and build a base there." } } }, @@ -298,17 +302,17 @@ "logical_and": { "type": "define", "name": "defines.compound_command.logical_and", - "doc": "Fail on first failure. Only succeeds if all commands (executed one after another) succeed." + "doc": " Fail on first failure. Only succeeds if all commands (executed one after another) succeed." }, "logical_or": { "type": "define", "name": "defines.compound_command.logical_or", - "doc": "Succeed on first success. Only fails if all commands (executed one after another) fail." + "doc": " Succeed on first success. Only fails if all commands (executed one after another) fail." }, "return_last": { "type": "define", "name": "defines.compound_command.return_last", - "doc": "Execute all commands in sequence and fail or succeed depending on the return status of the last command." + "doc": " Execute all commands in sequence and fail or succeed depending on the return status of the last command." } } }, @@ -390,50 +394,6 @@ } } }, - "train_stop": { - "type": "define", - "properties": { - "circuit_mode_of_operation": { - "type": "define", - "properties": { - "enable_disable": { - "type": "define", - "name": "defines.control_behavior.train_stop.circuit_mode_of_operation.enable_disable" - }, - "send_to_train": { - "type": "define", - "name": "defines.control_behavior.train_stop.circuit_mode_of_operation.send_to_train" - }, - "read_from_train": { - "type": "define", - "name": "defines.control_behavior.train_stop.circuit_mode_of_operation.read_from_train" - }, - "read_stopped_train": { - "type": "define", - "name": "defines.control_behavior.train_stop.circuit_mode_of_operation.read_stopped_train" - } - } - } - } - }, - "roboport": { - "type": "define", - "properties": { - "circuit_mode_of_operation": { - "type": "define", - "properties": { - "read_logistics": { - "type": "define", - "name": "defines.control_behavior.roboport.circuit_mode_of_operation.read_logistics" - }, - "read_robot_stats": { - "type": "define", - "name": "defines.control_behavior.roboport.circuit_mode_of_operation.read_robot_stats" - } - } - } - } - }, "mining_drill": { "type": "define", "properties": { @@ -476,92 +436,92 @@ "container": { "type": "define", "name": "defines.control_behavior.type.container", - "doc": "LuaContainerControlBehavior" + "doc": " LuaContainerControlBehavior" }, "generic_on_off": { "type": "define", "name": "defines.control_behavior.type.generic_on_off", - "doc": "LuaGenericOnOffControlBehavior" + "doc": " LuaGenericOnOffControlBehavior" }, "inserter": { "type": "define", "name": "defines.control_behavior.type.inserter", - "doc": "LuaInserterControlBehavior" + "doc": " LuaInserterControlBehavior" }, "lamp": { "type": "define", "name": "defines.control_behavior.type.lamp", - "doc": "LuaLampControlBehavior" + "doc": " LuaLampControlBehavior" }, "logistic_container": { "type": "define", "name": "defines.control_behavior.type.logistic_container", - "doc": "LuaLogisticContainerControlBehavior" + "doc": " LuaLogisticContainerControlBehavior" }, "roboport": { "type": "define", "name": "defines.control_behavior.type.roboport", - "doc": "LuaRoboportControlBehavior" + "doc": " LuaRoboportControlBehavior" }, "storage_tank": { "type": "define", "name": "defines.control_behavior.type.storage_tank", - "doc": "LuaStorageTankControlBehavior" + "doc": " LuaStorageTankControlBehavior" }, "train_stop": { "type": "define", "name": "defines.control_behavior.type.train_stop", - "doc": "LuaTrainStopControlBehavior" + "doc": " LuaTrainStopControlBehavior" }, "decider_combinator": { "type": "define", "name": "defines.control_behavior.type.decider_combinator", - "doc": "LuaDeciderCombinatorControlBehavior" + "doc": " LuaDeciderCombinatorControlBehavior" }, "arithmetic_combinator": { "type": "define", "name": "defines.control_behavior.type.arithmetic_combinator", - "doc": "LuaArithmeticCombinatorControlBehavior" + "doc": " LuaArithmeticCombinatorControlBehavior" }, "constant_combinator": { "type": "define", "name": "defines.control_behavior.type.constant_combinator", - "doc": "LuaConstantCombinatorControlBehavior" + "doc": " LuaConstantCombinatorControlBehavior" }, "transport_belt": { "type": "define", "name": "defines.control_behavior.type.transport_belt", - "doc": "LuaTransportBeltControlBehavior" + "doc": " LuaTransportBeltControlBehavior" }, "accumulator": { "type": "define", "name": "defines.control_behavior.type.accumulator", - "doc": "LuaAccumulatorControlBehavior" + "doc": " LuaAccumulatorControlBehavior" }, "rail_signal": { "type": "define", "name": "defines.control_behavior.type.rail_signal", - "doc": "LuaRailSignalControlBehavior" + "doc": " LuaRailSignalControlBehavior" }, "rail_chain_signal": { "type": "define", "name": "defines.control_behavior.type.rail_chain_signal", - "doc": "LuaRailChainSignalControlBehavior" + "doc": " LuaRailChainSignalControlBehavior" }, "wall": { "type": "define", "name": "defines.control_behavior.type.wall", - "doc": "LuaWallControlBehavior" + "doc": " LuaWallControlBehavior" }, "mining_drill": { "type": "define", "name": "defines.control_behavior.type.mining_drill", - "doc": "LuaMiningDrillControlBehavior" + "doc": " LuaMiningDrillControlBehavior" }, "programmable_speaker": { "type": "define", "name": "defines.control_behavior.type.programmable_speaker", - "doc": "LuaProgrammableSpeakerControlBehavior" + "doc": " LuaProgrammableSpeakerControlBehavior" } } } @@ -573,32 +533,32 @@ "ghost": { "type": "define", "name": "defines.controllers.ghost", - "doc": "Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen." + "doc": " Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen." }, "character": { "type": "define", "name": "defines.controllers.character", - "doc": "The controller controls a character. This is the default controller in freeplay." + "doc": " The controller controls a character. This is the default controller in freeplay." }, "god": { "type": "define", "name": "defines.controllers.god", - "doc": "The controller isn't tied to a character. This is the default controller in sandbox." + "doc": " The controller isn't tied to a character. This is the default controller in sandbox." }, "editor": { "type": "define", "name": "defines.controllers.editor", - "doc": "The Editor Controller near ultimate power to do almost anything in the game." + "doc": " The Editor Controller near ultimate power to do almost anything in the game." }, "cutscene": { "type": "define", "name": "defines.controllers.cutscene", - "doc": "The player can't interact with the world, and the camera pans around in a predefined manner." + "doc": " The player can't interact with the world, and the camera pans around in a predefined manner." }, "spectator": { "type": "define", "name": "defines.controllers.spectator", - "doc": "Can't change anything in the world but can view anything." + "doc": " Can't change anything in the world but can view anything." } } }, @@ -739,28 +699,77 @@ } } }, + "disconnect_reason": { + "type": "define", + "properties": { + "quit": { + "type": "define", + "name": "defines.disconnect_reason.quit" + }, + "dropped": { + "type": "define", + "name": "defines.disconnect_reason.dropped" + }, + "reconnect": { + "type": "define", + "name": "defines.disconnect_reason.reconnect" + }, + "wrong_input": { + "type": "define", + "name": "defines.disconnect_reason.wrong_input" + }, + "desync_limit_reached": { + "type": "define", + "name": "defines.disconnect_reason.desync_limit_reached" + }, + "cannot_keep_up": { + "type": "define", + "name": "defines.disconnect_reason.cannot_keep_up" + }, + "afk": { + "type": "define", + "name": "defines.disconnect_reason.afk" + }, + "kicked": { + "type": "define", + "name": "defines.disconnect_reason.kicked" + }, + "kicked_and_deleted": { + "type": "define", + "name": "defines.disconnect_reason.kicked_and_deleted" + }, + "banned": { + "type": "define", + "name": "defines.disconnect_reason.banned" + }, + "switching_servers": { + "type": "define", + "name": "defines.disconnect_reason.switching_servers" + } + } + }, "distraction": { "type": "define", "properties": { "none": { "type": "define", "name": "defines.distraction.none", - "doc": "Perform command even if someone attacks the unit." + "doc": " Perform command even if someone attacks the unit." }, "by_enemy": { "type": "define", "name": "defines.distraction.by_enemy", - "doc": "Attack closer enemy entities with force." + "doc": " Attack closer enemy entities with force." }, "by_anything": { "type": "define", "name": "defines.distraction.by_anything", - "doc": "Attack closer enemy entities, including entities \"built\" by player (belts, inserters, chests)." + "doc": " Attack closer enemy entities, including entities \"built\" by player (belts, inserters, chests)." }, "by_damage": { "type": "define", "name": "defines.distraction.by_damage", - "doc": "Attack when attacked." + "doc": " Attack when attacked." } } }, @@ -771,85 +780,206 @@ "type": "define", "name": "defines.entity_status.working" }, + "normal": { + "type": "define", + "name": "defines.entity_status.normal" + }, "no_power": { "type": "define", "name": "defines.entity_status.no_power" }, + "low_power": { + "type": "define", + "name": "defines.entity_status.low_power" + }, "no_fuel": { "type": "define", "name": "defines.entity_status.no_fuel" }, - "no_recipe": { + "disabled_by_control_behavior": { "type": "define", - "name": "defines.entity_status.no_recipe" + "name": "defines.entity_status.disabled_by_control_behavior" }, - "no_input_fluid": { + "opened_by_circuit_network": { "type": "define", - "name": "defines.entity_status.no_input_fluid" + "name": "defines.entity_status.opened_by_circuit_network" }, - "no_research_in_progress": { + "closed_by_circuit_network": { "type": "define", - "name": "defines.entity_status.no_research_in_progress" + "name": "defines.entity_status.closed_by_circuit_network" }, - "no_minable_resources": { + "disabled_by_script": { "type": "define", - "name": "defines.entity_status.no_minable_resources" + "name": "defines.entity_status.disabled_by_script" }, - "low_input_fluid": { + "marked_for_deconstruction": { "type": "define", - "name": "defines.entity_status.low_input_fluid" + "name": "defines.entity_status.marked_for_deconstruction" }, - "low_power": { + "not_plugged_in_electric_network": { "type": "define", - "name": "defines.entity_status.low_power" + "name": "defines.entity_status.not_plugged_in_electric_network", + "doc": " Used by generators and solar panels." }, - "disabled_by_control_behavior": { + "networks_connected": { "type": "define", - "name": "defines.entity_status.disabled_by_control_behavior" + "name": "defines.entity_status.networks_connected", + "doc": " Used by power switches." }, - "disabled_by_script": { + "networks_disconnected": { "type": "define", - "name": "defines.entity_status.disabled_by_script" + "name": "defines.entity_status.networks_disconnected", + "doc": " Used by power switches." }, - "fluid_ingredient_shortage": { + "charging": { "type": "define", - "name": "defines.entity_status.fluid_ingredient_shortage" + "name": "defines.entity_status.charging", + "doc": " Used by accumulators." }, - "fluid_production_overload": { + "discharging": { "type": "define", - "name": "defines.entity_status.fluid_production_overload" + "name": "defines.entity_status.discharging", + "doc": " Used by accumulators." }, - "item_ingredient_shortage": { + "fully_charged": { "type": "define", - "name": "defines.entity_status.item_ingredient_shortage" + "name": "defines.entity_status.fully_charged", + "doc": " Used by accumulators." }, - "item_production_overload": { + "out_of_logistic_network": { "type": "define", - "name": "defines.entity_status.item_production_overload" + "name": "defines.entity_status.out_of_logistic_network", + "doc": " Used by logistic containers." }, - "marked_for_deconstruction": { + "no_recipe": { "type": "define", - "name": "defines.entity_status.marked_for_deconstruction" + "name": "defines.entity_status.no_recipe", + "doc": " Used by assembling machines." + }, + "no_ingredients": { + "type": "define", + "name": "defines.entity_status.no_ingredients", + "doc": " Used by furnaces." + }, + "no_input_fluid": { + "type": "define", + "name": "defines.entity_status.no_input_fluid", + "doc": " Used by boilers, fluid turrets and fluid energy sources: Boiler has no fluid to work with." + }, + "no_research_in_progress": { + "type": "define", + "name": "defines.entity_status.no_research_in_progress", + "doc": " Used by labs." + }, + "no_minable_resources": { + "type": "define", + "name": "defines.entity_status.no_minable_resources", + "doc": " Used by mining drills." + }, + "low_input_fluid": { + "type": "define", + "name": "defines.entity_status.low_input_fluid", + "doc": " Used by boilers and fluid turrets: Boiler still has some fluid but is about to run out." + }, + "fluid_ingredient_shortage": { + "type": "define", + "name": "defines.entity_status.fluid_ingredient_shortage", + "doc": " Used by crafting machines." + }, + "full_output": { + "type": "define", + "name": "defines.entity_status.full_output", + "doc": " Used by crafting machines, boilers, burner energy sources and reactors: Reactor/burner has full burnt result inventory, boiler has full output fluidbox." + }, + "item_ingredient_shortage": { + "type": "define", + "name": "defines.entity_status.item_ingredient_shortage", + "doc": " Used by crafting machines." }, "missing_required_fluid": { "type": "define", - "name": "defines.entity_status.missing_required_fluid" + "name": "defines.entity_status.missing_required_fluid", + "doc": " Used by mining drills when the mining fluid is missing." }, "missing_science_packs": { "type": "define", - "name": "defines.entity_status.missing_science_packs" + "name": "defines.entity_status.missing_science_packs", + "doc": " Used by labs." }, "waiting_for_source_items": { "type": "define", - "name": "defines.entity_status.waiting_for_source_items" + "name": "defines.entity_status.waiting_for_source_items", + "doc": " Used by inserters." }, "waiting_for_space_in_destination": { "type": "define", - "name": "defines.entity_status.waiting_for_space_in_destination" + "name": "defines.entity_status.waiting_for_space_in_destination", + "doc": " Used by inserters and mining drills." + }, + "preparing_rocket_for_launch": { + "type": "define", + "name": "defines.entity_status.preparing_rocket_for_launch", + "doc": " Used by the rocket silo." }, "waiting_to_launch_rocket": { "type": "define", - "name": "defines.entity_status.waiting_to_launch_rocket" + "name": "defines.entity_status.waiting_to_launch_rocket", + "doc": " Used by the rocket silo." + }, + "launching_rocket": { + "type": "define", + "name": "defines.entity_status.launching_rocket", + "doc": " Used by the rocket silo." + }, + "no_modules_to_transmit": { + "type": "define", + "name": "defines.entity_status.no_modules_to_transmit", + "doc": " Used by beacons." + }, + "recharging_after_power_outage": { + "type": "define", + "name": "defines.entity_status.recharging_after_power_outage", + "doc": " Used by roboports." + }, + "waiting_for_target_to_be_built": { + "type": "define", + "name": "defines.entity_status.waiting_for_target_to_be_built", + "doc": " Used by inserters targeting entity ghosts." + }, + "waiting_for_train": { + "type": "define", + "name": "defines.entity_status.waiting_for_train", + "doc": " Used by inserters targeting rails." + }, + "no_ammo": { + "type": "define", + "name": "defines.entity_status.no_ammo", + "doc": " Used by ammo turrets." + }, + "low_temperature": { + "type": "define", + "name": "defines.entity_status.low_temperature", + "doc": " Used by heat energy sources." + }, + "disabled": { + "type": "define", + "name": "defines.entity_status.disabled", + "doc": " Used by constant combinators: Combinator is turned off via switch in GUI." + }, + "turned_off_during_daytime": { + "type": "define", + "name": "defines.entity_status.turned_off_during_daytime", + "doc": " Used by lamps." + }, + "not_connected_to_rail": { + "type": "define", + "name": "defines.entity_status.not_connected_to_rail", + "doc": " Used by rail signals." + }, + "cant_divide_segments": { + "type": "define", + "name": "defines.entity_status.cant_divide_segments", + "doc": " Used by rail signals." } } }, @@ -857,703 +987,693 @@ "type": "define", "properties": { "on_tick": { - "name": "on_tick", - "doc": "It is fired once every tick. Since this event is fired every tick, its handler shouldn \ninclude performance heavy cod", - "type": "event" + "type": "define", + "name": "defines.events.on_tick" }, "on_gui_click": { - "name": "on_gui_click", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) is clicke \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The clicked element. \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the clicking. \nbutton :: [defines.mouse_button_type](http://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type): The mouse button used if any. \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If alt was pressed. \ncontrol :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If control was pressed. \nshift :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If shift was pressed.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_click" + }, + "on_gui_confirmed": { + "type": "define", + "name": "defines.events.on_gui_confirmed" }, "on_gui_text_changed": { - "name": "on_gui_text_changed", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) text is changed by the play \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The edited element. \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the edit.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_text_changed" }, "on_gui_checked_state_changed": { - "name": "on_gui_checked_state_changed", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) checked state is changed (related to checkboxes and radio button \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element whose checked state changed \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the change.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_checked_state_changed" }, "on_entity_died": { - "name": "on_entity_died", - "doc": "Called when an entity die \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ncause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The entity that did the killing if available. \nloot :: [LuaInventory](http://lua-api.factorio.com/latest/LuaInventory.html): The loot generated by this entity if any. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) (optional): The force that did the killing if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_died" }, "on_post_entity_died": { - "name": "on_post_entity_died", - "doc": "Called after an entity die \n\n**Contains** \nghost :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The ghost created by the entity dying if any. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) (optional): The force that did the killing if any. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Position where the entity died. \nprototype :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html): The entity prototype of the entity that died. \ncorpses :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The corpses created by the entity dying if any. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface the entity was on.", - "type": "event" + "type": "define", + "name": "defines.events.on_post_entity_died" }, "on_entity_damaged": { - "name": "on_entity_damaged", - "doc": "Called when an entity is damage \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ndamage_type :: [LuaDamagePrototype](http://lua-api.factorio.com/latest/LuaDamagePrototype.html) \noriginal_damage_amount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \nfinal_damage_amount :: [float](http://lua-api.factorio.com/latest/Builtin-Types.html#float) \ncause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The entity that did the attacking if available. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) (optional): The force that did the attacking if any. \n\n**Note: ** This is not called when an entities health is set directly by another mod.", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_damaged" }, "on_picked_up_item": { - "name": "on_picked_up_item", - "doc": "Called when a player picks up an ite \n\n**Contains** \nitem_stack :: [SimpleItemStack](http://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_picked_up_item" }, "on_built_entity": { - "name": "on_built_entity", - "doc": "Called when player builds somethin \n\n**Contains** \ncreated_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) (optional): The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).", - "type": "event" + "type": "define", + "name": "defines.events.on_built_entity" }, "on_sector_scanned": { - "name": "on_sector_scanned", - "doc": "Called when the radar finishes scanning a secto \n\n**Contains** \nradar :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The radar that did the scanning. \nchunk_position :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The chunk scanned.", - "type": "event" + "type": "define", + "name": "defines.events.on_sector_scanned" }, "on_player_mined_item": { - "name": "on_player_mined_item", - "doc": "Called when the player mines somethin \n\n**Contains** \nitem_stack :: [SimpleItemStack](http://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack): The item given to the player \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_mined_item" }, - "on_put_item": { - "name": "on_put_item", - "doc": "Called when players uses an item to build something. Called before [on_built_entity](http://lua-api.factorio.com/latest/events.html#on_built_entity \n\n**Contains** \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): Where the item was placed. \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the placing. \nshift_build :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Item was placed using shift building. \nbuilt_by_moving :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Item was placed while moving. \ndirection :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): The direction the item was facing when placed.", - "type": "event" + "on_pre_build": { + "type": "define", + "name": "defines.events.on_pre_build" }, "on_rocket_launched": { - "name": "on_rocket_launched", - "doc": "Called when the rocket is launche \n\n**Contains** \nrocket :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nrocket_silo :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that is riding the rocket, if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_rocket_launched" }, "on_pre_player_mined_item": { - "name": "on_pre_player_mined_item", - "doc": "Called when the player finishes mining an entity, before the entity is removed from ma \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity being mined \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_player_mined_item" }, "on_chunk_generated": { - "name": "on_chunk_generated", - "doc": "Called when a chunk is generate \n\n**Contains** \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): Area of the chunk \nsurface :: [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html): The surface the chunk is on", - "type": "event" + "type": "define", + "name": "defines.events.on_chunk_generated" }, "on_player_crafted_item": { - "name": "on_player_crafted_item", - "doc": "Called when the player crafts an item (just before inserting into player's inventory, not clicki \nthe button to craft). It is called for each item crafted as well as what was clicked. \n\n**Contains** \nitem_stack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The crafted item \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the crafting \nrecipe :: [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe that resulted in this item being crafted", - "type": "event" + "type": "define", + "name": "defines.events.on_player_crafted_item" }, "on_robot_built_entity": { - "name": "on_robot_built_entity", - "doc": "Called when a construction robot builds an entit \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot that did the building. \ncreated_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity built. \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The item used to do the building.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_built_entity" }, "on_robot_pre_mined": { - "name": "on_robot_pre_mined", - "doc": "Called before a robot mines an entit \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot that's about to do the mining. \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity which is about to be mined.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_pre_mined" }, "on_robot_mined": { - "name": "on_robot_mined", - "doc": "Called when a robot mines an entit \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot that did the mining. \nitem_stack :: [SimpleItemStack](http://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack): The entity the robot just picked up.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_mined" }, "on_research_started": { - "name": "on_research_started", - "doc": "Called when a technology research start \n\n**Contains** \nresearch :: [LuaTechnology](http://lua-api.factorio.com/latest/LuaTechnology.html): The technology being researched \nlast_research :: [LuaTechnology](http://lua-api.factorio.com/latest/LuaTechnology.html) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_research_started" }, "on_research_finished": { - "name": "on_research_finished", - "doc": "Called when a research finishe \n\n**Contains** \nresearch :: [LuaTechnology](http://lua-api.factorio.com/latest/LuaTechnology.html): The researched technology \nby_script :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the technology was researched by script.", - "type": "event" + "type": "define", + "name": "defines.events.on_research_finished" + }, + "on_research_reversed": { + "type": "define", + "name": "defines.events.on_research_reversed" }, "on_player_rotated_entity": { - "name": "on_player_rotated_entity", - "doc": "Called when the player rotates an entity. This event is only fired when the entity actually changes i \norientation -- pressing the rotate key on an entity that can't be rotated won't fire this even \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The rotated entity. \nprevious_direction :: [defines.direction](http://lua-api.factorio.com/latest/defines.html#defines.direction): The previous direction \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_rotated_entity" }, "on_marked_for_deconstruction": { - "name": "on_marked_for_deconstruction", - "doc": "Called when an entity is marked for deconstruction with the Deconstruction planner or via scrip \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_marked_for_deconstruction" }, "on_cancelled_deconstruction": { - "name": "on_cancelled_deconstruction", - "doc": "Called when the deconstruction of an entity is cancele \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_cancelled_deconstruction" }, "on_trigger_created_entity": { - "name": "on_trigger_created_entity", - "doc": "Called when an entity with a trigger prototype (such as capsules) create an entity AND th \ntrigger prototype defined ````\ntrigger_created_entity=\"true\"```` \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_trigger_created_entity" }, "on_trigger_fired_artillery": { - "name": "on_trigger_fired_artillery", - "doc": "Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND th \ntrigger prototype defined ````\ntrigger_fired_artillery=\"true\"```` \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_trigger_fired_artillery" }, "on_train_changed_state": { - "name": "on_train_changed_state", - "doc": "Called when a train changes state (started to stopped and vice vers \n\n**Contains** \ntrain :: [LuaTrain](http://lua-api.factorio.com/latest/LuaTrain.html) \nold_state :: [defines.train_state](http://lua-api.factorio.com/latest/defines.html#defines.train_state)", - "type": "event" + "type": "define", + "name": "defines.events.on_train_changed_state" }, "on_player_created": { - "name": "on_player_created", - "doc": "Called after the player was create \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_created" }, "on_resource_depleted": { - "name": "on_resource_depleted", - "doc": "Called when a resource entity reaches 0 or its minimum yield for infinite resource \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_resource_depleted" }, "on_player_driving_changed_state": { - "name": "on_player_driving_changed_state", - "doc": "Called when the player's driving state has changed, this means a player has eith \nentered or left a vehicl \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The vehicle if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_driving_changed_state" }, "on_force_created": { - "name": "on_force_created", - "doc": "Called when a new force is created using ````\ngame.create_force()```` \n\n**Contains** \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html): The newly created force.", - "type": "event" + "type": "define", + "name": "defines.events.on_force_created" }, "on_forces_merging": { - "name": "on_forces_merging", - "doc": "Called when two forces are about to be merged using ````\ngame.merge_forces()```` \n\n**Contains** \nsource :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html): The force to be destroyed \ndestination :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html): The force to reassign entities to.", - "type": "event" + "type": "define", + "name": "defines.events.on_forces_merging" }, "on_player_cursor_stack_changed": { - "name": "on_player_cursor_stack_changed", - "doc": "Called after a players cursorstack changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_cursor_stack_changed" }, "on_pre_entity_settings_pasted": { - "name": "on_pre_entity_settings_pasted", - "doc": "Called before entity copy-paste is don \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The source entity settings will be copied from. \ndestination :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The destination entity settings will be copied to.", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_entity_settings_pasted" }, "on_entity_settings_pasted": { - "name": "on_entity_settings_pasted", - "doc": "Called after entity copy-paste is don \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The source entity settings have been copied from. \ndestination :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The destination entity settings have been copied to.", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_settings_pasted" }, "on_player_main_inventory_changed": { - "name": "on_player_main_inventory_changed", - "doc": "Called after a players main inventory changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_main_inventory_changed" }, "on_player_armor_inventory_changed": { - "name": "on_player_armor_inventory_changed", - "doc": "Called after a players armor inventory changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_armor_inventory_changed" }, "on_player_ammo_inventory_changed": { - "name": "on_player_ammo_inventory_changed", - "doc": "Called after a players ammo inventory changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_ammo_inventory_changed" }, "on_player_gun_inventory_changed": { - "name": "on_player_gun_inventory_changed", - "doc": "Called after a players gun inventory changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_gun_inventory_changed" }, "on_player_placed_equipment": { - "name": "on_player_placed_equipment", - "doc": "Called after the player puts equipment in an equipment gr \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html): The equipment put in the equipment grid. \ngrid :: [LuaEquipmentGrid](http://lua-api.factorio.com/latest/LuaEquipmentGrid.html): The equipment grid the equipment was put in.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_placed_equipment" }, "on_player_removed_equipment": { - "name": "on_player_removed_equipment", - "doc": "Called after the player removes equipment from an equipment gr \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ngrid :: [LuaEquipmentGrid](http://lua-api.factorio.com/latest/LuaEquipmentGrid.html): The equipment grid removed from. \nequipment :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The equipment removed. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count of equipment removed.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_removed_equipment" }, "on_pre_player_died": { - "name": "on_pre_player_died", - "doc": "Called before a players die \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ncause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_player_died" }, "on_player_died": { - "name": "on_player_died", - "doc": "Called after a player die \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \ncause :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_died" }, "on_player_respawned": { - "name": "on_player_respawned", - "doc": "Called after a player respawn \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nplayer_port :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The player port used to respawn if one was used.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_respawned" }, "on_player_joined_game": { - "name": "on_player_joined_game", - "doc": "Called after a player joins the gam \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_joined_game" }, "on_player_left_game": { - "name": "on_player_left_game", - "doc": "Called after a player leaves the gam \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_left_game" }, "on_player_built_tile": { - "name": "on_player_built_tile", - "doc": "Called after a player builds tile \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface the tile(s) were built on. \ntiles :: array of [OldTileAndPosition](http://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition): The position data. \ntile :: [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html): The tile prototype that was placed. \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html) (optional): The item type used to build the tiles \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The stack used to build the tiles (may be empty if all of the items where used to build the tiles).", - "type": "event" + "type": "define", + "name": "defines.events.on_player_built_tile" }, "on_player_mined_tile": { - "name": "on_player_mined_tile", - "doc": "Called after a player mines tile \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface the tile(s) were mined from. \ntiles :: array of [OldTileAndPosition](http://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition): The position data.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_mined_tile" }, "on_robot_built_tile": { - "name": "on_robot_built_tile", - "doc": "Called after a robot builds tile \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot. \ntiles :: array of [OldTileAndPosition](http://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition): The position data. \ntile :: [LuaTilePrototype](http://lua-api.factorio.com/latest/LuaTilePrototype.html): The tile prototype that was placed. \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The item type used to build the tiles. \nstack :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html): The stack used to build the tiles (may be empty if all of the items where used to build the tiles). \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface the tile(s) are build on.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_built_tile" }, "on_robot_mined_tile": { - "name": "on_robot_mined_tile", - "doc": "Called after a robot mines tile \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot. \ntiles :: array of [OldTileAndPosition](http://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition): The position data. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface the tile(s) were mined on.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_mined_tile" }, "on_player_selected_area": { - "name": "on_player_selected_area", - "doc": "Called after a player selects an area with a selection-tool ite \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player doing the selection. \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area selected. \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item used to select the area. \nentities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entities selected. \ntiles :: array of [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tiles selected.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_selected_area" }, "on_player_alt_selected_area": { - "name": "on_player_alt_selected_area", - "doc": "Called after a player alt-selects an area with a selection-tool ite \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player doing the selection. \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area selected. \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item used to select the area. \nentities :: array of [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entities selected. \ntiles :: array of [LuaTile](http://lua-api.factorio.com/latest/LuaTile.html): The tiles selected.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_alt_selected_area" }, "on_player_changed_surface": { - "name": "on_player_changed_surface", - "doc": "Called after a player changes surface \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who changed surfaces. \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The surface index the player was on. \n\n**Note: ** In the instance a player is moved off a surface due to it being deleted this is not called.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_changed_surface" }, "on_selected_entity_changed": { - "name": "on_selected_entity_changed", - "doc": "Called after the selected entity changes for a given playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player whose selected entity changed. \nlast_entity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The last selected entity if it still exists and there was one.", - "type": "event" + "type": "define", + "name": "defines.events.on_selected_entity_changed" }, "on_market_item_purchased": { - "name": "on_market_item_purchased", - "doc": "Called after a player purchases some offer from a Market entit \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the purchasing. \nmarket :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The market entity. \noffer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the offer purchased. \ncount :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The count of offers purchased.", - "type": "event" + "type": "define", + "name": "defines.events.on_market_item_purchased" }, "on_player_dropped_item": { - "name": "on_player_dropped_item", - "doc": "Called when a player drops an item on the groun \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The item-on-ground entity.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_dropped_item" }, "on_biter_base_built": { - "name": "on_biter_base_built", - "doc": "Called when a biter migration builds a bas \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The built entity. \n\n**Note: ** This will be called multiple times as each biter in a given migration is sacrificed and builds part of the base.", - "type": "event" + "type": "define", + "name": "defines.events.on_biter_base_built" }, "on_player_changed_force": { - "name": "on_player_changed_force", - "doc": "Called after a player changes force \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who changed forces. \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html): The old force.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_changed_force" }, "on_entity_renamed": { - "name": "on_entity_renamed", - "doc": "Called after an entity has been renamed either by the player or through scrip \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): If by_script is true this will not be included \nby_script :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nold_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_renamed" }, "on_gui_selection_state_changed": { - "name": "on_gui_selection_state_changed", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) selection state is changed (related to drop-downs and listboxe \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element whose selection state changed \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the change.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_selection_state_changed" }, "on_runtime_mod_setting_changed": { - "name": "on_runtime_mod_setting_changed", - "doc": "Called when a runtime mod setting is changed by a playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who changed the setting or ````\nnil````\nif changed by script. \nsetting :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The setting name that changed \nsetting_type :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The setting type: \"runtime-per-user\", or \"runtime-global\"", - "type": "event" + "type": "define", + "name": "defines.events.on_runtime_mod_setting_changed" }, "on_difficulty_settings_changed": { - "name": "on_difficulty_settings_changed", - "doc": "Called when the map difficulty settings are change \n\n**Contains** \nold_recipe_difficulty :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nold_technology_difficulty :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Note: ** It's not guaranteed that both settings are changed - just that at least one has been changed.", - "type": "event" + "type": "define", + "name": "defines.events.on_difficulty_settings_changed" }, "on_surface_created": { - "name": "on_surface_created", - "doc": "Called when a surface is create \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \n\n**Note: ** This is not called when the default surface is created as it will always exist.", - "type": "event" + "type": "define", + "name": "defines.events.on_surface_created" }, "on_surface_deleted": { - "name": "on_surface_deleted", - "doc": "Called after a surface is delete \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_surface_deleted" }, "on_pre_surface_deleted": { - "name": "on_pre_surface_deleted", - "doc": "Called just before a surface is delete \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_surface_deleted" }, "on_player_mined_entity": { - "name": "on_player_mined_entity", - "doc": "Called after the results of an entity being mined are collected just before the entity is destroye \nAfter this event any items in the buffer will be transferred into the player as if they came from mining the entit \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the player doing the mining. \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity that has been mined. \nbuffer :: [LuaInventory](http://lua-api.factorio.com/latest/LuaInventory.html): The temporary inventory that holds the result of mining the entity. \n\n**Note: ** The 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.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_mined_entity" }, "on_robot_mined_entity": { - "name": "on_robot_mined_entity", - "doc": "Called after the results of an entity being mined are collected just before the entity is destroye \nAfter this event any items in the buffer will be transferred into the robot as if they came from mining the entit \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The robot doing the mining. \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The entity that has been mined. \nbuffer :: [LuaInventory](http://lua-api.factorio.com/latest/LuaInventory.html): The temporary inventory that holds the result of mining the entity. \n\n**Note: ** The 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.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_mined_entity" }, "on_train_created": { - "name": "on_train_created", - "doc": "Called when a new train is created either through disconnecting/connecting an existing one or building a new on \n\n**Contains** \ntrain :: [LuaTrain](http://lua-api.factorio.com/latest/LuaTrain.html) \nold_train_id_1 :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The first old train id when splitting/merging trains. \nold_train_id_2 :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The second old train id when splitting/merging trains.", - "type": "event" + "type": "define", + "name": "defines.events.on_train_created" }, "on_gui_elem_changed": { - "name": "on_gui_elem_changed", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) element value is changed (related to choose element button \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element whose selection state changed \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the change.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_elem_changed" }, "on_player_setup_blueprint": { - "name": "on_player_setup_blueprint", - "doc": "Called when a player selects an area with a blueprin \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player doing the selection. \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area selected. \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item used to select the area. \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If normal selection or alt selection was used.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_setup_blueprint" }, "on_player_deconstructed_area": { - "name": "on_player_deconstructed_area", - "doc": "Called when a player selects an area with a deconstruction planne \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player doing the selection. \narea :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox): The area selected. \nitem :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The item used to select the area. \nalt :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If normal selection or alt selection was used.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_deconstructed_area" }, "on_player_configured_blueprint": { - "name": "on_player_configured_blueprint", - "doc": "Called when a player clicks the \"confirm\" button in the configure Blueprint GU \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_configured_blueprint" }, "on_console_chat": { - "name": "on_console_chat", - "doc": "Called when someone talks in-game either a player or through the server interfac \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player if any. \nmessage :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The chat message.", - "type": "event" + "type": "define", + "name": "defines.events.on_console_chat" }, "on_console_command": { - "name": "on_console_command", - "doc": "Called when someone enters a command-like message regardless of it being a valid comman \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player if any. \ncommand :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The command as typed without the preceding forward slash ('/'). \nparameters :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The parameters provided if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_console_command" }, "on_player_removed": { - "name": "on_player_removed", - "doc": "Called when a player is removed (deleted) from the gam \nNot to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save fil \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player index that was removed", - "type": "event" + "type": "define", + "name": "defines.events.on_player_removed" }, "on_pre_player_removed": { - "name": "on_pre_player_removed", - "doc": "Called before a player is removed (deleted) from the gam \nNot to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save fil \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player index that will be removed", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_player_removed" }, "on_player_used_capsule": { - "name": "on_player_used_capsule", - "doc": "Called when a player uses a capsule that results in some game actio \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player. \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The capsule item used. \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position): The position the capsule was used.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_used_capsule" }, "script_raised_built": { - "name": "script_raised_built", - "doc": "A static event mods can use to tell other mods they built something with a scrip \nThis is event is only raised if a mod uses it with script.raise_event() or when 'raise_built' is passed to [LuaSurface::create_entity](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.script_raised_built" }, "script_raised_destroy": { - "name": "script_raised_destroy", - "doc": "A static event mods can use to tell other mods they destroyed something with a scrip \nThis is event is only raised if a mod uses it with script.raise_event() or when 'raise_destroy' is passed to [LuaEntity::destroy](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.script_raised_destroy" }, "script_raised_revive": { - "name": "script_raised_revive", - "doc": "A static event mods can use to tell other mods they revived something with a scrip \nThis is event is only raised if a mod uses it with script.raise_event() or when 'raise_revive' is passed to [LuaEntity::revive](http://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.script_raised_revive" + }, + "script_raised_set_tiles": { + "type": "define", + "name": "defines.events.script_raised_set_tiles" }, "on_player_promoted": { - "name": "on_player_promoted", - "doc": "Called when a player is promote \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_promoted" }, "on_player_demoted": { - "name": "on_player_demoted", - "doc": "Called when a player is demote \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_demoted" }, "on_combat_robot_expired": { - "name": "on_combat_robot_expired", - "doc": "Called when a combat robot expires through a lack of energy, or timeou \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nowner :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The entity that owns the robot if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_combat_robot_expired" }, "on_player_changed_position": { - "name": "on_player_changed_position", - "doc": "Called when the tile position a player is located at change \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_changed_position" }, "on_mod_item_opened": { - "name": "on_mod_item_opened", - "doc": "Called when the player uses the 'Open item GUI' control on an item defined with 'can_be_mod_opened' as tr \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player. \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The item clicked on.", - "type": "event" + "type": "define", + "name": "defines.events.on_mod_item_opened" }, "on_gui_opened": { - "name": "on_gui_opened", - "doc": "Called when the player opens a GU \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player. \ngui_type :: [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type): The GUI type that was opened. \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The entity that was opened \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The item that was opened \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): The equipment that was opened \nother_player :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) (optional): The other player that was opened \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) (optional): The custom GUI element that was opened", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_opened" }, "on_gui_closed": { - "name": "on_gui_closed", - "doc": "Called when the player closes the GUI they have ope \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player. \ngui_type :: [defines.gui_type](http://lua-api.factorio.com/latest/defines.html#defines.gui_type): The GUI type that was open. \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) (optional): The entity that was open \nitem :: [LuaItemStack](http://lua-api.factorio.com/latest/LuaItemStack.html) (optional): The item that was open \nequipment :: [LuaEquipment](http://lua-api.factorio.com/latest/LuaEquipment.html) (optional): The equipment that was open \nother_player :: [LuaPlayer](http://lua-api.factorio.com/latest/LuaPlayer.html) (optional): The other player that was open \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) (optional): The custom GUI element that was open \n\n**Note: ** This is only called if the player explicitly closed the GUI. \n\n**Note: ** It'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.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_closed" }, "on_gui_value_changed": { - "name": "on_gui_value_changed", - "doc": "Called when [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html) slider value is changed (related to the slider elemen \n\n**Contains** \nelement :: [LuaGuiElement](http://lua-api.factorio.com/latest/LuaGuiElement.html): The element whose value changed \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player who did the change.", - "type": "event" + "type": "define", + "name": "defines.events.on_gui_value_changed" }, "on_player_muted": { - "name": "on_player_muted", - "doc": "Called when a player is mute \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_muted" }, "on_player_unmuted": { - "name": "on_player_unmuted", - "doc": "Called when a player is unmute \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_unmuted" }, "on_player_cheat_mode_enabled": { - "name": "on_player_cheat_mode_enabled", - "doc": "Called when cheat mode is enabled on a playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_cheat_mode_enabled" }, "on_player_cheat_mode_disabled": { - "name": "on_player_cheat_mode_disabled", - "doc": "Called when cheat mode is disabled on a playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_cheat_mode_disabled" }, "on_character_corpse_expired": { - "name": "on_character_corpse_expired", - "doc": "Called when a character corpse expires due to timeout or all of the items being removed from i \n\n**Contains** \ncorpse :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html): The corpse. \n\n**Note: ** this is not called if the corpse is mined. See [defines.events.on_pre_player_mined_item](http://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_mined_item) to detect that.", - "type": "event" + "type": "define", + "name": "defines.events.on_character_corpse_expired" }, "on_pre_ghost_deconstructed": { - "name": "on_pre_ghost_deconstructed", - "doc": "Called before a ghost entity is destroyed as a result of being marked for deconstructio \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that did the deconstruction if any. \nghost :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_ghost_deconstructed" }, "on_player_pipette": { - "name": "on_player_pipette", - "doc": "Called when a player invokes the \"smart pipette\" over an entit \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The item put in the cursor \nused_cheat_mode :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If cheat mode was used to give a free stack of the item.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_pipette" }, "on_player_display_resolution_changed": { - "name": "on_player_display_resolution_changed", - "doc": "Called when the display resolution changes for a given playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player \nold_resolution :: [DisplayResolution](http://lua-api.factorio.com/latest/Concepts.html#DisplayResolution): The old display resolution", - "type": "event" + "type": "define", + "name": "defines.events.on_player_display_resolution_changed" }, "on_player_display_scale_changed": { - "name": "on_player_display_scale_changed", - "doc": "Called when the display scale changes for a given playe \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player \nold_scale :: [double](http://lua-api.factorio.com/latest/Builtin-Types.html#double): The old display scale", - "type": "event" + "type": "define", + "name": "defines.events.on_player_display_scale_changed" }, "on_pre_player_crafted_item": { - "name": "on_pre_player_crafted_item", - "doc": "Called when a player queues something to be crafte \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player. \nrecipe :: [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html): The recipe. \nitems :: [LuaInventory](http://lua-api.factorio.com/latest/LuaInventory.html): The items removed from the players inventory to do the crafting.", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_player_crafted_item" }, "on_player_cancelled_crafting": { - "name": "on_player_cancelled_crafting", - "doc": "Called when a player cancels craftin \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nitems :: [LuaInventory](http://lua-api.factorio.com/latest/LuaInventory.html) \nrecipe :: [LuaRecipe](http://lua-api.factorio.com/latest/LuaRecipe.html) \ncancel_count :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_cancelled_crafting" }, "on_chunk_charted": { - "name": "on_chunk_charted", - "doc": "Called when a chunk is charted or re-charte \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nposition :: [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_chunk_charted" }, "on_technology_effects_reset": { - "name": "on_technology_effects_reset", - "doc": "Called when [LuaForce::reset_technology_effects](http://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects) is finishe \n\n**Contains** \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_technology_effects_reset" + }, + "on_force_reset": { + "type": "define", + "name": "defines.events.on_force_reset" }, "on_land_mine_armed": { - "name": "on_land_mine_armed", - "doc": "Called when a land mine is arme \n\n**Contains** \nmine :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_land_mine_armed" }, "on_forces_merged": { - "name": "on_forces_merged", - "doc": "Called after two forces have been merged using ````\ngame.merge_forces()```` \n\n**Contains** \nsource_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The force destroyed. \ndestination :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html): The force entities where reassigned to. \n\n**Note: ** The source force is invalidated before this event is called and the name can be re-used in this event if desired.", - "type": "event" + "type": "define", + "name": "defines.events.on_forces_merged" }, "on_player_trash_inventory_changed": { - "name": "on_player_trash_inventory_changed", - "doc": "Called after a players trash inventory changed in some wa \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_trash_inventory_changed" }, "on_pre_player_left_game": { - "name": "on_pre_player_left_game", - "doc": "Called before a player leaves the gam \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_player_left_game" }, "on_pre_surface_cleared": { - "name": "on_pre_surface_cleared", - "doc": "Called just before a surface is cleared (all entities removed and all chunks deleted \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_surface_cleared" }, "on_surface_cleared": { - "name": "on_surface_cleared", - "doc": "Called just after a surface is cleared (all entities removed and all chunks deleted \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_surface_cleared" }, "on_chunk_deleted": { - "name": "on_chunk_deleted", - "doc": "Called when one or more chunks are deleted using [LuaSurface::delete_chunk](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \npositions :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunks deleted.", - "type": "event" + "type": "define", + "name": "defines.events.on_chunk_deleted" }, "on_pre_chunk_deleted": { - "name": "on_pre_chunk_deleted", - "doc": "Called before one or more chunks are deleted using [LuaSurface::delete_chunk](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \npositions :: array of [ChunkPosition](http://lua-api.factorio.com/latest/Concepts.html#ChunkPosition): The chunks to be deleted.", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_chunk_deleted" }, "on_train_schedule_changed": { - "name": "on_train_schedule_changed", - "doc": "Called when a trains schedule is changed either by the player or through scrip \n\n**Contains** \ntrain :: [LuaTrain](http://lua-api.factorio.com/latest/LuaTrain.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player who made the change if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_train_schedule_changed" }, "on_player_banned": { - "name": "on_player_banned", - "doc": "Called when a player is banne \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player banned. \nplayer_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The banned player name. \nby_player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that did the banning if any. \nreason :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The reason given if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_banned" }, "on_player_kicked": { - "name": "on_player_kicked", - "doc": "Called when a player is kicke \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player kicked. \nby_player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that did the kicking if any. \nreason :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The reason given if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_kicked" }, "on_player_unbanned": { - "name": "on_player_unbanned", - "doc": "Called when a player is un-banne \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player un-banned. \nplayer_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The player name un-banned. \nby_player :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that did the un-banning if any. \nreason :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) (optional): The reason the player was banned if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_unbanned" }, "on_rocket_launch_ordered": { - "name": "on_rocket_launch_ordered", - "doc": "Called when a rocket silo is ordered to be launche \n\n**Contains** \nrocket :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nrocket_silo :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional): The player that is riding the rocket, if any.", - "type": "event" + "type": "define", + "name": "defines.events.on_rocket_launch_ordered" }, "on_script_path_request_finished": { - "name": "on_script_path_request_finished", - "doc": "Called when a script path request completes. [LuaSurface::request_path](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_pat \nEach Waypoint is a table: \nposition :: [Position](http://lua-api.factorio.com/latest/Concepts.html#Position) \nneeds_destroy_to_reach :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): true if the path from the previous Waypoint to this one go \nthrough an entity that must be destroyed. \npath will be nil if pathfinding faile \n\n**Contains** \npath :: array of Waypoint (optional) \nid :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): Handle to associate the callback with a particular call to [LuaSurface::request_path](http://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path). \ntry_again_later :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): Indicates that the pathfinder failed because it is too busy, and you can retry later.", - "type": "event" + "type": "define", + "name": "defines.events.on_script_path_request_finished" }, "on_ai_command_completed": { - "name": "on_ai_command_completed", - "doc": "Called when a unit/group completes a comman \n\n**Contains** \nunit_number :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): unit_number/group_number of the unit/group which just completed a command. \nresult :: [defines.behavior_result](http://lua-api.factorio.com/latest/defines.html#defines.behavior_result)", - "type": "event" + "type": "define", + "name": "defines.events.on_ai_command_completed" }, "on_marked_for_upgrade": { - "name": "on_marked_for_upgrade", - "doc": "Called when an entity is marked for upgrade with the Upgrade planner or via scrip \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ntarget :: [LuaEntityPrototype](http://lua-api.factorio.com/latest/LuaEntityPrototype.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_marked_for_upgrade" }, "on_cancelled_upgrade": { - "name": "on_cancelled_upgrade", - "doc": "Called when the upgrade of an entity is cancele \n\n**Contains** \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_cancelled_upgrade" }, "on_player_toggled_map_editor": { - "name": "on_player_toggled_map_editor", - "doc": "Called when a player toggles the map editor on or of \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_toggled_map_editor" }, "on_entity_cloned": { - "name": "on_entity_cloned", - "doc": "Called when an entity is clone \n\n**Contains** \nsource :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ndestination :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_cloned" }, "on_area_cloned": { - "name": "on_area_cloned", - "doc": "Called when an area of the map is clone \n\n**Contains** \nsource_surface :: [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html) \nsource_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_surface :: [LuaSurface](http://lua-api.factorio.com/latest/LuaSurface.html) \ndestination_area :: [BoundingBox](http://lua-api.factorio.com/latest/Concepts.html#BoundingBox) \ndestination_force :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) (optional) \nclone_tiles :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nclone_entities :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nclone_decoratives :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean) \nclear_destination :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean)", - "type": "event" + "type": "define", + "name": "defines.events.on_area_cloned" + }, + "on_brush_cloned": { + "type": "define", + "name": "defines.events.on_brush_cloned" }, "on_game_created_from_scenario": { - "name": "on_game_created_from_scenario", - "doc": "Called when a game is created from a scenario.", - "type": "event" + "type": "define", + "name": "defines.events.on_game_created_from_scenario" }, "on_surface_imported": { - "name": "on_surface_imported", - "doc": "Called after a surface is importe \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \noriginal_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): The original surface name.", - "type": "event" + "type": "define", + "name": "defines.events.on_surface_imported" }, "on_surface_renamed": { - "name": "on_surface_renamed", - "doc": "Called when a surface is rename \n\n**Contains** \nsurface_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nold_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nnew_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string)", - "type": "event" + "type": "define", + "name": "defines.events.on_surface_renamed" }, "on_player_toggled_alt_mode": { - "name": "on_player_toggled_alt_mode", - "doc": "Called when a player toggles alt mode, also known as \"show entity info \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_toggled_alt_mode" }, "on_player_repaired_entity": { - "name": "on_player_repaired_entity", - "doc": "Called when a player repairs an entit \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_player_repaired_entity" }, "on_player_fast_transferred": { - "name": "on_player_fast_transferred", - "doc": "Called when a player fast-transfers something to or from an entit \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nfrom_player :: [boolean](http://lua-api.factorio.com/latest/Builtin-Types.html#boolean): If the transfer was from player to entity or entity to player.", - "type": "event" + "type": "define", + "name": "defines.events.on_player_fast_transferred" }, "on_pre_robot_exploded_cliff": { - "name": "on_pre_robot_exploded_cliff", - "doc": "Called directly before a robot explodes cliff \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ncliff :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The cliff explosive used.", - "type": "event" + "type": "define", + "name": "defines.events.on_pre_robot_exploded_cliff" }, "on_robot_exploded_cliff": { - "name": "on_robot_exploded_cliff", - "doc": "Called directly after a robot explodes cliff \n\n**Contains** \nrobot :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nitem :: [LuaItemPrototype](http://lua-api.factorio.com/latest/LuaItemPrototype.html): The cliff explosive used.", - "type": "event" + "type": "define", + "name": "defines.events.on_robot_exploded_cliff" }, "on_entity_spawned": { - "name": "on_entity_spawned", - "doc": "Called when an entity is spawned by a EnemySpawn \n\n**Contains** \nspawner :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \nentity :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_entity_spawned" }, "on_cutscene_waypoint_reached": { - "name": "on_cutscene_waypoint_reached", - "doc": "Called when a cutscene is playing, each time it reaches a waypoint in that cutscen \nThis refers to an index in the table previously passed to set_controller which started the cutscene. \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The player index of the player viewing the cutscene. \nwaypoint_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint): The index of the waypoint we just completed.", - "type": "event" + "type": "define", + "name": "defines.events.on_cutscene_waypoint_reached" }, "on_unit_group_created": { - "name": "on_unit_group_created", - "doc": "Called when a new unit group is created, before any members are added to i \n\n**Contains** \ngroup :: [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_unit_group_created" }, "on_unit_added_to_group": { - "name": "on_unit_added_to_group", - "doc": "Called when a unit is added to a unit grou \n\n**Contains** \nunit :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ngroup :: [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_unit_added_to_group" }, "on_unit_removed_from_group": { - "name": "on_unit_removed_from_group", - "doc": "Called when a unit is removed from a unit grou \n\n**Contains** \nunit :: [LuaEntity](http://lua-api.factorio.com/latest/LuaEntity.html) \ngroup :: [LuaUnitGroup](http://lua-api.factorio.com/latest/LuaUnitGroup.html)", - "type": "event" + "type": "define", + "name": "defines.events.on_unit_removed_from_group" + }, + "on_unit_group_finished_gathering": { + "type": "define", + "name": "defines.events.on_unit_group_finished_gathering" + }, + "on_build_base_arrived": { + "type": "define", + "name": "defines.events.on_build_base_arrived" }, "on_chart_tag_added": { - "name": "on_chart_tag_added", - "doc": "Called when a chart tag is create \n\n**Contains** \ntag :: [LuaCustomChartTag](http://lua-api.factorio.com/latest/LuaCustomChartTag.html) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "type": "define", + "name": "defines.events.on_chart_tag_added" + }, + "on_chart_tag_modified": { + "type": "define", + "name": "defines.events.on_chart_tag_modified" + }, + "on_chart_tag_removed": { + "type": "define", + "name": "defines.events.on_chart_tag_removed" + }, + "on_lua_shortcut": { + "type": "define", + "name": "defines.events.on_lua_shortcut" + }, + "on_gui_location_changed": { + "type": "define", + "name": "defines.events.on_gui_location_changed" + }, + "on_gui_selected_tab_changed": { + "type": "define", + "name": "defines.events.on_gui_selected_tab_changed" + }, + "on_gui_switch_state_changed": { + "type": "define", + "name": "defines.events.on_gui_switch_state_changed" + }, + "on_force_cease_fire_changed": { + "type": "define", + "name": "defines.events.on_force_cease_fire_changed" + }, + "on_force_friends_changed": { + "type": "define", + "name": "defines.events.on_force_friends_changed" + }, + "on_string_translated": { + "type": "define", + "name": "defines.events.on_string_translated" + }, + "on_script_trigger_effect": { + "type": "define", + "name": "defines.events.on_script_trigger_effect" + }, + "on_player_set_quick_bar_slot": { + "type": "define", + "name": "defines.events.on_player_set_quick_bar_slot" + }, + "on_pre_player_toggled_map_editor": { + "type": "define", + "name": "defines.events.on_pre_player_toggled_map_editor" + }, + "on_pre_script_inventory_resized": { + "type": "define", + "name": "defines.events.on_pre_script_inventory_resized" + }, + "on_script_inventory_resized": { + "type": "define", + "name": "defines.events.on_script_inventory_resized" + }, + "on_entity_destroyed": { + "type": "define", + "name": "defines.events.on_entity_destroyed" + }, + "on_player_clicked_gps_tag": { + "type": "define", + "name": "defines.events.on_player_clicked_gps_tag" + }, + "on_player_flushed_fluid": { + "type": "define", + "name": "defines.events.on_player_flushed_fluid" + }, + "on_permission_group_edited": { + "type": "define", + "name": "defines.events.on_permission_group_edited" + }, + "on_pre_permission_string_imported": { + "type": "define", + "name": "defines.events.on_pre_permission_string_imported" + }, + "on_permission_string_imported": { + "type": "define", + "name": "defines.events.on_permission_string_imported" + }, + "on_pre_permission_group_deleted": { + "type": "define", + "name": "defines.events.on_pre_permission_group_deleted" + }, + "on_permission_group_deleted": { + "type": "define", + "name": "defines.events.on_permission_group_deleted" + }, + "on_permission_group_added": { + "type": "define", + "name": "defines.events.on_permission_group_added" + }, + "on_cutscene_cancelled": { + "type": "define", + "name": "defines.events.on_cutscene_cancelled" + }, + "on_player_configured_spider_remote": { + "type": "define", + "name": "defines.events.on_player_configured_spider_remote" }, - "on_chart_tag_modified": { - "name": "on_chart_tag_modified", - "doc": "Called when a chart tag is modified by a playe \n\n**Contains** \ntag :: [LuaCustomChartTag](http://lua-api.factorio.com/latest/LuaCustomChartTag.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) \nold_text :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string) \nold_icon :: [SignalID](http://lua-api.factorio.com/latest/Concepts.html#SignalID) \nold_player_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "on_player_used_spider_remote": { + "type": "define", + "name": "defines.events.on_player_used_spider_remote" }, - "on_chart_tag_removed": { - "name": "on_chart_tag_removed", - "doc": "Called just before a chart tag is delete \n\n**Contains** \ntag :: [LuaCustomChartTag](http://lua-api.factorio.com/latest/LuaCustomChartTag.html) \nforce :: [LuaForce](http://lua-api.factorio.com/latest/LuaForce.html) \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) (optional)", - "type": "event" + "on_spider_command_completed": { + "type": "define", + "name": "defines.events.on_spider_command_completed" }, - "on_lua_shortcut": { - "name": "on_lua_shortcut", - "doc": "Called when a custom Lua shortcut is presse \n\n**Contains** \nplayer_index :: [uint](http://lua-api.factorio.com/latest/Builtin-Types.html#uint) \nprototype_name :: [string](http://lua-api.factorio.com/latest/Builtin-Types.html#string): Shortcut prototype name of the shortcut that was clicked.", - "type": "event" + "on_entity_logistic_slot_changed": { + "type": "define", + "name": "defines.events.on_entity_logistic_slot_changed" } } }, "flow_precision_index": { "type": "define", "properties": { - "one_second": { + "five_seconds": { "type": "define", - "name": "defines.flow_precision_index.one_second" + "name": "defines.flow_precision_index.five_seconds" }, "one_minute": { "type": "define", @@ -1607,6 +1727,14 @@ "finished": { "type": "define", "name": "defines.group_state.finished" + }, + "pathfinding": { + "type": "define", + "name": "defines.group_state.pathfinding" + }, + "wander_in_group": { + "type": "define", + "name": "defines.group_state.wander_in_group" } } }, @@ -1665,10 +1793,6 @@ "type": "define", "name": "defines.gui_type.other_player" }, - "kills": { - "type": "define", - "name": "defines.gui_type.kills" - }, "permissions": { "type": "define", "name": "defines.gui_type.permissions" @@ -1688,6 +1812,10 @@ "player_management": { "type": "define", "name": "defines.gui_type.player_management" + }, + "tile": { + "type": "define", + "name": "defines.gui_type.tile" } } }, @@ -1738,9 +1866,9 @@ "type": "define", "name": "defines.input_action.begin_mining_terrain" }, - "build_item": { + "build": { "type": "define", - "name": "defines.input_action.build_item" + "name": "defines.input_action.build" }, "build_rail": { "type": "define", @@ -1770,6 +1898,10 @@ "type": "define", "name": "defines.input_action.cancel_upgrade" }, + "change_active_character_tab": { + "type": "define", + "name": "defines.input_action.change_active_character_tab" + }, "change_active_item_group_for_crafting": { "type": "define", "name": "defines.input_action.change_active_item_group_for_crafting" @@ -1786,14 +1918,18 @@ "type": "define", "name": "defines.input_action.change_arithmetic_combinator_parameters" }, - "change_blueprint_book_record_label": { - "type": "define", - "name": "defines.input_action.change_blueprint_book_record_label" - }, "change_decider_combinator_parameters": { "type": "define", "name": "defines.input_action.change_decider_combinator_parameters" }, + "change_entity_label": { + "type": "define", + "name": "defines.input_action.change_entity_label" + }, + "change_item_description": { + "type": "define", + "name": "defines.input_action.change_item_description" + }, "change_item_label": { "type": "define", "name": "defines.input_action.change_item_label" @@ -1826,10 +1962,6 @@ "type": "define", "name": "defines.input_action.change_shooting_state" }, - "change_single_blueprint_record_label": { - "type": "define", - "name": "defines.input_action.change_single_blueprint_record_label" - }, "change_train_stop_station": { "type": "define", "name": "defines.input_action.change_train_stop_station" @@ -1842,21 +1974,9 @@ "type": "define", "name": "defines.input_action.change_train_wait_condition_data" }, - "clean_cursor_stack": { + "clear_cursor": { "type": "define", - "name": "defines.input_action.clean_cursor_stack" - }, - "clear_selected_blueprint": { - "type": "define", - "name": "defines.input_action.clear_selected_blueprint" - }, - "clear_selected_deconstruction_item": { - "type": "define", - "name": "defines.input_action.clear_selected_deconstruction_item" - }, - "clear_selected_upgrade_item": { - "type": "define", - "name": "defines.input_action.clear_selected_upgrade_item" + "name": "defines.input_action.clear_cursor" }, "connect_rolling_stock": { "type": "define", @@ -1870,13 +1990,17 @@ "type": "define", "name": "defines.input_action.copy_entity_settings" }, - "craft": { + "copy_opened_blueprint": { "type": "define", - "name": "defines.input_action.craft" + "name": "defines.input_action.copy_opened_blueprint" }, - "create_blueprint_like": { + "copy_opened_item": { "type": "define", - "name": "defines.input_action.create_blueprint_like" + "name": "defines.input_action.copy_opened_item" + }, + "craft": { + "type": "define", + "name": "defines.input_action.craft" }, "cursor_split": { "type": "define", @@ -1918,6 +2042,10 @@ "type": "define", "name": "defines.input_action.delete_permission_group" }, + "destroy_item": { + "type": "define", + "name": "defines.input_action.destroy_item" + }, "destroy_opened_item": { "type": "define", "name": "defines.input_action.destroy_opened_item" @@ -1942,9 +2070,9 @@ "type": "define", "name": "defines.input_action.drop_item" }, - "drop_to_blueprint_book": { + "edit_blueprint_tool_preview": { "type": "define", - "name": "defines.input_action.drop_to_blueprint_book" + "name": "defines.input_action.edit_blueprint_tool_preview" }, "edit_custom_tag": { "type": "define", @@ -1966,6 +2094,14 @@ "type": "define", "name": "defines.input_action.fast_entity_transfer" }, + "flush_opened_entity_fluid": { + "type": "define", + "name": "defines.input_action.flush_opened_entity_fluid" + }, + "flush_opened_entity_specific_fluid": { + "type": "define", + "name": "defines.input_action.flush_opened_entity_specific_fluid" + }, "go_to_train_station": { "type": "define", "name": "defines.input_action.go_to_train_station" @@ -1982,14 +2118,30 @@ "type": "define", "name": "defines.input_action.gui_click" }, + "gui_confirmed": { + "type": "define", + "name": "defines.input_action.gui_confirmed" + }, "gui_elem_changed": { "type": "define", "name": "defines.input_action.gui_elem_changed" }, + "gui_location_changed": { + "type": "define", + "name": "defines.input_action.gui_location_changed" + }, + "gui_selected_tab_changed": { + "type": "define", + "name": "defines.input_action.gui_selected_tab_changed" + }, "gui_selection_state_changed": { "type": "define", "name": "defines.input_action.gui_selection_state_changed" }, + "gui_switch_state_changed": { + "type": "define", + "name": "defines.input_action.gui_switch_state_changed" + }, "gui_text_changed": { "type": "define", "name": "defines.input_action.gui_text_changed" @@ -2006,6 +2158,10 @@ "type": "define", "name": "defines.input_action.import_blueprint_string" }, + "import_blueprints_filtered": { + "type": "define", + "name": "defines.input_action.import_blueprints_filtered" + }, "import_permissions_string": { "type": "define", "name": "defines.input_action.import_permissions_string" @@ -2058,6 +2214,10 @@ "type": "define", "name": "defines.input_action.open_character_gui" }, + "open_current_vehicle_gui": { + "type": "define", + "name": "defines.input_action.open_current_vehicle_gui" + }, "open_equipment": { "type": "define", "name": "defines.input_action.open_equipment" @@ -2070,10 +2230,6 @@ "type": "define", "name": "defines.input_action.open_item" }, - "open_kills_gui": { - "type": "define", - "name": "defines.input_action.open_kills_gui" - }, "open_logistic_gui": { "type": "define", "name": "defines.input_action.open_logistic_gui" @@ -2082,6 +2238,10 @@ "type": "define", "name": "defines.input_action.open_mod_item" }, + "open_parent_of_opened_item": { + "type": "define", + "name": "defines.input_action.open_parent_of_opened_item" + }, "open_production_gui": { "type": "define", "name": "defines.input_action.open_production_gui" @@ -2090,6 +2250,10 @@ "type": "define", "name": "defines.input_action.open_technology_gui" }, + "open_tips_and_tricks_gui": { + "type": "define", + "name": "defines.input_action.open_tips_and_tricks_gui" + }, "open_train_gui": { "type": "define", "name": "defines.input_action.open_train_gui" @@ -2102,10 +2266,6 @@ "type": "define", "name": "defines.input_action.open_trains_gui" }, - "open_tutorials_gui": { - "type": "define", - "name": "defines.input_action.open_tutorials_gui" - }, "paste_entity_settings": { "type": "define", "name": "defines.input_action.paste_entity_settings" @@ -2126,6 +2286,10 @@ "type": "define", "name": "defines.input_action.quick_bar_set_slot" }, + "reassign_blueprint": { + "type": "define", + "name": "defines.input_action.reassign_blueprint" + }, "remove_cables": { "type": "define", "name": "defines.input_action.remove_cables" @@ -2138,6 +2302,10 @@ "type": "define", "name": "defines.input_action.reset_assembling_machine" }, + "reset_item": { + "type": "define", + "name": "defines.input_action.reset_item" + }, "rotate_entity": { "type": "define", "name": "defines.input_action.rotate_entity" @@ -2170,6 +2338,10 @@ "type": "define", "name": "defines.input_action.select_tile_slot" }, + "send_spidertron": { + "type": "define", + "name": "defines.input_action.send_spidertron" + }, "set_auto_launch_rocket": { "type": "define", "name": "defines.input_action.set_auto_launch_rocket" @@ -2194,6 +2366,10 @@ "type": "define", "name": "defines.input_action.set_circuit_mode_of_operation" }, + "set_controller_logistic_trash_filter_item": { + "type": "define", + "name": "defines.input_action.set_controller_logistic_trash_filter_item" + }, "set_deconstruction_item_tile_selection_mode": { "type": "define", "name": "defines.input_action.set_deconstruction_item_tile_selection_mode" @@ -2210,10 +2386,18 @@ "type": "define", "name": "defines.input_action.set_entity_energy_property" }, + "set_entity_logistic_trash_filter_item": { + "type": "define", + "name": "defines.input_action.set_entity_logistic_trash_filter_item" + }, "set_filter": { "type": "define", "name": "defines.input_action.set_filter" }, + "set_flat_controller_gui": { + "type": "define", + "name": "defines.input_action.set_flat_controller_gui" + }, "set_heat_interface_mode": { "type": "define", "name": "defines.input_action.set_heat_interface_mode" @@ -2242,6 +2426,10 @@ "type": "define", "name": "defines.input_action.set_inventory_bar" }, + "set_linked_container_link_i_d": { + "type": "define", + "name": "defines.input_action.set_linked_container_link_i_d" + }, "set_logistic_filter_item": { "type": "define", "name": "defines.input_action.set_logistic_filter_item" @@ -2250,9 +2438,13 @@ "type": "define", "name": "defines.input_action.set_logistic_filter_signal" }, - "set_logistic_trash_filter_item": { + "set_player_color": { "type": "define", - "name": "defines.input_action.set_logistic_trash_filter_item" + "name": "defines.input_action.set_player_color" + }, + "set_recipe_notifications": { + "type": "define", + "name": "defines.input_action.set_recipe_notifications" }, "set_request_from_buffers": { "type": "define", @@ -2266,10 +2458,6 @@ "type": "define", "name": "defines.input_action.set_signal" }, - "set_single_blueprint_record_icon": { - "type": "define", - "name": "defines.input_action.set_single_blueprint_record_icon" - }, "set_splitter_priority": { "type": "define", "name": "defines.input_action.set_splitter_priority" @@ -2278,6 +2466,14 @@ "type": "define", "name": "defines.input_action.set_train_stopped" }, + "set_trains_limit": { + "type": "define", + "name": "defines.input_action.set_trains_limit" + }, + "set_vehicle_automatic_targeting_parameters": { + "type": "define", + "name": "defines.input_action.set_vehicle_automatic_targeting_parameters" + }, "setup_assembling_machine": { "type": "define", "name": "defines.input_action.setup_assembling_machine" @@ -2294,6 +2490,10 @@ "type": "define", "name": "defines.input_action.smart_pipette" }, + "spawn_item": { + "type": "define", + "name": "defines.input_action.spawn_item" + }, "stack_split": { "type": "define", "name": "defines.input_action.stack_split" @@ -2358,6 +2558,10 @@ "type": "define", "name": "defines.input_action.toggle_enable_vehicle_logistics_while_moving" }, + "toggle_entity_logistic_requests": { + "type": "define", + "name": "defines.input_action.toggle_entity_logistic_requests" + }, "toggle_equipment_movement_bonus": { "type": "define", "name": "defines.input_action.toggle_equipment_movement_bonus" @@ -2366,6 +2570,10 @@ "type": "define", "name": "defines.input_action.toggle_map_editor" }, + "toggle_personal_logistic_requests": { + "type": "define", + "name": "defines.input_action.toggle_personal_logistic_requests" + }, "toggle_personal_roboport": { "type": "define", "name": "defines.input_action.toggle_personal_roboport" @@ -2374,6 +2582,10 @@ "type": "define", "name": "defines.input_action.toggle_show_entity_info" }, + "translate_string": { + "type": "define", + "name": "defines.input_action.translate_string" + }, "undo": { "type": "define", "name": "defines.input_action.undo" @@ -2382,9 +2594,13 @@ "type": "define", "name": "defines.input_action.upgrade" }, - "upgrade_opened_blueprint": { + "upgrade_opened_blueprint_by_item": { "type": "define", - "name": "defines.input_action.upgrade_opened_blueprint" + "name": "defines.input_action.upgrade_opened_blueprint_by_item" + }, + "upgrade_opened_blueprint_by_record": { + "type": "define", + "name": "defines.input_action.upgrade_opened_blueprint_by_record" }, "use_artillery_remote": { "type": "define", @@ -2562,6 +2778,18 @@ "artillery_wagon_ammo": { "type": "define", "name": "defines.inventory.artillery_wagon_ammo" + }, + "spider_trunk": { + "type": "define", + "name": "defines.inventory.spider_trunk" + }, + "spider_ammo": { + "type": "define", + "name": "defines.inventory.spider_ammo" + }, + "spider_trash": { + "type": "define", + "name": "defines.inventory.spider_trash" } } }, @@ -2678,6 +2906,284 @@ } } }, + "relative_gui_position": { + "type": "define", + "properties": { + "top": { + "type": "define", + "name": "defines.relative_gui_position.top" + }, + "bottom": { + "type": "define", + "name": "defines.relative_gui_position.bottom" + }, + "left": { + "type": "define", + "name": "defines.relative_gui_position.left" + }, + "right": { + "type": "define", + "name": "defines.relative_gui_position.right" + } + } + }, + "relative_gui_type": { + "type": "define", + "properties": { + "accumulator_gui": { + "type": "define", + "name": "defines.relative_gui_type.accumulator_gui" + }, + "achievement_gui": { + "type": "define", + "name": "defines.relative_gui_type.achievement_gui" + }, + "additional_entity_info_gui": { + "type": "define", + "name": "defines.relative_gui_type.additional_entity_info_gui" + }, + "admin_gui": { + "type": "define", + "name": "defines.relative_gui_type.admin_gui" + }, + "arithmetic_combinator_gui": { + "type": "define", + "name": "defines.relative_gui_type.arithmetic_combinator_gui" + }, + "armor_gui": { + "type": "define", + "name": "defines.relative_gui_type.armor_gui" + }, + "assembling_machine_gui": { + "type": "define", + "name": "defines.relative_gui_type.assembling_machine_gui" + }, + "assembling_machine_select_recipe_gui": { + "type": "define", + "name": "defines.relative_gui_type.assembling_machine_select_recipe_gui" + }, + "beacon_gui": { + "type": "define", + "name": "defines.relative_gui_type.beacon_gui" + }, + "blueprint_book_gui": { + "type": "define", + "name": "defines.relative_gui_type.blueprint_book_gui" + }, + "blueprint_library_gui": { + "type": "define", + "name": "defines.relative_gui_type.blueprint_library_gui" + }, + "blueprint_setup_gui": { + "type": "define", + "name": "defines.relative_gui_type.blueprint_setup_gui" + }, + "bonus_gui": { + "type": "define", + "name": "defines.relative_gui_type.bonus_gui" + }, + "burner_equipment_gui": { + "type": "define", + "name": "defines.relative_gui_type.burner_equipment_gui" + }, + "car_gui": { + "type": "define", + "name": "defines.relative_gui_type.car_gui" + }, + "constant_combinator_gui": { + "type": "define", + "name": "defines.relative_gui_type.constant_combinator_gui" + }, + "container_gui": { + "type": "define", + "name": "defines.relative_gui_type.container_gui" + }, + "controller_gui": { + "type": "define", + "name": "defines.relative_gui_type.controller_gui" + }, + "decider_combinator_gui": { + "type": "define", + "name": "defines.relative_gui_type.decider_combinator_gui" + }, + "deconstruction_item_gui": { + "type": "define", + "name": "defines.relative_gui_type.deconstruction_item_gui" + }, + "electric_energy_interface_gui": { + "type": "define", + "name": "defines.relative_gui_type.electric_energy_interface_gui" + }, + "electric_network_gui": { + "type": "define", + "name": "defines.relative_gui_type.electric_network_gui" + }, + "entity_variations_gui": { + "type": "define", + "name": "defines.relative_gui_type.entity_variations_gui" + }, + "entity_with_energy_source_gui": { + "type": "define", + "name": "defines.relative_gui_type.entity_with_energy_source_gui" + }, + "equipment_grid_gui": { + "type": "define", + "name": "defines.relative_gui_type.equipment_grid_gui" + }, + "furnace_gui": { + "type": "define", + "name": "defines.relative_gui_type.furnace_gui" + }, + "generic_on_off_entity_gui": { + "type": "define", + "name": "defines.relative_gui_type.generic_on_off_entity_gui" + }, + "heat_interface_gui": { + "type": "define", + "name": "defines.relative_gui_type.heat_interface_gui" + }, + "infinity_pipe_gui": { + "type": "define", + "name": "defines.relative_gui_type.infinity_pipe_gui" + }, + "inserter_gui": { + "type": "define", + "name": "defines.relative_gui_type.inserter_gui" + }, + "item_with_inventory_gui": { + "type": "define", + "name": "defines.relative_gui_type.item_with_inventory_gui" + }, + "lab_gui": { + "type": "define", + "name": "defines.relative_gui_type.lab_gui" + }, + "lamp_gui": { + "type": "define", + "name": "defines.relative_gui_type.lamp_gui" + }, + "linked_container_gui": { + "type": "define", + "name": "defines.relative_gui_type.linked_container_gui" + }, + "loader_gui": { + "type": "define", + "name": "defines.relative_gui_type.loader_gui" + }, + "logistic_gui": { + "type": "define", + "name": "defines.relative_gui_type.logistic_gui" + }, + "market_gui": { + "type": "define", + "name": "defines.relative_gui_type.market_gui" + }, + "mining_drill_gui": { + "type": "define", + "name": "defines.relative_gui_type.mining_drill_gui" + }, + "other_player_gui": { + "type": "define", + "name": "defines.relative_gui_type.other_player_gui" + }, + "permissions_gui": { + "type": "define", + "name": "defines.relative_gui_type.permissions_gui" + }, + "pipe_gui": { + "type": "define", + "name": "defines.relative_gui_type.pipe_gui" + }, + "power_switch_gui": { + "type": "define", + "name": "defines.relative_gui_type.power_switch_gui" + }, + "production_gui": { + "type": "define", + "name": "defines.relative_gui_type.production_gui" + }, + "programmable_speaker_gui": { + "type": "define", + "name": "defines.relative_gui_type.programmable_speaker_gui" + }, + "rail_chain_signal_gui": { + "type": "define", + "name": "defines.relative_gui_type.rail_chain_signal_gui" + }, + "rail_signal_gui": { + "type": "define", + "name": "defines.relative_gui_type.rail_signal_gui" + }, + "reactor_gui": { + "type": "define", + "name": "defines.relative_gui_type.reactor_gui" + }, + "rename_stop_gui": { + "type": "define", + "name": "defines.relative_gui_type.rename_stop_gui" + }, + "resource_entity_gui": { + "type": "define", + "name": "defines.relative_gui_type.resource_entity_gui" + }, + "roboport_gui": { + "type": "define", + "name": "defines.relative_gui_type.roboport_gui" + }, + "rocket_silo_gui": { + "type": "define", + "name": "defines.relative_gui_type.rocket_silo_gui" + }, + "server_config_gui": { + "type": "define", + "name": "defines.relative_gui_type.server_config_gui" + }, + "spider_vehicle_gui": { + "type": "define", + "name": "defines.relative_gui_type.spider_vehicle_gui" + }, + "splitter_gui": { + "type": "define", + "name": "defines.relative_gui_type.splitter_gui" + }, + "standalone_character_gui": { + "type": "define", + "name": "defines.relative_gui_type.standalone_character_gui" + }, + "storage_tank_gui": { + "type": "define", + "name": "defines.relative_gui_type.storage_tank_gui" + }, + "tile_variations_gui": { + "type": "define", + "name": "defines.relative_gui_type.tile_variations_gui" + }, + "train_gui": { + "type": "define", + "name": "defines.relative_gui_type.train_gui" + }, + "train_stop_gui": { + "type": "define", + "name": "defines.relative_gui_type.train_stop_gui" + }, + "trains_gui": { + "type": "define", + "name": "defines.relative_gui_type.trains_gui" + }, + "transport_belt_gui": { + "type": "define", + "name": "defines.relative_gui_type.transport_belt_gui" + }, + "upgrade_item_gui": { + "type": "define", + "name": "defines.relative_gui_type.upgrade_item_gui" + }, + "wall_gui": { + "type": "define", + "name": "defines.relative_gui_type.wall_gui" + } + } + }, "render_mode": { "type": "define", "properties": { @@ -2695,6 +3201,23 @@ } } }, + "rich_text_setting": { + "type": "define", + "properties": { + "enabled": { + "type": "define", + "name": "defines.rich_text_setting.enabled" + }, + "disabled": { + "type": "define", + "name": "defines.rich_text_setting.disabled" + }, + "highlight": { + "type": "define", + "name": "defines.rich_text_setting.highlight" + } + } + }, "riding": { "type": "define", "properties": { @@ -2761,22 +3284,22 @@ "open": { "type": "define", "name": "defines.signal_state.open", - "doc": "Green." + "doc": " Green." }, "closed": { "type": "define", "name": "defines.signal_state.closed", - "doc": "Red." + "doc": " Red." }, "reserved": { "type": "define", "name": "defines.signal_state.reserved", - "doc": "Orange." + "doc": " Orange." }, "reserved_by_circuit_network": { "type": "define", "name": "defines.signal_state.reserved_by_circuit_network", - "doc": "Red - From circuit network." + "doc": " Red - From circuit network." } } }, @@ -2786,52 +3309,57 @@ "on_the_path": { "type": "define", "name": "defines.train_state.on_the_path", - "doc": "Normal state -- following the path." + "doc": " Normal state -- following the path." }, "path_lost": { "type": "define", "name": "defines.train_state.path_lost", - "doc": "Had path and lost it -- must stop." + "doc": " Had path and lost it -- must stop." }, "no_schedule": { "type": "define", "name": "defines.train_state.no_schedule", - "doc": "Doesn't have anywhere to go." + "doc": " Doesn't have anywhere to go." }, "no_path": { "type": "define", "name": "defines.train_state.no_path", - "doc": "Has no path and is stopped." + "doc": " Has no path and is stopped." }, "arrive_signal": { "type": "define", "name": "defines.train_state.arrive_signal", - "doc": "Braking before a rail signal." + "doc": " Braking before a rail signal." }, "wait_signal": { "type": "define", "name": "defines.train_state.wait_signal", - "doc": "Waiting at a signal." + "doc": " Waiting at a signal." }, "arrive_station": { "type": "define", "name": "defines.train_state.arrive_station", - "doc": "Braking before a station." + "doc": " Braking before a station." }, "wait_station": { "type": "define", "name": "defines.train_state.wait_station", - "doc": "Waiting at a station." + "doc": " Waiting at a station." }, "manual_control_stop": { "type": "define", "name": "defines.train_state.manual_control_stop", - "doc": "Switched to manual control and has to stop." + "doc": " Switched to manual control and has to stop." }, "manual_control": { "type": "define", "name": "defines.train_state.manual_control", - "doc": "Can move if user explicitly sits in and rides the train." + "doc": " Can move if user explicitly sits in and rides the train." + }, + "destination_full": { + "type": "define", + "name": "defines.train_state.destination_full", + "doc": " Same as no_path but all candidate train stops are full" } } }, diff --git a/package-lock.json b/package-lock.json index 13b1a00..559264f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,10 +4,16 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/lodash": { - "version": "4.14.134", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.134.tgz", - "integrity": "sha512-2/O0khFUCFeDlbi7sZ7ZFRCcT812fAeOLm7Ev4KbwASkZ575TDrDcY7YyaoHdTOzKcNbfiwLYZqPmoC4wadrsw==", + "version": "4.14.168", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==", "dev": true }, "@types/mocha": { @@ -17,9 +23,9 @@ "dev": true }, "@types/node": { - "version": "12.0.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.7.tgz", - "integrity": "sha512-1YKeT4JitGgE4SOzyB9eMwO0nGVNkNEsm9qlIt1Lqm/tG2QEiSMTD4kS3aO6L+w5SClLVxALmIBESK6Mk5wX0A==", + "version": "12.20.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.10.tgz", + "integrity": "sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw==", "dev": true }, "abbrev": { @@ -29,24 +35,29 @@ "dev": true }, "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "ansi-colors": { @@ -113,9 +124,9 @@ } }, "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "argparse": { @@ -127,54 +138,12 @@ "sprintf-js": "~1.0.2" } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, "bindings": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", @@ -203,18 +172,22 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -244,14 +217,42 @@ "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "code-point-at": { @@ -275,19 +276,10 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "concat-map": { @@ -308,34 +300,12 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "css2xpath": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/css2xpath/-/css2xpath-0.0.1.tgz", "integrity": "sha1-8QUC1kkzDWz/toK7IbO7VFVDw2U=", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -366,12 +336,6 @@ "object-keys": "^1.0.12" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -425,31 +389,12 @@ "domelementtype": "1" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", @@ -457,23 +402,47 @@ "dev": true }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -508,45 +477,6 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -557,31 +487,14 @@ } }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "dev": true, "requires": { "is-buffer": "~2.0.3" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, "fs-minipass": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", @@ -662,22 +575,15 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, "glob": { @@ -700,22 +606,6 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -725,6 +615,12 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -732,9 +628,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "has-unicode": { @@ -776,51 +672,58 @@ } }, "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, "requires": { - "agent-base": "4", - "debug": "3.1.0" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "2.1.2" } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", "dev": true, "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "iconv-lite": { @@ -863,28 +766,37 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", "dev": true }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-fullwidth-code-point": { @@ -893,36 +805,43 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "is-regex": { + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-number-object": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true + }, + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", "dev": true, "requires": { - "has": "^1.0.1" + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", "dev": true }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -935,12 +854,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -951,51 +864,6 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "libxmljs": { "version": "0.19.5", "resolved": "https://registry.npmjs.org/libxmljs/-/libxmljs-0.19.5.tgz", @@ -1029,9 +897,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "log-symbols": { "version": "2.2.0", @@ -1043,50 +911,9 @@ } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "minimatch": { @@ -1141,9 +968,9 @@ } }, "mocha": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.4.tgz", - "integrity": "sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", + "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -1158,7 +985,7 @@ "js-yaml": "3.13.1", "log-symbols": "2.2.0", "minimatch": "3.0.4", - "mkdirp": "0.5.1", + "mkdirp": "0.5.4", "ms": "2.1.1", "node-environment-flags": "1.0.5", "object.assign": "4.1.0", @@ -1166,9 +993,26 @@ "supports-color": "6.0.0", "which": "1.3.1", "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + } } }, "ms": { @@ -1210,12 +1054,6 @@ } } }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node-environment-flags": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", @@ -1283,15 +1121,6 @@ "npm-bundled": "^1.0.1" } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -1310,18 +1139,18 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-inspect": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", + "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", + "dev": true + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -1341,13 +1170,14 @@ } }, "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" } }, "once": { @@ -1365,17 +1195,6 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -1402,28 +1221,10 @@ "needle": "^1.6.0" } }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -1456,58 +1257,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, - "psl": { - "version": "1.1.32", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.32.tgz", - "integrity": "sha512-MHACAkHpihU/REGGPLj4sEfc/XKW2bheigvHO1dUqjaKigMp1C8+WLQYRGgeKFMsw5PMfegZcaN8IDXK/cD0+g==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", - "dev": true - }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -1531,34 +1286,6 @@ "util-deprecate": "^1.0.1" } }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1571,12 +1298,6 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -1616,21 +1337,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -1644,9 +1350,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1659,23 +1365,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1686,6 +1375,26 @@ "strip-ansi": "^4.0.0" } }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "string_decoder": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", @@ -1704,12 +1413,6 @@ "ansi-regex": "^3.0.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -1740,83 +1443,43 @@ "yallist": "^3.0.3" } }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, "ts-node": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz", - "integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==", + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", "dev": true, "requires": { "arg": "^4.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" + "source-map-support": "^0.5.17", + "yn": "3.1.1" }, "dependencies": { "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true } } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, "typescript": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz", - "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" } }, "util-deprecate": { @@ -1825,44 +1488,21 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "vscode": { - "version": "1.1.34", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.34.tgz", - "integrity": "sha512-GuT3tCT2N5Qp26VG4C+iGmWMgg/MuqtY5G5TSOT3U/X6pgjM9LFulJEeqpyf6gdzpI4VyU3ZN/lWPo54UFPuQg==", + "version": "1.1.37", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.37.tgz", + "integrity": "sha512-vJNj6IlN7IJPdMavlQa1KoFB3Ihn06q1AiN3ZFI/HfzPNzbKZWPPuiU+XkpNOfGU5k15m4r80nxNPlM7wcc0wg==", "dev": true, "requires": { "glob": "^7.1.2", - "mocha": "^4.0.1", - "request": "^2.88.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "mocha": "^5.2.0", "semver": "^5.4.1", "source-map-support": "^0.5.0", - "url-parse": "^1.4.4", "vscode-test": "^0.4.1" }, "dependencies": { - "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", - "dev": true - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -1872,24 +1512,6 @@ "ms": "2.0.0" } }, - "diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", - "dev": true - }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", - "dev": true - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", @@ -1897,21 +1519,22 @@ "dev": true }, "mocha": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", - "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", "dev": true, "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", + "browser-stdout": "1.3.1", + "commander": "2.15.1", "debug": "3.1.0", - "diff": "3.3.1", + "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", - "growl": "1.10.3", + "growl": "1.10.5", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "4.4.0" + "supports-color": "5.4.0" }, "dependencies": { "glob": { @@ -1937,12 +1560,12 @@ "dev": true }, "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -1955,6 +1578,52 @@ "requires": { "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.1" + }, + "dependencies": { + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "dev": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "which": { @@ -1966,6 +1635,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -1982,48 +1664,40 @@ } }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "dependencies": { "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^4.1.0" } } } @@ -2035,9 +1709,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yallist": { @@ -2047,22 +1721,21 @@ "dev": true }, "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "cliui": "^4.0.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" + "yargs-parser": "^13.1.2" }, "dependencies": { "ansi-regex": { @@ -2094,9 +1767,9 @@ } }, "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -2104,64 +1777,20 @@ } }, "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, "requires": { "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, - "dependencies": { - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "lodash": "^4.17.15", + "yargs": "^13.3.0" } }, "yn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", - "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true } } diff --git a/package.json b/package.json index e29f217..24dfaaf 100644 --- a/package.json +++ b/package.json @@ -41,17 +41,17 @@ "test": "node ./node_modules/vscode/bin/test" }, "dependencies": { - "lodash": "^4.17.11" + "lodash": "^4.17.21" }, "devDependencies": { - "@types/lodash": "^4.14.134", + "@types/lodash": "^4.14.168", "@types/mocha": "^5.2.7", - "@types/node": "^12.0.7", + "@types/node": "^12.20.10", "html-to-text": "^5.1.1", - "mocha": "^6.1.4", + "mocha": "^6.2.3", "osmosis": "^1.1.10", - "ts-node": "^8.2.0", - "typescript": "^3.5.1", - "vscode": "^1.1.34" + "ts-node": "^8.10.2", + "typescript": "^3.9.9", + "vscode": "^1.1.37" } } diff --git a/scraper/classes.ts b/scraper/classes.ts index d96eb7d..954eb6b 100644 --- a/scraper/classes.ts +++ b/scraper/classes.ts @@ -1,177 +1,184 @@ -import * as osmosis from "osmosis" -import * as fs from "fs" -import * as htmlToText from "html-to-text" -import * as _ from "lodash" +import * as osmosis from "osmosis"; +import * as fs from "fs"; +import * as htmlToText from "html-to-text"; +import * as _ from "lodash"; -import { splitFnRegex, arrayToObject, parseHtml } from "./utils" -import config from "./config" +import { splitFnRegex, arrayToObject, parseHtml } from "./utils"; +import config from "./config"; +import { FactorioType, FactorioTypeMap } from "../src/types"; -const { keys } = Object -const { isArray } = Array +const { keys } = Object; +const { isArray } = Array; -const URL = config.baseUrl + "/Classes.html" +const URL = config.baseUrl + "/Classes.html"; export const scrape = () => { - let classes: FactorioTypeMap = {} - - return new Promise((resolve, reject) => { - osmosis - .get(URL) - .find("body > div.brief-listing > div.brief-listing") - .set({ - name: "span.type-name > a", - type: "span.type-name > a", - inherits: ["div:contains('Inherited from')"] - }) - .then((context, data, next) => { - console.log("current: ", data.name) - classes[data.name] = data - next(context, {}) - }) - .fail("a:nth-child(2):contains('ControlBehavior')") - .select("span.type-name > a") - .follow("@href") - .find("body > div.brief-listing > div.brief-listing") + let classes: FactorioTypeMap = {}; + + return new Promise((resolve, reject) => { + osmosis + .get(URL) + .find("body > div.brief-listing > div.brief-listing") + .set({ + name: "span.type-name > a", + type: "span.type-name > a", + inherits: ["div:contains('Inherited from')"], + }) + .then((context, data, next) => { + console.log("current: ", data.name); + classes[data.name] = data; + next(context, {}); + }) + .fail("a:nth-child(2):contains('ControlBehavior')") + .select("span.type-name > a") + .follow("@href") + .find("body > div.brief-listing > div.brief-listing") + .set({ + name: "span.type-name", + properties: [ + osmosis.find("table.brief-members > tr").set({ + name: "span.element-name > a", + type: "span.param-type > a", + mode: "span.attribute-mode", + doc: "td.description:not(:empty)", + }), + ], + }) + .then((document, data, next) => { + _.merge(classes[data.name], data); + next(document.querySelector("#" + data.name), {}); + }) + .set({ + name: "node() !> div@id", // gets the id of parent div.element (!> is parent) + doc: "p:first", + properties: [ + osmosis + .find("div.element") .set({ - name: "span.type-name", - properties: [ - osmosis - .find("table.brief-members > tr") - .set({ - name: "span.element-name > a", - type: "span.param-type > a", - mode: "span.attribute-mode", - doc: "td.description:not(:empty)" - }) - ] - }) - .then((document, data, next) => { - _.merge(classes[data.name], data) - next(document.querySelector("#" + data.name), {}) - }) - .set({ - name: "node() !> div@id", // gets the id of parent div.element (!> is parent) - doc: "p:first", - properties: [ - osmosis - .find("div.element") - .set({ - name: "span.element-name", - type: "span.param-type:first", - returns: "span.return-type > span.param-type", - args: [ - osmosis - .find("div.element-content .detail-header:contains(Parameters) + .detail-content > div") - .set({ - name: "span.param-name", - // TODO: Missing types. e.g. LuaCircuitNetwork.get_signal(SignalID) - type: "span.param-type:first" - }) - .set("doc", (context) => { - return parseHtml(context.innerHTML) - }) - ] - }) - .select("div.element-content") - .set("doc", (context) => { - return parseHtml(context.innerHTML) - }) - ] - }) - .then((context, data, next) => { - const notString = (obj) => !_.isEmpty(obj) && typeof obj !== "string" - - data.properties = data.properties.filter(notString) - - data.properties.forEach((prop) => { - if (_.isEmpty(prop.doc)) { - delete prop.doc - } - - // Check if this is a function - if (splitFnRegex.test(prop.name)) { - let [__, fnName] = prop.name.match(splitFnRegex) - prop.name = fnName - prop.type = "function" - } - - if (!_.isArray(prop.args)) { - prop.args = [prop.args] - } - - prop.args = _(prop.args) - .filter(notString) - .each((arg) => { - if (!arg.type) { - arg.type = arg.name - } - }) - - if (prop.args.length === 0) { - delete prop.args - } - }) - - _.merge(classes[data.name], data) - - next(context, {}) + name: "span.element-name", + type: "span.param-type:first", + returns: "span.return-type > span.param-type", + args: [ + osmosis + .find( + "div.element-content .detail-header:contains(Parameters) + .detail-content > div" + ) + .set({ + name: "span.param-name", + // TODO: Missing types. e.g. LuaCircuitNetwork.get_signal(SignalID) + type: "span.param-type:first", + }) + .set("doc", (context) => { + return parseHtml(context.innerHTML); + }), + ], }) - .log((msg) => { - if (/follow|find/.test(msg)) return - console.log(msg) - }) - .error(console.log) - //.debug(console.log) - .done(() => { - _.forOwn(classes, (type, key) => { - _.forEach(type.properties, (prop: FactorioType) => { - if (prop.args) { - prop.args = arrayToObject(prop.args as any) - } - }) - - if (type.inherits.length) { - handleInheritance(type, classes) - } - - type.properties = arrayToObject(type.properties as any) - - // comment for debugging - // delete type.inherits - }) - - // Sort classes by key - classes = _(classes).toPairs().sortBy(0).fromPairs().value() - console.log(`done: ${Object.keys(classes).length} classes`) - resolve(classes) - }) - }) -} - -const handleInheritance = (type, typeMap) => { - // Merge properties from parent classes - type.inherits.reduce((type, inheritStr: string) => { - let [__, fromStr, propsStr] = inheritStr.match(/Inherited from (\w+): (.*)/) - const from = typeMap[fromStr] - - if (!from) { - console.error(`${type.name} inherits from ${from}, but ${from} doesn't exit!`) - return type - } + .select("div.element-content") + .set("doc", (context) => { + return parseHtml(context.innerHTML); + }), + ], + }) + .then((context, data, next) => { + const notString = (obj) => !_.isEmpty(obj) && typeof obj !== "string"; + + data.properties = data.properties.filter(notString); + + data.properties.forEach((prop) => { + if (_.isEmpty(prop.doc)) { + delete prop.doc; + } + + // Check if this is a function + if (splitFnRegex.test(prop.name)) { + let [__, fnName] = prop.name.match(splitFnRegex); + prop.name = fnName; + prop.type = "function"; + } + + if (!_.isArray(prop.args)) { + prop.args = [prop.args]; + } + + prop.args = _(prop.args) + .filter(notString) + .each((arg) => { + if (!arg.type) { + arg.type = arg.name; + } + }); + + if (prop.args.length === 0) { + delete prop.args; + } + }); + + _.merge(classes[data.name], data); + + next(context, {}); + }) + .log((msg) => { + if (/follow|find/.test(msg)) return; + console.log(msg); + }) + .error(console.log) + //.debug(console.log) + .done(() => { + _.forOwn(classes, (type, key) => { + // @ts-ignore + type.properties = type.properties || []; + _.forEach(type.properties, (prop: FactorioType) => { + if (prop.args) { + prop.args = arrayToObject(prop.args as any); + } + }); - let propsStrArr = propsStr.split(", ") + if (type.inherits.length) { + handleInheritance(type, classes); + } - propsStrArr.forEach((propStr) => { - let fromProp = from.properties[propStr] + type.properties = arrayToObject(type.properties as any); - if (!fromProp) { - console.error(`${from.name} has no property ${propStr}`) - return - } + // comment for debugging + // delete type.inherits + }); - type.properties.push(fromProp) - }) + // Sort classes by key + classes = _(classes).toPairs().sortBy(0).fromPairs().value(); + console.log(`done: ${Object.keys(classes).length} classes`); + resolve(classes); + }); + }); +}; - return type - }, type) -} +const handleInheritance = (type, typeMap) => { + // Merge properties from parent classes + type.inherits.reduce((type, inheritStr: string) => { + let [__, fromStr, propsStr] = inheritStr.match( + /Inherited from (\w+): (.*)/ + ); + const from = typeMap[fromStr]; + + if (!from) { + console.error( + `${type.name} inherits from ${from}, but ${from} doesn't exit!` + ); + return type; + } + + let propsStrArr = propsStr.split(", "); + + propsStrArr.forEach((propStr) => { + let fromProp = from.properties[propStr]; + + if (!fromProp) { + console.error(`${from.name} has no property ${propStr}`); + return; + } + + type.properties.push(fromProp); + }); + + return type; + }, type); +}; diff --git a/scraper/defines.ts b/scraper/defines.ts index 2ca2958..136c170 100644 --- a/scraper/defines.ts +++ b/scraper/defines.ts @@ -1,95 +1,97 @@ -import * as osmosis from "osmosis" -import * as fs from "fs" -import * as htmlToText from "html-to-text" -import * as _ from "lodash" +import * as osmosis from "osmosis"; +import * as fs from "fs"; +import * as htmlToText from "html-to-text"; +import * as _ from "lodash"; -import { getRegexMatches, parseHtml } from "./utils" -import config from "./config" -const { keys, assign } = Object +import { getRegexMatches, parseHtml } from "./utils"; +import config from "./config"; +import { FactorioType, FactorioTypeMap } from "../src/types"; +const { keys, assign } = Object; -const DEFINES_URL = config.baseUrl + "/defines.html" -const EVENTS_URL = config.baseUrl + "/events.html" +const DEFINES_URL = config.baseUrl + "/defines.html"; +const EVENTS_URL = config.baseUrl + "/events.html"; export const scrape = () => { - const definesPromise = new Promise((resolve, reject) => { - const defines: FactorioTypeMap = {} + const definesPromise = new Promise((resolve, reject) => { + const defines: FactorioTypeMap = {}; - osmosis - .get(DEFINES_URL) - .find("div.element table.brief-members tr") - .set("name", "td.header") - .select("td.description") - .set("doc", (context) => { - let { innerHTML } = context - if (!innerHTML || innerHTML.trim() === "") return - return htmlToText.fromString(innerHTML, config.htmlToText) - }) - .data((defineData: FactorioType, next) => { - let words = defineData.name.split(".") - words.shift() // remove "defines" word + osmosis + .get(DEFINES_URL) + .find("div.element table.brief-members tr") + .set("name", "td.header") + .select("td.description") + .set("doc", (context) => { + let { innerHTML } = context; + if (!innerHTML || innerHTML.trim() === "") return; + return htmlToText.fromString(innerHTML, config.htmlToText); + }) + .data((defineData: FactorioType, next) => { + let words = defineData.name.split("."); + words.shift(); // remove "defines" word - const tree: FactorioTypeMap = {} - let define = words.reduce((result: FactorioType | FactorioTypeMap, word, i) => { - let notLast = i < (words.length - 1) - let curr: FactorioType = { type: "define" } - result[word] = curr + const tree: FactorioTypeMap = {}; + let define = words.reduce( + (result: FactorioType | FactorioTypeMap, word, i) => { + let notLast = i < words.length - 1; + let curr: FactorioType = { type: "define" }; + result[word] = curr; - if (notLast) { - if (!curr.properties) { - curr.properties = {} - } - return result[word].properties - } - return curr - }, tree) + if (notLast) { + if (!curr.properties) { + curr.properties = {}; + } + return result[word].properties; + } + return curr; + }, + tree + ); - _.merge(define, defineData) - _.merge(defines, tree) - }) - .done(() => { - console.log(`done: ${keys(defines).length} defines parsed`) - resolve(defines) - }) - }) + _.merge(define, defineData); + _.merge(defines, tree); + }) + .done(() => { + console.log(`done: ${keys(defines).length} defines parsed`); + resolve(defines); + }); + }); - const eventsPromise = new Promise((resolve, reject) => { - let events: FactorioType[] = [] + const eventsPromise = new Promise((resolve, reject) => { + let events: FactorioType[] = []; - osmosis - .get(EVENTS_URL) - .find("div.element") - .set("name", "div.element-header") - .select("div.element-content") - .set("doc", (context) => { - return parseHtml(context.innerHTML) - }) - .data((data) => { - data.type = "event" - events.push(data) - }) - .log(console.log) - .error(console.log) - //.debug(console.log) - .done(() => { - console.log(`done: ${keys(events).length} events parsed`) - resolve(events) - }) - }) + osmosis + .get(EVENTS_URL) + .find("div.element") + .set("name", "div.element-header") + .select("div.element-content") + .set("doc", (context) => { + return parseHtml(context.innerHTML); + }) + .data((data) => { + data.type = "event"; + events.push(data); + }) + .log(console.log) + .error(console.log) + //.debug(console.log) + .done(() => { + console.log(`done: ${keys(events).length} events parsed`); + resolve(events); + }); + }); - return new Promise((resolve, reject) => { - Promise - .all([definesPromise, eventsPromise]) - .then(([defines, events]) => { - // First event is the parent of all events - const parentEvent = events.shift() - events.forEach(event => { - event = _.merge({}, parentEvent, event) - if (defines.events.properties[event.name]) { - defines.events.properties[event.name] = event - } - }) + return new Promise((resolve, reject) => { + Promise.all([definesPromise, eventsPromise]).then(([defines, events]) => { + // First event is the parent of all events + const parentEvent = events.shift(); + events.forEach((event) => { + event = _.merge({}, parentEvent, event); + if (defines.events.properties[event.name]) { + defines.events.properties[event.name] = event; + } + }); - resolve(defines) - }) - }) -} + resolve(defines); + }); + }); +}; diff --git a/scraper/utils.ts b/scraper/utils.ts index 357272b..1a710eb 100644 --- a/scraper/utils.ts +++ b/scraper/utils.ts @@ -1,95 +1,101 @@ -import * as fs from "fs" +import * as fs from "fs"; /** * Extracts a function from a string and splits it into two parts: * - function name * - parameters - * + * * Example: - * + * * "set_tiles(tiles, correct_tiles)".match(...) * => [__, "set_tiles", "tiles, correct_tiles"] */ -export const splitFnRegex = /(\S+)(?:\(|\{)(.*)(?:\}|\))/ +export const splitFnRegex = /(\S+)(?:\(|\{)(.*)(?:\}|\))/; -export const wordsRegex = /([\w\[\]]+\.[\w\[\]\.]+)+/g +export const wordsRegex = /([\w\[\]]+\.[\w\[\]\.]+)+/g; export const writeJson = (fileName, obj) => { - return new Promise((resolve, reject) => { - fs.writeFile(fileName, JSON.stringify(obj, null, 2), "utf8", err => { - if (err) return reject(err) - console.log(`writeJson: "${fileName}" success`) - resolve() - }) - }) -} + return new Promise((resolve, reject) => { + fs.writeFile(fileName, JSON.stringify(obj, null, 2), "utf8", (err) => { + if (err) return reject(err); + console.log(`writeJson: "${fileName}" success`); + resolve(undefined); + }); + }); +}; export const arrayToObject = (array: any[]) => { - return array - .sort((a, b) => a.name.localeCompare(b.name)) - .reduce((obj, item) => { - let { name } = item - // if it's a function, get rid of the params (??? check again later, needs improvements) - if (exports.splitFnRegex.test(name)) { - name = item.name.match(exports.splitFnRegex)[1] - } - obj[name] = item - return obj - }, {}) -} + return array + .sort((a, b) => a.name.localeCompare(b.name)) + .reduce((obj, item) => { + let { name } = item; + // if it's a function, get rid of the params (??? check again later, needs improvements) + if (exports.splitFnRegex.test(name)) { + name = item.name.match(exports.splitFnRegex)[1]; + } + obj[name] = item; + return obj; + }, {}); +}; export const getRegexMatches = (regex, str) => { - let match = null, matches = [] - while ((match = regex.exec(str)) !== null) { - matches.push(match[0]) - } - return matches -} + let match = null, + matches = []; + while ((match = regex.exec(str)) !== null) { + matches.push(match[0]); + } + return matches; +}; export const getLastMatch = (regex, str) => { - return getRegexMatches(regex, str).slice(-1).pop() -} + return getRegexMatches(regex, str).slice(-1).pop(); +}; // /<\/?(tag)[^><]*>/g -const tagsRegex = (tag) => new RegExp("<\\/?(" + tag + ")[^><]*>", "g") -const latestUrl = "http://lua-api.factorio.com/latest/" +const tagsRegex = (tag) => new RegExp("<\\/?(" + tag + ")[^><]*>", "g"); +const latestUrl = "http://lua-api.factorio.com/latest/"; // This whole function is complete bullshit, but it works much better than htmlToText or pandoc. // Very fragile, much regex. I pray I won't have to touch this anytime soon again. // At least some unit tests would be good though... export const parseHtml = (htmlStr) => { - return htmlStr - .replace(tagsRegex("span|ul|p"), "") - .replace(tagsRegex("div|br|li"), "\n\n") - // .replace(tagsRegex("li"), "\n\n") - .replace(tagsRegex("strong"), "**") - .replace(tagsRegex("em"), "_") - .replace(tagsRegex("code"), "````\n") - // Make some markdown links - .replace(/([\w\s\.:]*)<\/a>/g, "[$2]("+latestUrl+"$1)") + return ( + htmlStr + .replace(tagsRegex("span|ul|p"), "") + .replace(tagsRegex("div|br|li"), "\n\n") + // .replace(tagsRegex("li"), "\n\n") + .replace(tagsRegex("strong"), "**") + .replace(tagsRegex("em"), "_") + .replace(tagsRegex("code"), "````\n") + // Make some markdown links + .replace( + /([\w\s\.:]*)<\/a>/g, + "[$2](" + latestUrl + "$1)" + ) - // And now let's try to clean up all those broken newlines and whitespaces... - // Very fun - // Replace multiple whitespaces with one - .replace(/[ ]+/g, " ") - // Prepend two spaces before single line breaks (so markdown renders a single line break correctly) - .replace(/[^`].(\n)./g, " \n") - // Replace multiple newlines with a single markdown-style newline - .replace(/\n\s*\n/g, " \n") - // Remove spaces after new lines (affects some code blocks) - .replace(/\n /g, "\n") - // Replace unnecessary new lines between words - .replace(/\w\n\w/g, "") + // And now let's try to clean up all those broken newlines and whitespaces... + // Very fun + // Replace multiple whitespaces with one + .replace(/[ ]+/g, " ") + // Prepend two spaces before single line breaks (so markdown renders a single line break correctly) + .replace(/[^`].(\n)./g, " \n") + // Replace multiple newlines with a single markdown-style newline + .replace(/\n\s*\n/g, " \n") + // Remove spaces after new lines (affects some code blocks) + .replace(/\n /g, "\n") + // Replace unnecessary new lines between words + .replace(/\w\n\w/g, "") - // Wrap some stuff with newlines for a nicer look - .replace(/\n*(Parameters)[\n\s]*/g, "\n\n**$1** \n") - .replace(/\n*(Return value)[\n\s]*/g, "\n\n**$1** \n") - .replace(/\n*(Example)[\n\s]/g, "\n\n**$1** ") - .replace(/\n*(Contains)[\n\s]/g, "\n\n**$1** ") - .replace(/\n*(\*\*Note:)/g, "\n\n$1") + // Wrap some stuff with newlines for a nicer look + .replace(/\n*(Parameters)[\n\s]*/g, "\n\n**$1** \n") + .replace(/\n*(Return value)[\n\s]*/g, "\n\n**$1** \n") + .replace(/\n*(Example)[\n\s]/g, "\n\n**$1** ") + .replace(/\n*(Contains)[\n\s]/g, "\n\n**$1** ") + .replace(/\n*(\*\*Note:)/g, "\n\n$1") - // Replace newlines at the beginning - .replace(/^[\s\n]+/, "") - // Replace newlines at the end - .replace(/[\s\n]+$/, "") -} + // Replace newlines at the beginning + .replace(/^[\s\n]+/, "") + // Replace newlines at the end + .replace(/[\s\n]+$/, "") + ); +}; diff --git a/src/FactorioApiData.ts b/src/FactorioApiData.ts index c4932ba..4a21a47 100644 --- a/src/FactorioApiData.ts +++ b/src/FactorioApiData.ts @@ -1,115 +1,115 @@ -import * as fs from"fs" -import * as _ from "lodash" +import * as fs from "fs"; +import * as _ from "lodash"; +import { FactorioType, FactorioTypeMap } from "./types"; -const brackets = /\[.*\]/g +const brackets = /\[.*\]/g; const additionalTriggers = { - game: "LuaGameScript", - script: "LuaBootstrap", - remote: "LuaRemote", - commands: "LuaCommandProcessor", - player: "LuaPlayer", - entity: "LuaEntity", - inventory: "LuaInventory", - gui: "LuaGui", - force: "LuaForce", - style: "LuaStyle", - tile: "LuaTile", -} + game: "LuaGameScript", + script: "LuaBootstrap", + remote: "LuaRemote", + commands: "LuaCommandProcessor", + player: "LuaPlayer", + entity: "LuaEntity", + inventory: "LuaInventory", + gui: "LuaGui", + force: "LuaForce", + style: "LuaStyle", + tile: "LuaTile", +}; export default class FactorioApiData { + private classes: FactorioTypeMap; + private defines: FactorioTypeMap; - private classes: FactorioTypeMap - private defines: FactorioTypeMap + constructor(private dataPath: string) { + this.loadData(dataPath); + } - constructor(private dataPath: string) { - this.loadData(dataPath) + public findType(words: string[]): FactorioType { + if (words.length === 0) { + return { properties: this.classes }; } - public findType(words: string[]): FactorioType { - if (words.length === 0) { - return { properties: this.classes } - } - - // Clean up path by removing array/dict access brackets (players[0] => players) - words = words.map(p => p.replace(brackets, "")) - - let type = this.classes[words.shift()] - - if (!type) { - return null - } + // Clean up path by removing array/dict access brackets (players[0] => players) + words = words.map((p) => p.replace(brackets, "")); - if (!type.properties || words.length === 0) { - return type - } + let type = this.classes[words.shift()]; - let props = type.properties + if (!type) { + return null; + } - for (let i = 0; i < words.length; i++) { - type = props[words[i]] + if (!type.properties || words.length === 0) { + return type; + } - // Not found - if (!type) return null + let props = type.properties; - // First try traverse it's own properties - if (type.properties) { - props = type.properties - continue - } + for (let i = 0; i < words.length; i++) { + type = props[words[i]]; - // Then the complete type list - let parentType = type.type + // Not found + if (!type) return null; - // Special handling for defines - if (/defines/.test(parentType)) { - let [__, defineName] = parentType.split(".") - //let define = this.defines[defineName] - return _.get(this.defines, [defineName, "properties"]) - // return defineName && this.defines[defineName] || null - } + // First try traverse it's own properties + if (type.properties) { + props = type.properties; + continue; + } - type = this.classes[parentType] + // Then the complete type list + let parentType = type.type; - if (type && type.properties) { - props = type.properties - continue - } - } + // Special handling for defines + if (/defines/.test(parentType)) { + let [__, defineName] = parentType.split("."); + //let define = this.defines[defineName] + return _.get(this.defines, [defineName, "properties"]); + // return defineName && this.defines[defineName] || null + } - return type - } + type = this.classes[parentType]; - private loadData(dataPath: string) { - const classes = this.loadDataFile(dataPath + "/classes.json") - const defines = this.loadDataFile(dataPath + "/defines.json") - - // Add some additional autocomplete triggers (when typing on blank line or pressing ctrl-space) - Object.keys(additionalTriggers).forEach(trigger => { - let luaType = additionalTriggers[trigger] - if (luaType in classes) { - classes[trigger] = classes[luaType] - } - }) - - // LuaPlayer and LuaEntity inherit from LuaControl - // Instead of doing this manually it would be best to adjust the scraper to read the "extends" keyword - // in the docs and do this automatically. - // Object.assign(classes.LuaPlayer.properties, classes.LuaControl.properties) - // Object.assign(classes.LuaEntity.properties, classes.LuaControl.properties) - - this.classes = classes - this.defines = defines - // todo: revisit this - this.classes.defines = { - type: "define", - properties: defines - } + if (type && type.properties) { + props = type.properties; + continue; + } } - private loadDataFile(fileName: string): FactorioTypeMap { - const jsonStr = fs.readFileSync(fileName, "utf8") - const data = JSON.parse(jsonStr) - return data - } + return type; + } + + private loadData(dataPath: string) { + const classes = this.loadDataFile(dataPath + "/classes.json"); + const defines = this.loadDataFile(dataPath + "/defines.json"); + + // Add some additional autocomplete triggers (when typing on blank line or pressing ctrl-space) + Object.keys(additionalTriggers).forEach((trigger) => { + let luaType = additionalTriggers[trigger]; + if (luaType in classes) { + classes[trigger] = classes[luaType]; + } + }); + + // LuaPlayer and LuaEntity inherit from LuaControl + // Instead of doing this manually it would be best to adjust the scraper to read the "extends" keyword + // in the docs and do this automatically. + // Object.assign(classes.LuaPlayer.properties, classes.LuaControl.properties) + // Object.assign(classes.LuaEntity.properties, classes.LuaControl.properties) + + this.classes = classes; + this.defines = defines; + // todo: revisit this + this.classes.defines = { + type: "define", + properties: defines, + }; + } + + private loadDataFile(fileName: string): FactorioTypeMap { + const jsonStr = fs.readFileSync(fileName, "utf8"); + const data = JSON.parse(jsonStr); + return data; + } } diff --git a/src/FactorioAutocomplete.ts b/src/FactorioAutocomplete.ts index 7ebf364..f518c3a 100644 --- a/src/FactorioAutocomplete.ts +++ b/src/FactorioAutocomplete.ts @@ -1,60 +1,72 @@ -"use strict" +"use strict"; -import vscode = require('vscode') -import FactorioApiData from "./FactorioApiData" -import { getLastMatch, keys, assign } from "./utils" +import vscode = require("vscode"); +import FactorioApiData from "./FactorioApiData"; +import { FactorioType, FactorioTypeMap } from "./types"; +import { getLastMatch, keys, assign } from "./utils"; -const wordsRegex = /([\w\[\]]+\.[\w\[\]\.]*)/g +const wordsRegex = /([\w\[\]]+\.[\w\[\]\.]*)/g; export class FactorioAutocomplete implements vscode.CompletionItemProvider { - constructor(private apiData: FactorioApiData) { } + constructor(private apiData: FactorioApiData) {} - public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { - return new Promise((resolve, reject) => { - let lineText = document.lineAt(position.line).text - let lineTillCurrentPosition = lineText.substr(0, position.character) + public provideCompletionItems( + document: vscode.TextDocument, + position: vscode.Position, + token: vscode.CancellationToken + ): Thenable { + return new Promise((resolve, reject) => { + let lineText = document.lineAt(position.line).text; + let lineTillCurrentPosition = lineText.substr(0, position.character); - let match = getLastMatch(wordsRegex, lineTillCurrentPosition) - let line = match ? match[1] : "" + let match = getLastMatch(wordsRegex, lineTillCurrentPosition); + let line = match ? match[1] : ""; - let words = line.split(".") - words.pop() + let words = line.split("."); + words.pop(); - let type = this.apiData.findType(words) + let type = this.apiData.findType(words); - if (!type || !type.properties) { - return reject() - } + if (!type || !type.properties) { + return reject(); + } - let suggestions = this.toCompletionItems(type.properties) - return resolve(suggestions) - }) - } + let suggestions = this.toCompletionItems(type.properties); + return resolve(suggestions); + }); + } - private toCompletionItems(types: FactorioTypeMap): vscode.CompletionItem[] { - return keys(types).map(key => this.toCompletionItem(types[key], key)) - } + private toCompletionItems(types: FactorioTypeMap): vscode.CompletionItem[] { + return keys(types).map((key) => + this.toCompletionItem(types[key], key) + ); + } + + private toCompletionItem( + type: FactorioType, + key: string + ): vscode.CompletionItem { + const { doc, name, mode } = type; - private toCompletionItem(type: FactorioType, key: string): vscode.CompletionItem { - const { doc, name, mode } = type - - let completionItem = assign(new vscode.CompletionItem(key), { - detail: type.type, - documentation: new vscode.MarkdownString([doc, mode].filter(Boolean).join("\n\n")), - kind: vscode.CompletionItemKind.Property - }) - - if (type.type === "function") { - assign(completionItem, { - detail: name, - kind: vscode.CompletionItemKind.Function - }) - } else if (type.type === "define") { - assign(completionItem, { - kind: vscode.CompletionItemKind.Constant - }) - } - - return completionItem + let completionItem = assign(new vscode.CompletionItem(key), { + detail: type.type, + documentation: new vscode.MarkdownString( + [doc, mode].filter(Boolean).join("\n\n") + ), + kind: vscode.CompletionItemKind.Property, + }); + + if (type.type === "function") { + assign(completionItem, { + detail: name, + kind: vscode.CompletionItemKind.Function, + }); + } else if (type.type === "define") { + assign(completionItem, { + kind: vscode.CompletionItemKind.Constant, + }); } + + return completionItem; + } } diff --git a/src/types.d.ts b/src/types.d.ts deleted file mode 100644 index 54cb6b7..0000000 --- a/src/types.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -interface FactorioTypeMap { - [prop: string]: FactorioType -} - -interface FactorioType { - type?: string - name?: string - doc?: string - mode?: string - properties?: FactorioTypeMap - args?: FactorioTypeMap - returns?: string - inherits?: string[] -} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..0949b33 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,14 @@ +export interface FactorioTypeMap { + [prop: string]: FactorioType; +} + +export interface FactorioType { + type?: string; + name?: string; + doc?: string; + mode?: string; + properties?: FactorioTypeMap; + args?: FactorioTypeMap; + returns?: string; + inherits?: string[]; +} diff --git a/src/utils.ts b/src/utils.ts index d7b26c3..779bb02 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,26 +1,34 @@ -export const { isArray } = Array -export const { assign, keys } = Object +export const { isArray } = Array; +export const { assign, keys } = Object; -export const getMatches = (regex: RegExp, str: string) : string[] => { - let match = null, matches = [] - while ((match = regex.exec(str)) !== null) { - matches.push(match) - } - return matches -} +export const getMatches = (regex: RegExp, str: string): string[] => { + let match = null, + matches = []; + while ((match = regex.exec(str)) !== null) { + matches.push(match); + } + return matches; +}; -export const getLastMatch = (regex: RegExp, str: string) : string => { - return getMatches(regex, str).slice(-1).pop() -} +export const getLastMatch = (regex: RegExp, str: string): string => { + return getMatches(regex, str).slice(-1).pop(); +}; -export const each = (data: any[] | {}, callback: (value: any, key: string | number) => any) =>{ - isArray(data) ? - data.forEach(callback) : - keys(data).forEach(k => callback(data[k], k)) -} +export const each = ( + data: any[] | {}, + callback: (value: any, key: string | number) => any +) => { + isArray(data) + ? data.forEach(callback) + : keys(data).forEach((k) => callback(data[k], k)); +}; -export const reduce = (data: any[] | {}, callback: (prev: any, curr: any, key: string | number) => any, initial?: any): any => { - return isArray(data) ? - data.reduce(callback, initial) : - keys(data).reduce((prev, key) => callback(prev, data[key], key), initial) -} +export const reduce = ( + data: any[] | {}, + callback: (prev: any, curr: any, key: string | number) => any, + initial?: any +): any => { + return isArray(data) + ? data.reduce(callback, initial) + : keys(data).reduce((prev, key) => callback(prev, data[key], key), initial); +};