mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-05 23:15:56 -06:00
prep for reorganization
This commit is contained in:
51
.vscode/factorio/runtime-api-LuaAISettings.lua
vendored
51
.vscode/factorio/runtime-api-LuaAISettings.lua
vendored
@@ -1,51 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaAISettings
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Collection of settings for overriding default ai behavior.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html)
|
||||
---@class LuaAISettings:LuaObject
|
||||
---[RW]
|
||||
---If enabled, units that repeatedly fail to succeed at commands will be destroyed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.allow_destroy_when_commands_fail)
|
||||
---@field allow_destroy_when_commands_fail boolean
|
||||
---[RW]
|
||||
---If enabled, units that have nothing else to do will attempt to return to a spawner.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.allow_try_return_to_spawner)
|
||||
---@field allow_try_return_to_spawner boolean
|
||||
---[RW]
|
||||
---If enabled, units will try to separate themselves from nearby friendly units.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.do_separation)
|
||||
---@field do_separation boolean
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---The pathing resolution modifier, must be between -8 and 8.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.path_resolution_modifier)
|
||||
---@field path_resolution_modifier int8
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.valid)
|
||||
---@field valid boolean
|
||||
local LuaAISettings={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAISettings.html#LuaAISettings.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaAccumulatorControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for accumulators.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html)
|
||||
---@class LuaAccumulatorControlBehavior:LuaControlBehavior
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html#LuaAccumulatorControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html#LuaAccumulatorControlBehavior.output_signal)
|
||||
---@field output_signal SignalID
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html#LuaAccumulatorControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaAccumulatorControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html#LuaAccumulatorControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaAchievementPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a achievement.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html)
|
||||
---@class LuaAchievementPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.allowed_without_fight)
|
||||
---@field allowed_without_fight boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaAchievementPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaAmmoCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a ammo category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html)
|
||||
---@class LuaAmmoCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.bonus_gui_order)
|
||||
---@field bonus_gui_order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaAmmoCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaArithmeticCombinatorControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for arithmetic combinators.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html)
|
||||
---@class LuaArithmeticCombinatorControlBehavior:LuaCombinatorControlBehavior
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---This arithmetic combinator's parameters.
|
||||
---
|
||||
---**Note:** Writing `nil` clears the combinator's parameters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.parameters)
|
||||
---@field parameters ArithmeticCombinatorParameters
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaArithmeticCombinatorControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaAutoplaceControlPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an autoplace control.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html)
|
||||
---@class LuaAutoplaceControlPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.can_be_disabled)
|
||||
---@field can_be_disabled boolean
|
||||
---[R]
|
||||
---Category name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.category)
|
||||
---@field category string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.control_order)
|
||||
---@field control_order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.richness)
|
||||
---@field richness boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaAutoplaceControlPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
372
.vscode/factorio/runtime-api-LuaBootstrap.lua
vendored
372
.vscode/factorio/runtime-api-LuaBootstrap.lua
vendored
@@ -1,372 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaBootstrap
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---**Global Description:**
|
||||
---Provides an interface for registering event handlers.
|
||||
---
|
||||
---**Class Description:**
|
||||
---Entry point for registering event handlers. It is accessible through the global object named `script`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html)
|
||||
---@class LuaBootstrap:LuaObject
|
||||
---[R]
|
||||
---A dictionary listing the names of all currently active mods and mapping them to their version.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.active_mods)
|
||||
---
|
||||
---### Example
|
||||
---This will print the names and versions of all active mods to the console.
|
||||
---```
|
||||
---for name, version in pairs(script.active_mods) do
|
||||
--- game.print(name .. " version " .. version)
|
||||
---end
|
||||
---```
|
||||
---@field active_mods {[string]: string}
|
||||
---[R]
|
||||
---Information about the currently running scenario/campaign/tutorial.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level)
|
||||
---@field level LuaBootstrap.level
|
||||
---[R]
|
||||
---The name of the mod from the environment this is used in.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.mod_name)
|
||||
---@field mod_name string
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.object_name)
|
||||
---@field object_name string
|
||||
script={
|
||||
---Generate a new, unique event ID that can be used to raise custom events with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.generate_event_name)
|
||||
---@return uint@The newly generated event ID.
|
||||
generate_event_name=function()end,
|
||||
---Gets the filters for the given event.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.get_event_filter)
|
||||
---@param event uint@ID of the event to get.
|
||||
---@return EventFilter?@The filters or `nil` if none are defined.
|
||||
get_event_filter=function(event)end,
|
||||
---Find the event handler for an event.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.get_event_handler)
|
||||
---@param event uint@The event identifier to get a handler for.
|
||||
---@return fun(param1:EventData)?@Reference to the function currently registered as the handler, if it was found.
|
||||
get_event_handler=function(event)end,
|
||||
---Gets the mod event order as a string.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.get_event_order)
|
||||
---@return string
|
||||
get_event_order=function()end,
|
||||
---Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its table or to the game state through [LuaGameScript](https://lua-api.factorio.com/latest/LuaGameScript.html).
|
||||
---
|
||||
---**Note:** For more context, refer to the page.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed)
|
||||
---@param handler fun(param1:ConfigurationChangedData)|nil@The handler for this event. Passing `nil` will unregister it.
|
||||
on_configuration_changed=function(handler)end,
|
||||
---Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_event)
|
||||
---
|
||||
---### Example
|
||||
---Register for the [on_tick](https://lua-api.factorio.com/latest/events.html#on_tick) event to print the current tick to console each tick.
|
||||
---```
|
||||
---script.on_event(defines.events.on_tick,
|
||||
---function(event) game.print(event.tick) end)
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---Register for the [on_built_entity](https://lua-api.factorio.com/latest/events.html#on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
||||
---```
|
||||
---script.on_event(defines.events.on_built_entity,
|
||||
---function(event) game.print("Gotta go fast!") end,
|
||||
---{{filter = "name", name = "fast-inserter"}})
|
||||
---```
|
||||
---@param event defines.events|defines.events[]|string@The event(s) or custom-input to invoke the handler on.
|
||||
---@param handler fun(param1:EventData)|nil@The handler for this event. Passing `nil` will unregister it.
|
||||
---@param filters EventFilter?@The filters for this event. Can only be used when registering for individual events.
|
||||
on_event=function(event,handler,filters)end,
|
||||
---Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to [LuaGameScript](https://lua-api.factorio.com/latest/LuaGameScript.html) and the table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
|
||||
---
|
||||
---**Note:** For more context, refer to the page.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init)
|
||||
---
|
||||
---### Example
|
||||
---Initialize a `players` table in `global` for later use.
|
||||
---```
|
||||
---script.on_init(function()
|
||||
--- global.players = {}
|
||||
---end)
|
||||
---```
|
||||
---@param handler fun()|nil@The handler for this event. Passing `nil` will unregister it.
|
||||
on_init=function(handler)end,
|
||||
---Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to [LuaGameScript](https://lua-api.factorio.com/latest/LuaGameScript.html) is not available. The table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
|
||||
---
|
||||
---The only legitimate uses of this event are the following:
|
||||
---- Re-setup [metatables](https://www.lua.org/pil/13.html) as they are not persisted through the save/load cycle.
|
||||
---- Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
|
||||
---- Create local references to data stored in the table.
|
||||
---
|
||||
---For all other purposes, [LuaBootstrap::on_init](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init), [LuaBootstrap::on_configuration_changed](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed) or should be used instead.
|
||||
---
|
||||
---**Note:** For more context, refer to the page.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_load)
|
||||
---@param handler fun()|nil@The handler for this event. Passing `nil` will unregister it.
|
||||
on_load=function(handler)end,
|
||||
---Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_nth_tick)
|
||||
---@param tick uint|uint[]|nil@The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
||||
---@param handler fun(param1:NthTickEventData)|nil@The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
||||
on_nth_tick=function(tick,handler)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_biter_base_built)
|
||||
---@class LuaBootstrap.raise_biter_base_built_param
|
||||
---The entity that was built.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_biter_base_built)
|
||||
---@field entity LuaEntity
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [on_biter_base_built](https://lua-api.factorio.com/latest/events.html#on_biter_base_built) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_biter_base_built)
|
||||
---@param param LuaBootstrap.raise_biter_base_built_param
|
||||
raise_biter_base_built=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat)
|
||||
---@class LuaBootstrap.raise_console_chat_param
|
||||
---The player doing the chatting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat)
|
||||
---@field player_index uint
|
||||
---The chat message to send.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat)
|
||||
---@field message string
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [on_console_chat](https://lua-api.factorio.com/latest/events.html#on_console_chat) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat)
|
||||
---@param param LuaBootstrap.raise_console_chat_param
|
||||
raise_console_chat=function(param)end,
|
||||
---Raise an event. Only events generated with [LuaBootstrap::generate_event_name](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.generate_event_name) and the following can be raised:
|
||||
---
|
||||
---- [on_console_chat](https://lua-api.factorio.com/latest/events.html#on_console_chat)
|
||||
---- [on_player_crafted_item](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
|
||||
---- [on_player_fast_transferred](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
|
||||
---- [on_biter_base_built](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
|
||||
---- [on_market_item_purchased](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
|
||||
---- [script_raised_built](https://lua-api.factorio.com/latest/events.html#script_raised_built)
|
||||
---- [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
|
||||
---- [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
|
||||
---- [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event)
|
||||
---
|
||||
---### Example
|
||||
---Raise the [on_console_chat](https://lua-api.factorio.com/latest/events.html#on_console_chat) event with the desired message 'from' the first player.
|
||||
---```
|
||||
---local data = {player_index = 1, message = "Hello friends!"}
|
||||
---script.raise_event(defines.events.on_console_chat, data)
|
||||
---```
|
||||
---@param event uint@ID of the event to raise.
|
||||
---@param data table@Table with extra data that will be passed to the event handler. Any invalid LuaObjects will silently stop the event from being raised.
|
||||
raise_event=function(event,data)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@class LuaBootstrap.raise_market_item_purchased_param
|
||||
---The player who did the purchasing.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@field player_index uint
|
||||
---The market entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@field market LuaEntity
|
||||
---The index of the offer purchased.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@field offer_index uint
|
||||
---The amount of offers purchased.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@field count uint
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [on_market_item_purchased](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased)
|
||||
---@param param LuaBootstrap.raise_market_item_purchased_param
|
||||
raise_market_item_purchased=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item)
|
||||
---@class LuaBootstrap.raise_player_crafted_item_param
|
||||
---The item that has been crafted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item)
|
||||
---@field item_stack LuaItemStack
|
||||
---The player doing the crafting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item)
|
||||
---@field player_index uint
|
||||
---The recipe used to craft this item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item)
|
||||
---@field recipe LuaRecipe
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [on_player_crafted_item](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item)
|
||||
---@param param LuaBootstrap.raise_player_crafted_item_param
|
||||
raise_player_crafted_item=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred)
|
||||
---@class LuaBootstrap.raise_player_fast_transferred_param
|
||||
---The player transferred from or to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred)
|
||||
---@field player_index uint
|
||||
---The entity transferred from or to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred)
|
||||
---@field entity LuaEntity
|
||||
---Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred)
|
||||
---@field from_player boolean
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [on_player_fast_transferred](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred)
|
||||
---@param param LuaBootstrap.raise_player_fast_transferred_param
|
||||
raise_player_fast_transferred=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built)
|
||||
---@class LuaBootstrap.raise_script_built_param
|
||||
---The entity that has been built.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built)
|
||||
---@field entity LuaEntity
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [script_raised_built](https://lua-api.factorio.com/latest/events.html#script_raised_built) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built)
|
||||
---@param param LuaBootstrap.raise_script_built_param
|
||||
raise_script_built=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy)
|
||||
---@class LuaBootstrap.raise_script_destroy_param
|
||||
---The entity that was destroyed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy)
|
||||
---@field entity LuaEntity
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy)
|
||||
---@param param LuaBootstrap.raise_script_destroy_param
|
||||
raise_script_destroy=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive)
|
||||
---@class LuaBootstrap.raise_script_revive_param
|
||||
---The entity that was revived.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive)
|
||||
---@field entity LuaEntity
|
||||
---The tags associated with this entity, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive)
|
||||
---@field tags? Tags
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive)
|
||||
---@param param LuaBootstrap.raise_script_revive_param
|
||||
raise_script_revive=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles)
|
||||
---@class LuaBootstrap.raise_script_set_tiles_param
|
||||
---The surface whose tiles have been changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles)
|
||||
---@field surface_index uint
|
||||
---The tiles that have been changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles)
|
||||
---@field tiles Tile[]
|
||||
|
||||
|
||||
---**Events:**
|
||||
--- * Will raise [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) instantly.
|
||||
---Raised with the provided arguments.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles)
|
||||
---@param param LuaBootstrap.raise_script_set_tiles_param
|
||||
raise_script_set_tiles=function(param)end,
|
||||
---Register a metatable to have linkage recorded and restored when saving/loading. The metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.
|
||||
---
|
||||
---**Note:** `register_metatable()` can not be used in the console, in event listeners or during a `remote.call()`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_metatable)
|
||||
---@param name string@The name of this metatable. Names must be unique per mod.
|
||||
---@param metatable table@The metatable to register.
|
||||
register_metatable=function(name,metatable)end,
|
||||
---Registers an entity so that after it's destroyed, [on_entity_destroyed](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) is called. Once an entity is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an entity, all mods listening to [on_entity_destroyed](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) will receive the event when it is destroyed. Registering the same entity multiple times will still only fire the destruction event once, and will return the same registration number.
|
||||
---
|
||||
---**Note:** Depending on when a given entity is destroyed, [on_entity_destroyed](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) will either be fired at the end of the current tick or at the end of the next tick.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed)
|
||||
---@param entity LuaEntity@The entity to register.
|
||||
---@return uint64@The registration number. It is used to identify the entity in the [on_entity_destroyed](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) event.
|
||||
register_on_entity_destroyed=function(entity)end,
|
||||
---Sets the filters for the given event. The filters are only retained when set after the actual event registration, because registering for an event with different or no filters will overwrite previously set ones.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.set_event_filter)
|
||||
---
|
||||
---### Example
|
||||
---Limit the [on_marked_for_deconstruction](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) event to only be received when a non-ghost entity is marked for deconstruction.
|
||||
---```
|
||||
---script.set_event_filter(defines.events.on_marked_for_deconstruction, {{filter = "ghost", invert = true}})
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---Limit the [on_built_entity](https://lua-api.factorio.com/latest/events.html#on_built_entity) event to only be received when either a `unit` or a `unit-spawner` is built.
|
||||
---```
|
||||
---script.set_event_filter(defines.events.on_built_entity, {{filter = "type", type = "unit"}, {filter = "type", type = "unit-spawner"}})
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---Limit the [on_entity_damaged](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) event to only be received when a `rail` is damaged by an `acid` attack.
|
||||
---```
|
||||
---script.set_event_filter(defines.events.on_entity_damaged, {{filter = "rail"}, {filter = "damage-type", type = "acid", mode = "and"}})
|
||||
---```
|
||||
---@param event uint@ID of the event to filter.
|
||||
---@param filters EventFilter?@The filters or `nil` to clear them.
|
||||
set_event_filter=function(event,filters)end,
|
||||
}
|
||||
|
||||
|
||||
77
.vscode/factorio/runtime-api-LuaBurner.lua
vendored
77
.vscode/factorio/runtime-api-LuaBurner.lua
vendored
@@ -1,77 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaBurner
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A reference to the burner energy source owned by a specific [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html) or [LuaEquipment](https://lua-api.factorio.com/latest/LuaEquipment.html).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html)
|
||||
---@class LuaBurner:LuaObject
|
||||
---[R]
|
||||
---The burnt result inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.burnt_result_inventory)
|
||||
---@field burnt_result_inventory LuaInventory
|
||||
---[RW]
|
||||
---The currently burning item.
|
||||
---
|
||||
---**Note:** Writing to this automatically handles correcting [LuaBurner::remaining_burning_fuel](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.remaining_burning_fuel).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.currently_burning)
|
||||
---@field currently_burning? LuaItemPrototype
|
||||
---[R]
|
||||
---The fuel categories this burner uses.
|
||||
---
|
||||
---**Note:** The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.fuel_categories)
|
||||
---@field fuel_categories {[string]: boolean}
|
||||
---[RW]
|
||||
---The current heat (energy) stored in this burner.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.heat)
|
||||
---@field heat double
|
||||
---[R]
|
||||
---The maximum heat (maximum energy) that this burner can store.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.heat_capacity)
|
||||
---@field heat_capacity double
|
||||
---[R]
|
||||
---The fuel inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.inventory)
|
||||
---@field inventory LuaInventory
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The owner of this burner energy source
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.owner)
|
||||
---@field owner LuaEntity|LuaEquipment
|
||||
---[RW]
|
||||
---The amount of energy left in the currently-burning fuel item.
|
||||
---
|
||||
---**Note:** Writing to this will silently do nothing if there's no [LuaBurner::currently_burning](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.currently_burning) set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.remaining_burning_fuel)
|
||||
---@field remaining_burning_fuel double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.valid)
|
||||
---@field valid boolean
|
||||
local LuaBurner={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaBurnerPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a burner energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html)
|
||||
---@class LuaBurnerPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.burnt_inventory_size)
|
||||
---@field burnt_inventory_size uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.effectivity)
|
||||
---@field effectivity double
|
||||
---[R]
|
||||
---The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.emissions)
|
||||
---@field emissions double
|
||||
---[R]
|
||||
---
|
||||
---**Note:** The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.fuel_categories)
|
||||
---@field fuel_categories {[string]: boolean}
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.fuel_inventory_size)
|
||||
---@field fuel_inventory_size uint
|
||||
---[R]
|
||||
---The light flicker definition for this burner prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker)
|
||||
---@field light_flicker? LuaBurnerPrototype.light_flicker
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.render_no_network_icon)
|
||||
---@field render_no_network_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.render_no_power_icon)
|
||||
---@field render_no_power_icon boolean
|
||||
---[R]
|
||||
---The smoke sources for this burner prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.smoke)
|
||||
---@field smoke? SmokeSource[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaBurnerPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaChunkIterator
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A chunk iterator can be used for iterating chunks coordinates of a surface.
|
||||
---
|
||||
---The returned type is a [ChunkPositionAndArea](https://lua-api.factorio.com/latest/Concepts.html#ChunkPositionAndArea) containing the chunk coordinates and its area.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaChunkIterator.html)
|
||||
---
|
||||
---### Example
|
||||
---```
|
||||
---for chunk in some_surface.get_chunks() do
|
||||
--- game.player.print("x: " .. chunk.x .. ", y: " .. chunk.y)
|
||||
--- game.player.print("area: " .. serpent.line(chunk.area))
|
||||
---end
|
||||
---```
|
||||
---@class LuaChunkIterator.__index:LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.valid)
|
||||
---@field valid boolean
|
||||
local LuaChunkIterator={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
---Gets the next chunk position if the iterator is not yet done and increments the it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.operator%20())
|
||||
---@alias LuaChunkIterator.__call fun():ChunkPositionAndArea
|
||||
---@alias LuaChunkIterator LuaChunkIterator.__index|LuaChunkIterator.__call
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCircuitNetwork
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A circuit network associated with a given entity, connector, and wire type.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html)
|
||||
---@class LuaCircuitNetwork:LuaObject
|
||||
---[R]
|
||||
---The circuit connector ID on the associated entity this network was gotten from.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.circuit_connector_id)
|
||||
---@field circuit_connector_id defines.circuit_connector_id
|
||||
---[R]
|
||||
---The number of circuits connected to this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.connected_circuit_count)
|
||||
---@field connected_circuit_count uint
|
||||
---[R]
|
||||
---The entity this circuit network reference is associated with.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.entity)
|
||||
---@field entity LuaEntity
|
||||
---[R]
|
||||
---The circuit networks ID.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.network_id)
|
||||
---@field network_id uint
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The circuit network signals last tick. `nil` if there were no signals last tick.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.signals)
|
||||
---@field signals? Signal[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---The wire type this network is associated with.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.wire_type)
|
||||
---@field wire_type defines.wire_type
|
||||
local LuaCircuitNetwork={
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.get_signal)
|
||||
---@param signal SignalID@The signal to read.
|
||||
---@return int@The current value of the signal.
|
||||
get_signal=function(signal)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCircuitNetwork.html#LuaCircuitNetwork.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCombinatorControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCombinatorControlBehavior.html)
|
||||
---@class LuaCombinatorControlBehavior:LuaControlBehavior
|
||||
---[R]
|
||||
---The circuit network signals sent by this combinator last tick.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCombinatorControlBehavior.html#LuaCombinatorControlBehavior.signals_last_tick)
|
||||
---@field signals_last_tick Signal[]
|
||||
local LuaCombinatorControlBehavior={
|
||||
---Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCombinatorControlBehavior.html#LuaCombinatorControlBehavior.get_signal_last_tick)
|
||||
---@param signal SignalID@The signal to get
|
||||
---@return int?
|
||||
get_signal_last_tick=function(signal)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCommandProcessor
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---**Global Description:**
|
||||
---Allows registering custom commands for the in-game console accessible via the grave key.
|
||||
---
|
||||
---**Class Description:**
|
||||
---Allows for the registration of custom console commands. Similarly to [event subscriptions](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_event), these don't persist through a save-and-load cycle.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html)
|
||||
---@class LuaCommandProcessor:LuaObject
|
||||
---[R]
|
||||
---Lists the custom commands registered by scripts through `LuaCommandProcessor`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.commands)
|
||||
---@field commands {[string]: LocalisedString}
|
||||
---[R]
|
||||
---Lists the built-in commands of the core game. The [wiki](https://wiki.factorio.com/Console) has an overview of these.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.game_commands)
|
||||
---@field game_commands {[string]: LocalisedString}
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.object_name)
|
||||
---@field object_name string
|
||||
commands={
|
||||
---Add a custom console command.
|
||||
---
|
||||
---**Note:** Trying to add a command with the `name` of a game command or the name of a custom command that is already in use will result in an error.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.add_command)
|
||||
---
|
||||
---### Example
|
||||
---This will register a custom event called `print_tick` that prints the current tick to either the player issuing the command or to everyone on the server, depending on the command parameter. It shows the usage of the table that gets passed to any function handling a custom command. This specific example makes use of the `tick` and the optional `player_index` and `parameter` fields. The user is supposed to either call it without any parameter (`"/print_tick"`) or with the `"me"` parameter (`"/print_tick me"`).
|
||||
---```
|
||||
---commands.add_command("print_tick", nil, function(command)
|
||||
--- if command.player_index ~= nil and command.parameter == "me" then
|
||||
--- game.get_player(command.player_index).print(command.tick)
|
||||
--- else
|
||||
--- game.print(command.tick)
|
||||
--- end
|
||||
---end)
|
||||
---```
|
||||
---@param name string@The desired name of the command (case sensitive).
|
||||
---@param help LocalisedString@The localised help message. It will be shown to players using the `/help` command.
|
||||
---@param function_ fun(param1:CustomCommandData)@The function that will be called when this command is invoked.
|
||||
add_command=function(name,help,function_)end,
|
||||
---Remove a custom console command.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.remove_command)
|
||||
---@param name string@The name of the command to remove (case sensitive).
|
||||
---@return boolean@Whether the command was successfully removed. Returns `false` if the command didn't exist.
|
||||
remove_command=function(name)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaConstantCombinatorControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for constant combinators.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html)
|
||||
---@class LuaConstantCombinatorControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---Turns this constant combinator on and off.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---This constant combinator's parameters. `nil` if the [item_slot_count](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.item_slot_count) of the combinator's prototype is `0`.
|
||||
---
|
||||
---Writing `nil` clears the combinator's parameters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.parameters)
|
||||
---@field parameters? ConstantCombinatorParameters[]
|
||||
---[R]
|
||||
---The number of signals this constant combinator supports
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.signals_count)
|
||||
---@field signals_count uint
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaConstantCombinatorControlBehavior={
|
||||
---Gets the signal at the given index. Returned [Signal](https://lua-api.factorio.com/latest/Concepts.html#Signal) will not contain signal if none is set for the index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.get_signal)
|
||||
---@param index uint
|
||||
---@return Signal
|
||||
get_signal=function(index)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Sets the signal at the given index
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.set_signal)
|
||||
---@param index uint
|
||||
---@param signal Signal
|
||||
set_signal=function(index,signal)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaContainerControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for container entities.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaContainerControlBehavior.html)
|
||||
---@class LuaContainerControlBehavior:LuaControlBehavior
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaContainerControlBehavior.html#LuaContainerControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaContainerControlBehavior.html#LuaContainerControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaContainerControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaContainerControlBehavior.html#LuaContainerControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
603
.vscode/factorio/runtime-api-LuaControl.lua
vendored
603
.vscode/factorio/runtime-api-LuaControl.lua
vendored
@@ -1,603 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaControl
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---This is an abstract base class containing the common functionality between [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html) and entities (see [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html)). When accessing player-related functions through a [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html), it must refer to a character entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html)
|
||||
---@class LuaControl:LuaObject
|
||||
---[R]
|
||||
---The build distance of this character or max uint when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.build_distance)
|
||||
---@field build_distance uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_additional_mining_categories)
|
||||
---@field character_additional_mining_categories string[]
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_build_distance_bonus)
|
||||
---@field character_build_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_crafting_speed_modifier)
|
||||
---@field character_crafting_speed_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_health_bonus)
|
||||
---@field character_health_bonus float
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_inventory_slots_bonus)
|
||||
---@field character_inventory_slots_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_item_drop_distance_bonus)
|
||||
---@field character_item_drop_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_item_pickup_distance_bonus)
|
||||
---@field character_item_pickup_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_loot_pickup_distance_bonus)
|
||||
---@field character_loot_pickup_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_maximum_following_robot_count_bonus)
|
||||
---@field character_maximum_following_robot_count_bonus uint
|
||||
---[R]
|
||||
---The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_mining_progress)
|
||||
---@field character_mining_progress double
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_mining_speed_modifier)
|
||||
---@field character_mining_speed_modifier double
|
||||
---[RW]
|
||||
---If personal logistic requests are enabled for this character or players character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_personal_logistic_requests_enabled)
|
||||
---@field character_personal_logistic_requests_enabled boolean
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_reach_distance_bonus)
|
||||
---@field character_reach_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_resource_reach_distance_bonus)
|
||||
---@field character_resource_reach_distance_bonus uint
|
||||
---[R]
|
||||
---The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_running_speed)
|
||||
---@field character_running_speed double
|
||||
---[RW]
|
||||
---Modifies the running speed of this character by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_running_speed_modifier)
|
||||
---@field character_running_speed_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character (see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_trash_slot_count_bonus)
|
||||
---@field character_trash_slot_count_bonus uint
|
||||
---[RW]
|
||||
---When `true` hand crafting is free and instant.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cheat_mode)
|
||||
---@field cheat_mode boolean
|
||||
---[R]
|
||||
---The current crafting queue items.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue)
|
||||
---@field crafting_queue CraftingQueueItem[]
|
||||
---[RW]
|
||||
---The crafting queue progress in the range `[0-1]`. `0` when no recipe is being crafted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue_progress)
|
||||
---@field crafting_queue_progress double
|
||||
---[R]
|
||||
---Size of the crafting queue.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue_size)
|
||||
---@field crafting_queue_size uint
|
||||
---[RW]
|
||||
---The ghost prototype in the player's cursor. When read, it will be a [LuaItemPrototype](https://lua-api.factorio.com/latest/LuaItemPrototype.html).
|
||||
---
|
||||
---**Note:** Items in the cursor stack will take priority over the cursor ghost.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cursor_ghost)
|
||||
---@field cursor_ghost? ItemPrototypeIdentification
|
||||
---[R]
|
||||
---The player's cursor stack. `nil` if the player controller is a spectator.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cursor_stack)
|
||||
---
|
||||
---### Example
|
||||
---Even though this property is marked as read-only, it returns a [LuaItemStack](https://lua-api.factorio.com/latest/LuaItemStack.html), meaning it can be manipulated like so:
|
||||
---```
|
||||
---player.cursor_stack.clear()
|
||||
---```
|
||||
---@field cursor_stack? LuaItemStack
|
||||
---[RW]
|
||||
---`true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_driving_changed_state](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) instantly.
|
||||
---Raised if the driving state successfully changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.driving)
|
||||
---@field driving boolean
|
||||
---[R]
|
||||
---The item drop distance of this character or max uint when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.drop_item_distance)
|
||||
---@field drop_item_distance uint
|
||||
---[R]
|
||||
---The current combat robots following the character.
|
||||
---
|
||||
---**Note:** When called on a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), it must be associated with a character(see [LuaPlayer::character](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.following_robots)
|
||||
---@field following_robots LuaEntity[]
|
||||
---[RW]
|
||||
---The force of this entity. Reading will always give a [LuaForce](https://lua-api.factorio.com/latest/LuaForce.html), but it is possible to assign either [string](https://lua-api.factorio.com/latest/Builtin-Types.html#string) or [LuaForce](https://lua-api.factorio.com/latest/LuaForce.html) to this attribute to change the force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.force)
|
||||
---@field force ForceIdentification
|
||||
---[R]
|
||||
---Whether this character entity is in combat.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.in_combat)
|
||||
---@field in_combat boolean
|
||||
---[R]
|
||||
---The item pickup distance of this character or max double when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.item_pickup_distance)
|
||||
---@field item_pickup_distance double
|
||||
---[R]
|
||||
---The loot pickup distance of this character or max double when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.loot_pickup_distance)
|
||||
---@field loot_pickup_distance double
|
||||
---[RW]
|
||||
---Current mining state.
|
||||
---
|
||||
---**Note:** When the player isn't mining tiles the player will mine what ever entity is currently selected. See [LuaControl::selected](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected) and [LuaControl::update_selected_entity](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mining_state)
|
||||
---@field mining_state LuaControl.mining_state
|
||||
---[RW]
|
||||
---The GUI the player currently has open.
|
||||
---
|
||||
---This is the GUI that will asked to close (by firing the [on_gui_closed](https://lua-api.factorio.com/latest/events.html#on_gui_closed) event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.
|
||||
---
|
||||
---**Note:** Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory`, `technology`, or `nil`.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_gui_opened](https://lua-api.factorio.com/latest/events.html#on_gui_opened) instantly.
|
||||
---Raised when writing a valid GUI target to this attribute.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.opened)
|
||||
---@field opened? LuaEntity|LuaItemStack|LuaEquipment|LuaEquipmentGrid|LuaPlayer|LuaGuiElement|LuaInventory|LuaTechnology|defines.gui_type
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.opened_gui_type)
|
||||
---@field opened_gui_type? defines.gui_type
|
||||
---[RW]
|
||||
---Current item-picking state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.picking_state)
|
||||
---@field picking_state boolean
|
||||
---[R]
|
||||
---The current position of the entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.position)
|
||||
---@field position MapPosition
|
||||
---[R]
|
||||
---The reach distance of this character or max uint when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.reach_distance)
|
||||
---@field reach_distance uint
|
||||
---[RW]
|
||||
---Current repair state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.repair_state)
|
||||
---@field repair_state LuaControl.repair_state
|
||||
---[R]
|
||||
---The resource reach distance of this character or max double when not a character or player connected to a character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.resource_reach_distance)
|
||||
---@field resource_reach_distance double
|
||||
---[RW]
|
||||
---Current riding state of this car, or of the car this player is riding in.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.riding_state)
|
||||
---@field riding_state RidingState
|
||||
---[RW]
|
||||
---The currently selected entity. Assigning an entity will select it if is selectable, otherwise the selection is cleared.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_selected_entity_changed](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) instantly.
|
||||
---Raised when a selectable entity is written to this attribute.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected)
|
||||
---@field selected? LuaEntity
|
||||
---[RW]
|
||||
---Current shooting state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.shooting_state)
|
||||
---@field shooting_state LuaControl.shooting_state
|
||||
---[R]
|
||||
---The surface this entity is currently on.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.surface)
|
||||
---@field surface LuaSurface
|
||||
---[R]
|
||||
---The vehicle the player is currently sitting in.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.vehicle)
|
||||
---@field vehicle? LuaEntity
|
||||
---[RW]
|
||||
---If personal logistic requests are enabled for this vehicle (spidertron).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.vehicle_logistic_requests_enabled)
|
||||
---@field vehicle_logistic_requests_enabled boolean
|
||||
---[RW]
|
||||
---Current walking state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.walking_state)
|
||||
---
|
||||
---### Example
|
||||
---Make the player go north. Note that a one-shot action like this will only make the player walk for one tick.
|
||||
---```
|
||||
---game.player.walking_state = {walking = true, direction = defines.direction.north}
|
||||
---```
|
||||
---@field walking_state LuaControl.walking_state
|
||||
local LuaControl={
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting)
|
||||
---@class LuaControl.begin_crafting_param
|
||||
---The count to craft.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting)
|
||||
---@field count uint
|
||||
---The recipe to craft.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting)
|
||||
---@field recipe string|LuaRecipe
|
||||
---If false and the recipe can't be crafted the requested number of times printing the failure is skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting)
|
||||
---@field silent? boolean
|
||||
|
||||
|
||||
---Begins crafting the given count of the given recipe.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_main_inventory_changed](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) later in the current tick.
|
||||
---Raised if crafting was able to be started.
|
||||
---
|
||||
--- * May raise [on_pre_player_crafted_item](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) instantly.
|
||||
---Raised if crafting was able to be started.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting)
|
||||
---@param param LuaControl.begin_crafting_param
|
||||
---@return uint@The count that was actually started crafting.
|
||||
begin_crafting=function(param)end,
|
||||
---Can at least some items be inserted?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.can_insert)
|
||||
---@param items ItemStackIdentification@Items that would be inserted.
|
||||
---@return boolean@`true` if at least a part of the given items could be inserted into this inventory.
|
||||
can_insert=function(items)end,
|
||||
---Can a given entity be opened or accessed?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.can_reach_entity)
|
||||
---@param entity LuaEntity
|
||||
---@return boolean
|
||||
can_reach_entity=function(entity)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting)
|
||||
---@class LuaControl.cancel_crafting_param
|
||||
---The crafting queue index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting)
|
||||
---@field index uint
|
||||
---The count to cancel crafting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting)
|
||||
---@field count uint
|
||||
|
||||
|
||||
---Cancels crafting the given count of the given crafting queue index.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_cancelled_crafting](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) instantly.
|
||||
---Raised if crafting was able to be cancelled.
|
||||
---
|
||||
--- * May raise [on_player_main_inventory_changed](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) later in the current tick.
|
||||
---Raised if crafting was able to be cancelled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting)
|
||||
---@param param LuaControl.cancel_crafting_param
|
||||
cancel_crafting=function(param)end,
|
||||
---Removes the arrow created by `set_gui_arrow`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_gui_arrow)
|
||||
clear_gui_arrow=function()end,
|
||||
---Remove all items from this entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_items_inside)
|
||||
clear_items_inside=function()end,
|
||||
---**Note:** This will silently fail if personal logistics are not researched yet.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_entity_logistic_slot_changed](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) instantly.
|
||||
---Raised if clearing of logistic slot was successful.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_personal_logistic_slot)
|
||||
---@param slot_index uint@The slot to clear.
|
||||
clear_personal_logistic_slot=function(slot_index)end,
|
||||
---Unselect any selected entity.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_selected_entity_changed](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) instantly.
|
||||
---Raised if there is a currently selected entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_selected_entity)
|
||||
clear_selected_entity=function()end,
|
||||
---**Note:** This will silently fail if the vehicle does not use logistics.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_entity_logistic_slot_changed](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) instantly.
|
||||
---Raised if clearing of logistic slot was successful.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_vehicle_logistic_slot)
|
||||
---@param slot_index uint@The slot to clear.
|
||||
clear_vehicle_logistic_slot=function(slot_index)end,
|
||||
---Disable the flashlight.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.disable_flashlight)
|
||||
disable_flashlight=function()end,
|
||||
---Enable the flashlight.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.enable_flashlight)
|
||||
enable_flashlight=function()end,
|
||||
---Gets the entities that are part of the currently selected blueprint, regardless of it being in a blueprint book or picked from the blueprint library.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_blueprint_entities)
|
||||
---@return BlueprintEntity[]?@Returns `nil` if there is no currently selected blueprint.
|
||||
get_blueprint_entities=function()end,
|
||||
---Gets the count of the given recipe that can be crafted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_craftable_count)
|
||||
---@param recipe string|LuaRecipe@The recipe.
|
||||
---@return uint@The count that can be crafted.
|
||||
get_craftable_count=function(recipe)end,
|
||||
---Get an inventory belonging to this entity. This can be either the "main" inventory or some auxiliary one, like the module slots or logistic trash slots.
|
||||
---
|
||||
---**Note:** A given [defines.inventory](https://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](https://lua-api.factorio.com/latest/defines.html#defines.inventory) it's almost guaranteed to not be the inventory asked for.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_inventory)
|
||||
---@param inventory defines.inventory
|
||||
---@return LuaInventory?@The inventory or `nil` if none with the given index was found.
|
||||
get_inventory=function(inventory)end,
|
||||
---Get the number of all or some items in this entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_item_count)
|
||||
---@param item string?@Prototype name of the item to count. If not specified, count all items.
|
||||
---@return uint
|
||||
get_item_count=function(item)end,
|
||||
---Gets the main inventory for this character or player if this is a character or player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_main_inventory)
|
||||
---@return LuaInventory?@The inventory or `nil` if this entity is not a character or player.
|
||||
get_main_inventory=function()end,
|
||||
---Gets the parameters of a personal logistic request and auto-trash slot.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_personal_logistic_slot)
|
||||
---@param slot_index uint@The slot to get.
|
||||
---@return LogisticParameters@The logistic parameters. If personal logistics are not researched yet, their `name` will be `nil`.
|
||||
get_personal_logistic_slot=function(slot_index)end,
|
||||
---Gets the parameters of a vehicle logistic request and auto-trash slot. Only used on `spider-vehicle`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_vehicle_logistic_slot)
|
||||
---@param slot_index uint@The slot to get.
|
||||
---@return LogisticParameters@The logistic parameters. If the vehicle does not use logistics, their `name` will be `nil`.
|
||||
get_vehicle_logistic_slot=function(slot_index)end,
|
||||
---Does this entity have any item inside it?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.has_items_inside)
|
||||
---@return boolean
|
||||
has_items_inside=function()end,
|
||||
---Insert items into this entity. This works the same way as inserters or shift-clicking: the "best" inventory is chosen automatically.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.insert)
|
||||
---@param items ItemStackIdentification@The items to insert.
|
||||
---@return uint@The number of items that were actually inserted.
|
||||
insert=function(items)end,
|
||||
---Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records from the blueprint library into account.
|
||||
---
|
||||
---Note that both this method and [LuaControl::get_blueprint_entities](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_blueprint_entities) refer to the currently selected blueprint, meaning a blueprint book with a selected blueprint will return the information as well.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.is_cursor_blueprint)
|
||||
---@return boolean
|
||||
is_cursor_blueprint=function()end,
|
||||
---Returns whether the player is holding something in the cursor. It takes into account items from the blueprint library, as well as items and ghost cursor.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.is_cursor_empty)
|
||||
---@return boolean
|
||||
is_cursor_empty=function()end,
|
||||
---Is the flashlight enabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.is_flashlight_enabled)
|
||||
---@return boolean
|
||||
is_flashlight_enabled=function()end,
|
||||
---When `true` control adapter is a LuaPlayer object, `false` for entities including characters with players.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.is_player)
|
||||
---@return boolean
|
||||
is_player=function()end,
|
||||
---Mines the given entity as if this player (or character) mined it.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_mined_entity](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) instantly.
|
||||
---Raised if mining is successful.
|
||||
---
|
||||
--- * May raise [on_player_mined_item](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) instantly.
|
||||
---Raised if mining is successful.
|
||||
---
|
||||
--- * May raise [on_pre_player_mined_item](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) instantly.
|
||||
---Raised if mining is possible.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_entity)
|
||||
---@param entity LuaEntity@The entity to mine
|
||||
---@param force boolean?@Forces mining the entity even if the items can't fit in the player.
|
||||
---@return boolean@Whether the mining succeeded.
|
||||
mine_entity=function(entity,force)end,
|
||||
---Mines the given tile as if this player (or character) mined it.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_mined_item](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) instantly.
|
||||
---Raised if mining is successful.
|
||||
---
|
||||
--- * May raise [on_player_mined_tile](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) instantly.
|
||||
---Raised if mining is successful.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_tile)
|
||||
---@param tile LuaTile@The tile to mine.
|
||||
---@return boolean@Whether the mining succeeded.
|
||||
mine_tile=function(tile)end,
|
||||
---Open the technology GUI and select a given technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.open_technology_gui)
|
||||
---@param technology TechnologyIdentification?@The technology to select after opening the GUI.
|
||||
open_technology_gui=function(technology)end,
|
||||
---Remove items from this entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.remove_item)
|
||||
---@param items ItemStackIdentification@The items to remove.
|
||||
---@return uint@The number of items that were actually removed.
|
||||
remove_item=function(items)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@class LuaControl.set_gui_arrow_param
|
||||
---Where to point to. This field determines what other fields are mandatory. May be `"nowhere"`, `"goal"`, `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"`, or `"item_stack"`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field type string
|
||||
---Applies to **"entity"**: (required)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field entity LuaEntity
|
||||
---Applies to **"position"**: (required)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field position MapPosition
|
||||
---Applies to **"crafting_queue"**: (required)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field crafting_queueindex uint
|
||||
---Applies to **"item_stack"**: (required)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field inventory_index defines.inventory
|
||||
---Applies to **"item_stack"**: (required)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field item_stack_index uint
|
||||
---Applies to **"item_stack"**: (required)
|
||||
---May be either `"player"` or `"target"`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@field source string
|
||||
|
||||
|
||||
---Create an arrow which points at this entity. This is used in the tutorial. For examples, see `control.lua` in the campaign missions.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_gui_arrow)
|
||||
---@param param LuaControl.set_gui_arrow_param
|
||||
set_gui_arrow=function(param)end,
|
||||
---Sets a personal logistic request and auto-trash slot to the given value.
|
||||
---
|
||||
---**Note:** This will silently fail if personal logistics are not researched yet.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_entity_logistic_slot_changed](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) instantly.
|
||||
---Raised if setting of logistic slot was successful.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_personal_logistic_slot)
|
||||
---@param slot_index uint@The slot to set.
|
||||
---@param value LogisticParameters@The logistic request parameters.
|
||||
---@return boolean@Whether the slot was set successfully. `false` if personal logistics are not researched yet.
|
||||
set_personal_logistic_slot=function(slot_index,value)end,
|
||||
---Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicle`.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_entity_logistic_slot_changed](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) instantly.
|
||||
---Raised if setting of logistic slot was successful.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_vehicle_logistic_slot)
|
||||
---@param slot_index uint@The slot to set.
|
||||
---@param value LogisticParameters@The logistic request parameters.
|
||||
---@return boolean@Whether the slot was set successfully. `false` if the vehicle does not use logistics.
|
||||
set_vehicle_logistic_slot=function(slot_index,value)end,
|
||||
---Teleport the entity to a given position, possibly on another surface.
|
||||
---
|
||||
---**Note:** Some entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.
|
||||
---
|
||||
---**Note:** You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_changed_position](https://lua-api.factorio.com/latest/events.html#on_player_changed_position) instantly.
|
||||
---Raised if the teleported entity is a player character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.teleport)
|
||||
---@param position MapPosition@Where to teleport to.
|
||||
---@param surface SurfaceIdentification?@Surface to teleport to. If not given, will teleport to the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface.
|
||||
---@return boolean@`true` if the entity was successfully teleported.
|
||||
teleport=function(position,surface)end,
|
||||
---Select an entity, as if by hovering the mouse above it.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_selected_entity_changed](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) instantly.
|
||||
---Raised if there is an entity at the given position to select.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity)
|
||||
---@param position MapPosition@Position of the entity to select.
|
||||
update_selected_entity=function(position)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---The control behavior for an entity. Inserters have logistic network and circuit network behavior logic, lamps have circuit logic and so on. This is an abstract base class that concrete control behaviors inherit.
|
||||
---
|
||||
---**Note:** An control reference becomes invalid once the control behavior is removed or the entity (see [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html)) it resides in is destroyed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControlBehavior.html)
|
||||
---@class LuaControlBehavior:LuaObject
|
||||
---[R]
|
||||
---The entity this control behavior belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaControlBehavior.entity)
|
||||
---@field entity LuaEntity
|
||||
---[R]
|
||||
---The concrete type of this control behavior.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaControlBehavior.type)
|
||||
---@field type defines.control_behavior.type
|
||||
local LuaControlBehavior={
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaControlBehavior.get_circuit_network)
|
||||
---@param wire defines.wire_type@Wire color of the network connected to this entity.
|
||||
---@param circuit_connector defines.circuit_connector_id?@The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.
|
||||
---@return LuaCircuitNetwork@The circuit network or nil.
|
||||
get_circuit_network=function(wire,circuit_connector)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCustomChartTag
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A custom tag that shows on the map view.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html)
|
||||
---@class LuaCustomChartTag:LuaObject
|
||||
---[R]
|
||||
---The force this tag belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.force)
|
||||
---@field force LuaForce
|
||||
---[RW]
|
||||
---This tag's icon, if it has one. Writing `nil` removes it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.icon)
|
||||
---@field icon SignalID
|
||||
---[RW]
|
||||
---The player who last edited this tag.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.last_user)
|
||||
---@field last_user? LuaPlayer
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The position of this tag.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.position)
|
||||
---@field position MapPosition
|
||||
---[R]
|
||||
---The surface this tag belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.surface)
|
||||
---@field surface LuaSurface
|
||||
---[R]
|
||||
---The unique ID for this tag on this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.tag_number)
|
||||
---@field tag_number uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.text)
|
||||
---@field text string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.valid)
|
||||
---@field valid boolean
|
||||
local LuaCustomChartTag={
|
||||
---Destroys this tag.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.destroy)
|
||||
destroy=function()end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomChartTag.html#LuaCustomChartTag.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCustomInputPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a custom input.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html)
|
||||
---@class LuaCustomInputPrototype:LuaObject
|
||||
---[R]
|
||||
---The action that happens when this custom input is triggered.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.action)
|
||||
---@field action string
|
||||
---[R]
|
||||
---The default alternative key sequence for this custom input, if any
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.alternative_key_sequence)
|
||||
---@field alternative_key_sequence? string
|
||||
---[R]
|
||||
---The consuming type: `"none"` or `"game-only"`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.consuming)
|
||||
---@field consuming string
|
||||
---[R]
|
||||
---Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---Whether this custom input is enabled while using the cutscene controller.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_in_cutscene)
|
||||
---@field enabled_while_in_cutscene boolean
|
||||
---[R]
|
||||
---Whether this custom input is enabled while using the spectator controller.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_spectating)
|
||||
---@field enabled_while_spectating boolean
|
||||
---[R]
|
||||
---Whether this custom input will include the selected prototype (if any) when triggered.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.include_selected_prototype)
|
||||
---@field include_selected_prototype boolean
|
||||
---[R]
|
||||
---The item that gets spawned when this custom input is fired, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.item_to_spawn)
|
||||
---@field item_to_spawn? LuaItemPrototype
|
||||
---[R]
|
||||
---The default key sequence for this custom input.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.key_sequence)
|
||||
---@field key_sequence string
|
||||
---[R]
|
||||
---The linked game control name, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.linked_game_control)
|
||||
---@field linked_game_control? string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaCustomInputPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
62
.vscode/factorio/runtime-api-LuaCustomTable.lua
vendored
62
.vscode/factorio/runtime-api-LuaCustomTable.lua
vendored
@@ -1,62 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaCustomTable
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Lazily evaluated table. For performance reasons, we sometimes return a custom table-like type instead of a native Lua table. This custom type lazily constructs the necessary Lua wrappers of the corresponding C++ objects, therefore preventing their unnecessary construction in some cases.
|
||||
---
|
||||
---There are some notable consequences to the usage of a custom table type rather than the native Lua table type: Iterating a custom table is only possible using the `pairs` Lua function; `ipairs` won't work. Another key difference is that custom tables cannot be serialised into a game save file -- if saving the game would require serialisation of a custom table, an error will be displayed and the game will not be saved.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomTable.html)
|
||||
---
|
||||
---### Example
|
||||
---In previous versions of Factorio, this would create a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html) instance for every player in the game, even though only one such wrapper is needed. In the current version, accessing [game.players](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) by itself does not create any [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html) instances; they are created lazily when accessed. Therefore, this example only constructs one [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html) instance, no matter how many elements there are in `game.players`.
|
||||
---```
|
||||
---game.players["Oxyd"].character.die()
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---Custom tables may be iterated using `pairs`.
|
||||
---```
|
||||
---for _, p in pairs(game.players) do game.player.print(p.name); end
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---The following will produce no output because `ipairs` is not supported with custom tables.
|
||||
---```
|
||||
---for _, p in ipairs(game.players) do game.player.print(p.name); end -- incorrect; use pairs instead
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---This statement will execute successfully and `global.p` will be useable as one might expect. However, as soon as the user tries to save the game, a "LuaCustomTable cannot be serialized" error will be shown. The game will remain unsaveable so long as `global.p` refers to an instance of a custom table.
|
||||
---```
|
||||
---global.p = game.players -- This has high potential to make the game unsaveable
|
||||
---```
|
||||
---@class LuaCustomTable<K,V>:{[K]:V},LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Number of elements in this table.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.length)
|
||||
---@operator len: uint
|
||||
local LuaCustomTable={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaDamagePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a damage.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html)
|
||||
---@class LuaDamagePrototype:LuaObject
|
||||
---[R]
|
||||
---Whether this damage type is hidden from entity tooltips.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaDamagePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaDeciderCombinatorControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for decider combinators.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html)
|
||||
---@class LuaDeciderCombinatorControlBehavior:LuaCombinatorControlBehavior
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---This decider combinator's parameters.
|
||||
---
|
||||
---**Note:** Writing `nil` clears the combinator's parameters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.parameters)
|
||||
---@field parameters DeciderCombinatorParameters
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaDeciderCombinatorControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaDecorativePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an optimized decorative.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html)
|
||||
---@class LuaDecorativePrototype:LuaObject
|
||||
---[R]
|
||||
---Autoplace specification for this decorative prototype, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.autoplace_specification)
|
||||
---@field autoplace_specification? AutoplaceSpecification
|
||||
---[R]
|
||||
---The bounding box used for collision checking.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.collision_box)
|
||||
---@field collision_box BoundingBox
|
||||
---[R]
|
||||
---The collision masks this decorative uses
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.collision_mask)
|
||||
---@field collision_mask CollisionMask
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.collision_mask_with_flags)
|
||||
---@field collision_mask_with_flags CollisionMaskWithFlags
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaDecorativePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaElectricEnergySourcePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an electric energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html)
|
||||
---@class LuaElectricEnergySourcePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.buffer_capacity)
|
||||
---@field buffer_capacity double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.drain)
|
||||
---@field drain double
|
||||
---[R]
|
||||
---The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.emissions)
|
||||
---@field emissions double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.input_flow_limit)
|
||||
---@field input_flow_limit double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.output_flow_limit)
|
||||
---@field output_flow_limit double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.render_no_network_icon)
|
||||
---@field render_no_network_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.render_no_power_icon)
|
||||
---@field render_no_power_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.usage_priority)
|
||||
---@field usage_priority string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaElectricEnergySourcePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
2191
.vscode/factorio/runtime-api-LuaEntity.lua
vendored
2191
.vscode/factorio/runtime-api-LuaEntity.lua
vendored
File diff suppressed because it is too large
Load Diff
1554
.vscode/factorio/runtime-api-LuaEntityPrototype.lua
vendored
1554
.vscode/factorio/runtime-api-LuaEntityPrototype.lua
vendored
File diff suppressed because it is too large
Load Diff
99
.vscode/factorio/runtime-api-LuaEquipment.lua
vendored
99
.vscode/factorio/runtime-api-LuaEquipment.lua
vendored
@@ -1,99 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaEquipment
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---An item in a [LuaEquipmentGrid](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html), for example a fusion reactor placed in one's power armor.
|
||||
---
|
||||
---An equipment reference becomes invalid once the equipment is removed or the equipment grid it resides in is destroyed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html)
|
||||
---@class LuaEquipment:LuaObject
|
||||
---[R]
|
||||
---The burner energy source for this equipment, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.burner)
|
||||
---@field burner? LuaBurner
|
||||
---[RW]
|
||||
---Current available energy.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.energy)
|
||||
---@field energy double
|
||||
---[R]
|
||||
---Energy generated per tick.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.generator_power)
|
||||
---@field generator_power double
|
||||
---[R]
|
||||
---Maximum amount of energy that can be stored in this equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_energy)
|
||||
---@field max_energy double
|
||||
---[R]
|
||||
---Maximum shield value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_shield)
|
||||
---@field max_shield double
|
||||
---[R]
|
||||
---Maximum solar power generated.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_solar_power)
|
||||
---@field max_solar_power double
|
||||
---[R]
|
||||
---Movement speed bonus.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.movement_bonus)
|
||||
---@field movement_bonus double
|
||||
---[R]
|
||||
---Name of this equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Position of this equipment in the equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.position)
|
||||
---@field position EquipmentPosition
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.prototype)
|
||||
---@field prototype LuaEquipmentPrototype
|
||||
---[R]
|
||||
---Shape of this equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shape)
|
||||
---@field shape LuaEquipment.shape
|
||||
---[RW]
|
||||
---Current shield value of the equipment.
|
||||
---
|
||||
---**Note:** Can't be set higher than [LuaEquipment::max_shield](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.max_shield).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shield)
|
||||
---@field shield double
|
||||
---[R]
|
||||
---Type of this equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.type)
|
||||
---@field type string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.valid)
|
||||
---@field valid boolean
|
||||
local LuaEquipment={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaEquipmentCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an equipment category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html)
|
||||
---@class LuaEquipmentCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaEquipmentCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
204
.vscode/factorio/runtime-api-LuaEquipmentGrid.lua
vendored
204
.vscode/factorio/runtime-api-LuaEquipmentGrid.lua
vendored
@@ -1,204 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaEquipmentGrid
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---An equipment grid is for example the inside of a power armor.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html)
|
||||
---@class LuaEquipmentGrid:LuaObject
|
||||
---[R]
|
||||
---The total energy stored in all batteries in the equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.available_in_batteries)
|
||||
---@field available_in_batteries double
|
||||
---[R]
|
||||
---Total energy storage capacity of all batteries in the equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.battery_capacity)
|
||||
---@field battery_capacity double
|
||||
---[R]
|
||||
---All the equipment in this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.equipment)
|
||||
---@field equipment LuaEquipment[]
|
||||
---[R]
|
||||
---Total energy per tick generated by the equipment inside this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.generator_energy)
|
||||
---@field generator_energy double
|
||||
---[R]
|
||||
---Height of the equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.height)
|
||||
---@field height uint
|
||||
---[RW]
|
||||
---True if this movement bonus equipment is turned off, otherwise false.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.inhibit_movement_bonus)
|
||||
---@field inhibit_movement_bonus boolean
|
||||
---[R]
|
||||
---The maximum amount of shields this equipment grid has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.max_shield)
|
||||
---@field max_shield float
|
||||
---[R]
|
||||
---Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generated energy varies depending on the daylight levels.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.max_solar_energy)
|
||||
---@field max_solar_energy double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.prototype)
|
||||
---@field prototype LuaEquipmentGridPrototype
|
||||
---[R]
|
||||
---The amount of shields this equipment grid has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.shield)
|
||||
---@field shield float
|
||||
---[R]
|
||||
---Unique identifier of this equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.unique_id)
|
||||
---@field unique_id uint
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Width of the equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.width)
|
||||
---@field width uint
|
||||
local LuaEquipmentGrid={
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.can_move)
|
||||
---@class LuaEquipmentGrid.can_move_param
|
||||
---The equipment to move
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.can_move)
|
||||
---@field equipment LuaEquipment
|
||||
---Where to put it
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.can_move)
|
||||
---@field position EquipmentPosition
|
||||
|
||||
|
||||
---Check whether moving an equipment would succeed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.can_move)
|
||||
---@param param LuaEquipmentGrid.can_move_param
|
||||
---@return boolean
|
||||
can_move=function(param)end,
|
||||
---Clear all equipment from the grid, removing it without actually returning it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.clear)
|
||||
---@param by_player PlayerIdentification?@If provided, the action is done 'as' this player and [on_player_removed_equipment](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered.
|
||||
clear=function(by_player)end,
|
||||
---Get the number of all or some equipment in this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.count)
|
||||
---@param equipment string?@Prototype name of the equipment to count. If not specified, count all equipment.
|
||||
---@return uint
|
||||
count=function(equipment)end,
|
||||
---Find equipment by name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.find)
|
||||
---@param equipment string@Prototype name of the equipment to find.
|
||||
---@return LuaEquipment?@The first found equipment, or `nil` if equipment could not be found.
|
||||
find=function(equipment)end,
|
||||
---Find equipment in the Equipment Grid based off a position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.get)
|
||||
---@param position EquipmentPosition@The position
|
||||
---@return LuaEquipment?@The found equipment, or `nil` if equipment could not be found at the given position.
|
||||
get=function(position)end,
|
||||
---Get counts of all equipment in this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.get_contents)
|
||||
---@return {[string]: uint}@The counts, indexed by equipment names.
|
||||
get_contents=function()end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.move)
|
||||
---@class LuaEquipmentGrid.move_param
|
||||
---The equipment to move
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.move)
|
||||
---@field equipment LuaEquipment
|
||||
---Where to put it
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.move)
|
||||
---@field position EquipmentPosition
|
||||
|
||||
|
||||
---Move an equipment within this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.move)
|
||||
---@param param LuaEquipmentGrid.move_param
|
||||
---@return boolean@`true` if the equipment was successfully moved.
|
||||
move=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.put)
|
||||
---@class LuaEquipmentGrid.put_param
|
||||
---Equipment prototype name
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.put)
|
||||
---@field name string
|
||||
---Grid position to put the equipment in.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.put)
|
||||
---@field position? EquipmentPosition
|
||||
---If provided the action is done 'as' this player and [on_player_placed_equipment](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) is triggered.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.put)
|
||||
---@field by_player? PlayerIdentification
|
||||
|
||||
|
||||
---Insert an equipment into the grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.put)
|
||||
---@param param LuaEquipmentGrid.put_param
|
||||
---@return LuaEquipment?@The newly-added equipment, or `nil` if the equipment could not be added.
|
||||
put=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take)
|
||||
---@class LuaEquipmentGrid.take_param
|
||||
---Take the equipment that contains this position in the grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take)
|
||||
---@field position? EquipmentPosition
|
||||
---Take this exact equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take)
|
||||
---@field equipment? LuaEquipment
|
||||
---If provided the action is done 'as' this player and [on_player_removed_equipment](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take)
|
||||
---@field by_player? PlayerIdentification
|
||||
|
||||
|
||||
---Remove an equipment from the grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take)
|
||||
---@param param LuaEquipmentGrid.take_param
|
||||
---@return SimpleItemStack?@The removed equipment, or `nil` if no equipment was removed.
|
||||
take=function(param)end,
|
||||
---Remove all equipment from the grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.take_all)
|
||||
---@param by_player PlayerIdentification?@If provided, the action is done 'as' this player and [on_player_removed_equipment](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) is triggered.
|
||||
---@return {[string]: uint}@Count of each removed equipment, indexed by their prototype names.
|
||||
take_all=function(by_player)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaEquipmentGridPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html)
|
||||
---@class LuaEquipmentGridPrototype:LuaObject
|
||||
---[R]
|
||||
---Equipment category names for the [categories](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.equipment_categories) that may be inserted into this equipment grid. The grid will accept any equipment that has at least one category in this list.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.equipment_categories)
|
||||
---@field equipment_categories string[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.height)
|
||||
---@field height uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---If the player can move equipment into or out of this grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.locked)
|
||||
---@field locked boolean
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.width)
|
||||
---@field width uint
|
||||
local LuaEquipmentGridPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaEquipmentPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a modular equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html)
|
||||
---@class LuaEquipmentPrototype:LuaObject
|
||||
---[R]
|
||||
---The equipment attack parameters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.attack_parameters)
|
||||
---
|
||||
---_Can only be used if this is ActiveDefenseEquipment_
|
||||
---@field attack_parameters? AttackParameters
|
||||
---[R]
|
||||
---Whether this active defense equipment is automatic. Returns false if not active defense equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.automatic)
|
||||
---@field automatic boolean
|
||||
---[R]
|
||||
---The background color of this equipment prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.background_color)
|
||||
---@field background_color Color
|
||||
---[R]
|
||||
---The burner energy source prototype this equipment uses, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.burner_prototype)
|
||||
---@field burner_prototype? LuaBurnerPrototype
|
||||
---[R]
|
||||
---The electric energy source prototype this equipment uses, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.electric_energy_source_prototype)
|
||||
---@field electric_energy_source_prototype? LuaElectricEnergySourcePrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_consumption)
|
||||
---@field energy_consumption double
|
||||
---[R]
|
||||
---The energy per shield point restored. 0 for non-shield equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_per_shield)
|
||||
---@field energy_per_shield double
|
||||
---[R]
|
||||
---The max power generated by this equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_production)
|
||||
---@field energy_production double
|
||||
---[R]
|
||||
---The energy source prototype for the equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_source)
|
||||
---@field energy_source LuaElectricEnergySourcePrototype
|
||||
---[R]
|
||||
---Category names for this equipment. These [categories](https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.equipment_categories) will be used to determine whether this equipment is allowed in a particular equipment grid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.equipment_categories)
|
||||
---@field equipment_categories string[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---The logistic parameters for this roboport equipment.
|
||||
---
|
||||
---**Note:** Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters)
|
||||
---
|
||||
---_Can only be used if this is RoboportEquipment_
|
||||
---@field logistic_parameters? LuaEquipmentPrototype.logistic_parameters
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.movement_bonus)
|
||||
---
|
||||
---_Can only be used if this is MovementBonusEquipment_
|
||||
---@field movement_bonus? float
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Shape of this equipment prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shape)
|
||||
---@field shape LuaEquipmentPrototype.shape
|
||||
---[R]
|
||||
---The shield value of this equipment. 0 for non-shield equipment.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shield)
|
||||
---@field shield float
|
||||
---[R]
|
||||
---The result item when taking this equipment out of an equipment grid, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.take_result)
|
||||
---@field take_result? LuaItemPrototype
|
||||
---[R]
|
||||
---Type of this equipment prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.type)
|
||||
---@field type string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaEquipmentPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
119
.vscode/factorio/runtime-api-LuaFlowStatistics.lua
vendored
119
.vscode/factorio/runtime-api-LuaFlowStatistics.lua
vendored
@@ -1,119 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFlowStatistics
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Encapsulates statistic data for different parts of the game. 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.
|
||||
---
|
||||
---Examples:
|
||||
---- The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
|
||||
---- The kills GUI shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
|
||||
---- The electric network GUI shows "power consumption" on the left side, so in this case `input` describes the power consumption numbers.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html)
|
||||
---@class LuaFlowStatistics:LuaObject
|
||||
---[R]
|
||||
---The force these statistics belong to. `nil` for pollution statistics.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.force)
|
||||
---@field force? LuaForce
|
||||
---[R]
|
||||
---List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.input_counts)
|
||||
---@field input_counts {[string]: uint64|double}
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---List of output counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for the given statistics.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.output_counts)
|
||||
---@field output_counts {[string]: uint64|double}
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.valid)
|
||||
---@field valid boolean
|
||||
local LuaFlowStatistics={
|
||||
---Reset all the statistics data to 0.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.clear)
|
||||
clear=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@class LuaFlowStatistics.get_flow_count_param
|
||||
---The prototype name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@field name string
|
||||
---Read the input values or the output values
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@field input boolean
|
||||
---The precision range to read.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@field precision_index defines.flow_precision_index
|
||||
---The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@field sample_index? uint16
|
||||
---If true, the count of items/fluids/entities is returned instead of the per-time-frame value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@field count? boolean
|
||||
|
||||
|
||||
---Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.
|
||||
---
|
||||
---Use `sample_index` to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.
|
||||
---
|
||||
---All return values are normalized to be per-tick for electric networks and per-minute for all other types.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count)
|
||||
---@param param LuaFlowStatistics.get_flow_count_param
|
||||
---@return double
|
||||
get_flow_count=function(param)end,
|
||||
---Gets the total input count for a given prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_input_count)
|
||||
---@param name string@The prototype name.
|
||||
---@return uint64|double
|
||||
get_input_count=function(name)end,
|
||||
---Gets the total output count for a given prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_output_count)
|
||||
---@param name string@The prototype name.
|
||||
---@return uint64|double
|
||||
get_output_count=function(name)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Adds a value to this flow statistics.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.on_flow)
|
||||
---@param name string@The prototype name.
|
||||
---@param count float@The count: positive or negative determines if the value goes in the input or output statistics.
|
||||
on_flow=function(name,count)end,
|
||||
---Sets the total input count for a given prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.set_input_count)
|
||||
---@param name string@The prototype name.
|
||||
---@param count uint64|double@The new count. The type depends on the instance of the statistics.
|
||||
set_input_count=function(name,count)end,
|
||||
---Sets the total output count for a given prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.set_output_count)
|
||||
---@param name string@The prototype name.
|
||||
---@param count uint64|double@The new count. The type depends on the instance of the statistics.
|
||||
set_output_count=function(name,count)end,
|
||||
}
|
||||
|
||||
|
||||
118
.vscode/factorio/runtime-api-LuaFluidBox.lua
vendored
118
.vscode/factorio/runtime-api-LuaFluidBox.lua
vendored
@@ -1,118 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFluidBox
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe. See [Fluid](https://lua-api.factorio.com/latest/Concepts.html#Fluid).
|
||||
---
|
||||
---Do note that reading from a [LuaFluidBox](https://lua-api.factorio.com/latest/LuaFluidBox.html) creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html)
|
||||
---
|
||||
---### Example
|
||||
---Double the temperature of the fluid in `entity`'s first fluid box.
|
||||
---```
|
||||
---fluid = entity.fluidbox[1]
|
||||
---fluid.temperature = fluid.temperature * 2
|
||||
---entity.fluidbox[1] = fluid
|
||||
---```
|
||||
---@class LuaFluidBox:LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The entity that owns this fluidbox.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.owner)
|
||||
---@field owner LuaEntity
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Number of fluid boxes.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.length)
|
||||
---@operator len: uint
|
||||
---[R]
|
||||
---Access, set or clear a fluid box. The index must always be in bounds (see [LuaFluidBox::length_operator](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.length_operator)). New fluidboxes may not be added or removed using this operator.
|
||||
---
|
||||
---Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.index)
|
||||
---@field [uint]? Fluid
|
||||
local LuaFluidBox={
|
||||
---Flushes all fluid from this fluidbox and its fluid system.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.flush)
|
||||
---@param index uint
|
||||
---@param fluid FluidIdentification?@If provided, only this fluid is flushed.
|
||||
---@return {[string]: float}@The removed fluid.
|
||||
flush=function(index,fluid)end,
|
||||
---The capacity of the given fluidbox index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_capacity)
|
||||
---@param index uint
|
||||
---@return double
|
||||
get_capacity=function(index)end,
|
||||
---The fluidboxes to which the fluidbox at the given index is connected.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_connections)
|
||||
---@param index uint
|
||||
---@return LuaFluidBox[]
|
||||
get_connections=function(index)end,
|
||||
---Get a fluid box filter
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_filter)
|
||||
---@param index uint@The index of the filter to get.
|
||||
---@return FluidBoxFilter?@The filter at the requested index, or `nil` if there isn't one.
|
||||
get_filter=function(index)end,
|
||||
---Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.
|
||||
---
|
||||
---**Note:** Fluid wagons do not track it and will return 0.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_flow)
|
||||
---@param index uint
|
||||
---@return double
|
||||
get_flow=function(index)end,
|
||||
---Gets unique fluid system identifier of selected fluid box. May return nil for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid system
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_fluid_system_id)
|
||||
---@param index uint
|
||||
---@return uint
|
||||
get_fluid_system_id=function(index)end,
|
||||
---Returns the fluid the fluidbox is locked onto
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_locked_fluid)
|
||||
---@param index uint
|
||||
---@return string?@`nil` if the fluidbox is not locked to any fluid.
|
||||
get_locked_fluid=function(index)end,
|
||||
---The prototype of this fluidbox index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_prototype)
|
||||
---@param index uint
|
||||
---@return LuaFluidBoxPrototype
|
||||
get_prototype=function(index)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Set a fluid box filter.
|
||||
---
|
||||
---**Note:** Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.set_filter)
|
||||
---@param index uint@The index of the filter to set.
|
||||
---@param filter FluidBoxFilterSpec|nil@The filter to set. Setting `nil` clears the filter.
|
||||
---@return boolean@Whether the filter was set successfully.
|
||||
set_filter=function(index,filter)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFluidBoxPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A prototype of a fluidbox owned by some [LuaEntityPrototype](https://lua-api.factorio.com/latest/LuaEntityPrototype.html).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html)
|
||||
---@class LuaFluidBoxPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.base_area)
|
||||
---@field base_area double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.base_level)
|
||||
---@field base_level double
|
||||
---[R]
|
||||
---The entity that this belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.entity)
|
||||
---@field entity LuaEntityPrototype
|
||||
---[R]
|
||||
---The filter, if any is set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.filter)
|
||||
---@field filter? LuaFluidPrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.height)
|
||||
---@field height double
|
||||
---[R]
|
||||
---The index of this fluidbox prototype in the owning entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.index)
|
||||
---@field index uint
|
||||
---[R]
|
||||
---The maximum temperature, if any is set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.maximum_temperature)
|
||||
---@field maximum_temperature? double
|
||||
---[R]
|
||||
---The minimum temperature, if any is set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.minimum_temperature)
|
||||
---@field minimum_temperature? double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The pipe connection points.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.pipe_connections)
|
||||
---@field pipe_connections FluidBoxConnection[]
|
||||
---[R]
|
||||
---The production type. "input", "output", "input-output", or "none".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.production_type)
|
||||
---@field production_type string
|
||||
---[R]
|
||||
---The render layer.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.render_layer)
|
||||
---@field render_layer string
|
||||
---[R]
|
||||
---The secondary draw orders for the 4 possible connection directions.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.secondary_draw_orders)
|
||||
---@field secondary_draw_orders int[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.volume)
|
||||
---@field volume double
|
||||
local LuaFluidBoxPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidBoxPrototype.html#LuaFluidBoxPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFluidEnergySourcePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a fluid energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html)
|
||||
---@class LuaFluidEnergySourcePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.burns_fluid)
|
||||
---@field burns_fluid boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.destroy_non_fuel_fluid)
|
||||
---@field destroy_non_fuel_fluid boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.effectivity)
|
||||
---@field effectivity double
|
||||
---[R]
|
||||
---The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.emissions)
|
||||
---@field emissions double
|
||||
---[R]
|
||||
---The fluid box for this energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.fluid_box)
|
||||
---@field fluid_box LuaFluidBoxPrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.fluid_usage_per_tick)
|
||||
---@field fluid_usage_per_tick double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.maximum_temperature)
|
||||
---@field maximum_temperature double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.render_no_network_icon)
|
||||
---@field render_no_network_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.render_no_power_icon)
|
||||
---@field render_no_power_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.scale_fluid_usage)
|
||||
---@field scale_fluid_usage boolean
|
||||
---[R]
|
||||
---The smoke sources for this prototype, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.smoke)
|
||||
---@field smoke SmokeSource[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaFluidEnergySourcePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
102
.vscode/factorio/runtime-api-LuaFluidPrototype.lua
vendored
102
.vscode/factorio/runtime-api-LuaFluidPrototype.lua
vendored
@@ -1,102 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFluidPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a fluid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html)
|
||||
---@class LuaFluidPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.base_color)
|
||||
---@field base_color Color
|
||||
---[R]
|
||||
---Default temperature of this fluid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.default_temperature)
|
||||
---@field default_temperature double
|
||||
---[R]
|
||||
---A multiplier on the amount of emissions produced when this fluid is burnt in a generator. A value above `1.0` increases emissions and vice versa. The multiplier can't be negative.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.emissions_multiplier)
|
||||
---@field emissions_multiplier double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.flow_color)
|
||||
---@field flow_color Color
|
||||
---[R]
|
||||
---The amount of energy in Joules one unit of this fluid will produce when burnt in a generator. A value of `0` means this fluid can't be used for energy generation. The value can't be negative.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.fuel_value)
|
||||
---@field fuel_value double
|
||||
---[R]
|
||||
---The temperature above which this fluid will be shown as gaseous inside tanks and pipes.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.gas_temperature)
|
||||
---@field gas_temperature double
|
||||
---[R]
|
||||
---Group of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.group)
|
||||
---@field group LuaGroup
|
||||
---[R]
|
||||
---The amount of energy in Joules required to heat one unit of this fluid by 1°C.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.heat_capacity)
|
||||
---@field heat_capacity double
|
||||
---[R]
|
||||
---Whether this fluid is hidden from the fluid and signal selectors.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Maximum temperature this fluid can reach.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.max_temperature)
|
||||
---@field max_temperature double
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Subgroup of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.subgroup)
|
||||
---@field subgroup LuaGroup
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaFluidPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFontPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a font.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html)
|
||||
---@class LuaFontPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.border)
|
||||
---@field border boolean
|
||||
---[R]
|
||||
---The border color, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.border_color)
|
||||
---@field border_color? Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.filtered)
|
||||
---@field filtered boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.from)
|
||||
---@field from string
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.size)
|
||||
---@field size int
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.spacing)
|
||||
---@field spacing float
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaFontPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFontPrototype.html#LuaFontPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
698
.vscode/factorio/runtime-api-LuaForce.lua
vendored
698
.vscode/factorio/runtime-api-LuaForce.lua
vendored
@@ -1,698 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaForce
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---`LuaForce` encapsulates data local to each "force" or "faction" of the game. Default forces are player, enemy and neutral. Players and mods can create additional forces (up to 64 total).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html)
|
||||
---@class LuaForce:LuaObject
|
||||
---[RW]
|
||||
---Enables some higher-level AI behaviour for this force. When set to `true`, biters belonging to this force will automatically expand into new territories, build new spawners, and form unit groups. By default, this value is `true` for the enemy force and `false` for all others.
|
||||
---
|
||||
---**Note:** Setting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.
|
||||
---
|
||||
---**Note:** It is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ai_controllable)
|
||||
---@field ai_controllable boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.artillery_range_modifier)
|
||||
---@field artillery_range_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_build_distance_bonus)
|
||||
---@field character_build_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_health_bonus)
|
||||
---@field character_health_bonus double
|
||||
---[RW]
|
||||
---the number of additional inventory slots the character main inventory has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_inventory_slots_bonus)
|
||||
---@field character_inventory_slots_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_item_drop_distance_bonus)
|
||||
---@field character_item_drop_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_item_pickup_distance_bonus)
|
||||
---@field character_item_pickup_distance_bonus double
|
||||
---[RW]
|
||||
---`true` if character requester logistics is enabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_logistic_requests)
|
||||
---@field character_logistic_requests boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_loot_pickup_distance_bonus)
|
||||
---@field character_loot_pickup_distance_bonus double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_reach_distance_bonus)
|
||||
---@field character_reach_distance_bonus uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_resource_reach_distance_bonus)
|
||||
---@field character_resource_reach_distance_bonus double
|
||||
---[RW]
|
||||
---Modifies the running speed of all characters in this force by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_running_speed_modifier)
|
||||
---@field character_running_speed_modifier double
|
||||
---[RW]
|
||||
---Number of character trash slots.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.character_trash_slot_count)
|
||||
---@field character_trash_slot_count double
|
||||
---[R]
|
||||
---Effective color of this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.color)
|
||||
---@field color Color
|
||||
---[R]
|
||||
---The connected players belonging to this force.
|
||||
---
|
||||
---This is primarily useful when you want to do some action against all online players of this force.
|
||||
---
|
||||
---**Note:** This does *not* index using player index. See [LuaPlayer::index](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index) on each player instance for the player index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.connected_players)
|
||||
---@field connected_players LuaPlayer[]
|
||||
---[R]
|
||||
---The currently ongoing technology research, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.current_research)
|
||||
---@field current_research? LuaTechnology
|
||||
---[RW]
|
||||
---Custom color for this force. If specified, will take priority over other sources of the force color. Writing nil clears custom color. Will return nil if it was not specified or if was set to {0,0,0,0}
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.custom_color)
|
||||
---@field custom_color? Color
|
||||
---[RW]
|
||||
---The time, in ticks, before a deconstruction order is removed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.deconstruction_time_to_live)
|
||||
---@field deconstruction_time_to_live uint
|
||||
---[R]
|
||||
---The entity build statistics for this force (built and mined)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.entity_build_count_statistics)
|
||||
---@field entity_build_count_statistics LuaFlowStatistics
|
||||
---[RW]
|
||||
---Evolution factor of this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.evolution_factor)
|
||||
---@field evolution_factor double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.evolution_factor_by_killing_spawners)
|
||||
---@field evolution_factor_by_killing_spawners double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.evolution_factor_by_pollution)
|
||||
---@field evolution_factor_by_pollution double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.evolution_factor_by_time)
|
||||
---@field evolution_factor_by_time double
|
||||
---[R]
|
||||
---The fluid production statistics for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.fluid_production_statistics)
|
||||
---@field fluid_production_statistics LuaFlowStatistics
|
||||
---[RW]
|
||||
---Additional lifetime for following robots.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.following_robots_lifetime_modifier)
|
||||
---@field following_robots_lifetime_modifier double
|
||||
---[RW]
|
||||
---If friendly fire is enabled for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.friendly_fire)
|
||||
---@field friendly_fire boolean
|
||||
---[RW]
|
||||
---The time, in ticks, before a placed ghost disappears.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ghost_time_to_live)
|
||||
---@field ghost_time_to_live uint
|
||||
---[R]
|
||||
---Unique ID associated with this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.index)
|
||||
---@field index uint
|
||||
---[RW]
|
||||
---The inserter stack size bonus for non stack inserters
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.inserter_stack_size_bonus)
|
||||
---@field inserter_stack_size_bonus double
|
||||
---[R]
|
||||
---The item production statistics for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.item_production_statistics)
|
||||
---@field item_production_statistics LuaFlowStatistics
|
||||
---[R]
|
||||
---All of the items that have been launched in rockets. The attribute is a dictionary mapping the item prototype names to the launched amounts.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.items_launched)
|
||||
---@field items_launched {[string]: uint}
|
||||
---[R]
|
||||
---The kill counter statistics for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.kill_count_statistics)
|
||||
---@field kill_count_statistics LuaFlowStatistics
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.laboratory_productivity_bonus)
|
||||
---@field laboratory_productivity_bonus double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.laboratory_speed_modifier)
|
||||
---@field laboratory_speed_modifier double
|
||||
---[R]
|
||||
---List of logistic networks, grouped by surface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.logistic_networks)
|
||||
---@field logistic_networks {[string]: LuaLogisticNetwork[]}
|
||||
---[RW]
|
||||
---Multiplier of the manual crafting speed. Default value is `0`. The actual crafting speed will be multiplied by `1 + manual_crafting_speed_modifier`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.manual_crafting_speed_modifier)
|
||||
---
|
||||
---### Example
|
||||
---Double the player's crafting speed
|
||||
---```
|
||||
---game.player.force.manual_crafting_speed_modifier = 1
|
||||
---```
|
||||
---@field manual_crafting_speed_modifier double
|
||||
---[RW]
|
||||
---Multiplier of the manual mining speed. Default value is `0`. The actual mining speed will be multiplied by `1 + manual_mining_speed_modifier`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.manual_mining_speed_modifier)
|
||||
---
|
||||
---### Example
|
||||
---Double the player's mining speed
|
||||
---```
|
||||
---game.player.force.manual_mining_speed_modifier = 1
|
||||
---```
|
||||
---@field manual_mining_speed_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.max_failed_attempts_per_tick_per_construction_queue)
|
||||
---@field max_failed_attempts_per_tick_per_construction_queue uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.max_successful_attempts_per_tick_per_construction_queue)
|
||||
---@field max_successful_attempts_per_tick_per_construction_queue uint
|
||||
---[RW]
|
||||
---Maximum number of follower robots.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.maximum_following_robot_count)
|
||||
---@field maximum_following_robot_count uint
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.mining_drill_productivity_bonus)
|
||||
---@field mining_drill_productivity_bonus double
|
||||
---[R]
|
||||
---Name of the force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.name)
|
||||
---
|
||||
---### Example
|
||||
---Prints "`player`"
|
||||
---```
|
||||
---game.player.print(game.player.force.name)
|
||||
---```
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Players belonging to this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.players)
|
||||
---@field players LuaPlayer[]
|
||||
---[RW]
|
||||
---The previous research, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.previous_research)
|
||||
---@field previous_research? LuaTechnology
|
||||
---[R]
|
||||
---Recipes available to this force, indexed by `name`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.recipes)
|
||||
---
|
||||
---### Example
|
||||
---Prints the category of the given recipe
|
||||
---```
|
||||
---game.player.print(game.player.force.recipes["transport-belt"].category)
|
||||
---```
|
||||
---@field recipes LuaCustomTable<string,LuaRecipe>
|
||||
---[R]
|
||||
---Whether research is enabled for this force, see [LuaForce::enable_research](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_research) and [LuaForce::disable_research](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_research)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_enabled)
|
||||
---@field research_enabled boolean
|
||||
---[RW]
|
||||
---Progress of current research, as a number in range [0, 1].
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_progress)
|
||||
---@field research_progress double
|
||||
---[RW]
|
||||
---The research queue of this force. The first technology in the array is the currently active one. Reading this attribute gives an array of [LuaTechnology](https://lua-api.factorio.com/latest/LuaTechnology.html).
|
||||
---
|
||||
---To write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research. Writing to this when the research queue is disabled will simply set the last research in the table as the current research.
|
||||
---
|
||||
---**Note:** This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_queue)
|
||||
---@field research_queue TechnologyIdentification[]
|
||||
---[RW]
|
||||
---Whether the research queue is available for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_queue_enabled)
|
||||
---@field research_queue_enabled boolean
|
||||
---[RW]
|
||||
---The number of rockets launched.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.rockets_launched)
|
||||
---@field rockets_launched uint
|
||||
---[RW]
|
||||
---If sharing chart data is enabled for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.share_chart)
|
||||
---@field share_chart boolean
|
||||
---[RW]
|
||||
---Number of items that can be transferred by stack inserters. When writing to this value, it must be >= 0 and <= 254.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.stack_inserter_capacity_bonus)
|
||||
---@field stack_inserter_capacity_bonus uint
|
||||
---[R]
|
||||
---Technologies owned by this force, indexed by `name`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.technologies)
|
||||
---
|
||||
---### Example
|
||||
---Researches the technology for the player's force
|
||||
---```
|
||||
---game.player.force.technologies["steel-processing"].researched = true
|
||||
---```
|
||||
---@field technologies LuaCustomTable<string,LuaTechnology>
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.train_braking_force_bonus)
|
||||
---@field train_braking_force_bonus double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.valid)
|
||||
---@field valid boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.worker_robots_battery_modifier)
|
||||
---@field worker_robots_battery_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.worker_robots_speed_modifier)
|
||||
---@field worker_robots_speed_modifier double
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.worker_robots_storage_bonus)
|
||||
---@field worker_robots_storage_bonus double
|
||||
---[RW]
|
||||
---Ability to create new blueprints using empty blueprint item when using zoom-to-world.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.zoom_to_world_blueprint_enabled)
|
||||
---@field zoom_to_world_blueprint_enabled boolean
|
||||
---[RW]
|
||||
---Ability to use deconstruction planner when using zoom-to-world.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.zoom_to_world_deconstruction_planner_enabled)
|
||||
---@field zoom_to_world_deconstruction_planner_enabled boolean
|
||||
---[RW]
|
||||
---Ability to use zoom-to-world on map.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.zoom_to_world_enabled)
|
||||
---@field zoom_to_world_enabled boolean
|
||||
---[RW]
|
||||
---Ability to build ghosts through blueprint or direct ghost placement, or "mine" ghosts when using zoom-to-world.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.zoom_to_world_ghost_building_enabled)
|
||||
---@field zoom_to_world_ghost_building_enabled boolean
|
||||
---[RW]
|
||||
---Ability to use custom selection tools when using zoom-to-world.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.zoom_to_world_selection_tool_enabled)
|
||||
---@field zoom_to_world_selection_tool_enabled boolean
|
||||
local LuaForce={
|
||||
---Adds a custom chart tag to the given surface and returns the new tag or `nil` if the given position isn't valid for a chart tag.
|
||||
---
|
||||
---**Note:** The chunk must be charted for a tag to be valid at that location.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_chart_tag_added](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) instantly.
|
||||
---Raised if the chart tag was successfully added.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_chart_tag)
|
||||
---@param surface SurfaceIdentification@Which surface to add the tag to.
|
||||
---@param tag ChartTagSpec@The tag to add.
|
||||
---@return LuaCustomChartTag?
|
||||
add_chart_tag=function(surface,tag)end,
|
||||
---Add this technology to the back of the research queue if the queue is enabled. Otherwise, set this technology to be researched now.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_research_started](https://lua-api.factorio.com/latest/events.html#on_research_started) instantly.
|
||||
---Raised if the technology was successfully added.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_research)
|
||||
---@param technology TechnologyIdentification
|
||||
---@return boolean@Whether the technology was successfully added.
|
||||
add_research=function(technology)end,
|
||||
---Cancels pending chart requests for the given surface or all surfaces.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.cancel_charting)
|
||||
---@param surface SurfaceIdentification?
|
||||
cancel_charting=function(surface)end,
|
||||
---Stop the research currently in progress. This will remove any dependent technologies from the research queue.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.cancel_current_research)
|
||||
cancel_current_research=function()end,
|
||||
---Chart a portion of the map. The chart for the given area is refreshed; it creates chart for any parts of the given area that haven't been charted yet.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.chart)
|
||||
---
|
||||
---### Example
|
||||
---Charts a 2048x2048 rectangle centered around the origin.
|
||||
---```
|
||||
---game.player.force.chart(game.player.surface, {{x = -1024, y = -1024}, {x = 1024, y = 1024}})
|
||||
---```
|
||||
---@param surface SurfaceIdentification
|
||||
---@param area BoundingBox@The area on the given surface to chart.
|
||||
chart=function(surface,area)end,
|
||||
---Chart all generated chunks.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.chart_all)
|
||||
---@param surface SurfaceIdentification?@Which surface to chart or all if not given.
|
||||
chart_all=function(surface)end,
|
||||
---Erases chart data for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.clear_chart)
|
||||
---@param surface SurfaceIdentification?@Which surface to erase chart data for or if not provided all surfaces charts are erased.
|
||||
clear_chart=function(surface)end,
|
||||
---Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_all_prototypes)
|
||||
disable_all_prototypes=function()end,
|
||||
---Disable research for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_research)
|
||||
disable_research=function()end,
|
||||
---Enables all recipes and technologies. The opposite of [LuaForce::disable_all_prototypes](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.disable_all_prototypes)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_all_prototypes)
|
||||
enable_all_prototypes=function()end,
|
||||
---Unlock all recipes.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_all_recipes)
|
||||
enable_all_recipes=function()end,
|
||||
---Unlock all technologies.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_all_technologies)
|
||||
enable_all_technologies=function()end,
|
||||
---Enable research for this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.enable_research)
|
||||
enable_research=function()end,
|
||||
---Finds all custom chart tags within the given bounding box on the given surface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.find_chart_tags)
|
||||
---@param surface SurfaceIdentification
|
||||
---@param area BoundingBox?
|
||||
---@return LuaCustomChartTag[]
|
||||
find_chart_tags=function(surface,area)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.find_logistic_network_by_position)
|
||||
---@param position MapPosition@Position to find a network for
|
||||
---@param surface SurfaceIdentification@Surface to search on
|
||||
---@return LuaLogisticNetwork?@The found network or `nil`.
|
||||
find_logistic_network_by_position=function(position,surface)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_ammo_damage_modifier)
|
||||
---@param ammo string@Ammo category
|
||||
---@return double
|
||||
get_ammo_damage_modifier=function(ammo)end,
|
||||
---Is `other` force in this force's cease fire list?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_cease_fire)
|
||||
---@param other ForceIdentification
|
||||
---@return boolean
|
||||
get_cease_fire=function(other)end,
|
||||
---Count entities of given type.
|
||||
---
|
||||
---**Note:** This function has O(1) time complexity as entity counts are kept and maintained in the game engine.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_entity_count)
|
||||
---@param name string@Prototype name of the entity.
|
||||
---@return uint@Number of entities of given prototype belonging to this force.
|
||||
get_entity_count=function(name)end,
|
||||
---Is `other` force in this force's friends list.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_friend)
|
||||
---@param other ForceIdentification
|
||||
---@return boolean
|
||||
get_friend=function(other)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_gun_speed_modifier)
|
||||
---@param ammo string@Ammo category
|
||||
---@return double
|
||||
get_gun_speed_modifier=function(ammo)end,
|
||||
---Gets if the given recipe is explicitly disabled from being hand crafted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_hand_crafting_disabled_for_recipe)
|
||||
---@param recipe string|LuaRecipe
|
||||
---@return boolean
|
||||
get_hand_crafting_disabled_for_recipe=function(recipe)end,
|
||||
---Gets the count of a given item launched in rockets.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_item_launched)
|
||||
---@param item string@The item to get
|
||||
---@return uint@The count of the item that has been launched.
|
||||
get_item_launched=function(item)end,
|
||||
---Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_linked_inventory)
|
||||
---@param prototype EntityPrototypeIdentification
|
||||
---@param link_id uint
|
||||
---@return LuaInventory?
|
||||
get_linked_inventory=function(prototype,link_id)end,
|
||||
---Gets the saved progress for the given technology or `nil` if there is no saved progress.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_saved_technology_progress)
|
||||
---@param technology TechnologyIdentification@The technology
|
||||
---@return double?@The progress as a percent.
|
||||
get_saved_technology_progress=function(technology)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_spawn_position)
|
||||
---@param surface SurfaceIdentification
|
||||
---@return MapPosition
|
||||
get_spawn_position=function(surface)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_train_stops)
|
||||
---@class LuaForce.get_train_stops_param
|
||||
---The name(s) of the train stops. Not providing names will match any stop.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_train_stops)
|
||||
---@field name? string|string[]
|
||||
---The surface to search. Not providing a surface will match stops on any surface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_train_stops)
|
||||
---@field surface? SurfaceIdentification
|
||||
|
||||
|
||||
---Gets train stops matching the given filters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_train_stops)
|
||||
---@param param?LuaForce.get_train_stops_param
|
||||
---@return LuaEntity[]
|
||||
get_train_stops=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_trains)
|
||||
---@param surface SurfaceIdentification?@The surface to search. Not providing a surface will match trains on any surface.
|
||||
---@return LuaTrain[]
|
||||
get_trains=function(surface)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_turret_attack_modifier)
|
||||
---@param turret string@Turret prototype name
|
||||
---@return double
|
||||
get_turret_attack_modifier=function(turret)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Has a chunk been charted?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_chunk_charted)
|
||||
---@param surface SurfaceIdentification
|
||||
---@param position ChunkPosition@Position of the chunk.
|
||||
---@return boolean
|
||||
is_chunk_charted=function(surface,position)end,
|
||||
---Is the given chunk currently charted and visible (not covered by fog of war) on the map.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_chunk_visible)
|
||||
---@param surface SurfaceIdentification
|
||||
---@param position ChunkPosition
|
||||
---@return boolean
|
||||
is_chunk_visible=function(surface,position)end,
|
||||
---Is this force an enemy? This differs from `get_cease_fire` in that it is always false for neutral force. This is equivalent to checking the `enemy` ForceCondition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_enemy)
|
||||
---@param other ForceIdentification
|
||||
---@return boolean
|
||||
is_enemy=function(other)end,
|
||||
---Is this force a friend? This differs from `get_friend` in that it is always true for neutral force. This is equivalent to checking the `friend` ForceCondition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_friend)
|
||||
---@param other ForceIdentification
|
||||
---@return boolean
|
||||
is_friend=function(other)end,
|
||||
---Is pathfinder busy? When the pathfinder is busy, it won't accept any more pathfinding requests.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_pathfinder_busy)
|
||||
---@return boolean
|
||||
is_pathfinder_busy=function()end,
|
||||
---Kill all units and flush the pathfinder.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.kill_all_units)
|
||||
kill_all_units=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@class LuaForce.play_sound_param
|
||||
---The sound to play.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@field path SoundPath
|
||||
---Where the sound should be played. If not given, it's played at the current position of each player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@field position? MapPosition
|
||||
---The volume of the sound to play. Must be between 0 and 1 inclusive.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@field volume_modifier? double
|
||||
---The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@field override_sound_type? SoundType
|
||||
|
||||
|
||||
---Play a sound for every player in this force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.play_sound)
|
||||
---@param param LuaForce.play_sound_param
|
||||
play_sound=function(param)end,
|
||||
---Print text to the chat console of all players on this force.
|
||||
---
|
||||
---**Note:** Messages that are identical to a message sent in the last 60 ticks are not printed again.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.print)
|
||||
---@param message LocalisedString
|
||||
---@param color Color?
|
||||
print=function(message,color)end,
|
||||
---Force a rechart of the whole chart.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.rechart)
|
||||
rechart=function()end,
|
||||
---Research all technologies.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_research_finished](https://lua-api.factorio.com/latest/events.html#on_research_finished) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_all_technologies)
|
||||
---@param include_disabled_prototypes boolean?@Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.
|
||||
research_all_technologies=function(include_disabled_prototypes)end,
|
||||
---Reset everything. All technologies are set to not researched, all modifiers are set to default values.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_force_reset](https://lua-api.factorio.com/latest/events.html#on_force_reset) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset)
|
||||
reset=function()end,
|
||||
---Resets evolution for this force to zero.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_evolution)
|
||||
reset_evolution=function()end,
|
||||
---Load the original version of all recipes from the prototypes.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_recipes)
|
||||
reset_recipes=function()end,
|
||||
---Load the original versions of technologies from prototypes. Preserves research state of technologies.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technologies)
|
||||
reset_technologies=function()end,
|
||||
---Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_technology_effects_reset](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects)
|
||||
reset_technology_effects=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_ammo_damage_modifier)
|
||||
---@param ammo string@Ammo category
|
||||
---@param modifier double
|
||||
set_ammo_damage_modifier=function(ammo,modifier)end,
|
||||
---Add `other` force to this force's cease fire list. Forces on the cease fire list won't be targeted for attack.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_force_cease_fire_changed](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_cease_fire)
|
||||
---@param other ForceIdentification
|
||||
---@param cease_fire boolean
|
||||
set_cease_fire=function(other,cease_fire)end,
|
||||
---Add `other` force to this force's friends list. Friends have unrestricted access to buildings and turrets won't fire at them.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_force_friends_changed](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_friend)
|
||||
---@param other ForceIdentification
|
||||
---@param friend boolean
|
||||
set_friend=function(other,friend)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_gun_speed_modifier)
|
||||
---@param ammo string@Ammo category
|
||||
---@param modifier double
|
||||
set_gun_speed_modifier=function(ammo,modifier)end,
|
||||
---Sets if the given recipe can be hand-crafted. This is used to explicitly disable hand crafting a recipe - it won't allow hand-crafting otherwise not hand-craftable recipes.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_hand_crafting_disabled_for_recipe)
|
||||
---@param recipe string|LuaRecipe
|
||||
---@param hand_crafting_disabled boolean
|
||||
set_hand_crafting_disabled_for_recipe=function(recipe,hand_crafting_disabled)end,
|
||||
---Sets the count of a given item launched in rockets.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_item_launched)
|
||||
---@param item string@The item to set
|
||||
---@param count uint@The count to set
|
||||
set_item_launched=function(item,count)end,
|
||||
---Sets the saved progress for the given technology. The technology must not be in progress, must not be completed, and the new progress must be < 100%.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_saved_technology_progress)
|
||||
---@param technology TechnologyIdentification@The technology
|
||||
---@param progress double@Progress as a percent. Set to `nil` to remove the saved progress.
|
||||
set_saved_technology_progress=function(technology,progress)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_spawn_position)
|
||||
---@param position MapPosition@The new position on the given surface.
|
||||
---@param surface SurfaceIdentification@Surface to set the spawn position for.
|
||||
set_spawn_position=function(position,surface)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_turret_attack_modifier)
|
||||
---@param turret string@Turret prototype name
|
||||
---@param modifier double
|
||||
set_turret_attack_modifier=function(turret,modifier)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.unchart_chunk)
|
||||
---@param position ChunkPosition@The chunk position to unchart.
|
||||
---@param surface SurfaceIdentification@Surface to unchart on.
|
||||
unchart_chunk=function(position,surface)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaFuelCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a fuel category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html)
|
||||
---@class LuaFuelCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaFuelCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
1045
.vscode/factorio/runtime-api-LuaGameScript.lua
vendored
1045
.vscode/factorio/runtime-api-LuaGameScript.lua
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaGenericOnOffControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---An abstract base class for behaviors that support switching the entity on or off based on some condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html)
|
||||
---@class LuaGenericOnOffControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---The circuit condition. Writing `nil` clears the circuit condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.circuit_condition)
|
||||
---
|
||||
---### Example
|
||||
---Tell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 chain signals.
|
||||
---```
|
||||
---a_behavior.circuit_condition = {condition={comparator=">",
|
||||
--- first_signal={type="item", name="rail-chain-signal"},
|
||||
--- constant=4}}
|
||||
---```
|
||||
---@field circuit_condition CircuitConditionDefinition
|
||||
---[RW]
|
||||
---`true` if this should connect to the logistic network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.connect_to_logistic_network)
|
||||
---@field connect_to_logistic_network boolean
|
||||
---[R]
|
||||
---If the entity is currently disabled because of the control behavior.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.disabled)
|
||||
---@field disabled boolean
|
||||
---[RW]
|
||||
---The logistic condition. Writing `nil` clears the logistic condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.logistic_condition)
|
||||
---
|
||||
---### Example
|
||||
---Tell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more than four chain signals.
|
||||
---```
|
||||
---a_behavior.logistic_condition = {condition={comparator=">",
|
||||
--- first_signal={type="item", name="rail-chain-signal"},
|
||||
--- constant=4}}
|
||||
---```
|
||||
---@field logistic_condition CircuitConditionDefinition
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaGenericOnOffControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
64
.vscode/factorio/runtime-api-LuaGroup.lua
vendored
64
.vscode/factorio/runtime-api-LuaGroup.lua
vendored
@@ -1,64 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaGroup
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Item group or subgroup.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html)
|
||||
---@class LuaGroup:LuaObject
|
||||
---[R]
|
||||
---The parent group, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.group)
|
||||
---@field group? LuaGroup
|
||||
---[R]
|
||||
---Localised name of the group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.localised_name)
|
||||
---@field localised_name? LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.name)
|
||||
---@field name? string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order_in_recipe)
|
||||
---@field order_in_recipe? string
|
||||
---[R]
|
||||
---Subgroups of this group. Can only be used on groups, not on subgroups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.subgroups)
|
||||
---@field subgroups? LuaGroup[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.type)
|
||||
---@field type? string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.valid)
|
||||
---@field valid boolean
|
||||
local LuaGroup={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
81
.vscode/factorio/runtime-api-LuaGui.lua
vendored
81
.vscode/factorio/runtime-api-LuaGui.lua
vendored
@@ -1,81 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaGui
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---The root of the GUI. This type houses the root elements, `top`, `left`, `center`, `goal`, and `screen`, to which other elements can be added to be displayed on screen.
|
||||
---
|
||||
---**Note:** Every player can have a different GUI state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html)
|
||||
---@class LuaGui:LuaObject
|
||||
---[R]
|
||||
---The center part of the GUI. It is a flow element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.center)
|
||||
---@field center LuaGuiElement
|
||||
---[R]
|
||||
---The children GUI elements mapped by name <> element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.children)
|
||||
---@field children {[string]: LuaGuiElement}
|
||||
---[R]
|
||||
---The flow used in the objectives window. It is a flow element. The objectives window is only visible when the flow is not empty or the objective text is set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.goal)
|
||||
---@field goal LuaGuiElement
|
||||
---[R]
|
||||
---The left part of the GUI. It is a flow element inside a scroll pane element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.left)
|
||||
---@field left LuaGuiElement
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The player who owns this gui.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.player)
|
||||
---@field player LuaPlayer
|
||||
---[R]
|
||||
---For showing a GUI somewhere relative to one of the game GUIs. It is an empty-widget element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.relative)
|
||||
---@field relative LuaGuiElement
|
||||
---[R]
|
||||
---For showing a GUI somewhere on the entire screen. It is an empty-widget element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen)
|
||||
---@field screen LuaGuiElement
|
||||
---[R]
|
||||
---The top part of the GUI. It is a flow element inside a scroll pane element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.top)
|
||||
---@field top LuaGuiElement
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.valid)
|
||||
---@field valid boolean
|
||||
local LuaGui={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
|
||||
---
|
||||
---If you want to avoid needing a LuaGui object, [LuaGameScript::is_valid_sprite_path](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path) can be used instead.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.is_valid_sprite_path)
|
||||
---@param sprite_path SpritePath@Path to a image.
|
||||
---@return boolean
|
||||
is_valid_sprite_path=function(sprite_path)end,
|
||||
}
|
||||
|
||||
|
||||
1175
.vscode/factorio/runtime-api-LuaGuiElement.lua
vendored
1175
.vscode/factorio/runtime-api-LuaGuiElement.lua
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,63 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaHeatBufferPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a heat buffer.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html)
|
||||
---@class LuaHeatBufferPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.connections)
|
||||
---@field connections HeatConnection[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.default_temperature)
|
||||
---@field default_temperature double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.max_temperature)
|
||||
---@field max_temperature double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.max_transfer)
|
||||
---@field max_transfer double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.min_temperature_gradient)
|
||||
---@field min_temperature_gradient double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.min_working_temperature)
|
||||
---@field min_working_temperature double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.minimum_glow_temperature)
|
||||
---@field minimum_glow_temperature double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.specific_heat)
|
||||
---@field specific_heat double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaHeatBufferPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html#LuaHeatBufferPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaHeatEnergySourcePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a heat energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html)
|
||||
---@class LuaHeatEnergySourcePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.connections)
|
||||
---@field connections HeatConnection[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.default_temperature)
|
||||
---@field default_temperature double
|
||||
---[R]
|
||||
---The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.emissions)
|
||||
---@field emissions double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.heat_buffer_prototype)
|
||||
---@field heat_buffer_prototype LuaHeatBufferPrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.max_temperature)
|
||||
---@field max_temperature double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.max_transfer)
|
||||
---@field max_transfer double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.min_temperature_gradient)
|
||||
---@field min_temperature_gradient double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.min_working_temperature)
|
||||
---@field min_working_temperature double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.minimum_glow_temperature)
|
||||
---@field minimum_glow_temperature double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.render_no_network_icon)
|
||||
---@field render_no_network_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.render_no_power_icon)
|
||||
---@field render_no_power_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.specific_heat)
|
||||
---@field specific_heat double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaHeatEnergySourcePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaInserterControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for inserters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html)
|
||||
---@class LuaInserterControlBehavior:LuaGenericOnOffControlBehavior
|
||||
---[RW]
|
||||
---The hand read mode for the inserter.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.circuit_hand_read_mode)
|
||||
---@field circuit_hand_read_mode defines.control_behavior.inserter.hand_read_mode
|
||||
---[RW]
|
||||
---The circuit mode of operations for the inserter.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.circuit_mode_of_operation)
|
||||
---@field circuit_mode_of_operation defines.control_behavior.inserter.circuit_mode_of_operation
|
||||
---[RW]
|
||||
---`true` if the contents of the inserter hand should be sent to the circuit network
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.circuit_read_hand_contents)
|
||||
---@field circuit_read_hand_contents boolean
|
||||
---[RW]
|
||||
---If the stack size of the inserter is set through the circuit network or not.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.circuit_set_stack_size)
|
||||
---@field circuit_set_stack_size boolean
|
||||
---[RW]
|
||||
---The signal used to set the stack size of the inserter.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.circuit_stack_control_signal)
|
||||
---@field circuit_stack_control_signal SignalID
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaInserterControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html#LuaInserterControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
230
.vscode/factorio/runtime-api-LuaInventory.lua
vendored
230
.vscode/factorio/runtime-api-LuaInventory.lua
vendored
@@ -1,230 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaInventory
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A storage of item stacks.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html)
|
||||
---@class LuaInventory:LuaObject
|
||||
---[R]
|
||||
---The entity that owns this inventory, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.entity_owner)
|
||||
---@field entity_owner? LuaEntity
|
||||
---[R]
|
||||
---The equipment that owns this inventory, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.equipment_owner)
|
||||
---@field equipment_owner? LuaEquipment
|
||||
---[R]
|
||||
---The inventory index this inventory uses, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.index)
|
||||
---@field index? defines.inventory
|
||||
---[R]
|
||||
---The mod that owns this inventory, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.mod_owner)
|
||||
---@field mod_owner? string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The player that owns this inventory, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.player_owner)
|
||||
---@field player_owner? LuaPlayer
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Get the number of slots in this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.length)
|
||||
---
|
||||
---### Example
|
||||
---Will print the number of slots in the player's main inventory.
|
||||
---```
|
||||
---game.player.print(#game.player.get_main_inventory())
|
||||
---```
|
||||
---@operator len: uint
|
||||
---[R]
|
||||
---The indexing operator.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.index)
|
||||
---
|
||||
---### Example
|
||||
---Will get the first item in the player's inventory.
|
||||
---```
|
||||
---game.player.get_main_inventory()[1]
|
||||
---```
|
||||
---@field [uint] LuaItemStack
|
||||
local LuaInventory={
|
||||
---Can at least some items be inserted?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.can_insert)
|
||||
---@param items ItemStackIdentification@Items that would be inserted.
|
||||
---@return boolean@`true` if at least a part of the given items could be inserted into this inventory.
|
||||
can_insert=function(items)end,
|
||||
---If the given inventory slot filter can be set to the given filter.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.can_set_filter)
|
||||
---@param index uint@The item stack index
|
||||
---@param filter string@The item name of the filter
|
||||
---@return boolean
|
||||
can_set_filter=function(index,filter)end,
|
||||
---Make this inventory empty.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.clear)
|
||||
clear=function()end,
|
||||
---Counts the number of empty stacks.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.count_empty_stacks)
|
||||
---@param include_filtered boolean?@If true, filtered slots will be included. Defaults to false.
|
||||
---@param include_bar boolean?@If true, slots blocked by the current bar will be included. Defaults to true.
|
||||
---@return uint
|
||||
count_empty_stacks=function(include_filtered,include_bar)end,
|
||||
---Destroys this inventory.
|
||||
---
|
||||
---**Note:** Only inventories created by [LuaGameScript::create_inventory](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) can be destroyed this way.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.destroy)
|
||||
destroy=function()end,
|
||||
---Finds the first empty stack. Filtered slots are excluded unless a filter item is given.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.find_empty_stack)
|
||||
---@param item string?@If given, empty stacks that are filtered for this item will be included.
|
||||
---@return LuaItemStack?@The first empty stack, or `nil` if there aren't any empty stacks.
|
||||
---@return uint?@The stack index of the matching stack, if any is found.
|
||||
find_empty_stack=function(item)end,
|
||||
---Finds the first LuaItemStack in the inventory that matches the given item name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.find_item_stack)
|
||||
---@param item string@The item name to find
|
||||
---@return LuaItemStack?@The first matching stack, or `nil` if none match.
|
||||
---@return uint?@The stack index of the matching stack, if any is found.
|
||||
find_item_stack=function(item)end,
|
||||
---Get the current bar. This is the index at which the red area starts.
|
||||
---
|
||||
---**Note:** Only useable if this inventory supports having a bar.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_bar)
|
||||
---@return uint
|
||||
get_bar=function()end,
|
||||
---Get counts of all items in this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents)
|
||||
---@return {[string]: uint}@The counts, indexed by item names.
|
||||
get_contents=function()end,
|
||||
---Gets the filter for the given item stack index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_filter)
|
||||
---@param index uint@The item stack index
|
||||
---@return string?@The current filter or `nil` if none.
|
||||
get_filter=function(index)end,
|
||||
---Gets the number of the given item that can be inserted into this inventory.
|
||||
---
|
||||
---**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.
|
||||
---
|
||||
---**Note:** The main use for this is in checking how many of a basic item can fit into a basic inventory.
|
||||
---
|
||||
---**Note:** This accounts for the 'bar' on the inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_insertable_count)
|
||||
---@param item string@The item to check.
|
||||
get_insertable_count=function(item)end,
|
||||
---Get the number of all or some items in this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_item_count)
|
||||
---@param item string?@Prototype name of the item to count. If not specified, count all items.
|
||||
---@return uint
|
||||
get_item_count=function(item)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Insert items into this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.insert)
|
||||
---@param items ItemStackIdentification@Items to insert.
|
||||
---@return uint@Number of items actually inserted.
|
||||
insert=function(items)end,
|
||||
---Does this inventory contain nothing?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.is_empty)
|
||||
---@return boolean
|
||||
is_empty=function()end,
|
||||
---If this inventory supports filters and has at least 1 filter set.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.is_filtered)
|
||||
---@return boolean
|
||||
is_filtered=function()end,
|
||||
---Is every stack in this inventory full? Ignores stacks blocked by the current bar.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.is_full)
|
||||
---@return boolean
|
||||
is_full=function()end,
|
||||
---Remove items from this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.remove)
|
||||
---@param items ItemStackIdentification@Items to remove.
|
||||
---@return uint@Number of items actually removed.
|
||||
remove=function(items)end,
|
||||
---Resizes the inventory.
|
||||
---
|
||||
---**Note:** Items in slots beyond the new capacity are deleted.
|
||||
---
|
||||
---**Note:** Only inventories created by [LuaGameScript::create_inventory](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) can be resized.
|
||||
---
|
||||
---**Events:**
|
||||
--- * Will raise [on_pre_script_inventory_resized](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) instantly.
|
||||
---
|
||||
--- * Will raise [on_script_inventory_resized](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) instantly.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.resize)
|
||||
---@param size uint16@New size of a inventory
|
||||
resize=function(size)end,
|
||||
---Set the current bar.
|
||||
---
|
||||
---**Note:** Only useable if this inventory supports having a bar.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_bar)
|
||||
---@param bar uint?@The new limit. Omitting this parameter will clear the limit.
|
||||
set_bar=function(bar)end,
|
||||
---Sets the filter for the given item stack index.
|
||||
---
|
||||
---**Note:** Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_filter)
|
||||
---@param index uint@The item stack index.
|
||||
---@param filter string|nil@The new filter. `nil` erases any existing filter.
|
||||
---@return boolean@If the filter was allowed to be set.
|
||||
set_filter=function(index,filter)end,
|
||||
---Sorts and merges the items in this inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.sort_and_merge)
|
||||
sort_and_merge=function()end,
|
||||
---Does this inventory support a bar? Bar is the draggable red thing, found for example on chests, that limits the portion of the inventory that may be manipulated by machines.
|
||||
---
|
||||
---**Note:** "Supporting a bar" doesn't mean that the bar is set to some nontrivial value. Supporting a bar means the inventory supports having this limit at all. The character's inventory is an example of an inventory without a bar; the wooden chest's inventory is an example of one with a bar.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.supports_bar)
|
||||
---@return boolean
|
||||
supports_bar=function()end,
|
||||
---If this inventory supports filters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.supports_filters)
|
||||
---@return boolean
|
||||
supports_filters=function()end,
|
||||
}
|
||||
|
||||
|
||||
619
.vscode/factorio/runtime-api-LuaItemPrototype.lua
vendored
619
.vscode/factorio/runtime-api-LuaItemPrototype.lua
vendored
@@ -1,619 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaItemPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html)
|
||||
---
|
||||
---### Example
|
||||
---```
|
||||
---game.item_prototypes["iron-plate"]
|
||||
---```
|
||||
---@class LuaItemPrototype:LuaObject
|
||||
---[R]
|
||||
---The alt entity filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_entity_filter_mode? string
|
||||
---[R]
|
||||
---The alt entity filters used by this selection tool indexed by entity name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_entity_filters? {[string]: LuaEntityPrototype}
|
||||
---[R]
|
||||
---The alt entity type filters used by this selection tool indexed by entity type.
|
||||
---
|
||||
---**Note:** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_type_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_entity_type_filters? {[string]: boolean}
|
||||
---[R]
|
||||
---The alt reverse entity filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_alt_entity_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_alt_entity_filter_mode? string
|
||||
---[R]
|
||||
---The alt reverse entity filters used by this selection tool indexed by entity name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_entity_filters? {[string]: LuaEntityPrototype}
|
||||
---[R]
|
||||
---The alt reverse entity type filters used by this selection tool indexed by entity type.
|
||||
---
|
||||
---**Note:** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_type_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_entity_type_filters? {[string]: boolean}
|
||||
---[R]
|
||||
---The color used when doing alt reverse selection with this selection tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_border_color)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_selection_border_color? Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_cursor_box_type)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_selection_cursor_box_type? string
|
||||
---[R]
|
||||
---Flags that affect which entities will be selected during alt reverse selection.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_mode_flags)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_selection_mode_flags? SelectionModeFlags
|
||||
---[R]
|
||||
---The alt reverse tile filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_tile_filter_mode? string
|
||||
---[R]
|
||||
---The alt reverse tile filters used by this selection tool indexed by tile name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_reverse_tile_filters? {[string]: LuaTilePrototype}
|
||||
---[R]
|
||||
---The color used when doing alt selection with this selection tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_border_color)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_selection_border_color? Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_cursor_box_type)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_selection_cursor_box_type? string
|
||||
---[R]
|
||||
---Flags that affect which entities will be selected during alternate selection.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_mode_flags)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_selection_mode_flags? SelectionModeFlags
|
||||
---[R]
|
||||
---The alt tile filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_tile_filter_mode? string
|
||||
---[R]
|
||||
---The alt tile filters used by this selection tool indexed by tile name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field alt_tile_filters? {[string]: LuaTilePrototype}
|
||||
---[R]
|
||||
---If tiles area always included when doing selection with this selection tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.always_include_tiles)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field always_include_tiles? boolean
|
||||
---[R]
|
||||
---The gun attack parameters.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.attack_parameters)
|
||||
---
|
||||
---_Can only be used if this is Gun_
|
||||
---@field attack_parameters? AttackParameters
|
||||
---[R]
|
||||
---The result of burning this item as fuel, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.burnt_result)
|
||||
---@field burnt_result? LuaItemPrototype
|
||||
---[R]
|
||||
---If this item can be mod-opened.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.can_be_mod_opened)
|
||||
---@field can_be_mod_opened boolean
|
||||
---[R]
|
||||
---The capsule action for this capsule item prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.capsule_action)
|
||||
---
|
||||
---_Can only be used if this is Capsule_
|
||||
---@field capsule_action? CapsuleAction
|
||||
---[R]
|
||||
---The name of a [LuaModuleCategoryPrototype](https://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 modules.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.category)
|
||||
---
|
||||
---_Can only be used if this is ModuleItem_
|
||||
---@field category? string
|
||||
---[R]
|
||||
---The curved rail prototype used for this rail planner prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.curved_rail)
|
||||
---
|
||||
---_Can only be used if this is RailPlanner_
|
||||
---@field curved_rail? LuaEntityPrototype
|
||||
---[R]
|
||||
---The default label color used for this item with label, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.default_label_color)
|
||||
---
|
||||
---_Can only be used if this is ItemWithLabel_
|
||||
---@field default_label_color? Color
|
||||
---[R]
|
||||
---The default request value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.default_request_amount)
|
||||
---@field default_request_amount uint
|
||||
---[R]
|
||||
---If true, and this item with label has a label it is drawn in place of the normal number when held in the cursor.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.draw_label_for_cursor_render)
|
||||
---
|
||||
---_Can only be used if this is ItemWithLabel_
|
||||
---@field draw_label_for_cursor_render? boolean
|
||||
---[R]
|
||||
---The durability of this tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.durability)
|
||||
---
|
||||
---_Can only be used if this is ToolItem_
|
||||
---@field durability? double
|
||||
---[R]
|
||||
---The durability message key used when displaying the durability of this tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.durability_description_key)
|
||||
---
|
||||
---_Can only be used if this is ToolItem_
|
||||
---@field durability_description_key? string
|
||||
---[R]
|
||||
---The entity filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field entity_filter_mode? string
|
||||
---[R]
|
||||
---The number of entity filters this deconstruction item has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_filter_slots)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field entity_filter_slots? uint
|
||||
---[R]
|
||||
---The entity filters used by this selection tool indexed by entity name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field entity_filters? {[string]: LuaEntityPrototype}
|
||||
---[R]
|
||||
---The entity type filters used by this selection tool indexed by entity type.
|
||||
---
|
||||
---**Note:** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_type_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field entity_type_filters? {[string]: boolean}
|
||||
---[R]
|
||||
---The prototype of this armor equipment grid, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.equipment_grid)
|
||||
---
|
||||
---_Can only be used if this is Armor_
|
||||
---@field equipment_grid? LuaEquipmentGridPrototype
|
||||
---[R]
|
||||
---If this item with inventory extends the inventory it resides in by default.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.extend_inventory_by_default)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field extend_inventory_by_default? boolean
|
||||
---[R]
|
||||
---The filter mode used by this item with inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.filter_mode)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field filter_mode? string
|
||||
---[R]
|
||||
---The flags for this item prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.flags)
|
||||
---@field flags ItemPrototypeFlags
|
||||
---[R]
|
||||
---The acceleration multiplier when this item is used as fuel in a vehicle.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.fuel_acceleration_multiplier)
|
||||
---@field fuel_acceleration_multiplier double
|
||||
---[R]
|
||||
---The fuel category of this item prototype, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.fuel_category)
|
||||
---@field fuel_category? string
|
||||
---[R]
|
||||
---The emissions multiplier if this is used as fuel.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.fuel_emissions_multiplier)
|
||||
---@field fuel_emissions_multiplier double
|
||||
---[R]
|
||||
---The fuel top speed multiplier when this item is used as fuel in a vehicle.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.fuel_top_speed_multiplier)
|
||||
---@field fuel_top_speed_multiplier double
|
||||
---[R]
|
||||
---Fuel value when burned.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.fuel_value)
|
||||
---@field fuel_value float
|
||||
---[R]
|
||||
---The group this prototype belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.group)
|
||||
---@field group LuaGroup
|
||||
---[R]
|
||||
---If this tool item has infinite durability.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.infinite)
|
||||
---
|
||||
---_Can only be used if this is ToolItem_
|
||||
---@field infinite? boolean
|
||||
---[R]
|
||||
---The insertion priority mode used by this item with inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.insertion_priority_mode)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field insertion_priority_mode? string
|
||||
---[R]
|
||||
---The main inventory size for item-with-inventory-prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.inventory_size)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventoryPrototype_
|
||||
---@field inventory_size? uint
|
||||
---[R]
|
||||
---The inventory size bonus for this armor prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.inventory_size_bonus)
|
||||
---
|
||||
---_Can only be used if this is ArmorPrototype_
|
||||
---@field inventory_size_bonus? uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.item_filters)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field item_filters? {[string]: LuaItemPrototype}
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.item_group_filters)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field item_group_filters? {[string]: LuaGroup}
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.item_subgroup_filters)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field item_subgroup_filters? {[string]: LuaGroup}
|
||||
---[R]
|
||||
---The limitation message key used when the player attempts to use this modules in some place it's not allowed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.limitation_message_key)
|
||||
---
|
||||
---_Can only be used if this is ModuleItem_
|
||||
---@field limitation_message_key? string
|
||||
---[R]
|
||||
---An array of recipe names this module is allowed to work with. Empty when all recipes are allowed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.limitations)
|
||||
---
|
||||
---_Can only be used if this is ModuleItem_
|
||||
---@field limitations? string[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---The localised string used when the player attempts to put items into this item with inventory that aren't allowed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.localised_filter_message)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field localised_filter_message? LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Size of full magazine.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.magazine_size)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@field magazine_size? float
|
||||
---[R]
|
||||
---How many filters an upgrade item has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.mapper_count)
|
||||
---
|
||||
---_Can only be used if this is UpgradeItem_
|
||||
---@field mapper_count? uint
|
||||
---[R]
|
||||
---Effects of this module.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.module_effects)
|
||||
---
|
||||
---_Can only be used if this is ModuleItem_
|
||||
---@field module_effects? ModuleEffects
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Prototype of the equipment that will be created by placing this item in an equipment grid, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.place_as_equipment_result)
|
||||
---@field place_as_equipment_result? LuaEquipmentPrototype
|
||||
---[R]
|
||||
---The place-as-tile result if one is defined, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.place_as_tile_result)
|
||||
---@field place_as_tile_result? PlaceAsTileResult
|
||||
---[R]
|
||||
---Prototype of the entity that will be created by placing this item, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.place_result)
|
||||
---@field place_result? LuaEntityPrototype
|
||||
---[R]
|
||||
---Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reload_time)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@field reload_time? float
|
||||
---[R]
|
||||
---The repair result of this repair tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.repair_result)
|
||||
---
|
||||
---_Can only be used if this is RepairTool_
|
||||
---@field repair_result? TriggerItem[]
|
||||
---[R]
|
||||
---Resistances of this armor item, if any, indexed by damage type name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.resistances)
|
||||
---
|
||||
---_Can only be used if this is Armor_
|
||||
---@field resistances? {[string]: Resistance}
|
||||
---[R]
|
||||
---The reverse entity filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_alt_entity_filter_mode? string
|
||||
---[R]
|
||||
---The reverse entity filters used by this selection tool indexed by entity name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_entity_filters? {[string]: LuaEntityPrototype}
|
||||
---[R]
|
||||
---The reverse entity type filters used by this selection tool indexed by entity type.
|
||||
---
|
||||
---**Note:** The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_entity_type_filters? {[string]: boolean}
|
||||
---[R]
|
||||
---The color used when doing reverse selection with this selection tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_selection_border_color? Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_selection_cursor_box_type? string
|
||||
---[R]
|
||||
---Flags that affect which entities will be selected during reverse selection.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_selection_mode_flags? SelectionModeFlags
|
||||
---[R]
|
||||
---The reverse tile filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_tile_filter_mode? string
|
||||
---[R]
|
||||
---The reverse tile filters used by this selection tool indexed by tile name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field reverse_tile_filters? {[string]: LuaTilePrototype}
|
||||
---[R]
|
||||
---The results of launching this item in a rocket.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.rocket_launch_products)
|
||||
---@field rocket_launch_products Product[]
|
||||
---[R]
|
||||
---The color used when doing normal selection with this selection tool prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_border_color)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field selection_border_color? Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_cursor_box_type)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field selection_cursor_box_type? string
|
||||
---[R]
|
||||
---Flags that affect which entities will be selected.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_mode_flags)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field selection_mode_flags? SelectionModeFlags
|
||||
---[R]
|
||||
---The repairing speed if this is a repairing tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.speed)
|
||||
---
|
||||
---_Can only be used if this is RepairTool_
|
||||
---@field speed? float
|
||||
---[R]
|
||||
---Maximum stack size of the item specified by this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.stack_size)
|
||||
---@field stack_size uint
|
||||
---[R]
|
||||
---Is this item allowed to stack at all?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.stackable)
|
||||
---@field stackable boolean
|
||||
---[R]
|
||||
---The straight rail prototype used for this rail planner prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.straight_rail)
|
||||
---
|
||||
---_Can only be used if this is RailPlanner_
|
||||
---@field straight_rail? LuaEntityPrototype
|
||||
---[R]
|
||||
---The subgroup this prototype belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.subgroup)
|
||||
---@field subgroup LuaGroup
|
||||
---[R]
|
||||
---Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.tier)
|
||||
---
|
||||
---_Can only be used if this is ModuleItem_
|
||||
---@field tier? uint
|
||||
---[R]
|
||||
---The tile filter mode used by this selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.tile_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field tile_filter_mode? string
|
||||
---[R]
|
||||
---The number of tile filters this deconstruction item has.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.tile_filter_slots)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field tile_filter_slots? uint
|
||||
---[R]
|
||||
---The tile filters used by this selection tool indexed by tile name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.tile_filters)
|
||||
---
|
||||
---_Can only be used if this is SelectionTool_
|
||||
---@field tile_filters? {[string]: LuaTilePrototype}
|
||||
---[R]
|
||||
---Type of this prototype. E.g. `"gun"` or `"mining-tool"`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.type)
|
||||
---@field type string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---The number of items needed to connect two entities with this as wire.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.wire_count)
|
||||
---@field wire_count uint
|
||||
local LuaItemPrototype={
|
||||
---The type of this ammo prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.get_ammo_type)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@param ammo_source_type string?@One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
|
||||
---@return AmmoType?
|
||||
get_ammo_type=function(ammo_source_type)end,
|
||||
---Does this prototype have a flag enabled?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.has_flag)
|
||||
---@param flag string@The flag to check. Can be one of [ItemPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags). Any other value will cause an error.
|
||||
---@return boolean
|
||||
has_flag=function(flag)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
720
.vscode/factorio/runtime-api-LuaItemStack.lua
vendored
720
.vscode/factorio/runtime-api-LuaItemStack.lua
vendored
@@ -1,720 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaItemStack
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A reference to an item and count owned by some external entity.
|
||||
---
|
||||
---**Note:** In most instances this is a simple reference as in: it points at a specific slot in an inventory and not the item in the slot.
|
||||
---
|
||||
---**Note:** In the instance this references an item on a [LuaTransportLine](https://lua-api.factorio.com/latest/LuaTransportLine.html) the reference is only guaranteed to stay valid (and refer to the same item) as long as nothing changes the transport line.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html)
|
||||
---@class LuaItemStack:LuaObject
|
||||
---[RW]
|
||||
---The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.active_index)
|
||||
---
|
||||
---_Can only be used if this is BlueprintBookItem_
|
||||
---@field active_index? uint
|
||||
---[RW]
|
||||
---Whether the label for this item can be manually changed. When false the label can only be changed through the API.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.allow_manual_label_change)
|
||||
---
|
||||
---_Can only be used if this is ItemWithLabel_
|
||||
---@field allow_manual_label_change boolean
|
||||
---[RW]
|
||||
---Number of bullets left in the magazine.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.ammo)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@field ammo uint
|
||||
---[RW]
|
||||
---If absolute snapping is enabled on this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.blueprint_absolute_snapping)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field blueprint_absolute_snapping boolean
|
||||
---[RW]
|
||||
---Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. An item that doesn't have icons returns `nil` on read and throws error on write.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.blueprint_icons)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field blueprint_icons? BlueprintSignalIcon[]
|
||||
---[RW]
|
||||
---The offset from the absolute grid. `nil` if absolute snapping is not enabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.blueprint_position_relative_to_grid)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field blueprint_position_relative_to_grid? TilePosition
|
||||
---[RW]
|
||||
---The snapping grid size in this blueprint item. `nil` if snapping is not enabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.blueprint_snap_to_grid)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field blueprint_snap_to_grid? TilePosition
|
||||
---[RW]
|
||||
---If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.connected_entity)
|
||||
---
|
||||
---_Can only be used if this is SpidertronRemote_
|
||||
---@field connected_entity? LuaEntity
|
||||
---[R]
|
||||
---Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype name to the required count.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cost_to_build)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field cost_to_build {[string]: uint}
|
||||
---[RW]
|
||||
---Number of items in this stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.count)
|
||||
---@field count uint
|
||||
---[RW]
|
||||
---The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.custom_description)
|
||||
---@field custom_description LocalisedString
|
||||
---[R]
|
||||
---The default icons for a blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.default_icons)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@field default_icons BlueprintItemIcon[]
|
||||
---[RW]
|
||||
---Durability of the contained item. Automatically capped at the item's maximum durability.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.durability)
|
||||
---
|
||||
---_Can only be used if this is Tool_
|
||||
---@field durability? double
|
||||
---[R]
|
||||
---The number of entity filters this deconstruction item supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.entity_filter_count)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field entity_filter_count uint
|
||||
---[RW]
|
||||
---The blacklist/whitelist entity filter mode for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.entity_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field entity_filter_mode defines.deconstruction_item.entity_filter_mode
|
||||
---[RW]
|
||||
---The entity filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be entity prototype names that don't have the `"not-deconstructable"` flag set and are either a `cliff` or marked as `minable`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.entity_filters)
|
||||
---@field entity_filters string[]
|
||||
---[RW]
|
||||
---If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). Only callable on items with inventories.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.extends_inventory)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field extends_inventory boolean
|
||||
---[R]
|
||||
---The equipment grid of this item, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.grid)
|
||||
---@field grid? LuaEquipmentGrid
|
||||
---[RW]
|
||||
---How much health the item has, as a number in range [0, 1].
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.health)
|
||||
---@field health float
|
||||
---[R]
|
||||
---If this is an armor item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_armor)
|
||||
---@field is_armor boolean
|
||||
---[R]
|
||||
---If this is a blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_blueprint)
|
||||
---@field is_blueprint boolean
|
||||
---[R]
|
||||
---If this is a blueprint book item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_blueprint_book)
|
||||
---@field is_blueprint_book boolean
|
||||
---[R]
|
||||
---If this is a deconstruction tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_deconstruction_item)
|
||||
---@field is_deconstruction_item boolean
|
||||
---[R]
|
||||
---If this is an item with entity data item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_item_with_entity_data)
|
||||
---@field is_item_with_entity_data boolean
|
||||
---[R]
|
||||
---If this is an item with inventory item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_item_with_inventory)
|
||||
---@field is_item_with_inventory boolean
|
||||
---[R]
|
||||
---If this is an item with label item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_item_with_label)
|
||||
---@field is_item_with_label boolean
|
||||
---[R]
|
||||
---If this is an item with tags item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_item_with_tags)
|
||||
---@field is_item_with_tags boolean
|
||||
---[R]
|
||||
---If this is a mining tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_mining_tool)
|
||||
---@field is_mining_tool boolean
|
||||
---[R]
|
||||
---If this is a module item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_module)
|
||||
---@field is_module boolean
|
||||
---[R]
|
||||
---If this is a repair tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_repair_tool)
|
||||
---@field is_repair_tool boolean
|
||||
---[R]
|
||||
---If this is a selection tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_selection_tool)
|
||||
---@field is_selection_tool boolean
|
||||
---[R]
|
||||
---If this is a tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_tool)
|
||||
---@field is_tool boolean
|
||||
---[R]
|
||||
---If this is a upgrade item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_upgrade_item)
|
||||
---@field is_upgrade_item boolean
|
||||
---[R]
|
||||
---The unique identifier for this item , if any. Note that this ID stays the same no matter where the item is moved to.
|
||||
---
|
||||
---Only these types of items have unique IDs:
|
||||
---- `"armor"`
|
||||
---- `"spidertron-remote"`
|
||||
---- `"selection-tool"`
|
||||
---- `"copy-paste-tool"`
|
||||
---- `"upgrade-item"`
|
||||
---- `"deconstruction-item"`
|
||||
---- `"blueprint"`
|
||||
---- `"blueprint-book"`
|
||||
---- `"item-with-entity-data"`
|
||||
---- `"item-with-inventory"`
|
||||
---- `"item-with-tags"`
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.item_number)
|
||||
---@field item_number? uint
|
||||
---[RW]
|
||||
---The current label for this item, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.label)
|
||||
---
|
||||
---_Can only be used if this is ItemWithLabel_
|
||||
---@field label? string
|
||||
---[RW]
|
||||
---The current label color for this item, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.label_color)
|
||||
---
|
||||
---_Can only be used if this is ItemWithLabel_
|
||||
---@field label_color? Color
|
||||
---[R]
|
||||
---Prototype name of the item held in this stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---The insertion mode priority this ItemWithInventory uses when items are inserted into an inventory it resides in. Only callable on items with inventories.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.prioritize_insertion_mode)
|
||||
---
|
||||
---_Can only be used if this is ItemWithInventory_
|
||||
---@field prioritize_insertion_mode string
|
||||
---[R]
|
||||
---Prototype of the item held in this stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.prototype)
|
||||
---@field prototype LuaItemPrototype
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.tags)
|
||||
---
|
||||
---_Can only be used if this is ItemWithTags_
|
||||
---@field tags Tags
|
||||
---[R]
|
||||
---The number of tile filters this deconstruction item supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.tile_filter_count)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field tile_filter_count uint
|
||||
---[RW]
|
||||
---The blacklist/whitelist tile filter mode for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.tile_filter_mode)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field tile_filter_mode defines.deconstruction_item.tile_filter_mode
|
||||
---[RW]
|
||||
---The tile filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All strings in this array must be tile prototype names.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.tile_filters)
|
||||
---@field tile_filters string[]
|
||||
---[RW]
|
||||
---The tile selection mode for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.tile_selection_mode)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field tile_selection_mode defines.deconstruction_item.tile_selection_mode
|
||||
---[RW]
|
||||
---If this deconstruction item is set to allow trees and rocks only.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.trees_and_rocks_only)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@field trees_and_rocks_only boolean
|
||||
---[R]
|
||||
---Type of the item prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.type)
|
||||
---@field type string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Is this valid for reading? Differs from the usual `valid` in that `valid` will be `true` even if the item stack is blank but the entity that holds it is still valid.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.valid_for_read)
|
||||
---@field valid_for_read boolean
|
||||
local LuaItemStack={
|
||||
---Add ammo to this ammo item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.add_ammo)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@param amount float@Amount of ammo to add.
|
||||
add_ammo=function(amount)end,
|
||||
---Add durability to this tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.add_durability)
|
||||
---
|
||||
---_Can only be used if this is ToolItem_
|
||||
---@param amount double@Amount of durability to add.
|
||||
add_durability=function(amount)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@class LuaItemStack.build_blueprint_param
|
||||
---Surface to build on
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field surface SurfaceIdentification
|
||||
---Force to use for the building
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field force ForceIdentification
|
||||
---The position to build at
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field position MapPosition
|
||||
---When true, anything that can be built is else nothing is built if any one thing can't be built
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field force_build? boolean
|
||||
---The direction to use when building
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field direction? defines.direction
|
||||
---If chunks covered by fog-of-war are skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field skip_fog_of_war? boolean
|
||||
---The player to use if any. If provided [defines.events.on_built_entity](https://lua-api.factorio.com/latest/defines.html#defines.events.on_built_entity) will also be fired on successful entity creation.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field by_player? PlayerIdentification
|
||||
---If true; [defines.events.script_raised_built](https://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.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@field raise_built? boolean
|
||||
|
||||
|
||||
---**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.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint)
|
||||
---@param param LuaItemStack.build_blueprint_param
|
||||
---@return LuaEntity[]@Array of created ghosts
|
||||
build_blueprint=function(param)end,
|
||||
---Would a call to [LuaItemStack::set_stack](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack) succeed?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.can_set_stack)
|
||||
---@param stack ItemStackIdentification?@Stack that would be set, possibly `nil`.
|
||||
---@return boolean
|
||||
can_set_stack=function(stack)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@class LuaItemStack.cancel_deconstruct_area_param
|
||||
---Surface to cancel deconstruct on
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@field surface SurfaceIdentification
|
||||
---Force to use for canceling deconstruction
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@field force ForceIdentification
|
||||
---The area to deconstruct
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@field area BoundingBox
|
||||
---If chunks covered by fog-of-war are skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@field skip_fog_of_war? boolean
|
||||
---The player to use if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@field by_player? PlayerIdentification
|
||||
|
||||
|
||||
---Cancel deconstruct the given area with this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.cancel_deconstruct_area)
|
||||
---@param param LuaItemStack.cancel_deconstruct_area_param
|
||||
cancel_deconstruct_area=function(param)end,
|
||||
---Clear this item stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear)
|
||||
clear=function()end,
|
||||
---Clears this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear_blueprint)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
clear_blueprint=function()end,
|
||||
---Clears all settings/filters on this deconstruction item resetting it to default values.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear_deconstruction_item)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
clear_deconstruction_item=function()end,
|
||||
---Clears all settings/filters on this upgrade item resetting it to default values.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear_upgrade_item)
|
||||
---
|
||||
---_Can only be used if this is UpgradeItem_
|
||||
clear_upgrade_item=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@class LuaItemStack.create_blueprint_param
|
||||
---Surface to create from
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field surface SurfaceIdentification
|
||||
---Force to use for the creation
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field force ForceIdentification
|
||||
---The bounding box
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field area BoundingBox
|
||||
---When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field always_include_tiles? boolean
|
||||
---When true, entities are included in the blueprint. Defaults to true.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field include_entities? boolean
|
||||
---When true, modules are included in the blueprint. Defaults to true.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field include_modules? boolean
|
||||
---When true, station names are included in the blueprint. Defaults to false.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field include_station_names? boolean
|
||||
---When true, trains are included in the blueprint. Defaults to false.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field include_trains? boolean
|
||||
---When true, train fuel is included in the blueprint, Defaults to true.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@field include_fuel? boolean
|
||||
|
||||
|
||||
---Sets up this blueprint using the found blueprintable entities/tiles on the surface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_blueprint)
|
||||
---@param param LuaItemStack.create_blueprint_param
|
||||
---@return {[uint]: LuaEntity}@The blueprint entity index to source entity mapping.
|
||||
create_blueprint=function(param)end,
|
||||
---Creates the equipment grid for this item if it doesn't exist and this is an item-with-entity-data that supports equipment grids.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.create_grid)
|
||||
---
|
||||
---_Can only be used if this is ItemWithEntityData_
|
||||
---@return LuaEquipmentGrid
|
||||
create_grid=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@class LuaItemStack.deconstruct_area_param
|
||||
---Surface to deconstruct on
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@field surface SurfaceIdentification
|
||||
---Force to use for the deconstruction
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@field force ForceIdentification
|
||||
---The area to deconstruct
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@field area BoundingBox
|
||||
---If chunks covered by fog-of-war are skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@field skip_fog_of_war? boolean
|
||||
---The player to use if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@field by_player? PlayerIdentification
|
||||
|
||||
|
||||
---Deconstruct the given area with this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.deconstruct_area)
|
||||
---@param param LuaItemStack.deconstruct_area_param
|
||||
deconstruct_area=function(param)end,
|
||||
---Remove ammo from this ammo item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.drain_ammo)
|
||||
---
|
||||
---_Can only be used if this is AmmoItem_
|
||||
---@param amount float@Amount of ammo to remove.
|
||||
drain_ammo=function(amount)end,
|
||||
---Remove durability from this tool item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.drain_durability)
|
||||
---
|
||||
---_Can only be used if this is ToolItem_
|
||||
---@param amount double@Amount of durability to remove.
|
||||
drain_durability=function(amount)end,
|
||||
---Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.export_stack)
|
||||
---@return string@The exported string
|
||||
export_stack=function()end,
|
||||
---The entities in this blueprint.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entities)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@return BlueprintEntity[]?
|
||||
get_blueprint_entities=function()end,
|
||||
---Gets the number of entities in this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entity_count)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@return uint
|
||||
get_blueprint_entity_count=function()end,
|
||||
---Gets the given tag on the given blueprint entity index in this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entity_tag)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param index uint@The entity index.
|
||||
---@param tag string@The tag to get.
|
||||
---@return AnyBasic?
|
||||
get_blueprint_entity_tag=function(index,tag)end,
|
||||
---Gets the tags for the given blueprint entity index in this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_entity_tags)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param index uint
|
||||
---@return Tags
|
||||
get_blueprint_entity_tags=function(index)end,
|
||||
---A list of the tiles in this blueprint.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_blueprint_tiles)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@return Tile[]?
|
||||
get_blueprint_tiles=function()end,
|
||||
---Gets the entity filter at the given index for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_entity_filter)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@param index uint
|
||||
---@return string?
|
||||
get_entity_filter=function(index)end,
|
||||
---Access the inner inventory of an item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_inventory)
|
||||
---@param inventory defines.inventory@Index of the inventory to access, which can only be [defines.inventory.item_main](https://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main).
|
||||
---@return LuaInventory?@`nil` if there is no inventory with the given index.
|
||||
get_inventory=function(inventory)end,
|
||||
---Gets the filter at the given index for this upgrade item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_mapper)
|
||||
---
|
||||
---_Can only be used if this is UpgradeItem_
|
||||
---@param index uint@The index of the mapper to read.
|
||||
---@param type string@`"from"` or `"to"`.
|
||||
---@return UpgradeFilter
|
||||
get_mapper=function(index,type)end,
|
||||
---Gets the tag with the given name or returns `nil` if it doesn't exist.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_tag)
|
||||
---
|
||||
---_Can only be used if this is ItemWithTags_
|
||||
---@param tag_name string
|
||||
---@return AnyBasic?
|
||||
get_tag=function(tag_name)end,
|
||||
---Gets the tile filter at the given index for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.get_tile_filter)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@param index uint
|
||||
---@return string?
|
||||
get_tile_filter=function(index)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.import_stack)
|
||||
---@param data string@The string to import
|
||||
---@return int@0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.
|
||||
import_stack=function(data)end,
|
||||
---Is this blueprint item setup? I.e. is it a non-empty blueprint?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.is_blueprint_setup)
|
||||
---@return boolean
|
||||
is_blueprint_setup=function()end,
|
||||
---Removes a tag with the given name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.remove_tag)
|
||||
---
|
||||
---_Can only be used if this is ItemWithTags_
|
||||
---@param tag string
|
||||
---@return boolean@If the tag existed and was removed.
|
||||
remove_tag=function(tag)end,
|
||||
---Set new entities to be a part of this blueprint.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_blueprint_entities)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param entities BlueprintEntity[]@The new blueprint entities.
|
||||
set_blueprint_entities=function(entities)end,
|
||||
---Sets the given tag on the given blueprint entity index in this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_blueprint_entity_tag)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param index uint@The entity index.
|
||||
---@param tag string@The tag to set.
|
||||
---@param value AnyBasic@The tag value to set or `nil` to clear the tag.
|
||||
set_blueprint_entity_tag=function(index,tag,value)end,
|
||||
---Sets the tags on the given blueprint entity index in this blueprint item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_blueprint_entity_tags)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param index uint@The entity index
|
||||
---@param tags Tags
|
||||
set_blueprint_entity_tags=function(index,tags)end,
|
||||
---Set specific tiles in this blueprint.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_blueprint_tiles)
|
||||
---
|
||||
---_Can only be used if this is BlueprintItem_
|
||||
---@param tiles Tile[]@Tiles to be a part of the blueprint.
|
||||
set_blueprint_tiles=function(tiles)end,
|
||||
---Sets the entity filter at the given index for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_entity_filter)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@param index uint
|
||||
---@param filter string|LuaEntityPrototype|LuaEntity|nil@Writing `nil` removes the filter.
|
||||
---@return boolean@Whether the new filter was successfully set (ie. was valid).
|
||||
set_entity_filter=function(index,filter)end,
|
||||
---Sets the module filter at the given index for this upgrade item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_mapper)
|
||||
---
|
||||
---_Can only be used if this is UpgradeItem_
|
||||
---@param index uint@The index of the mapper to set.
|
||||
---@param type string@`from` or `to`.
|
||||
---@param filter UpgradeFilter@The filter to set or `nil`
|
||||
set_mapper=function(index,type,filter)end,
|
||||
---Set this item stack to another item stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack)
|
||||
---@param stack ItemStackIdentification?@Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if [LuaItemStack::clear](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.clear) was called.
|
||||
---@return boolean@Whether the stack was set successfully. Returns `false` if this stack was not [valid for write](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.can_set_stack).
|
||||
set_stack=function(stack)end,
|
||||
---Sets the tag with the given name and value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_tag)
|
||||
---
|
||||
---_Can only be used if this is ItemWithTags_
|
||||
---@param tag_name string
|
||||
---@param tag AnyBasic
|
||||
set_tag=function(tag_name,tag)end,
|
||||
---Sets the tile filter at the given index for this deconstruction item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_tile_filter)
|
||||
---
|
||||
---_Can only be used if this is DeconstructionItem_
|
||||
---@param index uint
|
||||
---@param filter string|LuaTilePrototype|LuaTile@Setting to nil erases the filter.
|
||||
---@return boolean@Whether the new filter was successfully set (ie. was valid).
|
||||
set_tile_filter=function(index,filter)end,
|
||||
---Swaps this item stack with the given item stack if allowed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.swap_stack)
|
||||
---@param stack LuaItemStack
|
||||
---@return boolean@Whether the 2 stacks were swapped successfully.
|
||||
swap_stack=function(stack)end,
|
||||
---Transfers the given item stack into this item stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.transfer_stack)
|
||||
---@param stack ItemStackIdentification
|
||||
---@return boolean@`true` if the full stack was transferred.
|
||||
transfer_stack=function(stack)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLampControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for lamps.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html)
|
||||
---@class LuaLampControlBehavior:LuaGenericOnOffControlBehavior
|
||||
---[R]
|
||||
---The color the lamp is showing, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html#LuaLampControlBehavior.color)
|
||||
---@field color? Color
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html#LuaLampControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---`true` if the lamp should set the color from the circuit network signals.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html#LuaLampControlBehavior.use_colors)
|
||||
---@field use_colors boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html#LuaLampControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaLampControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html#LuaLampControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLazyLoadedValue
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A lazily loaded value. For performance reasons, we sometimes return a custom lazily-loaded value type instead of the native Lua value. This custom type lazily constructs the necessary value when [LuaLazyLoadedValue::get](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html#LuaLazyLoadedValue.get) is called, therefore preventing its unnecessary construction in some cases.
|
||||
---
|
||||
---An instance of LuaLazyLoadedValue is only valid during the event it was created from and cannot be saved.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html)
|
||||
---@class LuaLazyLoadedValue<T>:{get:fun():T},LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html#LuaLazyLoadedValue.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html#LuaLazyLoadedValue.valid)
|
||||
---@field valid boolean
|
||||
local LuaLazyLoadedValue={
|
||||
---Gets the value of this lazy loaded value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html#LuaLazyLoadedValue.get)
|
||||
---@return Any
|
||||
get=function()end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLazyLoadedValue.html#LuaLazyLoadedValue.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
124
.vscode/factorio/runtime-api-LuaLogisticCell.lua
vendored
124
.vscode/factorio/runtime-api-LuaLogisticCell.lua
vendored
@@ -1,124 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLogisticCell
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Logistic cell of a particular [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html). A "Logistic Cell" is the given name for settings and properties used by what would normally be seen as a "Roboport". A logistic cell however doesn't have to be attached to the roboport entity (the character has one for the personal roboport).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html)
|
||||
---@class LuaLogisticCell:LuaObject
|
||||
---[R]
|
||||
---Radius at which the robots hover when waiting to be charged.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.charge_approach_distance)
|
||||
---@field charge_approach_distance float
|
||||
---[R]
|
||||
---Number of robots currently charging.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.charging_robot_count)
|
||||
---@field charging_robot_count uint
|
||||
---[R]
|
||||
---Robots currently being charged.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.charging_robots)
|
||||
---@field charging_robots LuaEntity[]
|
||||
---[R]
|
||||
---Construction radius of this cell.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.construction_radius)
|
||||
---@field construction_radius float
|
||||
---[R]
|
||||
---The network that owns this cell, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.logistic_network)
|
||||
---@field logistic_network? LuaLogisticNetwork
|
||||
---[R]
|
||||
---Logistic radius of this cell.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.logistic_radius)
|
||||
---@field logistic_radius float
|
||||
---[R]
|
||||
---Logistic connection distance of this cell.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.logistics_connection_distance)
|
||||
---@field logistics_connection_distance float
|
||||
---[R]
|
||||
---`true` if this is a mobile cell. In vanilla, only the logistic cell created by a character's personal roboport is mobile.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.mobile)
|
||||
---@field mobile boolean
|
||||
---[R]
|
||||
---Neighbouring cells.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.neighbours)
|
||||
---@field neighbours LuaLogisticCell[]
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---This cell's owner.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.owner)
|
||||
---@field owner LuaEntity
|
||||
---[R]
|
||||
---Number of stationed construction robots in this cell.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.stationed_construction_robot_count)
|
||||
---@field stationed_construction_robot_count uint
|
||||
---[R]
|
||||
---Number of stationed logistic robots in this cell.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.stationed_logistic_robot_count)
|
||||
---@field stationed_logistic_robot_count uint
|
||||
---[R]
|
||||
---Number of robots waiting to charge.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.to_charge_robot_count)
|
||||
---@field to_charge_robot_count uint
|
||||
---[R]
|
||||
---Robots waiting to charge.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.to_charge_robots)
|
||||
---@field to_charge_robots LuaEntity[]
|
||||
---[R]
|
||||
---`true` if this cell is active.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.transmitting)
|
||||
---@field transmitting boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.valid)
|
||||
---@field valid boolean
|
||||
local LuaLogisticCell={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Is a given position within the construction range of this cell?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.is_in_construction_range)
|
||||
---@param position MapPosition
|
||||
---@return boolean
|
||||
is_in_construction_range=function(position)end,
|
||||
---Is a given position within the logistic range of this cell?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.is_in_logistic_range)
|
||||
---@param position MapPosition
|
||||
---@return boolean
|
||||
is_in_logistic_range=function(position)end,
|
||||
---Are two cells neighbours?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticCell.html#LuaLogisticCell.is_neighbour_with)
|
||||
---@param other LuaLogisticCell
|
||||
---@return boolean
|
||||
is_neighbour_with=function(other)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLogisticContainerControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for logistic chests.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html)
|
||||
---@class LuaLogisticContainerControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---The circuit mode of operations for the logistic container. Can only be set on containers whose [logistic_mode](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_mode) is set to "requester".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.circuit_mode_of_operation)
|
||||
---@field circuit_mode_of_operation defines.control_behavior.logistic_container.circuit_mode_of_operation
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaLogisticContainerControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
232
.vscode/factorio/runtime-api-LuaLogisticNetwork.lua
vendored
232
.vscode/factorio/runtime-api-LuaLogisticNetwork.lua
vendored
@@ -1,232 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLogisticNetwork
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A single logistic network of a given force on a given surface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html)
|
||||
---@class LuaLogisticNetwork:LuaObject
|
||||
---[R]
|
||||
---All active provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.active_provider_points)
|
||||
---@field active_provider_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---The total number of construction robots in the network (idle and active + in roboports).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.all_construction_robots)
|
||||
---@field all_construction_robots uint
|
||||
---[R]
|
||||
---The total number of logistic robots in the network (idle and active + in roboports).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.all_logistic_robots)
|
||||
---@field all_logistic_robots uint
|
||||
---[R]
|
||||
---Number of construction robots available for a job.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.available_construction_robots)
|
||||
---@field available_construction_robots uint
|
||||
---[R]
|
||||
---Number of logistic robots available for a job.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.available_logistic_robots)
|
||||
---@field available_logistic_robots uint
|
||||
---[R]
|
||||
---All cells in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.cells)
|
||||
---@field cells LuaLogisticCell[]
|
||||
---[R]
|
||||
---All construction robots in this logistic network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.construction_robots)
|
||||
---@field construction_robots LuaEntity[]
|
||||
---[R]
|
||||
---All things that have empty provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.empty_provider_points)
|
||||
---@field empty_provider_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---All entities that have empty logistic provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.empty_providers)
|
||||
---@field empty_providers LuaEntity[]
|
||||
---[R]
|
||||
---The force this logistic network belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.force)
|
||||
---@field force LuaForce
|
||||
---[R]
|
||||
---All other entities that have logistic points in this network (inserters mostly).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.logistic_members)
|
||||
---@field logistic_members LuaEntity[]
|
||||
---[R]
|
||||
---All logistic robots in this logistic network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.logistic_robots)
|
||||
---@field logistic_robots LuaEntity[]
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---All passive provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.passive_provider_points)
|
||||
---@field passive_provider_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---All things that have provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.provider_points)
|
||||
---@field provider_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---All entities that have logistic provider points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.providers)
|
||||
---@field providers LuaEntity[]
|
||||
---[R]
|
||||
---All things that have requester points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.requester_points)
|
||||
---@field requester_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---All entities that have logistic requester points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.requesters)
|
||||
---@field requesters LuaEntity[]
|
||||
---[R]
|
||||
---Maximum number of robots the network can work with. Currently only used for the personal roboport.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.robot_limit)
|
||||
---@field robot_limit uint
|
||||
---[R]
|
||||
---All robots in this logistic network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.robots)
|
||||
---@field robots LuaEntity[]
|
||||
---[R]
|
||||
---All things that have storage points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.storage_points)
|
||||
---@field storage_points LuaLogisticPoint[]
|
||||
---[R]
|
||||
---All entities that have logistic storage points in this network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.storages)
|
||||
---@field storages LuaEntity[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.valid)
|
||||
---@field valid boolean
|
||||
local LuaLogisticNetwork={
|
||||
---Can the network satisfy a request for a given item and count.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.can_satisfy_request)
|
||||
---@param item string@Item name to check.
|
||||
---@param count uint?@Count to check. Defaults to 1.
|
||||
---@param include_buffers boolean?@Should buffers be considered? Defaults to false.
|
||||
---@return boolean@Whether the network can satisfy the request.
|
||||
can_satisfy_request=function(item,count,include_buffers)end,
|
||||
---Find logistic cell closest to a given position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.find_cell_closest_to)
|
||||
---@param position MapPosition
|
||||
---@return LuaLogisticCell?@`nil` if no cell was found.
|
||||
find_cell_closest_to=function(position)end,
|
||||
---Get item counts for the entire network, similar to how [LuaInventory::get_contents](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents) does.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.get_contents)
|
||||
---@return {[string]: uint}@A mapping of item prototype names to the number available in the network.
|
||||
get_contents=function()end,
|
||||
---Count given or all items in the network or given members.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.get_item_count)
|
||||
---@param item string?@Item name to count. If not given, gives counts of all items in the network.
|
||||
---@param member string?@Logistic members to check, must be either `"storage"` or `"providers"`. If not given, gives count in the entire network.
|
||||
---@return int
|
||||
get_item_count=function(item,member)end,
|
||||
---Get the amount of items of the given type indexed by the storage member.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.get_supply_counts)
|
||||
---@param item string@Item name to check.
|
||||
---@return {[string]: uint}@A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to the number available in the members.
|
||||
get_supply_counts=function(item)end,
|
||||
---Gets the logistic points with of the given type indexed by the storage member.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.get_supply_points)
|
||||
---@param item string@Item name to check.
|
||||
---@return {[string]: LuaLogisticPoint[]}@A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to an array of LuaLogisticPoint.
|
||||
get_supply_points=function(item)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Insert items into the logistic network. This will actually insert the items into some logistic chests.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.insert)
|
||||
---@param item ItemStackIdentification@What to insert.
|
||||
---@param members string?@Which logistic members to insert the items to. Must be `"storage"`, `"storage-empty"` (storage chests that are completely empty), `"storage-empty-slot"` (storage chests that have an empty slot), or `"requester"`. If not specified, inserts items into the logistic network in the usual order.
|
||||
---@return uint@Number of items actually inserted.
|
||||
insert=function(item,members)end,
|
||||
---Remove items from the logistic network. This will actually remove the items from some logistic chests.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.remove_item)
|
||||
---@param item ItemStackIdentification@What to remove.
|
||||
---@param members string?@Which logistic members to remove from. Must be `"storage"`, `"passive-provider"`, `"buffer"`, or `"active-provider"`. If not specified, removes from the network in the usual order.
|
||||
---@return uint@Number of items removed.
|
||||
remove_item=function(item,members)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_drop_point)
|
||||
---@class LuaLogisticNetwork.select_drop_point_param
|
||||
---Name of the item to select.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_drop_point)
|
||||
---@field stack ItemStackIdentification
|
||||
---When given, it will find from only the specific type of member. Must be `"storage"`, `"storage-empty"`, `"storage-empty-slot"` or `"requester"`. If not specified, selects with normal priorities.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_drop_point)
|
||||
---@field members? string
|
||||
|
||||
|
||||
---Find a logistic point to drop the specific item stack.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_drop_point)
|
||||
---@param param LuaLogisticNetwork.select_drop_point_param
|
||||
---@return LuaLogisticPoint?@`nil` if no point was found.
|
||||
select_drop_point=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@class LuaLogisticNetwork.select_pickup_point_param
|
||||
---Name of the item to select.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@field name string
|
||||
---When given, it will find the storage 'best' storage point from this position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@field position? MapPosition
|
||||
---Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@field include_buffers? boolean
|
||||
---When given, it will find from only the specific type of member. Must be `"storage"`, `"passive-provider"`, `"buffer"` or `"active-provider"`. If not specified, selects with normal priorities. Not considered if position is specified.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@field members? string
|
||||
|
||||
|
||||
---Find the 'best' logistic point with this item ID and from the given position or from given chest type.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticNetwork.html#LuaLogisticNetwork.select_pickup_point)
|
||||
---@param param LuaLogisticNetwork.select_pickup_point_param
|
||||
---@return LuaLogisticPoint?@`nil` if no point was found.
|
||||
select_pickup_point=function(param)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaLogisticPoint
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Logistic point of a particular [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html). A "Logistic point" is the name given for settings and properties used by requester, provider, and storage points in a given logistic network. These "points" don't have to be a logistic container but often are. One other entity that can own several points is the "character" character type entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html)
|
||||
---@class LuaLogisticPoint:LuaObject
|
||||
---[R]
|
||||
---If this logistic point is using the exact mode. In exact mode robots never over-deliver requests.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.exact)
|
||||
---@field exact boolean
|
||||
---[R]
|
||||
---The logistic filters for this logistic point, if this uses any.
|
||||
---
|
||||
---**Note:** The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.filters)
|
||||
---@field filters? LogisticFilter[]
|
||||
---[R]
|
||||
---The force of this logistic point.
|
||||
---
|
||||
---**Note:** This will always be the same as the [LuaLogisticPoint::owner](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.owner) force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.force)
|
||||
---@field force LuaForce
|
||||
---[R]
|
||||
---The Logistic member index of this logistic point.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.logistic_member_index)
|
||||
---@field logistic_member_index uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.logistic_network)
|
||||
---@field logistic_network LuaLogisticNetwork
|
||||
---[R]
|
||||
---The logistic mode.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.mode)
|
||||
---@field mode defines.logistic_mode
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html) owner of this [LuaLogisticPoint](https://lua-api.factorio.com/latest/LuaLogisticPoint.html).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.owner)
|
||||
---@field owner LuaEntity
|
||||
---[R]
|
||||
---Items targeted to be dropped off into this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.targeted_items_deliver)
|
||||
---@field targeted_items_deliver {[string]: uint}
|
||||
---[R]
|
||||
---Items targeted to be picked up from this logistic point by robots. The attribute is a dictionary mapping the item prototype names to their item counts.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.targeted_items_pickup)
|
||||
---@field targeted_items_pickup {[string]: uint}
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.valid)
|
||||
---@field valid boolean
|
||||
local LuaLogisticPoint={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaMiningDrillControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for mining drills.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html)
|
||||
---@class LuaMiningDrillControlBehavior:LuaGenericOnOffControlBehavior
|
||||
---[RW]
|
||||
---`true` if this drill is enabled or disabled using the logistics or circuit condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.circuit_enable_disable)
|
||||
---@field circuit_enable_disable boolean
|
||||
---[RW]
|
||||
---`true` if this drill should send the resources in the field to the circuit network. Which resources depends on [LuaMiningDrillControlBehavior::resource_read_mode](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.resource_read_mode)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.circuit_read_resources)
|
||||
---@field circuit_read_resources boolean
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---If the mining drill should send just the resources in its area or the entire field it's on to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.resource_read_mode)
|
||||
---@field resource_read_mode defines.control_behavior.mining_drill.resource_read_mode
|
||||
---[R]
|
||||
---The resource entities that the mining drill will send information about to the circuit network or an empty array.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.resource_read_targets)
|
||||
---@field resource_read_targets LuaEntity[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaMiningDrillControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html#LuaMiningDrillControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaModSettingPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a mod setting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html)
|
||||
---@class LuaModSettingPrototype:LuaObject
|
||||
---[R]
|
||||
---Whether this string setting allows blank values. `nil` if not a string setting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.allow_blank)
|
||||
---@field allow_blank? boolean
|
||||
---[R]
|
||||
---The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.allowed_values)
|
||||
---@field allowed_values? string[]|int[]|double[]
|
||||
---[R]
|
||||
---Whether this string setting auto-trims values. `nil` if not a string setting
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.auto_trim)
|
||||
---@field auto_trim? boolean
|
||||
---[R]
|
||||
---The default value of this setting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.default_value)
|
||||
---@field default_value boolean|double|int|string
|
||||
---[R]
|
||||
---Whether this setting is hidden from the GUI.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---The maximum value for this setting. `nil` if this setting type doesn't support a maximum.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.maximum_value)
|
||||
---@field maximum_value? double|int
|
||||
---[R]
|
||||
---The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.minimum_value)
|
||||
---@field minimum_value? double|int
|
||||
---[R]
|
||||
---The mod that owns this setting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.mod)
|
||||
---@field mod string
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.setting_type)
|
||||
---@field setting_type string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaModSettingPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaModuleCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a module category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html)
|
||||
---@class LuaModuleCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaModuleCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaNamedNoiseExpression
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a named noise expression.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html)
|
||||
---@class LuaNamedNoiseExpression:LuaObject
|
||||
---[R]
|
||||
---The expression itself.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.expression)
|
||||
---@field expression NoiseExpression
|
||||
---[R]
|
||||
---Name of the property that this expression is intended to provide a value for, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.intended_property)
|
||||
---@field intended_property string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.valid)
|
||||
---@field valid boolean
|
||||
local LuaNamedNoiseExpression={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaNoiseLayerPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a noise layer.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html)
|
||||
---@class LuaNoiseLayerPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaNoiseLayerPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaParticlePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of an optimized particle.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html)
|
||||
---@class LuaParticlePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.ended_in_water_trigger_effect)
|
||||
---@field ended_in_water_trigger_effect TriggerEffectItem
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.life_time)
|
||||
---@field life_time uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.mining_particle_frame_speed)
|
||||
---@field mining_particle_frame_speed float
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.movement_modifier)
|
||||
---@field movement_modifier float
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.movement_modifier_when_on_ground)
|
||||
---@field movement_modifier_when_on_ground float
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.regular_trigger_effect)
|
||||
---@field regular_trigger_effect TriggerEffectItem
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.regular_trigger_effect_frequency)
|
||||
---@field regular_trigger_effect_frequency uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.render_layer)
|
||||
---@field render_layer RenderLayer
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.render_layer_when_on_ground)
|
||||
---@field render_layer_when_on_ground RenderLayer
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaParticlePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaPermissionGroup
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A permission group that defines what players in this group are allowed to do.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html)
|
||||
---@class LuaPermissionGroup:LuaObject
|
||||
---[R]
|
||||
---The group ID
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.group_id)
|
||||
---@field group_id uint
|
||||
---[RW]
|
||||
---The name of this group.
|
||||
---
|
||||
---**Note:** Setting the name to `nil` or an empty string sets the name to the default value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The players in this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.players)
|
||||
---@field players LuaPlayer[]
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.valid)
|
||||
---@field valid boolean
|
||||
local LuaPermissionGroup={
|
||||
---Adds the given player to this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.add_player)
|
||||
---@param player PlayerIdentification
|
||||
---@return boolean@Whether the player was added.
|
||||
add_player=function(player)end,
|
||||
---Whether this group allows the given action.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.allows_action)
|
||||
---@param action defines.input_action@The action in question.
|
||||
---@return boolean
|
||||
allows_action=function(action)end,
|
||||
---Destroys this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.destroy)
|
||||
---@return boolean@Whether the group was successfully destroyed.
|
||||
destroy=function()end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Removes the given player from this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.remove_player)
|
||||
---@param player PlayerIdentification
|
||||
---@return boolean@Whether the player was removed.
|
||||
remove_player=function(player)end,
|
||||
---Sets whether this group allows the performance the given action.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.set_allows_action)
|
||||
---@param action defines.input_action@The action in question.
|
||||
---@param allow_action boolean@Whether to allow the specified action.
|
||||
---@return boolean@Whether the value was successfully applied.
|
||||
set_allows_action=function(action,allow_action)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaPermissionGroups
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---All permission groups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html)
|
||||
---@class LuaPermissionGroups:LuaObject
|
||||
---[R]
|
||||
---All of the permission groups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.groups)
|
||||
---@field groups LuaPermissionGroup[]
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.valid)
|
||||
---@field valid boolean
|
||||
local LuaPermissionGroups={
|
||||
---Creates a new permission group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.create_group)
|
||||
---@param name string?
|
||||
---@return LuaPermissionGroup?@`nil` if the calling player doesn't have permission to make groups.
|
||||
create_group=function(name)end,
|
||||
---Gets the permission group with the given name or group ID.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.get_group)
|
||||
---@param group string|uint
|
||||
---@return LuaPermissionGroup?@`nil` if there is no matching group.
|
||||
get_group=function(group)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPermissionGroups.html#LuaPermissionGroups.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
806
.vscode/factorio/runtime-api-LuaPlayer.lua
vendored
806
.vscode/factorio/runtime-api-LuaPlayer.lua
vendored
@@ -1,806 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaPlayer
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A player in the game. Pay attention that a player may or may not have a character, which is the [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html) of the little guy running around the world doing things.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html)
|
||||
---@class LuaPlayer:LuaControl
|
||||
---[RW]
|
||||
---`true` if the player is an admin.
|
||||
---
|
||||
---**Note:** Trying to change player admin status from the console when you aren't an admin does nothing.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.admin)
|
||||
---@field admin boolean
|
||||
---[R]
|
||||
---How many ticks since the last action of this player
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.afk_time)
|
||||
---@field afk_time uint
|
||||
---[R]
|
||||
---If the main inventory will be auto sorted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.auto_sort_main_inventory)
|
||||
---@field auto_sort_main_inventory boolean
|
||||
---[R]
|
||||
---The item stack containing a blueprint to be setup.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.blueprint_to_setup)
|
||||
---@field blueprint_to_setup LuaItemStack
|
||||
---[RW]
|
||||
---The character attached to this player, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character)
|
||||
---@field character? LuaEntity
|
||||
---[RW]
|
||||
---The color used when this player talks in game.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.chat_color)
|
||||
---@field chat_color Color
|
||||
---[RW]
|
||||
---The color associated with the player. This will be used to tint the player's character as well as their buildings and vehicles.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.color)
|
||||
---@field color Color
|
||||
---[R]
|
||||
---`true` if the player is currently connected to the game.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)
|
||||
---@field connected boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.controller_type)
|
||||
---@field controller_type defines.controllers
|
||||
---[R]
|
||||
---When in a cutscene; the character this player would be using once the cutscene is over, if any. Returns `nil` when the player is disconnected (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.cutscene_character)
|
||||
---@field cutscene_character? LuaEntity
|
||||
---[R]
|
||||
---The display resolution for this player.
|
||||
---
|
||||
---**Note:** During [on_player_created](https://lua-api.factorio.com/latest/events.html#on_player_created), this attribute will always return a resolution of `{width=1920, height=1080}`. To get the actual resolution, listen to the [on_player_display_resolution_changed](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) event raised shortly afterwards.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_resolution)
|
||||
---@field display_resolution DisplayResolution
|
||||
---[R]
|
||||
---The display scale for this player.
|
||||
---
|
||||
---**Note:** During [on_player_created](https://lua-api.factorio.com/latest/events.html#on_player_created), this attribute will always return a scale of `1`. To get the actual scale, listen to the [on_player_display_scale_changed](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) event raised shortly afterwards.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_scale)
|
||||
---@field display_scale double
|
||||
---[R]
|
||||
---The source entity used during entity settings copy-paste, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.entity_copy_source)
|
||||
---@field entity_copy_source? LuaEntity
|
||||
---[RW]
|
||||
---The player's game view settings.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.game_view_settings)
|
||||
---@field game_view_settings GameViewSettings
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.gui)
|
||||
---@field gui LuaGui
|
||||
---[RW]
|
||||
---The original location of the item in the cursor, marked with a hand. `nil` if the cursor stack is empty. When writing, the specified inventory slot must be empty and the cursor stack must not be empty.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.hand_location)
|
||||
---@field hand_location? ItemStackLocation
|
||||
---[R]
|
||||
---This player's unique index in [LuaGameScript::players](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players). It is given to them when they are [created](https://lua-api.factorio.com/latest/events.html#on_player_created) and remains assigned to them until they are [removed](https://lua-api.factorio.com/latest/events.html#on_player_removed).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index)
|
||||
---@field index uint
|
||||
---[RW]
|
||||
---The filters for this map editor infinity inventory settings.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.infinity_inventory_filters)
|
||||
---@field infinity_inventory_filters InfinityInventoryFilter[]
|
||||
---[R]
|
||||
---At what tick this player was last online.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.last_online)
|
||||
---@field last_online uint
|
||||
---[W]
|
||||
---The player's map view settings. To write to this, use a table containing the fields that should be changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.map_view_settings)
|
||||
---@field map_view_settings MapViewSettings
|
||||
---[RW]
|
||||
---`true` if the minimap is visible.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.minimap_enabled)
|
||||
---@field minimap_enabled boolean
|
||||
---[R]
|
||||
---The current per-player settings for the this player, indexed by prototype name. Returns the same structure as [LuaSettings::get_player_settings](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.get_player_settings).
|
||||
---
|
||||
---**Note:** This table will become invalid if its associated player does.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.mod_settings)
|
||||
---@field mod_settings LuaCustomTable<string,ModSetting>
|
||||
---[R]
|
||||
---The player's username.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---How many ticks did this player spend playing this save (all sessions combined)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.online_time)
|
||||
---@field online_time uint
|
||||
---[R]
|
||||
---`true` if the player opened itself. I.e. if they opened the character or god-controller GUI.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.opened_self)
|
||||
---@field opened_self boolean
|
||||
---[RW]
|
||||
---The permission group this player is part of, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.permission_group)
|
||||
---@field permission_group? LuaPermissionGroup
|
||||
---[RW]
|
||||
---If items not included in this map editor infinity inventory filters should be removed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_unfiltered_items)
|
||||
---@field remove_unfiltered_items boolean
|
||||
---[R]
|
||||
---The render mode of the player, like map or zoom to world. The render mode can be set using [LuaPlayer::open_map](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.open_map), [LuaPlayer::zoom_to_world](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom_to_world) and [LuaPlayer::close_map](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.close_map).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.render_mode)
|
||||
---@field render_mode defines.render_mode
|
||||
---[RW]
|
||||
---If `true`, circle and name of given player is rendered on the map/chart.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.show_on_map)
|
||||
---@field show_on_map boolean
|
||||
---[RW]
|
||||
---If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.spectator)
|
||||
---@field spectator boolean
|
||||
---[R]
|
||||
---The stashed controller type, if any.
|
||||
---
|
||||
---**Note:** This is mainly useful when a player is in the map editor.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.stashed_controller_type)
|
||||
---@field stashed_controller_type? defines.controllers
|
||||
---[RW]
|
||||
---The tag that is shown after the player in chat and on the map.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.tag)
|
||||
---@field tag string
|
||||
---[RW]
|
||||
---The number of ticks until this player will respawn. `nil` if this player is not waiting to respawn.
|
||||
---
|
||||
---Set to `nil` to immediately respawn the player.
|
||||
---
|
||||
---**Note:** Set to any positive value to trigger the respawn state for this player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.ticks_to_respawn)
|
||||
---@field ticks_to_respawn? uint
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.valid)
|
||||
---@field valid boolean
|
||||
---[W]
|
||||
---The player's zoom-level.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom)
|
||||
---@field zoom double
|
||||
local LuaPlayer={
|
||||
---Gets a copy of the currently selected blueprint in the clipboard queue into the player's cursor, as if the player activated Paste.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.activate_paste)
|
||||
activate_paste=function()end,
|
||||
---Adds an alert to this player for the given entity of the given alert type.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.add_alert)
|
||||
---@param entity LuaEntity
|
||||
---@param type defines.alert_type
|
||||
add_alert=function(entity,type)end,
|
||||
---Adds a custom alert to this player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.add_custom_alert)
|
||||
---@param entity LuaEntity@If the alert is clicked, the map will open at the position of this entity.
|
||||
---@param icon SignalID
|
||||
---@param message LocalisedString
|
||||
---@param show_on_map boolean
|
||||
add_custom_alert=function(entity,icon,message,show_on_map)end,
|
||||
---Adds the given recipe to the list of recipe notifications for this player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.add_recipe_notification)
|
||||
---@param recipe string@Name of the recipe prototype to add.
|
||||
add_recipe_notification=function(recipe)end,
|
||||
---Adds the given blueprint to this player's clipboard queue.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.add_to_clipboard)
|
||||
---@param blueprint LuaItemStack@The blueprint to add.
|
||||
add_to_clipboard=function(blueprint)end,
|
||||
---Associates a character with this player.
|
||||
---
|
||||
---**Note:** The character must not be connected to any controller.
|
||||
---
|
||||
---**Note:** If this player is currently disconnected (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) the character will be immediately "logged off".
|
||||
---
|
||||
---**Note:** See [LuaPlayer::get_associated_characters](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.associate_character)
|
||||
---@param character LuaEntity@The character entity.
|
||||
associate_character=function(character)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@class LuaPlayer.build_from_cursor_param
|
||||
---Where the entity would be placed
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@field position MapPosition
|
||||
---Direction the entity would be placed
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@field direction? defines.direction
|
||||
---If alt build should be used instead of normal build. Defaults to normal.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@field alt? boolean
|
||||
---The size for building terrain if building terrain. Defaults to 2.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@field terrain_building_size? uint
|
||||
---If chunks covered by fog-of-war are skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@field skip_fog_of_war? boolean
|
||||
|
||||
|
||||
---Builds what ever is in the cursor on the surface the player is on.
|
||||
---
|
||||
---**Note:** Anything built will fire normal player-built events.
|
||||
---
|
||||
---**Note:** The cursor stack will automatically be reduced as if the player built normally.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor)
|
||||
---@param param LuaPlayer.build_from_cursor_param
|
||||
build_from_cursor=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@class LuaPlayer.can_build_from_cursor_param
|
||||
---Where the entity would be placed
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@field position MapPosition
|
||||
---Direction the entity would be placed
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@field direction? defines.direction
|
||||
---If alt build should be used instead of normal build. Defaults to normal.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@field alt? boolean
|
||||
---The size for building terrain if building terrain. Defaults to 2.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@field terrain_building_size? uint
|
||||
---If chunks covered by fog-of-war are skipped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@field skip_fog_of_war? boolean
|
||||
|
||||
|
||||
---Checks if this player can build what ever is in the cursor on the surface the player is on.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_built_entity](https://lua-api.factorio.com/latest/events.html#on_built_entity) instantly.
|
||||
---Raised if the cursor was successfully built.
|
||||
---
|
||||
--- * May raise [on_pre_build](https://lua-api.factorio.com/latest/events.html#on_pre_build) instantly.
|
||||
---Raised if the cursor was successfully built.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor)
|
||||
---@param param LuaPlayer.can_build_from_cursor_param
|
||||
---@return boolean
|
||||
can_build_from_cursor=function(param)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity)
|
||||
---@class LuaPlayer.can_place_entity_param
|
||||
---Name of the entity to check.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity)
|
||||
---@field name string
|
||||
---Where the entity would be placed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity)
|
||||
---@field position MapPosition
|
||||
---Direction the entity would be placed. Defaults to `north`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity)
|
||||
---@field direction? defines.direction
|
||||
|
||||
|
||||
---Checks if this player can build the given entity at the given location on the surface the player is on.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity)
|
||||
---@param param LuaPlayer.can_place_entity_param
|
||||
---@return boolean
|
||||
can_place_entity=function(param)end,
|
||||
---Clear the chat console.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_console)
|
||||
clear_console=function()end,
|
||||
---Invokes the "clear cursor" action on the player as if the user pressed it.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_cursor_stack_changed](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed) later in the current tick.
|
||||
---Raised when the cursor was successfully cleared.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_cursor)
|
||||
---@return boolean@Whether the cursor is now empty.
|
||||
clear_cursor=function()end,
|
||||
---Clears all recipe notifications for this player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_recipe_notifications)
|
||||
clear_recipe_notifications=function()end,
|
||||
---Clears the players selection tool selection position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_selection)
|
||||
clear_selection=function()end,
|
||||
---Queues request to switch to the normal game view from the map or zoom to world view. Render mode change requests are processed before rendering of the next frame.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.close_map)
|
||||
close_map=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@class LuaPlayer.connect_to_server_param
|
||||
---The server (address:port) if port is not given the default Factorio port is used.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@field address string
|
||||
---The name of the server.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@field name? LocalisedString
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@field description? LocalisedString
|
||||
---The password if different from the one used to join this game. Note, if the current password is not empty but the one required to join the new server is an empty string should be given for this field.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@field password? string
|
||||
|
||||
|
||||
---Asks the player if they would like to connect to the given server.
|
||||
---
|
||||
---**Note:** This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server)
|
||||
---@param param LuaPlayer.connect_to_server_param
|
||||
connect_to_server=function(param)end,
|
||||
---Creates and attaches a character entity to this player.
|
||||
---
|
||||
---**Note:** The player must not have a character already connected and must be online (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_character)
|
||||
---@param character string?@The character to create else the default is used.
|
||||
---@return boolean@Whether the character was created.
|
||||
create_character=function(character)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@class LuaPlayer.create_local_flying_text_param
|
||||
---The flying text to show.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field text LocalisedString
|
||||
---The location on the map at which to show the flying text.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field position? MapPosition
|
||||
---If `true`, the flying text is created at the player's cursor. Defaults to `false`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field create_at_cursor? boolean
|
||||
---The color of the flying text. Defaults to white text.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field color? Color
|
||||
---The amount of ticks that the flying text will be shown for. Defaults to `80`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field time_to_live? uint
|
||||
---The speed at which the text rises upwards in tiles/second. Can't be a negative value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@field speed? double
|
||||
|
||||
|
||||
---Spawn flying text that is only visible to this player. Either `position` or `create_at_cursor` are required. When `create_at_cursor` is `true`, all parameters other than `text` are ignored.
|
||||
---
|
||||
---**Note:** If no custom `speed` is set and the text is longer than 25 characters, its `time_to_live` and `speed` are dynamically adjusted to give players more time to read it.
|
||||
---
|
||||
---**Note:** Local flying text is not saved, which means it will disappear after a save/load-cycle.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text)
|
||||
---@param param LuaPlayer.create_local_flying_text_param
|
||||
create_local_flying_text=function(param)end,
|
||||
---Disables alerts for the given alert category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disable_alert)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean@Whether the alert type was disabled (false if it was already disabled).
|
||||
disable_alert=function(alert_type)end,
|
||||
---Disable recipe groups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disable_recipe_groups)
|
||||
disable_recipe_groups=function()end,
|
||||
---Disable recipe subgroups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disable_recipe_subgroups)
|
||||
disable_recipe_subgroups=function()end,
|
||||
---Disassociates a character from this player. This is functionally the same as setting [LuaEntity::associated_player](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player) to `nil`.
|
||||
---
|
||||
---**Note:** See [LuaPlayer::get_associated_characters](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters) for more information.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disassociate_character)
|
||||
---@param character LuaEntity@The character entity
|
||||
disassociate_character=function(character)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.drag_wire)
|
||||
---@class LuaPlayer.drag_wire_param
|
||||
---Position at which cursor was clicked. Used only to decide which side of arithmetic combinator, decider combinator or power switch is to be connected. Entity itself to be connected is based on the player's selected entity.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.drag_wire)
|
||||
---@field position MapPosition
|
||||
|
||||
|
||||
---Start/end wire dragging at the specified location, wire type is based on the cursor contents
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.drag_wire)
|
||||
---@param param LuaPlayer.drag_wire_param
|
||||
---@return boolean@`true` if the action did something
|
||||
drag_wire=function(param)end,
|
||||
---Enables alerts for the given alert category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.enable_alert)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean@Whether the alert type was enabled (false if it was already enabled).
|
||||
enable_alert=function(alert_type)end,
|
||||
---Enable recipe groups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.enable_recipe_groups)
|
||||
enable_recipe_groups=function()end,
|
||||
---Enable recipe subgroups.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.enable_recipe_subgroups)
|
||||
enable_recipe_subgroups=function()end,
|
||||
---Exit the current cutscene. Errors if not in a cutscene.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.exit_cutscene)
|
||||
exit_cutscene=function()end,
|
||||
---Gets which quick bar page is being used for the given screen page or `nil` if not known.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_active_quick_bar_page)
|
||||
---@param index 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.
|
||||
---@return uint8?
|
||||
get_active_quick_bar_page=function(index)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@class LuaPlayer.get_alerts_param
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@field entity? LuaEntity
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@field prototype? LuaEntityPrototype
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@field position? MapPosition
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@field type? defines.alert_type
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@field surface? SurfaceIdentification
|
||||
|
||||
|
||||
---Get all alerts matching the given filters, or all alerts if no filters are given.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_alerts)
|
||||
---@param param LuaPlayer.get_alerts_param
|
||||
---@return {[uint]: {[defines.alert_type]: Alert[]}}@A mapping of surface index to an array of arrays of [alerts](https://lua-api.factorio.com/latest/Concepts.html#Alert) indexed by the [alert type](https://lua-api.factorio.com/latest/defines.html#defines.alert_type).
|
||||
get_alerts=function(param)end,
|
||||
---The characters associated with this player.
|
||||
---
|
||||
---**Note:** The array will always be empty when the player is disconnected (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)) regardless of there being associated characters.
|
||||
---
|
||||
---**Note:** Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters)
|
||||
---@return LuaEntity[]
|
||||
get_associated_characters=function()end,
|
||||
---Get the current goal description, as a localised string.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_goal_description)
|
||||
---@return LocalisedString
|
||||
get_goal_description=function()end,
|
||||
---Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_infinity_inventory_filter)
|
||||
---@param index uint@The index to get.
|
||||
---@return InfinityInventoryFilter?
|
||||
get_infinity_inventory_filter=function(index)end,
|
||||
---Gets the quick bar filter for the given slot or `nil`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_quick_bar_slot)
|
||||
---@param index 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.
|
||||
---@return LuaItemPrototype?
|
||||
get_quick_bar_slot=function(index)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---If the given alert type is currently enabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.is_alert_enabled)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean
|
||||
is_alert_enabled=function(alert_type)end,
|
||||
---If the given alert type is currently muted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.is_alert_muted)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean
|
||||
is_alert_muted=function(alert_type)end,
|
||||
---Is a custom Lua shortcut currently available?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.is_shortcut_available)
|
||||
---@param prototype_name string@Prototype name of the custom shortcut.
|
||||
---@return boolean
|
||||
is_shortcut_available=function(prototype_name)end,
|
||||
---Is a custom Lua shortcut currently toggled?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.is_shortcut_toggled)
|
||||
---@param prototype_name string@Prototype name of the custom shortcut.
|
||||
---@return boolean
|
||||
is_shortcut_toggled=function(prototype_name)end,
|
||||
---Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscene.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.jump_to_cutscene_waypoint)
|
||||
---@param waypoint_index uint
|
||||
jump_to_cutscene_waypoint=function(waypoint_index)end,
|
||||
---Logs a dictionary of chunks -> active entities for the surface this player is on.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.log_active_entity_chunk_counts)
|
||||
log_active_entity_chunk_counts=function()end,
|
||||
---Logs a dictionary of active entities -> count for the surface this player is on.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.log_active_entity_counts)
|
||||
log_active_entity_counts=function()end,
|
||||
---Mutes alerts for the given alert category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.mute_alert)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean@Whether the alert type was muted (false if it was already muted).
|
||||
mute_alert=function(alert_type)end,
|
||||
---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). Render mode change requests are processed before rendering of the next frame.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.open_map)
|
||||
---@param position MapPosition
|
||||
---@param scale double?
|
||||
open_map=function(position,scale)end,
|
||||
---Invokes the "smart pipette" action on the player as if the user pressed it.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_pipette](https://lua-api.factorio.com/latest/events.html#on_player_pipette) instantly.
|
||||
---Raised if the entity was successfully pipetted.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.pipette_entity)
|
||||
---@param entity string|LuaEntity|LuaEntityPrototype
|
||||
---@return boolean@Whether the smart pipette found something to place.
|
||||
pipette_entity=function(entity)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@class LuaPlayer.play_sound_param
|
||||
---The sound to play.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@field path SoundPath
|
||||
---Where the sound should be played. If not given, it's played at the current position of the player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@field position? MapPosition
|
||||
---The volume of the sound to play. Must be between 0 and 1 inclusive.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@field volume_modifier? double
|
||||
---The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@field override_sound_type? SoundType
|
||||
|
||||
|
||||
---Play a sound for this player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound)
|
||||
---@param param LuaPlayer.play_sound_param
|
||||
play_sound=function(param)end,
|
||||
---Print text to the chat console.
|
||||
---
|
||||
---**Note:** Messages that are identical to a message sent in the last 60 ticks are not printed again.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print)
|
||||
---@param message LocalisedString
|
||||
---@param color Color?
|
||||
print=function(message,color)end,
|
||||
---Print entity statistics to the player's console.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print_entity_statistics)
|
||||
---@param entities string[]?@Entity prototypes to get statistics for. If not specified or empty, display statistics for all entities.
|
||||
print_entity_statistics=function(entities)end,
|
||||
---Print LuaObject counts per mod.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print_lua_object_statistics)
|
||||
print_lua_object_statistics=function()end,
|
||||
---Print construction robot job counts to the players console.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print_robot_jobs)
|
||||
print_robot_jobs=function()end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@class LuaPlayer.remove_alert_param
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field entity? LuaEntity
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field prototype? LuaEntityPrototype|string
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field position? MapPosition
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field type? defines.alert_type
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field surface? SurfaceIdentification
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field icon? SignalID
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@field message? LocalisedString
|
||||
|
||||
|
||||
---Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.remove_alert)
|
||||
---@param param LuaPlayer.remove_alert_param
|
||||
remove_alert=function(param)end,
|
||||
---Requests a translation for the given localised string. If the request is successful the [on_string_translated](https://lua-api.factorio.com/latest/events.html#on_string_translated) event will be fired at a later time with the results.
|
||||
---
|
||||
---**Note:** Does nothing if this player is not connected. (see [LuaPlayer::connected](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connected)).
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_string_translated](https://lua-api.factorio.com/latest/events.html#on_string_translated) in a future tick.
|
||||
---Raised if the request was successfully sent.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation)
|
||||
---@param localised_string LocalisedString
|
||||
---@return boolean@Whether the request was sent or not.
|
||||
request_translation=function(localised_string)end,
|
||||
---Sets which quick bar page is being used for the given screen page.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_active_quick_bar_page)
|
||||
---@param screen_index 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.
|
||||
---@param page_index uint@The new quick bar page.
|
||||
set_active_quick_bar_page=function(screen_index,page_index)end,
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@class LuaPlayer.set_controller_param
|
||||
---Which controller to use.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field type defines.controllers
|
||||
---Entity to control. Mandatory when `type` is [defines.controllers.character](https://lua-api.factorio.com/latest/defines.html#defines.controllers.character), ignored otherwise.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field character? LuaEntity
|
||||
---List of waypoints for the cutscene controller. This parameter is mandatory when `type` is [defines.controllers.cutscene](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field waypoints? CutsceneWaypoint
|
||||
---If specified and `type` is [defines.controllers.cutscene](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene), the cutscene will start at this position. If not given the start position will be the player position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field start_position? MapPosition
|
||||
---If specified and `type` is [defines.controllers.cutscene](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene), the cutscene will start at this zoom level. If not given the start zoom will be the players zoom.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field start_zoom? double
|
||||
---If specified and `type` is [defines.controllers.cutscene](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene), it is the time in ticks it will take for the camera to pan from the final waypoint back to the starting position. If not given the camera will not pan back to the start position/zoom.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field final_transition_time? uint
|
||||
---If specified and `type` is [defines.controllers.cutscene](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene), the game will switch to chart-mode (map zoomed out) rendering when the zoom level is less than this value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@field chart_mode_cutoff? double
|
||||
|
||||
|
||||
---Set the controller type of the player.
|
||||
---
|
||||
---**Note:** Setting a player to [defines.controllers.editor](https://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) auto promotes the player to admin and enables cheat mode.
|
||||
---
|
||||
---**Note:** Setting a player to [defines.controllers.editor](https://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) also requires the calling player be an admin.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller)
|
||||
---@param param LuaPlayer.set_controller_param
|
||||
set_controller=function(param)end,
|
||||
---Setup the screen to be shown when the game is finished.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_ending_screen_data)
|
||||
---@param message LocalisedString@Message to be shown.
|
||||
---@param file string?@Path to image to be shown.
|
||||
set_ending_screen_data=function(message,file)end,
|
||||
---Set the text in the goal window (top left).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_goal_description)
|
||||
---@param text LocalisedString?@The text to display. Lines can be delimited with `\n`. Passing an empty string or omitting this parameter entirely will make the goal window disappear.
|
||||
---@param only_update boolean?@When `true`, won't play the "goal updated" sound.
|
||||
set_goal_description=function(text,only_update)end,
|
||||
---Sets the filter for this map editor infinity filters at the given index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_infinity_inventory_filter)
|
||||
---@param index uint@The index to set.
|
||||
---@param filter InfinityInventoryFilter|nil@The new filter or `nil` to clear the filter.
|
||||
set_infinity_inventory_filter=function(index,filter)end,
|
||||
---Sets the quick bar filter for the given slot.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_quick_bar_slot)
|
||||
---@param index 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.
|
||||
---@param filter string|LuaItemPrototype|LuaItemStack@The filter or `nil`.
|
||||
set_quick_bar_slot=function(index,filter)end,
|
||||
---Make a custom Lua shortcut available or unavailable.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_shortcut_available)
|
||||
---@param prototype_name string@Prototype name of the custom shortcut.
|
||||
---@param available boolean
|
||||
set_shortcut_available=function(prototype_name,available)end,
|
||||
---Toggle or untoggle a custom Lua shortcut
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_shortcut_toggled)
|
||||
---@param prototype_name string@Prototype name of the custom shortcut.
|
||||
---@param toggled boolean
|
||||
set_shortcut_toggled=function(prototype_name,toggled)end,
|
||||
---Starts selection with selection tool from the specified position. Does nothing if the players cursor is not a selection tool.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.start_selection)
|
||||
---@param position MapPosition@The position to start selection from.
|
||||
---@param selection_mode string@The type of selection to start. Can be `select`, `alternative-select`, `reverse-select`.
|
||||
start_selection=function(position,selection_mode)end,
|
||||
---Toggles this player into or out of the map editor. Does nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_player_toggled_map_editor](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor) instantly.
|
||||
---Raised if the map editor was successfully toggled.
|
||||
---
|
||||
--- * May raise [on_pre_player_toggled_map_editor](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor) instantly.
|
||||
---Raised if the map editor was successfully toggled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.toggle_map_editor)
|
||||
toggle_map_editor=function()end,
|
||||
---Unlock the achievements of the given player. This has any effect only when this is the local player, the achievement isn't unlocked so far and the achievement is of the type "achievement".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.unlock_achievement)
|
||||
---@param name string@name of the achievement to unlock
|
||||
unlock_achievement=function(name)end,
|
||||
---Unmutes alerts for the given alert category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.unmute_alert)
|
||||
---@param alert_type defines.alert_type
|
||||
---@return boolean@Whether the alert type was unmuted (false if it was wasn't muted).
|
||||
unmute_alert=function(alert_type)end,
|
||||
---Uses the current item in the cursor if it's a capsule or does nothing if not.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.use_from_cursor)
|
||||
---@param position MapPosition@Where the item would be used.
|
||||
use_from_cursor=function(position)end,
|
||||
---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). Render mode change requests are processed before rendering of the next frame.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom_to_world)
|
||||
---@param position MapPosition
|
||||
---@param scale double?
|
||||
zoom_to_world=function(position,scale)end,
|
||||
}
|
||||
|
||||
|
||||
59
.vscode/factorio/runtime-api-LuaProfiler.lua
vendored
59
.vscode/factorio/runtime-api-LuaProfiler.lua
vendored
@@ -1,59 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaProfiler
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---An object used to measure script performance.
|
||||
---
|
||||
---**Note:** Since performance is non-deterministic, these objects don't allow reading the raw time values from Lua. They can be used anywhere a [LocalisedString](https://lua-api.factorio.com/latest/Concepts.html#LocalisedString) is used, except for [LuaGuiElement::add](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)'s LocalisedString arguments, [LuaSurface::create_entity](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity)'s `text` argument, and [LuaEntity::add_market_item](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.add_market_item).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html)
|
||||
---@class LuaProfiler:LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.valid)
|
||||
---@field valid boolean
|
||||
local LuaProfiler={
|
||||
---Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at once.
|
||||
---
|
||||
---**Note:** If other is running, the time to now will be added.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.add)
|
||||
---@param other LuaProfiler@The timer to add to this timer.
|
||||
add=function(other)end,
|
||||
---Divides the current duration by a set value. Useful for calculating the average of many iterations.
|
||||
---
|
||||
---**Note:** Does nothing if this isn't stopped.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.divide)
|
||||
---@param number double@The number to divide by. Must be > 0.
|
||||
divide=function(number)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Resets the clock, also restarting it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.reset)
|
||||
reset=function()end,
|
||||
---Start the clock again, without resetting it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.restart)
|
||||
restart=function()end,
|
||||
---Stops the clock.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.stop)
|
||||
stop=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaProgrammableSpeakerControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for programmable speakers.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html)
|
||||
---@class LuaProgrammableSpeakerControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html#LuaProgrammableSpeakerControlBehavior.circuit_condition)
|
||||
---@field circuit_condition CircuitConditionDefinition
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html#LuaProgrammableSpeakerControlBehavior.circuit_parameters)
|
||||
---@field circuit_parameters ProgrammableSpeakerCircuitParameters
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html#LuaProgrammableSpeakerControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html#LuaProgrammableSpeakerControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaProgrammableSpeakerControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html#LuaProgrammableSpeakerControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
30
.vscode/factorio/runtime-api-LuaRCON.lua
vendored
30
.vscode/factorio/runtime-api-LuaRCON.lua
vendored
@@ -1,30 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRCON
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---**Global Description:**
|
||||
---Allows printing messages to the calling RCON instance if any.
|
||||
---
|
||||
---**Class Description:**
|
||||
---An interface to send messages to the calling RCON interface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRCON.html)
|
||||
---@class LuaRCON:LuaObject
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRCON.html#LuaRCON.object_name)
|
||||
---@field object_name string
|
||||
rcon={
|
||||
---Print text to the calling RCON interface if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRCON.html#LuaRCON.print)
|
||||
---@param message LocalisedString
|
||||
print=function(message)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRailChainSignalControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for rail chain signals.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html)
|
||||
---@class LuaRailChainSignalControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.blue_signal)
|
||||
---@field blue_signal SignalID
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.green_signal)
|
||||
---@field green_signal SignalID
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.orange_signal)
|
||||
---@field orange_signal SignalID
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.red_signal)
|
||||
---@field red_signal SignalID
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaRailChainSignalControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html#LuaRailChainSignalControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
56
.vscode/factorio/runtime-api-LuaRailPath.lua
vendored
56
.vscode/factorio/runtime-api-LuaRailPath.lua
vendored
@@ -1,56 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRailPath
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A rail path.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html)
|
||||
---@class LuaRailPath:LuaObject
|
||||
---[R]
|
||||
---The current rail index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.current)
|
||||
---@field current uint
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Array of the rails that this path travels over.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.rails)
|
||||
---@field rails LuaCustomTable<uint,LuaEntity>
|
||||
---[R]
|
||||
---The total number of rails in this path.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.size)
|
||||
---@field size uint
|
||||
---[R]
|
||||
---The total path distance.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.total_distance)
|
||||
---@field total_distance double
|
||||
---[R]
|
||||
---The total distance travelled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.travelled_distance)
|
||||
---@field travelled_distance double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.valid)
|
||||
---@field valid boolean
|
||||
local LuaRailPath={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRailSignalControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for rail signals.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html)
|
||||
---@class LuaRailSignalControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---The circuit condition when controlling the signal through the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.circuit_condition)
|
||||
---@field circuit_condition CircuitConditionDefinition
|
||||
---[RW]
|
||||
---If this will close the rail signal based off the circuit condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.close_signal)
|
||||
---@field close_signal boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.green_signal)
|
||||
---@field green_signal SignalID
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.orange_signal)
|
||||
---@field orange_signal SignalID
|
||||
---[RW]
|
||||
---If this will read the rail signal state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.read_signal)
|
||||
---@field read_signal boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.red_signal)
|
||||
---@field red_signal SignalID
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaRailSignalControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRandomGenerator
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. This random generator can be saved and loaded and will maintain its state. Note this is entirely different from calling [math.random](https://lua-api.factorio.com/latest/Libraries.html#math.random)() and you should be sure you actually want to use this over calling `math.random()`. If you aren't sure if you need to use this over calling `math.random()` then you probably don't need to use this.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html)
|
||||
---
|
||||
---### Example
|
||||
---Create a generator and use it to print a random number.
|
||||
---```
|
||||
---global.generator = game.create_random_generator()
|
||||
---game.player.print(global.generator())
|
||||
---```
|
||||
---@class LuaRandomGenerator.__index:LuaObject
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.valid)
|
||||
---@field valid boolean
|
||||
local LuaRandomGenerator={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Re-seeds the random generator with the given value.
|
||||
---
|
||||
---**Note:** Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.re_seed)
|
||||
---@param seed uint
|
||||
re_seed=function(seed)end,
|
||||
}
|
||||
|
||||
---Generates a random number. If no parameters are given a number in the [0, 1) range is returned. If a single parameter is given a floored number in the [1, N] range is returned. If 2 parameters are given a floored number in the [N1, N2] range is returned.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.operator%20())
|
||||
---@alias LuaRandomGenerator.__call fun(lower?:int,upper?:int):double
|
||||
---@alias LuaRandomGenerator LuaRandomGenerator.__index|LuaRandomGenerator.__call
|
||||
|
||||
|
||||
121
.vscode/factorio/runtime-api-LuaRecipe.lua
vendored
121
.vscode/factorio/runtime-api-LuaRecipe.lua
vendored
@@ -1,121 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRecipe
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A crafting recipe. Recipes belong to forces (see [LuaForce](https://lua-api.factorio.com/latest/LuaForce.html)) because some recipes are unlocked by research, and researches are per-force.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html)
|
||||
---@class LuaRecipe:LuaObject
|
||||
---[R]
|
||||
---Category of the recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.category)
|
||||
---@field category string
|
||||
---[RW]
|
||||
---Can the recipe be used?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.energy)
|
||||
---@field energy double
|
||||
---[R]
|
||||
---The force that owns this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.force)
|
||||
---@field force LuaForce
|
||||
---[R]
|
||||
---Group of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.group)
|
||||
---@field group LuaGroup
|
||||
---[R]
|
||||
---Is the recipe hidden? Hidden recipe don't show up in the crafting menu.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.hidden)
|
||||
---@field hidden boolean
|
||||
---[RW]
|
||||
---Is the recipe hidden from flow statistics?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.hidden_from_flow_stats)
|
||||
---@field hidden_from_flow_stats boolean
|
||||
---[R]
|
||||
---Ingredients for this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.ingredients)
|
||||
---
|
||||
---### Example
|
||||
---What the "steel-chest" recipe would return
|
||||
---```
|
||||
---{{type="item", name="steel-plate", amount=8}}
|
||||
---```
|
||||
---
|
||||
---### Example
|
||||
---What the "advanced-oil-processing" recipe would return
|
||||
---```
|
||||
---{{type="fluid", name="crude-oil", amount=10}, {type="fluid", name="water", amount=5}}
|
||||
---```
|
||||
---@field ingredients Ingredient[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---Localised name of the recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---The results of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.products)
|
||||
---@field products Product[]
|
||||
---[R]
|
||||
---The prototype for this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.prototype)
|
||||
---@field prototype LuaRecipePrototype
|
||||
---[R]
|
||||
---Subgroup of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.subgroup)
|
||||
---@field subgroup LuaGroup
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.valid)
|
||||
---@field valid boolean
|
||||
local LuaRecipe={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Reload the recipe from the prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.reload)
|
||||
reload=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRecipeCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a recipe category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html)
|
||||
---@class LuaRecipeCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaRecipeCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
160
.vscode/factorio/runtime-api-LuaRecipePrototype.lua
vendored
160
.vscode/factorio/runtime-api-LuaRecipePrototype.lua
vendored
@@ -1,160 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRecipePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A crafting recipe prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html)
|
||||
---@class LuaRecipePrototype:LuaObject
|
||||
---[R]
|
||||
---If this recipe is enabled for the purpose of intermediate hand-crafting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.allow_as_intermediate)
|
||||
---@field allow_as_intermediate boolean
|
||||
---[R]
|
||||
---Is this recipe allowed to be broken down for the recipe tooltip "Total raw" calculations?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.allow_decomposition)
|
||||
---@field allow_decomposition boolean
|
||||
---[R]
|
||||
---If the recipe is allowed to have the extra inserter overload bonus applied (4 * stack inserter stack size).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.allow_inserter_overload)
|
||||
---@field allow_inserter_overload boolean
|
||||
---[R]
|
||||
---If this recipe is allowed to use intermediate recipes when hand-crafting.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.allow_intermediates)
|
||||
---@field allow_intermediates boolean
|
||||
---[R]
|
||||
---Should this recipe always show "Made in" in the tooltip?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.always_show_made_in)
|
||||
---@field always_show_made_in boolean
|
||||
---[R]
|
||||
---If the products are always shown in the recipe tooltip.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.always_show_products)
|
||||
---@field always_show_products boolean
|
||||
---[R]
|
||||
---Category of the recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.category)
|
||||
---@field category string
|
||||
---[R]
|
||||
---The emissions multiplier for this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.emissions_multiplier)
|
||||
---@field emissions_multiplier double
|
||||
---[R]
|
||||
---If this recipe prototype is enabled by default (enabled at the beginning of a game).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---Energy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.energy)
|
||||
---@field energy double
|
||||
---[R]
|
||||
---Group of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.group)
|
||||
---@field group LuaGroup
|
||||
---[R]
|
||||
---Is the recipe hidden? Hidden recipe don't show up in the crafting menu.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---Is the recipe hidden from flow statistics (item/fluid production statistics)?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.hidden_from_flow_stats)
|
||||
---@field hidden_from_flow_stats boolean
|
||||
---[R]
|
||||
---Is the recipe hidden from player crafting? The recipe will still show up for selection in machines.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.hidden_from_player_crafting)
|
||||
---@field hidden_from_player_crafting boolean
|
||||
---[R]
|
||||
---Ingredients for this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.ingredients)
|
||||
---@field ingredients Ingredient[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---Localised name of the recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---The main product of this recipe, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.main_product)
|
||||
---@field main_product? Product
|
||||
---[R]
|
||||
---Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.overload_multiplier)
|
||||
---@field overload_multiplier uint
|
||||
---[R]
|
||||
---The results of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.products)
|
||||
---@field products Product[]
|
||||
---[R]
|
||||
---The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.request_paste_multiplier)
|
||||
---@field request_paste_multiplier uint
|
||||
---[R]
|
||||
---If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.show_amount_in_title)
|
||||
---@field show_amount_in_title boolean
|
||||
---[R]
|
||||
---Subgroup of this recipe.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.subgroup)
|
||||
---@field subgroup LuaGroup
|
||||
---[R]
|
||||
---Is this recipe unlocks the result item(s) so they're shown in filter-select GUIs.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.unlock_results)
|
||||
---@field unlock_results boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaRecipePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
70
.vscode/factorio/runtime-api-LuaRemote.lua
vendored
70
.vscode/factorio/runtime-api-LuaRemote.lua
vendored
@@ -1,70 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRemote
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---**Global Description:**
|
||||
---Allows inter-mod communication by way of providing a repository of interfaces that is shared by all mods.
|
||||
---
|
||||
---**Class Description:**
|
||||
---Registry of interfaces between scripts. An interface is simply a dictionary mapping names to functions. A script or mod can then register an interface with [LuaRemote](https://lua-api.factorio.com/latest/LuaRemote.html), after that any script can call the registered functions, provided it knows the interface name and the desired function name. An instance of LuaRemote is available through the global object named `remote`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html)
|
||||
---
|
||||
---### Example
|
||||
---Will register a remote interface containing two functions. Later, it will call these functions through `remote`.
|
||||
---```
|
||||
---remote.add_interface("human interactor",
|
||||
--- {hello = function() game.player.print("Hi!") end,
|
||||
--- bye = function(name) game.player.print("Bye " .. name) end})
|
||||
----- Some time later, possibly in a different mod...
|
||||
---remote.call("human interactor", "hello")
|
||||
---remote.call("human interactor", "bye", "dear reader")
|
||||
---```
|
||||
---@class LuaRemote:LuaObject
|
||||
---[R]
|
||||
---List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.interfaces)
|
||||
---
|
||||
---### Example
|
||||
---Assuming the "human interactor" interface is registered as above
|
||||
---```
|
||||
---game.player.print(tostring(remote.interfaces["human interactor"]["hello"])) -- prints true
|
||||
---game.player.print(tostring(remote.interfaces["human interactor"]["nonexistent"])) -- prints nil
|
||||
---```
|
||||
---@field interfaces {[string]: {[string]: true}}
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.object_name)
|
||||
---@field object_name string
|
||||
remote={
|
||||
---Add a remote interface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface)
|
||||
---@param name string@Name of the interface. If the name matches any existing interface, an error is thrown.
|
||||
---@param functions {[string]: fun()}@List of functions that are members of the new interface.
|
||||
add_interface=function(name,functions)end,
|
||||
---Call a function of an interface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.call)
|
||||
---@param interface string@Interface to look up `function` in.
|
||||
---@param function_ string@Function name that belongs to the `interface`.
|
||||
---@vararg Any
|
||||
---
|
||||
---**vararg**: Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.
|
||||
---@return Any?
|
||||
call=function(interface,function_,...)end,
|
||||
---Removes an interface with the given name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.remove_interface)
|
||||
---@param name string@Name of the interface.
|
||||
---@return boolean@Whether the interface was removed. `False` if the interface didn't exist.
|
||||
remove_interface=function(name)end,
|
||||
}
|
||||
|
||||
|
||||
1356
.vscode/factorio/runtime-api-LuaRendering.lua
vendored
1356
.vscode/factorio/runtime-api-LuaRendering.lua
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,49 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaResourceCategoryPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a resource category.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html)
|
||||
---@class LuaResourceCategoryPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaResourceCategoryPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaRoboportControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for roboports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html)
|
||||
---@class LuaRoboportControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.available_construction_output_signal)
|
||||
---@field available_construction_output_signal SignalID
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.available_logistic_output_signal)
|
||||
---@field available_logistic_output_signal SignalID
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---`true` if the roboport should report the logistics network content to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.read_logistics)
|
||||
---@field read_logistics boolean
|
||||
---[RW]
|
||||
---`true` if the roboport should report the robot statistics to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.read_robot_stats)
|
||||
---@field read_robot_stats boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.total_construction_output_signal)
|
||||
---@field total_construction_output_signal SignalID
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.total_logistic_output_signal)
|
||||
---@field total_logistic_output_signal SignalID
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaRoboportControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html#LuaRoboportControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
52
.vscode/factorio/runtime-api-LuaSettings.lua
vendored
52
.vscode/factorio/runtime-api-LuaSettings.lua
vendored
@@ -1,52 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaSettings
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---**Global Description:**
|
||||
---Allows reading the current mod settings.
|
||||
---
|
||||
---**Class Description:**
|
||||
---Object containing mod settings of three distinct types: `startup`, `global`, and `player`. An instance of LuaSettings is available through the global object named `settings`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html)
|
||||
---@class LuaSettings:LuaObject
|
||||
---[R]
|
||||
---The current global mod settings, indexed by prototype name.
|
||||
---
|
||||
---Even though these are marked as read-only, they can be changed by overwriting individual [ModSetting](https://lua-api.factorio.com/latest/Concepts.html#ModSetting) tables in the custom table. Mods can only change their own settings. Using the in-game console, all global settings can be changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.global)
|
||||
---@field global LuaCustomTable<string,ModSetting>
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The default player mod settings for this map, indexed by prototype name.
|
||||
---
|
||||
---Even though these are marked as read-only, they can be changed by overwriting individual [ModSetting](https://lua-api.factorio.com/latest/Concepts.html#ModSetting) tables in the custom table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.player)
|
||||
---@field player LuaCustomTable<string,ModSetting>
|
||||
---[R]
|
||||
---The startup mod settings, indexed by prototype name.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.startup)
|
||||
---@field startup LuaCustomTable<string,ModSetting>
|
||||
settings={
|
||||
---Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as [LuaPlayer::mod_settings](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.mod_settings).
|
||||
---
|
||||
---**Note:** This table will become invalid if its associated player does.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.get_player_settings)
|
||||
---@param player PlayerIdentification
|
||||
---@return LuaCustomTable<string,ModSetting>
|
||||
get_player_settings=function(player)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaShortcutPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a shortcut.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html)
|
||||
---@class LuaShortcutPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.action)
|
||||
---@field action string
|
||||
---[R]
|
||||
---The control input that is associated with this shortcut, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.associated_control_input)
|
||||
---@field associated_control_input? string
|
||||
---[R]
|
||||
---The item to create when this shortcut is used, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.item_to_spawn)
|
||||
---@field item_to_spawn? LuaItemPrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---The technology to unlock when this shortcut is used, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.technology_to_unlock)
|
||||
---@field technology_to_unlock? LuaTechnologyPrototype
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.toggleable)
|
||||
---@field toggleable boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaShortcutPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaStorageTankControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for storage tanks.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStorageTankControlBehavior.html)
|
||||
---@class LuaStorageTankControlBehavior:LuaControlBehavior
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStorageTankControlBehavior.html#LuaStorageTankControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStorageTankControlBehavior.html#LuaStorageTankControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaStorageTankControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStorageTankControlBehavior.html#LuaStorageTankControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
404
.vscode/factorio/runtime-api-LuaStyle.lua
vendored
404
.vscode/factorio/runtime-api-LuaStyle.lua
vendored
@@ -1,404 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaStyle
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Style of a GUI element. All of the attributes listed here may be `nil` if not available for a particular GUI element.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html)
|
||||
---@class LuaStyle:LuaObject
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.badge_font)
|
||||
---
|
||||
---_Can only be used if this is TabStyle_
|
||||
---@field badge_font string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.badge_horizontal_spacing)
|
||||
---
|
||||
---_Can only be used if this is TabStyle_
|
||||
---@field badge_horizontal_spacing int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.bar_width)
|
||||
---
|
||||
---_Can only be used if this is LuaProgressBarStyle_
|
||||
---@field bar_width uint
|
||||
---[RW]
|
||||
---Space between the table cell contents bottom and border.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.bottom_cell_padding)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle_
|
||||
---@field bottom_cell_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.bottom_margin)
|
||||
---@field bottom_margin int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.bottom_padding)
|
||||
---@field bottom_padding int
|
||||
---[W]
|
||||
---Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.cell_padding)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle_
|
||||
---@field cell_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.clicked_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field clicked_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.clicked_vertical_offset)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field clicked_vertical_offset int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.color)
|
||||
---
|
||||
---_Can only be used if this is LuaProgressBarStyle_
|
||||
---@field color Color
|
||||
---[R]
|
||||
---Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.column_alignments)
|
||||
---
|
||||
---### Example
|
||||
---```
|
||||
---table_element.style.column_alignments[1] = "center"
|
||||
---```
|
||||
---@field column_alignments LuaCustomTable<uint,Alignment>
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.default_badge_font_color)
|
||||
---
|
||||
---_Can only be used if this is TabStyle_
|
||||
---@field default_badge_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.disabled_badge_font_color)
|
||||
---
|
||||
---_Can only be used if this is TabStyle_
|
||||
---@field disabled_badge_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.disabled_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle or LuaTabStyle_
|
||||
---@field disabled_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_bottom_margin_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_bottom_margin_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_bottom_padding_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_bottom_padding_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_left_margin_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_left_margin_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_left_padding_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_left_padding_when_activated int
|
||||
---[W]
|
||||
---Sets `extra_top/right/bottom/left_margin_when_activated` to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_margin_when_activated)
|
||||
---@field extra_margin_when_activated int|int[]
|
||||
---[W]
|
||||
---Sets `extra_top/right/bottom/left_padding_when_activated` to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_padding_when_activated)
|
||||
---@field extra_padding_when_activated int|int[]
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_right_margin_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_right_margin_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_right_padding_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_right_padding_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_top_margin_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_top_margin_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_top_padding_when_activated)
|
||||
---
|
||||
---_Can only be used if this is ScrollPaneStyle_
|
||||
---@field extra_top_padding_when_activated int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.font)
|
||||
---@field font string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.font_color)
|
||||
---@field font_color Color
|
||||
---[R]
|
||||
---Gui of the [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) of this style.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.gui)
|
||||
---@field gui LuaGui
|
||||
---[W]
|
||||
---Sets both minimal and maximal height to the given value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.height)
|
||||
---@field height int
|
||||
---[RW]
|
||||
---Horizontal align of the inner content of the widget, if any. Possible values are "left", "center" or "right".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_align)
|
||||
---@field horizontal_align? string
|
||||
---[RW]
|
||||
---Horizontal space between individual cells.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_spacing)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlowStyle_
|
||||
---@field horizontal_spacing int
|
||||
---[RW]
|
||||
---Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default value is false.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontally_squashable)
|
||||
---@field horizontally_squashable? boolean
|
||||
---[RW]
|
||||
---Whether the GUI element stretches its size horizontally to other elements. `nil` if this element does not support stretching.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontally_stretchable)
|
||||
---@field horizontally_stretchable? boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.hovered_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field hovered_font_color Color
|
||||
---[RW]
|
||||
---Space between the table cell contents left and border.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.left_cell_padding)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle_
|
||||
---@field left_cell_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.left_margin)
|
||||
---@field left_margin int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.left_padding)
|
||||
---@field left_padding int
|
||||
---[W]
|
||||
---Sets top/right/bottom/left margins to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.margin)
|
||||
---@field margin int|int[]
|
||||
---[RW]
|
||||
---Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.maximal_height)
|
||||
---@field maximal_height int
|
||||
---[RW]
|
||||
---Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.maximal_width)
|
||||
---@field maximal_width int
|
||||
---[RW]
|
||||
---Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.minimal_height)
|
||||
---@field minimal_height int
|
||||
---[RW]
|
||||
---Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.minimal_width)
|
||||
---@field minimal_width int
|
||||
---[R]
|
||||
---Name of this style.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.name)
|
||||
---@field name string
|
||||
---[RW]
|
||||
---Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.natural_height)
|
||||
---@field natural_height int
|
||||
---[RW]
|
||||
---Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.natural_width)
|
||||
---@field natural_width int
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.object_name)
|
||||
---@field object_name string
|
||||
---[W]
|
||||
---Sets top/right/bottom/left paddings to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.padding)
|
||||
---@field padding int|int[]
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.pie_progress_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field pie_progress_color Color
|
||||
---[RW]
|
||||
---How this GUI element handles rich text.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.rich_text_setting)
|
||||
---
|
||||
---_Can only be used if this is LuaLabelStyle, LuaTextBoxStyle or LuaTextFieldStyle_
|
||||
---@field rich_text_setting defines.rich_text_setting
|
||||
---[RW]
|
||||
---Space between the table cell contents right and border.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.right_cell_padding)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle_
|
||||
---@field right_cell_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.right_margin)
|
||||
---@field right_margin int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.right_padding)
|
||||
---@field right_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.selected_badge_font_color)
|
||||
---
|
||||
---_Can only be used if this is TabStyle_
|
||||
---@field selected_badge_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.selected_clicked_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field selected_clicked_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.selected_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field selected_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.selected_hovered_font_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field selected_hovered_font_color Color
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.single_line)
|
||||
---
|
||||
---_Can only be used if this is LabelStyle_
|
||||
---@field single_line boolean
|
||||
---[W]
|
||||
---Sets both width and height to the given value. Also accepts an array with two values, setting width to the first and height to the second one.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.size)
|
||||
---@field size int|int[]
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.stretch_image_to_widget_size)
|
||||
---
|
||||
---_Can only be used if this is ImageStyle_
|
||||
---@field stretch_image_to_widget_size boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.strikethrough_color)
|
||||
---
|
||||
---_Can only be used if this is LuaButtonStyle_
|
||||
---@field strikethrough_color Color
|
||||
---[RW]
|
||||
---Space between the table cell contents top and border.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.top_cell_padding)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle_
|
||||
---@field top_cell_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.top_margin)
|
||||
---@field top_margin int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.top_padding)
|
||||
---@field top_padding int
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.use_header_filler)
|
||||
---
|
||||
---_Can only be used if this is LuaFrameStyle_
|
||||
---@field use_header_filler boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.valid)
|
||||
---@field valid boolean
|
||||
---[RW]
|
||||
---Vertical align of the inner content of the widget, if any. Possible values are "top", "center" or "bottom".
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.vertical_align)
|
||||
---@field vertical_align? string
|
||||
---[RW]
|
||||
---Vertical space between individual cells.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.vertical_spacing)
|
||||
---
|
||||
---_Can only be used if this is LuaTableStyle, LuaFlowStyle, LuaVerticalFlowStyle or LuaTabbedPaneStyle_
|
||||
---@field vertical_spacing int
|
||||
---[RW]
|
||||
---Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwise.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.vertically_squashable)
|
||||
---@field vertically_squashable? boolean
|
||||
---[RW]
|
||||
---Whether the GUI element stretches its size vertically to other elements. `nil` if this element does not support stretching.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.vertically_stretchable)
|
||||
---@field vertically_stretchable? boolean
|
||||
---[W]
|
||||
---Sets both minimal and maximal width to the given value.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.width)
|
||||
---@field width int
|
||||
local LuaStyle={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
1724
.vscode/factorio/runtime-api-LuaSurface.lua
vendored
1724
.vscode/factorio/runtime-api-LuaSurface.lua
vendored
File diff suppressed because it is too large
Load Diff
121
.vscode/factorio/runtime-api-LuaTechnology.lua
vendored
121
.vscode/factorio/runtime-api-LuaTechnology.lua
vendored
@@ -1,121 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTechnology
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---One research item.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html)
|
||||
---@class LuaTechnology:LuaObject
|
||||
---[R]
|
||||
---Effects applied when this technology is researched.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.effects)
|
||||
---@field effects TechnologyModifier[]
|
||||
---[RW]
|
||||
---Can this technology be researched?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---The force this technology belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.force)
|
||||
---@field force LuaForce
|
||||
---[RW]
|
||||
---The current level of this technology. For level-based technology writing to this is the same as researching the technology to the previous level. Writing the level will set [LuaTechnology::enabled](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.enabled) to `true`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.level)
|
||||
---@field level uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---Localised name of this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Prerequisites of this technology. The result maps technology name to the [LuaTechnology](https://lua-api.factorio.com/latest/LuaTechnology.html) object.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.prerequisites)
|
||||
---@field prerequisites {[string]: LuaTechnology}
|
||||
---[R]
|
||||
---The prototype of this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.prototype)
|
||||
---@field prototype LuaTechnologyPrototype
|
||||
---[R]
|
||||
---The number of research units required for this technology.
|
||||
---
|
||||
---**Note:** This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier) is `true`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_count)
|
||||
---@field research_unit_count uint
|
||||
---[R]
|
||||
---The count formula used for this infinite research. `nil` if this research isn't infinite.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_count_formula)
|
||||
---@field research_unit_count_formula? string
|
||||
---[R]
|
||||
---Amount of energy required to finish a unit of research.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_energy)
|
||||
---@field research_unit_energy double
|
||||
---[R]
|
||||
---The types of ingredients that labs will require to research this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_ingredients)
|
||||
---@field research_unit_ingredients Ingredient[]
|
||||
---[RW]
|
||||
---Has this technology been researched? Switching from `false` to `true` will trigger the technology advancement perks; switching from `true` to `false` will reverse them.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.researched)
|
||||
---@field researched boolean
|
||||
---[R]
|
||||
---Is this an upgrade-type research?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.upgrade)
|
||||
---@field upgrade boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.valid)
|
||||
---@field valid boolean
|
||||
---[RW]
|
||||
---If this technology will be visible in the research GUI even though it is disabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.visible_when_disabled)
|
||||
---@field visible_when_disabled boolean
|
||||
local LuaTechnology={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Reload this technology from its prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.reload)
|
||||
reload=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTechnologyPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A Technology prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html)
|
||||
---@class LuaTechnologyPrototype:LuaObject
|
||||
---[R]
|
||||
---Effects applied when this technology is researched.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.effects)
|
||||
---@field effects TechnologyModifier[]
|
||||
---[R]
|
||||
---If this technology prototype is enabled by default (enabled at the beginning of a game).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.enabled)
|
||||
---@field enabled boolean
|
||||
---[R]
|
||||
---If this technology prototype is hidden.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.hidden)
|
||||
---@field hidden boolean
|
||||
---[R]
|
||||
---If this technology ignores the technology cost multiplier setting.
|
||||
---
|
||||
---**Note:** [LuaTechnologyPrototype::research_unit_count](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count) will already take this setting into account.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier)
|
||||
---@field ignore_tech_cost_multiplier boolean
|
||||
---[R]
|
||||
---The level of this research.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.level)
|
||||
---@field level uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---Localised name of this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---The max level of this research.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.max_level)
|
||||
---@field max_level uint
|
||||
---[R]
|
||||
---Name of this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Prerequisites of this technology. The result maps technology name to the [LuaTechnologyPrototype](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html) object.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.prerequisites)
|
||||
---@field prerequisites {[string]: LuaTechnologyPrototype}
|
||||
---[R]
|
||||
---The number of research units required for this technology.
|
||||
---
|
||||
---**Note:** This is multiplied by the current research cost multiplier, unless [LuaTechnologyPrototype::ignore_tech_cost_multiplier](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier) is `true`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count)
|
||||
---@field research_unit_count uint
|
||||
---[R]
|
||||
---The count formula used for this infinite research. `nil` if this research isn't infinite.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count_formula)
|
||||
---@field research_unit_count_formula? string
|
||||
---[R]
|
||||
---Amount of energy required to finish a unit of research.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_energy)
|
||||
---@field research_unit_energy double
|
||||
---[R]
|
||||
---The types of ingredients that labs will require to research this technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_ingredients)
|
||||
---@field research_unit_ingredients Ingredient[]
|
||||
---[R]
|
||||
---If the is technology prototype is an upgrade to some other technology.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.upgrade)
|
||||
---@field upgrade boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---If this technology will be visible in the research GUI even though it is disabled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.visible_when_disabled)
|
||||
---@field visible_when_disabled boolean
|
||||
local LuaTechnologyPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
106
.vscode/factorio/runtime-api-LuaTile.lua
vendored
106
.vscode/factorio/runtime-api-LuaTile.lua
vendored
@@ -1,106 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTile
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A single "square" on the map.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html)
|
||||
---@class LuaTile:LuaObject
|
||||
---[R]
|
||||
---The name of the [LuaTilePrototype](https://lua-api.factorio.com/latest/LuaTilePrototype.html) hidden under this tile, if any. During normal gameplay, only [non-mineable](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) tiles can become hidden. This can however be circumvented with [LuaSurface::set_hidden_tile](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_hidden_tile).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.hidden_tile)
|
||||
---@field hidden_tile? string
|
||||
---[R]
|
||||
---Prototype name of this tile. E.g. `"sand-3"` or `"grass-2"`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The position this tile references.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.position)
|
||||
---@field position TilePosition
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.prototype)
|
||||
---@field prototype LuaTilePrototype
|
||||
---[R]
|
||||
---The surface this tile is on.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.surface)
|
||||
---@field surface LuaSurface
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.valid)
|
||||
---@field valid boolean
|
||||
local LuaTile={
|
||||
---Cancels deconstruction if it is scheduled, does nothing otherwise.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_cancelled_deconstruction](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) instantly.
|
||||
---Raised if the tile's deconstruction was successfully cancelled.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.cancel_deconstruction)
|
||||
---@param force ForceIdentification@The force who did the deconstruction order.
|
||||
---@param player PlayerIdentification?@The player to set the last_user to if any.
|
||||
cancel_deconstruction=function(force,player)end,
|
||||
---What type of things can collide with this tile?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.collides_with)
|
||||
---
|
||||
---### Example
|
||||
---Check if the character would collide with a tile
|
||||
---```
|
||||
---game.player.print(tostring(game.player.surface.get_tile(1, 1).collides_with("player-layer")))
|
||||
---```
|
||||
---@param layer CollisionMaskLayer
|
||||
---@return boolean
|
||||
collides_with=function(layer)end,
|
||||
---Gets all tile ghosts on this tile.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.get_tile_ghosts)
|
||||
---@param force ForceIdentification?@Get tile ghosts of this force.
|
||||
---@return LuaTile[]
|
||||
get_tile_ghosts=function(force)end,
|
||||
---Does this tile have any tile ghosts on it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.has_tile_ghost)
|
||||
---@param force ForceIdentification?@Check for tile ghosts of this force.
|
||||
---@return boolean
|
||||
has_tile_ghost=function(force)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Orders deconstruction of this tile by the given force.
|
||||
---
|
||||
---**Events:**
|
||||
--- * May raise [on_marked_for_deconstruction](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) instantly.
|
||||
---Raised if the tile was successfully marked for deconstruction.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.order_deconstruction)
|
||||
---@param force ForceIdentification@The force whose robots are supposed to do the deconstruction.
|
||||
---@param player PlayerIdentification?@The player to set the last_user to if any.
|
||||
---@return LuaEntity?@The deconstructible tile proxy created, if any.
|
||||
order_deconstruction=function(force,player)end,
|
||||
---Is this tile marked for deconstruction?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.to_be_deconstructed)
|
||||
---@param force ForceIdentification?@The force who did the deconstruction order.
|
||||
---@return boolean
|
||||
to_be_deconstructed=function(force)end,
|
||||
}
|
||||
|
||||
|
||||
126
.vscode/factorio/runtime-api-LuaTilePrototype.lua
vendored
126
.vscode/factorio/runtime-api-LuaTilePrototype.lua
vendored
@@ -1,126 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTilePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a tile.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html)
|
||||
---@class LuaTilePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.allowed_neighbors)
|
||||
---@field allowed_neighbors {[string]: LuaTilePrototype}
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.automatic_neighbors)
|
||||
---@field automatic_neighbors boolean
|
||||
---[R]
|
||||
---Autoplace specification for this prototype, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.autoplace_specification)
|
||||
---@field autoplace_specification? AutoplaceSpecification
|
||||
---[R]
|
||||
---False if this tile is not allowed in blueprints regardless of the ability to build it.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.can_be_part_of_blueprint)
|
||||
---@field can_be_part_of_blueprint boolean
|
||||
---[R]
|
||||
---True if building this tile should check for colliding entities above and prevent building if such are found. Also during mining tiles above this tile checks for entities colliding with this tile and prevents mining if such are found.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.check_collision_with_entities)
|
||||
---@field check_collision_with_entities boolean
|
||||
---[R]
|
||||
---The collision mask this tile uses
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.collision_mask)
|
||||
---@field collision_mask CollisionMask
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.collision_mask_with_flags)
|
||||
---@field collision_mask_with_flags CollisionMaskWithFlags
|
||||
---[R]
|
||||
---The probability that decorative entities will be removed from on top of this tile when this tile is generated.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.decorative_removal_probability)
|
||||
---@field decorative_removal_probability float
|
||||
---[R]
|
||||
---Amount of pollution emissions per second this tile will absorb.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.emissions_per_second)
|
||||
---@field emissions_per_second double
|
||||
---[R]
|
||||
---Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name. `nil` (instead of an empty table) if no items can place this tile.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.items_to_place_this)
|
||||
---@field items_to_place_this SimpleItemStack[]
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.layer)
|
||||
---@field layer uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.map_color)
|
||||
---@field map_color Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties)
|
||||
---@field mineable_properties LuaTilePrototype.mineable_properties
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---If this tile needs correction logic applied when it's generated in the world..
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.needs_correction)
|
||||
---@field needs_correction boolean
|
||||
---[R]
|
||||
---The next direction of this tile, if any. Used when a tile has multiple directions (such as hazard concrete)
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.next_direction)
|
||||
---@field next_direction? LuaTilePrototype
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.vehicle_friction_modifier)
|
||||
---@field vehicle_friction_modifier float
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.walking_speed_modifier)
|
||||
---@field walking_speed_modifier float
|
||||
local LuaTilePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
246
.vscode/factorio/runtime-api-LuaTrain.lua
vendored
246
.vscode/factorio/runtime-api-LuaTrain.lua
vendored
@@ -1,246 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTrain
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html)
|
||||
---@class LuaTrain:LuaObject
|
||||
---[R]
|
||||
---The rail at the back end of the train, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.back_rail)
|
||||
---@field back_rail? LuaEntity
|
||||
---[R]
|
||||
---The back stock of this train, if any. The back of the train is at the opposite end of the [front](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.front_stock).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.back_stock)
|
||||
---@field back_stock? LuaEntity
|
||||
---[R]
|
||||
---The cargo carriages the train contains.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.cargo_wagons)
|
||||
---@field cargo_wagons LuaEntity[]
|
||||
---[R]
|
||||
---The rolling stocks this train is composed of, with the numbering starting at the [front](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.front_stock) of the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.carriages)
|
||||
---@field carriages LuaEntity[]
|
||||
---[R]
|
||||
---The fluid carriages the train contains.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.fluid_wagons)
|
||||
---@field fluid_wagons LuaEntity[]
|
||||
---[R]
|
||||
---The rail at the front end of the train, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.front_rail)
|
||||
---@field front_rail? LuaEntity
|
||||
---[R]
|
||||
---The front stock of this train, if any. The front of the train is in the direction that a majority of locomotives are pointing in. If it's a tie, the North and West directions take precedence.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.front_stock)
|
||||
---@field front_stock? LuaEntity
|
||||
---[R]
|
||||
---If this train has a path.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.has_path)
|
||||
---@field has_path boolean
|
||||
---[R]
|
||||
---The unique train ID.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.id)
|
||||
---@field id uint
|
||||
---[R]
|
||||
---The total number of kills by this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.kill_count)
|
||||
---@field kill_count uint
|
||||
---[R]
|
||||
---The players killed by this train.
|
||||
---
|
||||
---The keys are the player indices, the values are how often this train killed that player.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.killed_players)
|
||||
---@field killed_players {[uint]: uint}
|
||||
---[R]
|
||||
---Arrays of locomotives. The result is two arrays, indexed by `"front_movers"` and `"back_movers"` containing the locomotives. E.g. `{front_movers={loco1, loco2}, back_movers={loco3}}`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.locomotives)
|
||||
---@field locomotives {[string]: LuaEntity[]}
|
||||
---[RW]
|
||||
---When `true`, the train is explicitly controlled by the player or script. When `false`, the train moves autonomously according to its schedule.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.manual_mode)
|
||||
---@field manual_mode boolean
|
||||
---[R]
|
||||
---Current max speed when moving backwards, depends on locomotive prototype and fuel.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.max_backward_speed)
|
||||
---@field max_backward_speed double
|
||||
---[R]
|
||||
---Current max speed when moving forward, depends on locomotive prototype and fuel.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.max_forward_speed)
|
||||
---@field max_forward_speed double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The player passengers on the train
|
||||
---
|
||||
---**Note:** This does *not* index using player index. See [LuaPlayer::index](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index) on each player instance for the player index.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.passengers)
|
||||
---@field passengers LuaPlayer[]
|
||||
---[R]
|
||||
---The path this train is using, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.path)
|
||||
---@field path? LuaRailPath
|
||||
---[R]
|
||||
---The destination rail this train is currently pathing to, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.path_end_rail)
|
||||
---@field path_end_rail? LuaEntity
|
||||
---[R]
|
||||
---The destination train stop this train is currently pathing to, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.path_end_stop)
|
||||
---@field path_end_stop? LuaEntity
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.rail_direction_from_back_rail)
|
||||
---@field rail_direction_from_back_rail defines.rail_direction
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.rail_direction_from_front_rail)
|
||||
---@field rail_direction_from_front_rail defines.rail_direction
|
||||
---[R]
|
||||
---The riding state of this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.riding_state)
|
||||
---@field riding_state RidingState
|
||||
---[RW]
|
||||
---This train's current schedule, if any. Set to `nil` to clear.
|
||||
---
|
||||
---**Note:** The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.schedule)
|
||||
---@field schedule? TrainSchedule
|
||||
---[R]
|
||||
---The signal this train is arriving or waiting at, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.signal)
|
||||
---@field signal? LuaEntity
|
||||
---[RW]
|
||||
---Current speed.
|
||||
---
|
||||
---**Note:** Changing the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.speed)
|
||||
---@field speed double
|
||||
---[R]
|
||||
---This train's current state.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.state)
|
||||
---@field state defines.train_state
|
||||
---[R]
|
||||
---The train stop this train is stopped at, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.station)
|
||||
---@field station? LuaEntity
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---The weight of this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.weight)
|
||||
---@field weight double
|
||||
local LuaTrain={
|
||||
---Clears all fluids in this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.clear_fluids_inside)
|
||||
clear_fluids_inside=function()end,
|
||||
---Clear all items in this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.clear_items_inside)
|
||||
clear_items_inside=function()end,
|
||||
---Get a mapping of the train's inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_contents)
|
||||
---@return {[string]: uint}@The counts, indexed by item names.
|
||||
get_contents=function()end,
|
||||
---Gets a mapping of the train's fluid inventory.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_fluid_contents)
|
||||
---@return {[string]: double}@The counts, indexed by fluid names.
|
||||
get_fluid_contents=function()end,
|
||||
---Get the amount of a particular fluid stored in the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_fluid_count)
|
||||
---@param fluid string?@Fluid name to count. If not given, counts all fluids.
|
||||
---@return double
|
||||
get_fluid_count=function(fluid)end,
|
||||
---Get the amount of a particular item stored in the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_item_count)
|
||||
---@param item string?@Item name to count. If not given, counts all items.
|
||||
---@return uint
|
||||
get_item_count=function(item)end,
|
||||
---Gets all rails under the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_rails)
|
||||
---@return LuaEntity[]
|
||||
get_rails=function()end,
|
||||
---Go to the station specified by the index in the train's schedule.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.go_to_station)
|
||||
---@param index uint
|
||||
go_to_station=function(index)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Insert a stack into the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.insert)
|
||||
---@param stack ItemStackIdentification
|
||||
insert=function(stack)end,
|
||||
---Inserts the given fluid into the first available location in this train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.insert_fluid)
|
||||
---@param fluid Fluid
|
||||
---@return double@The amount inserted.
|
||||
insert_fluid=function(fluid)end,
|
||||
---Checks if the path is invalid and tries to re-path if it isn't.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.recalculate_path)
|
||||
---@param force boolean?@Forces the train to re-path regardless of the current path being valid or not.
|
||||
---@return boolean@If the train has a path after the repath attempt.
|
||||
recalculate_path=function(force)end,
|
||||
---Remove some fluid from the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.remove_fluid)
|
||||
---@param fluid Fluid
|
||||
---@return double@The amount of fluid actually removed.
|
||||
remove_fluid=function(fluid)end,
|
||||
---Remove some items from the train.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.remove_item)
|
||||
---@param stack ItemStackIdentification@The amount and type of items to remove
|
||||
---@return uint@Number of items actually removed.
|
||||
remove_item=function(stack)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTrainStopControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for train stops.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html)
|
||||
---@class LuaTrainStopControlBehavior:LuaGenericOnOffControlBehavior
|
||||
---[RW]
|
||||
---`true` if the train stop is enabled/disabled through the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.enable_disable)
|
||||
---@field enable_disable boolean
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---`true` if the train stop should send the train contents to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.read_from_train)
|
||||
---@field read_from_train boolean
|
||||
---[RW]
|
||||
---`true` if the train stop should send the stopped train id to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.read_stopped_train)
|
||||
---@field read_stopped_train boolean
|
||||
---[RW]
|
||||
---`true` if the train stop should send amount of incoming trains to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.read_trains_count)
|
||||
---@field read_trains_count boolean
|
||||
---[RW]
|
||||
---`true` if the train stop should send the circuit network contents to the train to use.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.send_to_train)
|
||||
---@field send_to_train boolean
|
||||
---[RW]
|
||||
---`true` if the trains_limit_signal is used to set a limit of trains incoming for train stop.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.set_trains_limit)
|
||||
---@field set_trains_limit boolean
|
||||
---[RW]
|
||||
---The signal that will be sent when using the send-train-id option.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.stopped_train_signal)
|
||||
---@field stopped_train_signal SignalID
|
||||
---[RW]
|
||||
---The signal that will be sent when using the read-trains-count option.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.trains_count_signal)
|
||||
---@field trains_count_signal SignalID
|
||||
---[RW]
|
||||
---The signal to be used by set-trains-limit to limit amount of incoming trains
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.trains_limit_signal)
|
||||
---@field trains_limit_signal SignalID
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaTrainStopControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html#LuaTrainStopControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTransportBeltControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for transport belts.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html)
|
||||
---@class LuaTransportBeltControlBehavior:LuaGenericOnOffControlBehavior
|
||||
---[RW]
|
||||
---If the belt will be enabled/disabled based off the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.enable_disable)
|
||||
---@field enable_disable boolean
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---If the belt will read the contents and send them to the circuit network.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.read_contents)
|
||||
---@field read_contents boolean
|
||||
---[RW]
|
||||
---The read mode for the belt.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.read_contents_mode)
|
||||
---@field read_contents_mode defines.control_behavior.transport_belt.content_read_mode
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaTransportBeltControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html#LuaTransportBeltControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
109
.vscode/factorio/runtime-api-LuaTransportLine.lua
vendored
109
.vscode/factorio/runtime-api-LuaTransportLine.lua
vendored
@@ -1,109 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTransportLine
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---One line on a transport belt.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html)
|
||||
---@class LuaTransportLine:LuaObject
|
||||
---[R]
|
||||
---The transport lines that this transport line is fed by or an empty table if none.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.input_lines)
|
||||
---@field input_lines LuaTransportLine[]
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The transport lines that this transport line outputs items to or an empty table if none.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.output_lines)
|
||||
---@field output_lines LuaTransportLine[]
|
||||
---[R]
|
||||
---The entity this transport line belongs to.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.owner)
|
||||
---@field owner LuaEntity
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.valid)
|
||||
---@field valid boolean
|
||||
---[R]
|
||||
---Get the number of items on this transport line.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.length)
|
||||
---@operator len: uint
|
||||
---[R]
|
||||
---The indexing operator.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.index)
|
||||
---@field [uint] LuaItemStack
|
||||
local LuaTransportLine={
|
||||
---Can an item be inserted at a given position?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.can_insert_at)
|
||||
---@param position float@Where to insert an item.
|
||||
---@return boolean
|
||||
can_insert_at=function(position)end,
|
||||
---Can an item be inserted at the back of this line?
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.can_insert_at_back)
|
||||
---@return boolean
|
||||
can_insert_at_back=function()end,
|
||||
---Remove all items from this transport line.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.clear)
|
||||
clear=function()end,
|
||||
---Get counts of all items on this line, similar to how [LuaInventory::get_contents](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents) does.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.get_contents)
|
||||
---@return {[string]: uint}@The counts, indexed by item names.
|
||||
get_contents=function()end,
|
||||
---Count some or all items on this line, similar to how [LuaInventory::get_item_count](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_item_count) does.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.get_item_count)
|
||||
---@param item string?@Prototype name of the item to count. If not specified, count all items.
|
||||
---@return uint
|
||||
get_item_count=function(item)end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Insert items at a given position.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.insert_at)
|
||||
---@param position float@Where on the line to insert the items.
|
||||
---@param items ItemStackIdentification@Items to insert.
|
||||
---@return boolean@Were the items inserted successfully?
|
||||
insert_at=function(position,items)end,
|
||||
---Insert items at the back of this line.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.insert_at_back)
|
||||
---@param items ItemStackIdentification
|
||||
---@return boolean@Were the items inserted successfully?
|
||||
insert_at_back=function(items)end,
|
||||
---Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.
|
||||
---
|
||||
---**Note:** This can return true even when the [LuaTransportLine::owner](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.owner)s are different (so `this == other` is false), because the internal transport lines can span multiple tiles.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.line_equals)
|
||||
---@param other LuaTransportLine
|
||||
---@return boolean
|
||||
line_equals=function(other)end,
|
||||
---Remove some items from this line.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.remove_item)
|
||||
---@param items ItemStackIdentification@Items to remove.
|
||||
---@return uint@Number of items actually removed.
|
||||
remove_item=function(items)end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaTrivialSmokePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a trivial smoke.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html)
|
||||
---@class LuaTrivialSmokePrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.affected_by_wind)
|
||||
---@field affected_by_wind boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.color)
|
||||
---@field color Color
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.cyclic)
|
||||
---@field cyclic boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.duration)
|
||||
---@field duration uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.end_scale)
|
||||
---@field end_scale double
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.fade_away_duration)
|
||||
---@field fade_away_duration uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.fade_in_duration)
|
||||
---@field fade_in_duration uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.glow_animation)
|
||||
---@field glow_animation boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.glow_fade_away_duration)
|
||||
---@field glow_fade_away_duration uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.movement_slow_down_factor)
|
||||
---@field movement_slow_down_factor double
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.render_layer)
|
||||
---@field render_layer RenderLayer
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.show_when_smoke_off)
|
||||
---@field show_when_smoke_off boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.spread_duration)
|
||||
---@field spread_duration uint
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.start_scale)
|
||||
---@field start_scale double
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaTrivialSmokePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
105
.vscode/factorio/runtime-api-LuaUnitGroup.lua
vendored
105
.vscode/factorio/runtime-api-LuaUnitGroup.lua
vendored
@@ -1,105 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaUnitGroup
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A collection of units moving and attacking together. The engine creates autonomous unit groups to attack polluted areas. The script can create and control such groups as well. Groups can accept commands in the same manner as regular units.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html)
|
||||
---@class LuaUnitGroup:LuaObject
|
||||
---[R]
|
||||
---The command given to this group, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.command)
|
||||
---@field command? Command
|
||||
---[R]
|
||||
---The distraction command given to this group, if any.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.distraction_command)
|
||||
---@field distraction_command? Command
|
||||
---[R]
|
||||
---The force of this unit group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.force)
|
||||
---@field force LuaForce
|
||||
---[R]
|
||||
---The group number for this unit group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.group_number)
|
||||
---@field group_number uint
|
||||
---[R]
|
||||
---Whether this unit group is controlled by a script or by the game engine. This can be changed using [LuaUnitGroup::set_autonomous](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.set_autonomous).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.is_script_driven)
|
||||
---@field is_script_driven boolean
|
||||
---[R]
|
||||
---Members of this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.members)
|
||||
---@field members LuaEntity[]
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---Group position. This can have different meanings depending on the group state. When the group is gathering, the position is the place of gathering. When the group is moving, the position is the expected position of its members along the path. When the group is attacking, it is the average position of its members.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.position)
|
||||
---@field position MapPosition
|
||||
---[R]
|
||||
---Whether this group is gathering, moving or attacking.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.state)
|
||||
---@field state defines.group_state
|
||||
---[R]
|
||||
---The surface of this unit group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.surface)
|
||||
---@field surface LuaSurface
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.valid)
|
||||
---@field valid boolean
|
||||
local LuaUnitGroup={
|
||||
---Make a unit a member of this group. Has the same effect as giving a `group_command` with this group to the unit.
|
||||
---
|
||||
---**Note:** The member must have the same force as the unit group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.add_member)
|
||||
---@param unit LuaEntity
|
||||
add_member=function(unit)end,
|
||||
---Dissolve this group. Its members won't be destroyed, they will be merely unlinked from this group.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.destroy)
|
||||
destroy=function()end,
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
---Make this group autonomous. Autonomous groups will automatically attack polluted areas. Autonomous groups aren't considered to be [script-driven](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.is_script_driven).
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.set_autonomous)
|
||||
set_autonomous=function()end,
|
||||
---Give this group a command.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.set_command)
|
||||
---@param command Command
|
||||
set_command=function(command)end,
|
||||
---Give this group a distraction command.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.set_distraction_command)
|
||||
---@param command Command
|
||||
set_distraction_command=function(command)end,
|
||||
---Make the group start moving even if some of its members haven't yet arrived.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.start_moving)
|
||||
start_moving=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaVirtualSignalPrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a virtual signal.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html)
|
||||
---@class LuaVirtualSignalPrototype:LuaObject
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.localised_description)
|
||||
---@field localised_description LocalisedString
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.localised_name)
|
||||
---@field localised_name LocalisedString
|
||||
---[R]
|
||||
---Name of this prototype.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.name)
|
||||
---@field name string
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.order)
|
||||
---@field order string
|
||||
---[R]
|
||||
---Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.special)
|
||||
---@field special boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.subgroup)
|
||||
---@field subgroup LuaGroup
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaVirtualSignalPrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaVoidEnergySourcePrototype
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Prototype of a void energy source.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html)
|
||||
---@class LuaVoidEnergySourcePrototype:LuaObject
|
||||
---[R]
|
||||
---The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.emissions)
|
||||
---@field emissions double
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.object_name)
|
||||
---@field object_name string
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.render_no_network_icon)
|
||||
---@field render_no_network_icon boolean
|
||||
---[R]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.render_no_power_icon)
|
||||
---@field render_no_power_icon boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.valid)
|
||||
---@field valid boolean
|
||||
local LuaVoidEnergySourcePrototype={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section LuaWallControlBehavior
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---Control behavior for walls.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html)
|
||||
---@class LuaWallControlBehavior:LuaControlBehavior
|
||||
---[RW]
|
||||
---The circuit condition.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.circuit_condition)
|
||||
---@field circuit_condition CircuitConditionDefinition
|
||||
---[R]
|
||||
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.object_name)
|
||||
---@field object_name string
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.open_gate)
|
||||
---@field open_gate boolean
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.output_signal)
|
||||
---@field output_signal SignalID
|
||||
---[RW]
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.read_sensor)
|
||||
---@field read_sensor boolean
|
||||
---[R]
|
||||
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.valid)
|
||||
---@field valid boolean
|
||||
local LuaWallControlBehavior={
|
||||
---All methods and properties that this object supports.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.help)
|
||||
---@return string
|
||||
help=function()end,
|
||||
}
|
||||
|
||||
|
||||
85
.vscode/factorio/runtime-api-builtin.lua
vendored
85
.vscode/factorio/runtime-api-builtin.lua
vendored
@@ -1,85 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section builtin
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---A double-precision floating-point number. This is the same data type as all Lua numbers use.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#double)
|
||||
---@alias double number
|
||||
|
||||
---A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision numbers, when a function takes a float, the game engine will immediately convert the double-precision number to single-precision.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#float)
|
||||
---@class float:number
|
||||
---@operator unm:float
|
||||
---@operator mod:float
|
||||
---@operator add:float
|
||||
---@operator div:float
|
||||
---@operator sub:float
|
||||
---@operator mul:float
|
||||
|
||||
---32-bit signed integer. Possible values are -2,147,483,648 to 2,147,483,647.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#int)
|
||||
---@alias int integer
|
||||
|
||||
---8-bit signed integer. Possible values are -128 to 127.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#int8)
|
||||
---@class int8:integer
|
||||
---@operator unm:int8
|
||||
---@operator mod:int8
|
||||
---@operator add:int8
|
||||
---@operator div:int8
|
||||
---@operator sub:int8
|
||||
---@operator mul:int8
|
||||
|
||||
---32-bit unsigned integer. Possible values are 0 to 4,294,967,295.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#uint)
|
||||
---@class uint:integer
|
||||
---@operator unm:int
|
||||
---@operator mod:uint
|
||||
---@operator add:uint
|
||||
---@operator div:uint
|
||||
---@operator sub:uint
|
||||
---@operator mul:uint
|
||||
|
||||
---16-bit unsigned integer. Possible values are 0 to 65535.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#uint16)
|
||||
---@class uint16:integer
|
||||
---@operator unm:int16
|
||||
---@operator mod:uint16
|
||||
---@operator add:uint16
|
||||
---@operator div:uint16
|
||||
---@operator sub:uint16
|
||||
---@operator mul:uint16
|
||||
|
||||
---64-bit unsigned integer. Possible values are 0 to 18,446,744,073,709,551,615.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#uint64)
|
||||
---@class uint64:integer
|
||||
---@operator unm:int64
|
||||
---@operator mod:uint64
|
||||
---@operator add:uint64
|
||||
---@operator div:uint64
|
||||
---@operator sub:uint64
|
||||
---@operator mul:uint64
|
||||
|
||||
---8-bit unsigned integer. Possible values are 0 to 255.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/Builtin-Types.html#uint8)
|
||||
---@class uint8:integer
|
||||
---@operator unm:int8
|
||||
---@operator mod:uint8
|
||||
---@operator add:uint8
|
||||
---@operator div:uint8
|
||||
---@operator sub:uint8
|
||||
---@operator mul:uint8
|
||||
|
||||
|
||||
4112
.vscode/factorio/runtime-api-concepts.lua
vendored
4112
.vscode/factorio/runtime-api-concepts.lua
vendored
File diff suppressed because it is too large
Load Diff
53
.vscode/factorio/runtime-api-custom.lua
vendored
53
.vscode/factorio/runtime-api-custom.lua
vendored
@@ -1,53 +0,0 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.72
|
||||
--$Overlay 5
|
||||
--$Section custom
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
|
||||
---@class LuaObject
|
||||
---@field valid boolean
|
||||
---@field object_name string
|
||||
|
||||
---@class BlueprintCircuitConnection
|
||||
|
||||
---@class BlueprintControlBehavior
|
||||
---@field condition? CircuitCondition
|
||||
---@field circuit_condition? CircuitCondition
|
||||
---@field filters? Signal[]
|
||||
---@field is_on? boolean
|
||||
---@field arithmetic_conditions? ArithmeticCombinatorParameters
|
||||
---@field decider_conditions? DeciderCombinatorParameters
|
||||
---@field circuit_enable_disable? boolean
|
||||
---@field circuit_read_resources? boolean
|
||||
---@field circuit_resource_read_mode? defines.control_behavior.mining_drill.resource_read_mode
|
||||
---@field read_stopped_train? boolean
|
||||
---@field train_stopped_signal? SignalID
|
||||
---@field read_from_train? boolean
|
||||
---@field send_to_train? boolean
|
||||
---@field circuit_mode_of_operation? number
|
||||
---@field circuit_read_hand_contents? boolean
|
||||
---@field circuit_hand_read_mode? defines.control_behavior.inserter
|
||||
---@field circuit_set_stack_size? boolean
|
||||
---@field stack_control_input_signal? SignalID
|
||||
---@field use_colors? boolean
|
||||
---@field read_robot_stats? boolean
|
||||
---@field read_logistics? boolean
|
||||
---@field available_logistic_output_signal? SignalID
|
||||
---@field total_logistic_output_signal? SignalID
|
||||
---@field available_construction_output_signal? SignalID
|
||||
---@field total_construction_output_signal? SignalID
|
||||
---@field circuit_contents_read_mode? defines.control_behavior.transport_belt
|
||||
---@field output_signal? SignalID
|
||||
---@field circuit_close_signal? SignalID
|
||||
---@field circuit_read_signal? SignalID
|
||||
---@field red_output_signal? SignalID
|
||||
---@field orange_output_signal? SignalID
|
||||
---@field green_output_signal? SignalID
|
||||
---@field blue_output_signal? SignalID
|
||||
---@field circuit_open_gate? boolean
|
||||
---@field circuit_read_sensor? boolean
|
||||
---@field circuit_parameters? ProgrammableSpeakerCircuitParameters
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user