From 9dc0bc31b4fc12886f5fc218b618be3311cc66d2 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Mon, 27 Mar 2023 10:17:20 -0400 Subject: [PATCH] prep for reorganization --- .../factorio/runtime-api-LuaAISettings.lua | 51 - ...time-api-LuaAccumulatorControlBehavior.lua | 35 - .../runtime-api-LuaAchievementPrototype.lua | 57 - .../runtime-api-LuaAmmoCategoryPrototype.lua | 53 - ...LuaArithmeticCombinatorControlBehavior.lua | 38 - ...ntime-api-LuaAutoplaceControlPrototype.lua | 66 - .vscode/factorio/runtime-api-LuaBootstrap.lua | 372 -- .vscode/factorio/runtime-api-LuaBurner.lua | 77 - .../runtime-api-LuaBurnerPrototype.lua | 72 - .../factorio/runtime-api-LuaChunkIterator.lua | 47 - .../runtime-api-LuaCircuitNetwork.lua | 65 - ...ntime-api-LuaCombinatorControlBehavior.lua | 25 - .../runtime-api-LuaCommandProcessor.lua | 62 - ...i-LuaConstantCombinatorControlBehavior.lua | 60 - ...untime-api-LuaContainerControlBehavior.lua | 31 - .vscode/factorio/runtime-api-LuaControl.lua | 603 --- .../runtime-api-LuaControlBehavior.lua | 33 - .../runtime-api-LuaCustomChartTag.lua | 69 - .../runtime-api-LuaCustomInputPrototype.lua | 99 - .../factorio/runtime-api-LuaCustomTable.lua | 62 - .../runtime-api-LuaDamagePrototype.lua | 54 - ...pi-LuaDeciderCombinatorControlBehavior.lua | 38 - .../runtime-api-LuaDecorativePrototype.lua | 68 - ...e-api-LuaElectricEnergySourcePrototype.lua | 64 - .vscode/factorio/runtime-api-LuaEntity.lua | 2191 --------- .../runtime-api-LuaEntityPrototype.lua | 1554 ------ .vscode/factorio/runtime-api-LuaEquipment.lua | 99 - ...time-api-LuaEquipmentCategoryPrototype.lua | 49 - .../factorio/runtime-api-LuaEquipmentGrid.lua | 204 - .../runtime-api-LuaEquipmentGridPrototype.lua | 67 - .../runtime-api-LuaEquipmentPrototype.lua | 135 - .../runtime-api-LuaFlowStatistics.lua | 119 - .vscode/factorio/runtime-api-LuaFluidBox.lua | 118 - .../runtime-api-LuaFluidBoxPrototype.lua | 92 - ...time-api-LuaFluidEnergySourcePrototype.lua | 78 - .../runtime-api-LuaFluidPrototype.lua | 102 - .../factorio/runtime-api-LuaFontPrototype.lua | 61 - .vscode/factorio/runtime-api-LuaForce.lua | 698 --- .../runtime-api-LuaFuelCategoryPrototype.lua | 49 - .../factorio/runtime-api-LuaGameScript.lua | 1045 ---- ...ime-api-LuaGenericOnOffControlBehavior.lua | 67 - .vscode/factorio/runtime-api-LuaGroup.lua | 64 - .vscode/factorio/runtime-api-LuaGui.lua | 81 - .../factorio/runtime-api-LuaGuiElement.lua | 1175 ----- .../runtime-api-LuaHeatBufferPrototype.lua | 63 - ...ntime-api-LuaHeatEnergySourcePrototype.lua | 80 - ...runtime-api-LuaInserterControlBehavior.lua | 56 - .vscode/factorio/runtime-api-LuaInventory.lua | 230 - .../factorio/runtime-api-LuaItemPrototype.lua | 619 --- .vscode/factorio/runtime-api-LuaItemStack.lua | 720 --- .../runtime-api-LuaLampControlBehavior.lua | 41 - .../runtime-api-LuaLazyLoadedValue.lua | 38 - .../factorio/runtime-api-LuaLogisticCell.lua | 124 - ...pi-LuaLogisticContainerControlBehavior.lua | 36 - .../runtime-api-LuaLogisticNetwork.lua | 232 - .../factorio/runtime-api-LuaLogisticPoint.lua | 79 - ...time-api-LuaMiningDrillControlBehavior.lua | 51 - .../runtime-api-LuaModSettingPrototype.lua | 93 - ...runtime-api-LuaModuleCategoryPrototype.lua | 49 - .../runtime-api-LuaNamedNoiseExpression.lua | 59 - .../runtime-api-LuaNoiseLayerPrototype.lua | 49 - .../runtime-api-LuaParticlePrototype.lua | 85 - .../runtime-api-LuaPermissionGroup.lua | 78 - .../runtime-api-LuaPermissionGroups.lua | 48 - .vscode/factorio/runtime-api-LuaPlayer.lua | 806 ---- .vscode/factorio/runtime-api-LuaProfiler.lua | 59 - ...-LuaProgrammableSpeakerControlBehavior.lua | 39 - .vscode/factorio/runtime-api-LuaRCON.lua | 30 - ...-api-LuaRailChainSignalControlBehavior.lua | 47 - .vscode/factorio/runtime-api-LuaRailPath.lua | 56 - ...ntime-api-LuaRailSignalControlBehavior.lua | 58 - .../runtime-api-LuaRandomGenerator.lua | 51 - .vscode/factorio/runtime-api-LuaRecipe.lua | 121 - ...runtime-api-LuaRecipeCategoryPrototype.lua | 49 - .../runtime-api-LuaRecipePrototype.lua | 160 - .vscode/factorio/runtime-api-LuaRemote.lua | 70 - .vscode/factorio/runtime-api-LuaRendering.lua | 1356 ------ ...ntime-api-LuaResourceCategoryPrototype.lua | 49 - ...runtime-api-LuaRoboportControlBehavior.lua | 57 - .vscode/factorio/runtime-api-LuaSettings.lua | 52 - .../runtime-api-LuaShortcutPrototype.lua | 72 - ...time-api-LuaStorageTankControlBehavior.lua | 31 - .vscode/factorio/runtime-api-LuaStyle.lua | 404 -- .vscode/factorio/runtime-api-LuaSurface.lua | 1724 ------- .../factorio/runtime-api-LuaTechnology.lua | 121 - .../runtime-api-LuaTechnologyPrototype.lua | 119 - .vscode/factorio/runtime-api-LuaTile.lua | 106 - .../factorio/runtime-api-LuaTilePrototype.lua | 126 - .vscode/factorio/runtime-api-LuaTrain.lua | 246 - ...untime-api-LuaTrainStopControlBehavior.lua | 76 - ...me-api-LuaTransportBeltControlBehavior.lua | 46 - .../factorio/runtime-api-LuaTransportLine.lua | 109 - .../runtime-api-LuaTrivialSmokePrototype.lua | 105 - .vscode/factorio/runtime-api-LuaUnitGroup.lua | 105 - .../runtime-api-LuaVirtualSignalPrototype.lua | 58 - ...ntime-api-LuaVoidEnergySourcePrototype.lua | 44 - .../runtime-api-LuaWallControlBehavior.lua | 48 - .vscode/factorio/runtime-api-builtin.lua | 85 - .vscode/factorio/runtime-api-concepts.lua | 4112 ---------------- .vscode/factorio/runtime-api-custom.lua | 53 - .vscode/factorio/runtime-api-defines.lua | 2918 ------------ .vscode/factorio/runtime-api-events.lua | 4193 ----------------- .../factorio/runtime-api-global_functions.lua | 31 - .vscode/factorio/runtime-api-table_types.lua | 431 -- 104 files changed, 31502 deletions(-) delete mode 100644 .vscode/factorio/runtime-api-LuaAISettings.lua delete mode 100644 .vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaAchievementPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaBootstrap.lua delete mode 100644 .vscode/factorio/runtime-api-LuaBurner.lua delete mode 100644 .vscode/factorio/runtime-api-LuaBurnerPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaChunkIterator.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCircuitNetwork.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCommandProcessor.lua delete mode 100644 .vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaContainerControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaControl.lua delete mode 100644 .vscode/factorio/runtime-api-LuaControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCustomChartTag.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCustomInputPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaCustomTable.lua delete mode 100644 .vscode/factorio/runtime-api-LuaDamagePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaDecorativePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEntity.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEntityPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEquipment.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEquipmentGrid.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaEquipmentPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFlowStatistics.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFluidBox.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFluidPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFontPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaForce.lua delete mode 100644 .vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaGameScript.lua delete mode 100644 .vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaGroup.lua delete mode 100644 .vscode/factorio/runtime-api-LuaGui.lua delete mode 100644 .vscode/factorio/runtime-api-LuaGuiElement.lua delete mode 100644 .vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaInserterControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaInventory.lua delete mode 100644 .vscode/factorio/runtime-api-LuaItemPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaItemStack.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLampControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLazyLoadedValue.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLogisticCell.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLogisticNetwork.lua delete mode 100644 .vscode/factorio/runtime-api-LuaLogisticPoint.lua delete mode 100644 .vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaModSettingPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua delete mode 100644 .vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaParticlePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaPermissionGroup.lua delete mode 100644 .vscode/factorio/runtime-api-LuaPermissionGroups.lua delete mode 100644 .vscode/factorio/runtime-api-LuaPlayer.lua delete mode 100644 .vscode/factorio/runtime-api-LuaProfiler.lua delete mode 100644 .vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRCON.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRailPath.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRandomGenerator.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRecipe.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRecipePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRemote.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRendering.lua delete mode 100644 .vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaSettings.lua delete mode 100644 .vscode/factorio/runtime-api-LuaShortcutPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaStyle.lua delete mode 100644 .vscode/factorio/runtime-api-LuaSurface.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTechnology.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTechnologyPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTile.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTilePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTrain.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTransportLine.lua delete mode 100644 .vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaUnitGroup.lua delete mode 100644 .vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua delete mode 100644 .vscode/factorio/runtime-api-LuaWallControlBehavior.lua delete mode 100644 .vscode/factorio/runtime-api-builtin.lua delete mode 100644 .vscode/factorio/runtime-api-concepts.lua delete mode 100644 .vscode/factorio/runtime-api-custom.lua delete mode 100644 .vscode/factorio/runtime-api-defines.lua delete mode 100644 .vscode/factorio/runtime-api-events.lua delete mode 100644 .vscode/factorio/runtime-api-global_functions.lua delete mode 100644 .vscode/factorio/runtime-api-table_types.lua diff --git a/.vscode/factorio/runtime-api-LuaAISettings.lua b/.vscode/factorio/runtime-api-LuaAISettings.lua deleted file mode 100644 index 6f16d0a..0000000 --- a/.vscode/factorio/runtime-api-LuaAISettings.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua deleted file mode 100644 index 32cbe0a..0000000 --- a/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua b/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua deleted file mode 100644 index 0f2a5ca..0000000 --- a/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua deleted file mode 100644 index 1a84da6..0000000 --- a/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua deleted file mode 100644 index da4be23..0000000 --- a/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua b/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua deleted file mode 100644 index fb9ad7b..0000000 --- a/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaBootstrap.lua b/.vscode/factorio/runtime-api-LuaBootstrap.lua deleted file mode 100644 index 9b7f974..0000000 --- a/.vscode/factorio/runtime-api-LuaBootstrap.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaBurner.lua b/.vscode/factorio/runtime-api-LuaBurner.lua deleted file mode 100644 index b606604..0000000 --- a/.vscode/factorio/runtime-api-LuaBurner.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua b/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua deleted file mode 100644 index 373a8b9..0000000 --- a/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaChunkIterator.lua b/.vscode/factorio/runtime-api-LuaChunkIterator.lua deleted file mode 100644 index 2fa5751..0000000 --- a/.vscode/factorio/runtime-api-LuaChunkIterator.lua +++ /dev/null @@ -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 - - diff --git a/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua b/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua deleted file mode 100644 index d7994b5..0000000 --- a/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua deleted file mode 100644 index 8171314..0000000 --- a/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaCommandProcessor.lua b/.vscode/factorio/runtime-api-LuaCommandProcessor.lua deleted file mode 100644 index c405a3d..0000000 --- a/.vscode/factorio/runtime-api-LuaCommandProcessor.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua deleted file mode 100644 index d04aa28..0000000 --- a/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua deleted file mode 100644 index 25d3de7..0000000 --- a/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaControl.lua b/.vscode/factorio/runtime-api-LuaControl.lua deleted file mode 100644 index bce7c1e..0000000 --- a/.vscode/factorio/runtime-api-LuaControl.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaControlBehavior.lua b/.vscode/factorio/runtime-api-LuaControlBehavior.lua deleted file mode 100644 index 1561e39..0000000 --- a/.vscode/factorio/runtime-api-LuaControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaCustomChartTag.lua b/.vscode/factorio/runtime-api-LuaCustomChartTag.lua deleted file mode 100644 index ce35397..0000000 --- a/.vscode/factorio/runtime-api-LuaCustomChartTag.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua b/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua deleted file mode 100644 index a671513..0000000 --- a/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaCustomTable.lua b/.vscode/factorio/runtime-api-LuaCustomTable.lua deleted file mode 100644 index 9a26039..0000000 --- a/.vscode/factorio/runtime-api-LuaCustomTable.lua +++ /dev/null @@ -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},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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaDamagePrototype.lua b/.vscode/factorio/runtime-api-LuaDamagePrototype.lua deleted file mode 100644 index 203e147..0000000 --- a/.vscode/factorio/runtime-api-LuaDamagePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua deleted file mode 100644 index ffae530..0000000 --- a/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua b/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua deleted file mode 100644 index 378016e..0000000 --- a/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua deleted file mode 100644 index 01ea5fc..0000000 --- a/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEntity.lua b/.vscode/factorio/runtime-api-LuaEntity.lua deleted file mode 100644 index 5573c7a..0000000 --- a/.vscode/factorio/runtime-api-LuaEntity.lua +++ /dev/null @@ -1,2191 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaEntity --- This file is automatically generated. Edits will be overwritten. - ----The primary interface for interacting with entities through the Lua API. Entities are everything that exists on the map except for tiles (see [LuaTile](https://lua-api.factorio.com/latest/LuaTile.html)). ---- ----Most functions on LuaEntity also work when the entity is contained in a ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html) ----@class LuaEntity:LuaControl ----[RW] ----Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc). ---- ----**Note:** Entities that are not active naturally can't be set to be active (setting it to be active will do nothing) ---- ----**Note:** Ghosts, simple smoke, and corpses can't be modified at this time. ---- ----**Note:** It is even possible to set the character to not be active, so he can't move and perform most of the tasks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.active) ----@field active boolean ----[R] ----The ai settings of this unit. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ai_settings) ---- ----_Can only be used if this is Unit_ ----@field ai_settings LuaAISettings ----[RW] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.alert_parameters) ---- ----_Can only be used if this is ProgrammableSpeaker_ ----@field alert_parameters ProgrammableSpeakerAlertParameters ----[RW] ----Whether this character's personal roboports are allowed to dispatch robots. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.allow_dispatching_robots) ---- ----_Can only be used if this is Character_ ----@field allow_dispatching_robots boolean ----[RW] ----Count of resource units contained. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.amount) ---- ----_Can only be used if this is ResourceEntity_ ----@field amount uint ----[R] ----Whether this land mine is armed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.armed) ---- ----_Can only be used if this is LandMine_ ----@field armed boolean ----[RW] ----The player this character is associated with, if any. Set to `nil` to clear. ---- ----The player will be automatically disassociated when a controller is set on the character. Also, all characters associated to a player will be logged off when the player logs off in multiplayer. ---- ----Reading this property will return a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), while [PlayerIdentification](https://lua-api.factorio.com/latest/Concepts.html#PlayerIdentification) can be used when writing. ---- ----**Note:** A character associated with a player is not directly controlled by any player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player) ---- ----_Can only be used if this is Character_ ----@field associated_player? LuaPlayer|PlayerIdentification ----[RW] ----Whether this rocket silo automatically launches the rocket when cargo is inserted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.auto_launch) ---- ----_Can only be used if this is RocketSilo_ ----@field auto_launch boolean ----[RW] ----Destination of this spidertron's autopilot, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destination) ---- ----_Can only be used if this is SpiderVehicle_ ----@field autopilot_destination? MapPosition ----[R] ----The queued destination positions of spidertron's autopilot. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destinations) ---- ----_Can only be used if this is SpiderVehicle_ ----@field autopilot_destinations MapPosition[] ----[RW] ----The backer name assigned to this entity. Entities that support backer names are labs, locomotives, radars, roboports, and train stops. `nil` if this entity doesn't support backer names. ---- ----**Note:** While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.backer_name) ----@field backer_name? string ----[R] ----The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see [LuaEntity::neighbours](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.neighbours) for that. This is a dictionary with `"inputs"`, `"outputs"` entries that are arrays of transport belt connectable entities, or empty tables if no entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.belt_neighbours) ---- ----_Can only be used if this is TransportBeltConnectable_ ----@field belt_neighbours {[string]: LuaEntity[]} ----[R] ----`"input"` or `"output"`, depending on whether this underground belt goes down or up. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.belt_to_ground_type) ---- ----_Can only be used if this is TransportBeltToGround_ ----@field belt_to_ground_type string ----[RW] ----The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.bonus_mining_progress) ----@field bonus_mining_progress? double ----[RW] ----The current productivity bonus progress, as a number in range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.bonus_progress) ---- ----_Can only be used if this is CraftingMachine_ ----@field bonus_progress double ----[R] ----[LuaEntityPrototype::collision_box](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_box) around entity's given position and respecting the current entity orientation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.bounding_box) ----@field bounding_box BoundingBox ----[R] ----The burner energy source for this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.burner) ----@field burner? LuaBurner ----[R] ----The state of this chain signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.chain_signal_state) ---- ----_Can only be used if this is RailChainSignal_ ----@field chain_signal_state defines.chain_signal_state ----[RW] ----The reason this character corpse character died. `""` if there is no reason. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.character_corpse_death_cause) ---- ----_Can only be used if this is CharacterCorpse_ ----@field character_corpse_death_cause LocalisedString ----[RW] ----The player index associated with this character corpse. ---- ----**Note:** The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.character_corpse_player_index) ---- ----_Can only be used if this is CharacterCorpse_ ----@field character_corpse_player_index uint ----[RW] ----The tick this character corpse died at. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.character_corpse_tick_of_death) ---- ----_Can only be used if this is CharacterCorpse_ ----@field character_corpse_tick_of_death uint ----[R] ----Entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.circuit_connected_entities) ----@field circuit_connected_entities? LuaEntity.circuit_connected_entities ----[R] ----The connection definition for entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.circuit_connection_definitions) ----@field circuit_connection_definitions? CircuitConnectionDefinition[] ----[R] ----The orientation of this cliff. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cliff_orientation) ----@field cliff_orientation CliffOrientation ----[RW] ----The color of this character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. `nil` if this entity doesn't use custom colors. ---- ----**Note:** Car color is overridden by the color of the current driver/passenger, if there is one. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.color) ----@field color? Color ----[RW] ----The owner of this combat robot, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.combat_robot_owner) ----@field combat_robot_owner? LuaEntity ----[R] ----The command given to this unit, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.command) ---- ----_Can only be used if this is Unit_ ----@field command? Command ----[R] ----The rail entity this train stop is connected to, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connected_rail) ---- ----_Can only be used if this is TrainStop_ ----@field connected_rail? LuaEntity ----[R] ----Rail direction to which this train stop is binding. This returns a value even when no rails are present. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connected_rail_direction) ---- ----_Can only be used if this is TrainStop_ ----@field connected_rail_direction defines.rail_direction ----[R] ----The consumption bonus of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.consumption_bonus) ----@field consumption_bonus double ----[RW] ----Multiplies the energy consumption. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.consumption_modifier) ---- ----_Can only be used if this is Car_ ----@field consumption_modifier float ----[RW] ----Whether this corpse will ever fade away. ---- ----**Note:** Useable only on corpses. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_expires) ----@field corpse_expires boolean ----[RW] ----If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of CorpsePrototype::remove_on_entity_placement. ---- ----**Note:** Useable only on corpses. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_immune_to_entity_placement) ----@field corpse_immune_to_entity_placement boolean ----[RW] ----The current crafting progress, as a number in range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.crafting_progress) ---- ----_Can only be used if this is CraftingMachine_ ----@field crafting_progress float ----[R] ----The current crafting speed, including speed bonuses from modules and beacons. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.crafting_speed) ---- ----_Can only be used if this is CraftingMachine_ ----@field crafting_speed double ----[RW] ----The damage dealt by this turret, artillery turret, or artillery wagon. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage_dealt) ---- ----_Can only be used if this is Turret_ ----@field damage_dealt double ----[RW] ----If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined. ---- ----**Note:** Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destructible) ----@field destructible boolean ----[RW] ----The current direction this entity is facing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.direction) ----@field direction defines.direction ----[R] ----The distraction command given to this unit, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.distraction_command) ---- ----_Can only be used if this is Unit_ ----@field distraction_command? Command ----[RW] ----Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.driver_is_gunner) ---- ----_Can only be used if this is Car or SpiderVehicle_ ----@field driver_is_gunner? boolean ----[RW] ----Position where the entity puts its stuff. ---- ----**Note:** Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_position) ----@field drop_position MapPosition ----[RW] ----The entity this entity is putting its items to. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position. `nil` if there is no entity to put items to, or if this is not an entity that puts items somewhere. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_target) ----@field drop_target? LuaEntity ----[R] ----The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. `nil` if this is not a unit. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.effective_speed) ---- ----_Can only be used if this is Unit_ ----@field effective_speed? float ----[RW] ----Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.effectivity_modifier) ---- ----_Can only be used if this is Car_ ----@field effectivity_modifier float ----[R] ----The effects being applied to this entity, if any. For beacons, this is the effect the beacon is broadcasting. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.effects) ----@field effects? ModuleEffects ----[RW] ----The buffer size for the electric energy source. `nil` if the entity doesn't have an electric energy source. ---- ----**Note:** Write access is limited to the ElectricEnergyInterface type ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_buffer_size) ----@field electric_buffer_size? double ----[R] ----The electric drain for the electric energy source. `nil` if the entity doesn't have an electric energy source. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_drain) ----@field electric_drain? double ----[R] ----The emissions for the electric energy source. `nil` if the entity doesn't have an electric energy source. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_emissions) ----@field electric_emissions? double ----[R] ----The input flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_input_flow_limit) ----@field electric_input_flow_limit? double ----[R] ----Returns the id of the electric network that this entity is connected to, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_network_id) ----@field electric_network_id? uint ----[R] ----The electric network statistics for this electric pole. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_network_statistics) ---- ----_Can only be used if this is ElectricPole_ ----@field electric_network_statistics LuaFlowStatistics ----[R] ----The output flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_output_flow_limit) ----@field electric_output_flow_limit? double ----[RW] ----Whether equipment grid logistics are enabled while this vehicle is moving. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.enable_logistics_while_moving) ---- ----_Can only be used if this is Vehicle_ ----@field enable_logistics_while_moving boolean ----[RW] ----Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.). always 0 for entities that don't have the concept of energy stored inside. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.energy) ---- ----### Example ----``` ----game.player.print("Machine energy: " .. game.player.selected.energy .. "J") ----game.player.selected.energy = 3000 ----``` ----@field energy double ----[R] ----How much energy this generator generated in the last tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.energy_generated_last_tick) ---- ----_Can only be used if this is Generator_ ----@field energy_generated_last_tick double ----[RW] ----The label on this entity, if any. `nil` if this is not a spider-vehicule. ---- ----**Events:** ---- * Will raise [on_entity_renamed](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.entity_label) ----@field entity_label? string ----[R] ----The number of filter slots this inserter, loader, or logistic storage container has. 0 if not one of those entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.filter_slot_count) ----@field filter_slot_count uint ----[RW] ----Fluidboxes of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.fluidbox) ----@field fluidbox LuaFluidBox ----[RW] ----The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_offset) ---- ----_Can only be used if this is SpiderVehicle_ ----@field follow_offset? Vector ----[RW] ----The follow target of this spidertron, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_target) ---- ----_Can only be used if this is SpiderVehicle_ ----@field follow_target? LuaEntity ----[RW] ----Multiplies the car friction rate. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.friction_modifier) ---- ----### Example ----This will allow the car to go much faster ----``` ----game.player.vehicle.friction_modifier = 0.5 ----``` ---- ----_Can only be used if this is Car_ ----@field friction_modifier float ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_localised_description) ---- ----_Can only be used if this is Ghost_ ----@field ghost_localised_description LocalisedString ----[R] ----Localised name of the entity or tile contained in this ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_localised_name) ---- ----_Can only be used if this is Ghost_ ----@field ghost_localised_name LocalisedString ----[R] ----Name of the entity or tile contained in this ghost ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_name) ---- ----_Can only be used if this is Ghost_ ----@field ghost_name string ----[R] ----The prototype of the entity or tile contained in this ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_prototype) ---- ----_Can only be used if this is Ghost_ ----@field ghost_prototype LuaEntityPrototype|LuaTilePrototype ----[R] ----The prototype type of the entity or tile contained in this ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_type) ---- ----_Can only be used if this is Ghost_ ----@field ghost_type string ----[R] ----The [unit_number](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number) of the entity contained in this ghost. It is the same as the unit number of the [EntityWithOwner](https://wiki.factorio.com/Prototype/EntityWithOwner) that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_unit_number) ---- ----_Can only be used if this is EntityGhost_ ----@field ghost_unit_number? uint ----[RW] ----The graphics variation for this entity. `nil` if this entity doesn't use graphics variations. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.graphics_variation) ----@field graphics_variation? uint8 ----[R] ----This entity's equipment grid, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.grid) ----@field grid? LuaEquipmentGrid ----[RW] ----The current health of the entity, if any. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked. ---- ----**Note:** To get the maximum possible health of this entity, see [LuaEntityPrototype::max_health](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_health) on its prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.health) ----@field health? float ----[R] ----The item stack currently held in an inserter's hand. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.held_stack) ---- ----_Can only be used if this is Inserter_ ----@field held_stack LuaItemStack ----[R] ----Current position of the inserter's "hand". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.held_stack_position) ---- ----_Can only be used if this is Inserter_ ----@field held_stack_position MapPosition ----[RW] ----The blink interval of this highlight box entity. 0 indicates no blink. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.highlight_box_blink_interval) ---- ----_Can only be used if this is HighlightBox_ ----@field highlight_box_blink_interval uint ----[RW] ----The hightlight box type of this highlight box entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.highlight_box_type) ---- ----_Can only be used if this is HighlightBox_ ----@field highlight_box_type string ----[RW] ----The filters for this infinity container. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.infinity_container_filters) ---- ----_Can only be used if this is InfinityContainer_ ----@field infinity_container_filters InfinityInventoryFilter[] ----[RW] ----Count of initial resource units contained. `nil` if this is not an infinite resource. ---- ----**Note:** If this is not an infinite resource, writing will produce an error. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.initial_amount) ---- ----_Can only be used if this is ResourceEntity_ ----@field initial_amount? uint ----[RW] ----The filter mode for this filter inserter. Either `"whitelist"` or `"blacklist"`. `nil` if this inserter doesn't use filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_filter_mode) ---- ----_Can only be used if this is Inserter_ ----@field inserter_filter_mode? string ----[RW] ----Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored. ---- ----**Note:** Set to 0 to reset. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_stack_size_override) ----@field inserter_stack_size_override uint ----[R] ----(deprecated by 1.1.51) If this entity is a MilitaryTarget. Returns same value as LuaEntity::is_military_target ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_entity_with_force) ----@field is_entity_with_force boolean ----[R] ----If this entity is EntityWithHealth ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_entity_with_health) ----@field is_entity_with_health boolean ----[R] ----If this entity is EntityWithOwner ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_entity_with_owner) ----@field is_entity_with_owner boolean ----[RW] ----Whether this entity is a MilitaryTarget. Can be written to if [LuaEntityPrototype::allow_run_time_change_of_is_military_target](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_run_time_change_of_is_military_target) returns `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_military_target) ----@field is_military_target boolean ----[RW] ----Items this ghost will request when revived or items this item request proxy is requesting. Result is a dictionary mapping each item prototype name to the required count. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.item_requests) ----@field item_requests {[string]: uint} ----[RW] ----The number of units killed by this turret, artillery turret, or artillery wagon. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.kills) ---- ----_Can only be used if this is Turret_ ----@field kills uint ----[RW] ----The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. `nil` if the last user is not part of the save anymore. ---- ----Reading this property will return a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), while [PlayerIdentification](https://lua-api.factorio.com/latest/Concepts.html#PlayerIdentification) can be used when writing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.last_user) ---- ----_Can only be used if this is EntityWithOwner_ ----@field last_user? LuaPlayer|PlayerIdentification ----[RW] ----The link ID this linked container is using. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.link_id) ----@field link_id uint ----[R] ----Neighbour to which this linked belt is connected to, if any. ---- ----**Note:** Can also be used on entity ghost if it contains linked-belt ---- ----**Note:** May return entity ghost which contains linked belt to which connection is made ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_neighbour) ---- ----_Can only be used if this is LinkedBelt_ ----@field linked_belt_neighbour? LuaEntity ----[RW] ----Type of linked belt: it is either `"input"` or `"output"`. Changing type will also flip direction so the belt is out of the same side ---- ----**Note:** Can only be changed when linked belt is disconnected (has no neighbour set) ---- ----**Note:** Can also be used on entity ghost if it contains linked-belt ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_type) ---- ----_Can only be used if this is LinkedBelt_ ----@field linked_belt_type string ----[R] ----The container entity this loader is pointing at/pulling from depending on the [LuaEntity::loader_type](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.loader_type), if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.loader_container) ---- ----_Can only be used if this is Loader_ ----@field loader_container? LuaEntity ----[RW] ----`"input"` or `"output"`, depending on whether this loader puts to or gets from a container. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.loader_type) ---- ----_Can only be used if this is Loader_ ----@field loader_type string ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.localised_description) ----@field localised_description LocalisedString ----[R] ----Localised name of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.localised_name) ----@field localised_name LocalisedString ----[R] ----The logistic cell this entity is a part of. Will be `nil` if this entity is not a part of any logistic cell. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.logistic_cell) ----@field logistic_cell LuaLogisticCell ----[RW] ----The logistic network this entity is a part of, or `nil` if this entity is not a part of any logistic network. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.logistic_network) ----@field logistic_network LuaLogisticNetwork ----[RW] ---- ----**Note:** Not minable entities can still be destroyed. ---- ----**Note:** Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.minable) ----@field minable boolean ----[RW] ----The mining progress for this mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mining_progress) ----@field mining_progress? double ----[R] ----The mining target, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mining_target) ---- ----_Can only be used if this is MiningDrill_ ----@field mining_target? LuaEntity ----[R] ----Returns true if this unit is moving. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.moving) ---- ----_Can only be used if this is Unit_ ----@field moving boolean ----[R] ----Name of the entity prototype. E.g. "inserter" or "filter-inserter". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.name) ----@field name string ----[R] ----The current total neighbour bonus of this reactor. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.neighbour_bonus) ---- ----_Can only be used if this is Reactor_ ----@field neighbour_bonus double ----[R] ----A list of neighbours for certain types of entities. Applies to electric poles, power switches, underground belts, walls, gates, reactors, cliffs, and pipe-connectable entities. ---- ----- When called on an electric pole, this is a dictionary of all connections, indexed by the strings `"copper"`, `"red"`, and `"green"`. ----- When called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to. ----- When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none. ----- When called on a wall-connectable entity or reactor, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west". ----- When called on a cliff entity, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.neighbours) ----@field neighbours {[string]: LuaEntity[]}|LuaEntity[][]|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/LuaEntity.html#LuaEntity.object_name) ----@field object_name string ----[RW] ----Player can't open gui of this entity and he can't quick insert/input stuff in to the entity when it is not operable. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.operable) ----@field operable boolean ----[RW] ----The smooth orientation of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.orientation) ----@field orientation RealOrientation ----[RW] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.parameters) ---- ----_Can only be used if this is ProgrammableSpeaker_ ----@field parameters ProgrammableSpeakerParameters ----[RW] ----Where the inserter will pick up items from. ---- ----**Note:** Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pickup_position) ---- ----_Can only be used if this is Inserter_ ----@field pickup_position MapPosition ----[RW] ----The entity this inserter will attempt to pick up items from. If there are multiple possible entities at the pick-up point, writing to this attribute allows a mod to choose which one to pick up items from. The entity needs to collide with the tile box under the pick-up position. `nil` if there is no entity to pull items from. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pickup_target) ---- ----_Can only be used if this is Inserter_ ----@field pickup_target? LuaEntity ----[R] ----The player connected to this character, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.player) ---- ----_Can only be used if this is Character_ ----@field player? LuaPlayer ----[R] ----The pollution bonus of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pollution_bonus) ----@field pollution_bonus double ----[RW] ----The power production specific to the ElectricEnergyInterface entity type. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.power_production) ---- ----_Can only be used if this is ElectricEnergyInterface_ ----@field power_production double ----[RW] ----The state of this power switch. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.power_switch_state) ----@field power_switch_state boolean ----[RW] ----The power usage specific to the ElectricEnergyInterface entity type. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.power_usage) ---- ----_Can only be used if this is ElectricEnergyInterface_ ----@field power_usage double ----[R] ----The previous recipe this furnace was using, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.previous_recipe) ---- ----_Can only be used if this is Furnace_ ----@field previous_recipe? LuaRecipe ----[R] ----The productivity bonus of this entity. ---- ----**Note:** This includes force based bonuses as well as beacon/module bonuses. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.productivity_bonus) ----@field productivity_bonus double ----[RW] ----The number of products this machine finished crafting in its lifetime. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.products_finished) ---- ----_Can only be used if this is CraftingMachine_ ----@field products_finished uint ----[R] ----The entity prototype of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.prototype) ----@field prototype LuaEntityPrototype ----[R] ----The target entity for this item-request-proxy, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.proxy_target) ----@field proxy_target? LuaEntity ----[R] ----The rail target of this pump, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pump_rail_target) ---- ----_Can only be used if this is Pump_ ----@field pump_rail_target? LuaEntity ----[R] ----The current radar scan progress, as a number in range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.radar_scan_progress) ---- ----_Can only be used if this is Radar_ ----@field radar_scan_progress float ----[RW] ----When locked; the recipe in this assembling machine can't be changed by the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.recipe_locked) ---- ----_Can only be used if this is AssemblingMachine_ ----@field recipe_locked boolean ----[RW] ----The relative orientation of the vehicle turret, artillery turret, artillery wagon. `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon. ---- ----**Note:** Writing does nothing if the vehicle doesn't have a turret. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.relative_turret_orientation) ----@field relative_turret_orientation? RealOrientation ----[RW] ----Whether items not included in this infinity container filters should be removed from the container. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_unfiltered_items) ---- ----_Can only be used if this is InfinityContainer_ ----@field remove_unfiltered_items boolean ----[RW] ----The player that this `simple-entity-with-owner`, `simple-entity-with-force`, `flying-text`, or `highlight-box` is visible to. `nil` when this entity is rendered for all players. ---- ----Reading this property will return a [LuaPlayer](https://lua-api.factorio.com/latest/LuaPlayer.html), while [PlayerIdentification](https://lua-api.factorio.com/latest/Concepts.html#PlayerIdentification) can be used when writing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_player) ----@field render_player? LuaPlayer|PlayerIdentification ----[RW] ----The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array when this entity is rendered for all forces. ---- ----**Note:** Reading will always give an array of [LuaForce](https://lua-api.factorio.com/latest/LuaForce.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_to_forces) ----@field render_to_forces? ForceIdentification[] ----[RW] ----Whether this requester chest is set to also request from buffer chests. ---- ----**Note:** Useable only on entities that have requester slots. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_from_buffers) ----@field request_from_buffers boolean ----[R] ----The index of the configured request with the highest index for this entity. This means 0 if no requests are set and e.g. 20 if the 20th request slot is configured. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_slot_count) ----@field request_slot_count uint ----[RW] ----Number of rocket parts in the silo. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rocket_parts) ---- ----_Can only be used if this is RocketSilo_ ----@field rocket_parts uint ----[R] ----The status of this rocket silo entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rocket_silo_status) ----@field rocket_silo_status defines.rocket_silo_status ----[RW] ----When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key. ---- ----**Note:** Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotatable) ----@field rotatable boolean ----[R] ----The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_bounding_box) ----@field secondary_bounding_box? BoundingBox ----[R] ----The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_selection_box) ----@field secondary_selection_box? BoundingBox ----[RW] ----Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index) ---- ----_Can only be used if this is Character, Car or SpiderVehicle_ ----@field selected_gun_index? uint ----[R] ----[LuaEntityPrototype::selection_box](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.selection_box) around entity's given position and respecting the current entity orientation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selection_box) ----@field selection_box BoundingBox ----[RW] ----The shooting target for this turret, if any. Can't be set to `nil` via script. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.shooting_target) ----@field shooting_target? LuaEntity ----[R] ----The state of this rail signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.signal_state) ---- ----_Can only be used if this is RailSignal or RailChainSignal_ ----@field signal_state defines.signal_state ----[R] ----The spawner associated with this unit entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.spawner) ----@field spawner? LuaEntity ----[RW] ----The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron. ---- ----Only the speed of units, cars, and projectiles are writable. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.speed) ----@field speed? float ----[R] ----The speed bonus of this entity. ---- ----**Note:** This includes force based bonuses as well as beacon/module bonuses. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.speed_bonus) ----@field speed_bonus double ----[RW] ----The filter for this splitter, if any is set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.splitter_filter) ---- ----_Can only be used if this is Splitter_ ----@field splitter_filter? LuaItemPrototype ----[RW] ----The input priority for this splitter. Either `"left"`, `"none"`, or `"right"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.splitter_input_priority) ---- ----_Can only be used if this is Splitter_ ----@field splitter_input_priority string ----[RW] ----The output priority for this splitter. Either `"left"`, `"none"`, or `"right"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.splitter_output_priority) ---- ----_Can only be used if this is Splitter_ ----@field splitter_output_priority string ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stack) ---- ----_Can only be used if this is ItemEntity_ ----@field stack LuaItemStack ----[R] ----The status of this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.status) ----@field status? defines.entity_status ----[R] ----The entity this sticker is sticked to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.sticked_to) ----@field sticked_to LuaEntity ----[R] ----The sticker entities attached to this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stickers) ----@field stickers? LuaEntity[] ----[RW] ----The storage filter for this logistic storage container. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.storage_filter) ----@field storage_filter LuaItemPrototype ----[R] ----Whether the entity has direction. When it is false for this entity, it will always return north direction when asked for. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.supports_direction) ----@field supports_direction boolean ----[RW] ----The tags associated with this entity ghost. `nil` if this is not an entity ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tags) ----@field tags? Tags ----[RW] ----The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.temperature) ----@field temperature? double ----[RW] ----The text of this flying-text entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.text) ---- ----_Can only be used if this is FlyingText_ ----@field text LocalisedString ----[RW] ----The last tick this character entity was attacked. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tick_of_last_attack) ---- ----_Can only be used if this is Character_ ----@field tick_of_last_attack uint ----[RW] ----The last tick this character entity was damaged. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tick_of_last_damage) ---- ----_Can only be used if this is Character_ ----@field tick_of_last_damage uint ----[R] ----Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_height) ----@field tile_height uint ----[R] ----Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_width) ----@field tile_width uint ----[RW] ----The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed. ---- ----- for ghosts set to uint32 max (4,294,967,295) to never expire. ----- for ghosts Cannot be set higher than [LuaForce::ghost_time_to_live](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ghost_time_to_live) of the entity's force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.time_to_live) ----@field time_to_live uint ----[RW] ----The ticks until the next trigger effect of this smoke-with-trigger. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.time_to_next_effect) ---- ----_Can only be used if this is SmokeWithTrigger_ ----@field time_to_next_effect uint ----[RW] ----The timeout that's left on this landmine in ticks. It describes the time between the landmine being placed and it being armed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.timeout) ---- ----_Can only be used if this is LandMine_ ----@field timeout uint ----[RW] ----Will this entity be picked up automatically when the player walks over it? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) ---- ----_Can only be used if this is ItemEntity_ ----@field to_be_looted boolean ----[RW] ----The torso orientation of this spider vehicle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.torso_orientation) ---- ----_Can only be used if this is SpiderVehicle_ ----@field torso_orientation RealOrientation ----[R] ----The train this rolling stock belongs to, if any. `nil` if this is not a rolling stock. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.train) ----@field train? LuaTrain ----[R] ----Amount of trains related to this particular train stop. Includes train stopped at this train stop (until it finds a path to next target) and trains having this train stop as goal or waypoint. ---- ----**Note:** Train may be included multiple times when braking distance covers this train stop multiple times ---- ----**Note:** Value may be read even when train stop has no control behavior ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_count) ---- ----_Can only be used if this is TrainStop_ ----@field trains_count uint ----[R] ----The number of trains in this rail block for this rail entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_in_block) ---- ----_Can only be used if this is Rail_ ----@field trains_in_block uint ----[RW] ----Amount of trains above which no new trains will be sent to this train stop. Writing nil will disable the limit (will set a maximum possible value). ---- ----**Note:** When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_limit) ---- ----_Can only be used if this is TrainStop_ ----@field trains_limit uint ----[RW] ----Index of the tree color. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_color_index) ----@field tree_color_index uint8 ----[R] ----Maximum index of the tree colors. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_color_index_max) ----@field tree_color_index_max uint8 ----[RW] ----Index of the tree gray stage ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_gray_stage_index) ----@field tree_gray_stage_index uint8 ----[R] ----Maximum index of the tree gray stages. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_gray_stage_index_max) ----@field tree_gray_stage_index_max uint8 ----[RW] ----Index of the tree stage. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_stage_index) ----@field tree_stage_index uint8 ----[R] ----Maximum index of the tree stages. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tree_stage_index_max) ----@field tree_stage_index_max uint8 ----[R] ----The entity prototype type of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.type) ----@field type string ----[R] ----The unit group this unit is a member of, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_group) ---- ----_Can only be used if this is Unit_ ----@field unit_group? LuaUnitGroup ----[R] ----A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from [EntityWithOwner](https://wiki.factorio.com/Prototype/EntityWithOwner), as well as [ItemRequestProxy](https://wiki.factorio.com/Prototype/ItemRequestProxy) and [EntityGhost](https://wiki.factorio.com/Prototype/EntityGhost) are assigned a unit number. `nil` if this entity doesn't have a unit number. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number) ----@field unit_number? uint ----[R] ----The units associated with this spawner entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.units) ----@field units 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/LuaEntity.html#LuaEntity.valid) ----@field valid boolean ----[RW] ----Read when this spidertron auto-targets enemies ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.vehicle_automatic_targeting_parameters) ---- ----_Can only be used if this is SpiderVehicle_ ----@field vehicle_automatic_targeting_parameters VehicleAutomaticTargetingParameters -local LuaEntity={ ----Adds the given position to this spidertron's autopilot's queue of destinations. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.add_autopilot_destination) ---- ----_Can only be used if this is SpiderVehicle_ ----@param position MapPosition@The position the spidertron should move to. -add_autopilot_destination=function(position)end, ----Offer a thing on the market. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.add_market_item) ---- ----### Example ----Adds market offer, 1 copper ore for 10 iron ore. ----``` ----market.add_market_item{price={{"iron-ore", 10}}, offer={type="give-item", item="copper-ore"}} ----``` ---- ----### Example ----Adds market offer, 1 copper ore for 5 iron ore and 5 stone ore. ----``` ----market.add_market_item{price={{"iron-ore", 5}, {"stone", 5}}, offer={type="give-item", item="copper-ore"}} ----``` ---- ----_Can only be used if this is Market_ ----@param offer Offer -add_market_item=function(offer)end, ----Checks if the entity can be destroyed ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.can_be_destroyed) ----@return boolean@Whether the entity can be destroyed. -can_be_destroyed=function()end, ----Whether this character can shoot the given entity or position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.can_shoot) ----@param target LuaEntity ----@param position MapPosition ----@return boolean -can_shoot=function(target,position)end, ----Can wires reach between these entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.can_wires_reach) ----@param entity LuaEntity ----@return boolean -can_wires_reach=function(entity)end, ----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 entity's deconstruction was successfully cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.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, ----Cancels upgrade if it is scheduled, does nothing otherwise. ---- ----**Events:** ---- * May raise [on_cancelled_upgrade](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) instantly. ----Raised if the entity way previously marked for upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_upgrade) ----@param force ForceIdentification@The force who did the upgrade order. ----@param player PlayerIdentification?@The player to set the last_user to if any. ----@return boolean@Whether the cancel was successful. -cancel_upgrade=function(force,player)end, ----Remove all fluids from this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_fluid_inside) -clear_fluid_inside=function()end, ----Removes all offers from a market. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_market_items) ---- ----_Can only be used if this is Market_ -clear_market_items=function()end, ----Clear a logistic requester slot. ---- ----**Note:** Useable only on entities that have requester slots. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_request_slot) ----@param slot uint@The slot index. -clear_request_slot=function(slot)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@class LuaEntity.clone_param ----The destination position ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@field position MapPosition ----The destination surface ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@field surface? LuaSurface ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@field force? ForceIdentification ----If false, the building effect smoke will not be shown around the new entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@field create_build_effect_smoke? boolean - - ----Clones this entity. ---- ----**Events:** ---- * May raise [on_entity_cloned](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) instantly. ----Raised if the entity was successfully cloned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone) ----@param param LuaEntity.clone_param ----@return LuaEntity?@The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location. -clone=function(param)end, ----Connects current linked belt with another one. ---- ----Neighbours have to be of different type. If given linked belt is connected to something else it will be disconnected first. If provided neighbour is connected to something else it will also be disconnected first. Automatically updates neighbour to be connected back to this one. ---- ----**Note:** Can also be used on entity ghost if it contains linked-belt ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_linked_belts) ---- ----_Can only be used if this is LinkedBelt_ ----@param neighbour LuaEntity@Another linked belt or entity ghost containing linked belt to connect or nil to disconnect -connect_linked_belts=function(neighbour)end, ----Connect two devices with a circuit wire or copper cable. Depending on which type of connection should be made, there are different procedures: ---- ----- To connect two electric poles, `target` must be a [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html) that specifies another electric pole. This will connect them with copper cable. ----- To connect two devices with circuit wire, `target` must be a table of type [WireConnectionDefinition](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_neighbour) ----@param target LuaEntity|WireConnectionDefinition@The target with which to establish a connection. ----@return boolean@Whether the connection was successfully formed. -connect_neighbour=function(target)end, ----Connects the rolling stock in the given direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_rolling_stock) ----@param direction defines.rail_direction ----@return boolean@Whether any connection was made -connect_rolling_stock=function(direction)end, ----Copies settings from the given entity onto this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.copy_settings) ----@param entity LuaEntity ----@param by_player PlayerIdentification?@If provided, the copying is done 'as' this player and [on_entity_settings_pasted](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) is triggered. ----@return {[string]: uint}@Any items removed from this entity as a result of copying the settings. -copy_settings=function(entity,by_player)end, ----Creates the same smoke that is created when you place a building by hand. You can play the building sound to go with it by using [LuaSurface::play_sound](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.play_sound), eg: entity.surface.play_sound{path="entity-build/"..entity.prototype.name, position=entity.position} ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.create_build_effect_smoke) -create_build_effect_smoke=function()end, ----Damages the entity. ---- ----**Events:** ---- * Will raise [on_entity_damaged](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage) ---- ----_Can only be used if this is EntityWithHealth_ ----@param damage float@The amount of damage to be done. ----@param force ForceIdentification@The force that will be doing the damage. ----@param type string?@The type of damage to be done, defaults to "impact". Can't be `nil`. ----@param dealer LuaEntity?@The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged. ----@return float@the total damage actually applied after resistances. -damage=function(damage,force,type,dealer)end, ----Depletes and destroys this resource entity. ---- ----**Events:** ---- * Will raise [on_resource_depleted](https://lua-api.factorio.com/latest/events.html#on_resource_depleted) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.deplete) ---- ----_Can only be used if this is ResourceEntity_ -deplete=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy) ----@class LuaEntity.destroy_param ----Whether neighbouring cliffs should be corrected. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy) ----@field do_cliff_correction? boolean ----If `true`, [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) will be called. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy) ----@field raise_destroy? boolean - - ----Destroys the entity. ---- ----**Note:** Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed. ---- ----**Events:** ---- * May raise [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) instantly. ----Raised if the `raise_destroy` flag was set and the entity was successfully destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy) ----@param param?LuaEntity.destroy_param ----@return boolean@Returns `false` if the entity was valid and destruction failed, `true` in all other cases. -destroy=function(param)end, ----Immediately kills the entity. Does nothing if the entity doesn't have health. ---- ----Unlike [LuaEntity::destroy](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy), `die` will trigger the [on_entity_died](https://lua-api.factorio.com/latest/events.html#on_entity_died) event and the entity will produce a corpse and drop loot if it has any. ---- ----**Events:** ---- * May raise [on_entity_died](https://lua-api.factorio.com/latest/events.html#on_entity_died) instantly. ----Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `"neutral"` force. ---- ---- * May raise [on_post_entity_died](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) instantly. ----Raised if the entity was successfully killed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.die) ---- ----### Example ----This function can be called with only the `cause` argument and no `force`: ----``` ----entity.die(nil, killer_entity) ----``` ----@param force ForceIdentification?@The force to attribute the kill to. ----@param cause LuaEntity?@The cause to attribute the kill to. ----@return boolean@Whether the entity was successfully killed. -die=function(force,cause)end, ----Disconnects linked belt from its neighbour. ---- ----**Note:** Can also be used on entity ghost if it contains linked-belt ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.disconnect_linked_belts) ---- ----_Can only be used if this is LinkedBelt_ -disconnect_linked_belts=function()end, ----Disconnect circuit wires or copper cables between devices. Depending on which type of connection should be cut, there are different procedures: ---- ----- To remove all copper cables, leave the `target` parameter blank: `pole.disconnect_neighbour()`. ----- To remove all wires of a specific color, set `target` to [defines.wire_type.red](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) or [defines.wire_type.green](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). ----- To remove a specific copper cable between two electric poles, `target` must be a [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html) that specifies the other pole: `pole1.disconnect_neighbour(pole2)`. ----- To remove a specific circuit wire, `target` must be a table of type [WireConnectionDefinition](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.disconnect_neighbour) ----@param target defines.wire_type|LuaEntity|WireConnectionDefinition?@The target with which to cut a connection. -disconnect_neighbour=function(target)end, ----Tries to disconnect this rolling stock in the given direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.disconnect_rolling_stock) ----@param direction defines.rail_direction ----@return boolean@If anything was disconnected -disconnect_rolling_stock=function(direction)end, ----Get the source of this beam. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_beam_source) ---- ----_Can only be used if this is Beam_ ----@return BeamTarget? -get_beam_source=function()end, ----Get the target of this beam. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_beam_target) ---- ----_Can only be used if this is Beam_ ----@return BeamTarget? -get_beam_target=function()end, ----The burnt result inventory for this entity or `nil` if this entity doesn't have a burnt result inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_burnt_result_inventory) ----@return LuaInventory? -get_burnt_result_inventory=function()end, ----Returns all child signals. Child signals can be either RailSignal or RailChainSignal. Child signals are signals which are checked by this signal to determine a chain state. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_child_signals) ---- ----_Can only be used if this is RailChainSignal_ ----@return LuaEntity[] -get_child_signals=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.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, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rail) ----@class LuaEntity.get_connected_rail_param ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rail) ----@field rail_direction defines.rail_direction ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rail) ----@field rail_connection_direction defines.rail_connection_direction - - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rail) ---- ----_Can only be used if this is Rail_ ----@param param LuaEntity.get_connected_rail_param ----@return LuaEntity?@Rail connected in the specified manner to this one, `nil` if unsuccessful. ----@return defines.rail_direction?@Rail direction of the returned rail which points to origin rail ----@return defines.rail_connection_direction?@Turn to be taken when going back from returned rail to origin rail -get_connected_rail=function(param)end, ----Get the rails that this signal is connected to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rails) ---- ----_Can only be used if this is RailSignal or RailChainSignal_ ----@return LuaEntity[] -get_connected_rails=function()end, ----Gets rolling stock connected to the given end of this stock. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_connected_rolling_stock) ----@param direction defines.rail_direction ----@return LuaEntity?@The rolling stock connected at the given end, `nil` if none is connected there. ----@return defines.rail_direction?@The rail direction of the connected rolling stock if any. -get_connected_rolling_stock=function(direction)end, ----Gets the control behavior of the entity (if any). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_control_behavior) ----@return LuaControlBehavior?@The control behavior or `nil`. -get_control_behavior=function()end, ----Returns the amount of damage to be taken by this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_damage_to_be_taken) ----@return float?@`nil` if this entity does not have health. -get_damage_to_be_taken=function()end, ----Gets the driver of this vehicle if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver) ---- ----_Can only be used if this is Vehicle_ ----@return LuaEntity|LuaPlayer?@`nil` if the vehicle contains no driver. To check if there's a passenger see [LuaEntity::get_passenger](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger). -get_driver=function()end, ----Get the filter for a slot in an inserter, loader, or logistic storage container. ---- ----**Note:** The entity must allow filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_filter) ----@param slot_index uint@Index of the slot to get the filter for. ----@return string?@Prototype name of the item being filtered. `nil` if the given slot has no filter. -get_filter=function(slot_index)end, ----Get amounts of all fluids in this entity. ---- ----**Note:** If information about fluid temperatures is required, [LuaEntity::fluidbox](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.fluidbox) should be used instead. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_contents) ----@return {[string]: double}@The amounts, indexed by fluid names. -get_fluid_contents=function()end, ----Get the amount of all or some fluid in this entity. ---- ----**Note:** If information about fluid temperatures is required, [LuaEntity::fluidbox](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.fluidbox) should be used instead. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_count) ----@param fluid string?@Prototype name of the fluid to count. If not specified, count all fluids. ----@return double -get_fluid_count=function(fluid)end, ----The fuel inventory for this entity or `nil` if this entity doesn't have a fuel inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fuel_inventory) ----@return LuaInventory? -get_fuel_inventory=function()end, ----The health ratio of this entity between 1 and 0 (for full health and no health respectively). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_health_ratio) ----@return float?@`nil` if this entity doesn't have health. -get_health_ratio=function()end, ----Gets the heat setting for this heat interface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_heat_setting) ---- ----_Can only be used if this is HeatInterface_ ----@return HeatSetting -get_heat_setting=function()end, ----Returns all signals guarding entrance to a rail block this rail belongs to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_inbound_signals) ---- ----_Can only be used if this is Rail_ ----@return LuaEntity[] -get_inbound_signals=function()end, ----Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_infinity_container_filter) ---- ----_Can only be used if this is InfinityContainer_ ----@param index uint@The index to get. ----@return InfinityInventoryFilter? -get_infinity_container_filter=function(index)end, ----Gets the filter for this infinity pipe, or `nil` if the filter is empty. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_infinity_pipe_filter) ---- ----_Can only be used if this is InfinityPipe_ ----@return InfinityPipeFilter? -get_infinity_pipe_filter=function()end, ----Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter. ---- ----**Note:** When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_logistic_point) ----@param index defines.logistic_member_index?@If provided, only returns the `LuaLogisticPoint` specified by this index. ----@return LuaLogisticPoint|LuaLogisticPoint[]? -get_logistic_point=function(index)end, ----Get all offers in a market as an array. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_market_items) ---- ----_Can only be used if this is Market_ ----@return Offer[] -get_market_items=function()end, ----Get the maximum transport line index of a belt or belt connectable entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_max_transport_line_index) ---- ----_Can only be used if this is TransportBeltConnectable_ ----@return uint -get_max_transport_line_index=function()end, ----Read a single signal from the combined circuit networks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_merged_signal) ----@param signal SignalID@The signal to read. ----@param circuit_connector defines.circuit_connector_id?@The connector to get signals for. Must be specified for entities with more than one circuit network connector. ----@return int@The current value of the signal. -get_merged_signal=function(signal,circuit_connector)end, ----The merged circuit network signals or `nil` if there are no signals. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_merged_signals) ----@param circuit_connector defines.circuit_connector_id?@The connector to get signals for. Must be specified for entities with more than one circuit network connector. ----@return Signal[]?@The sum of signals on both the red and green networks, or `nil` if it doesn't have a circuit connector. -get_merged_signals=function(circuit_connector)end, ----Inventory for storing modules of this entity; `nil` if this entity has no module inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_module_inventory) ----@return LuaInventory? -get_module_inventory=function()end, ----Gets (and or creates if needed) the control behavior of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_or_create_control_behavior) ----@return LuaControlBehavior?@The control behavior or `nil`. -get_or_create_control_behavior=function()end, ----Returns all signals guarding exit from a rail block this rail belongs to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_outbound_signals) ---- ----_Can only be used if this is Rail_ ----@return LuaEntity[] -get_outbound_signals=function()end, ----Gets the entity's output inventory if it has one. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_output_inventory) ----@return LuaInventory?@A reference to the entity's output inventory. -get_output_inventory=function()end, ----Returns all parent signals. Parent signals are always RailChainSignal. Parent signals are those signals that are checking state of this signal to determine their own chain state. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_parent_signals) ---- ----_Can only be used if this is RailSignal or RailChainSignal_ ----@return LuaEntity[] -get_parent_signals=function()end, ----Gets the passenger of this car or spidertron if any. ---- ----**Note:** This differs over [LuaEntity::get_driver](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver) in that the passenger can't drive the car. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger) ---- ----_Can only be used if this is Car or SpiderVehicle_ ----@return LuaEntity|LuaPlayer?@`nil` if the vehicle contains no passenger. To check if there's a driver see [LuaEntity::get_driver](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver). -get_passenger=function()end, ----The radius of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_radius) ----@return double -get_radius=function()end, ----Get the rail at the end of the rail segment this rail is in. ---- ----**Note:** A rail segment is a continuous section of rail with no branches, signals, nor train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_end) ---- ----_Can only be used if this is Rail_ ----@param direction defines.rail_direction ----@return LuaEntity@The rail entity. ----@return defines.rail_direction@A rail direction pointing out of the rail segment from the end rail. -get_rail_segment_end=function(direction)end, ----Get the rail signal or train stop at the start/end of the rail segment this rail is in. ---- ----**Note:** A rail segment is a continuous section of rail with no branches, signals, nor train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_entity) ---- ----_Can only be used if this is Rail_ ----@param direction defines.rail_direction@The direction of travel relative to this rail. ----@param in_else_out boolean@If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment. ----@return LuaEntity?@`nil` if the rail segment doesn't start/end with a signal nor a train stop. -get_rail_segment_entity=function(direction,in_else_out)end, ----Get the length of the rail segment this rail is in. ---- ----**Note:** A rail segment is a continuous section of rail with no branches, signals, nor train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_length) ---- ----_Can only be used if this is Rail_ ----@return double -get_rail_segment_length=function()end, ----Get a rail from each rail segment that overlaps with this rail's rail segment. ---- ----**Note:** A rail segment is a continuous section of rail with no branches, signals, nor train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_overlaps) ---- ----_Can only be used if this is Rail_ ----@return LuaEntity[] -get_rail_segment_overlaps=function()end, ----Get all rails of a rail segment this rail is in ---- ----**Note:** A rail segment is a continuous section of rail with no branches, signals, nor train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_rails) ---- ----_Can only be used if this is Rail_ ----@param direction defines.rail_direction@Selects end of this rail that points to a rail segment end from which to start returning rails ----@return LuaEntity[]@Rails of this rail segment -get_rail_segment_rails=function(direction)end, ----Current recipe being assembled by this machine or `nil` if no recipe is set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_recipe) ---- ----_Can only be used if this is CraftingMachine_ ----@return LuaRecipe? -get_recipe=function()end, ----Get a logistic requester slot. ---- ----**Note:** Useable only on entities that have requester slots. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_request_slot) ----@param slot uint@The slot index. ----@return SimpleItemStack?@Contents of the specified slot; `nil` if the given slot contains no request. -get_request_slot=function(slot)end, ----Gets legs of given SpiderVehicle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_spider_legs) ---- ----_Can only be used if this is SpiderVehicle_ ----@return LuaEntity[] -get_spider_legs=function()end, ----The train currently stopped at this train stop, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_stopped_train) ---- ----_Can only be used if this is TrainStop_ ----@return LuaTrain? -get_stopped_train=function()end, ----The trains scheduled to stop at this train stop. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_train_stop_trains) ---- ----_Can only be used if this is TrainStop_ ----@return LuaTrain[] -get_train_stop_trains=function()end, ----Get a transport line of a belt or belt connectable entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_transport_line) ---- ----_Can only be used if this is TransportBeltConnectable_ ----@param index uint@Index of the requested transport line. Transport lines are 1-indexed. ----@return LuaTransportLine -get_transport_line=function(index)end, ----Returns the new entity direction after upgrading. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_upgrade_direction) ----@return defines.direction?@`nil` if this entity is not marked for upgrade. -get_upgrade_direction=function()end, ----Returns the new entity prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_upgrade_target) ----@return LuaEntityPrototype?@`nil` if this entity is not marked for upgrade. -get_upgrade_target=function()end, ----Same as [LuaEntity::has_flag](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag), but targets the inner entity on a entity ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_has_flag) ---- ----_Can only be used if this is EntityGhost_ ----@param flag string@The flag to test. See [EntityPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) for a list of flags. ----@return boolean@`true` if the entity has the given flag set. -ghost_has_flag=function(flag)end, ----Has this unit been assigned a command? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_command) ---- ----_Can only be used if this is Unit_ ----@return boolean -has_command=function()end, ----Test whether this entity's prototype has a certain flag set. ---- ----**Note:** `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag) ----@param flag string@The flag to test. See [EntityPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) for a list of flags. ----@return boolean@`true` if this entity has the given flag set. -has_flag=function(flag)end, ----All methods and properties that this object supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.help) ----@return string -help=function()end, ----Insert fluid into this entity. Fluidbox is chosen automatically. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.insert_fluid) ----@param fluid Fluid@Fluid to insert. ----@return double@Amount of fluid actually inserted. -insert_fluid=function(fluid)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_closed) ---- ----_Can only be used if this is Gate_ ----@return boolean@`true` if this gate is currently closed. -is_closed=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_closing) ---- ----_Can only be used if this is Gate_ ----@return boolean@`true` if this gate is currently closing -is_closing=function()end, ----Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_connected_to_electric_network) ----@return boolean -is_connected_to_electric_network=function()end, ----Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_crafting) ---- ----_Can only be used if this is CraftingMachine_ ----@return boolean -is_crafting=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_opened) ---- ----_Can only be used if this is Gate_ ----@return boolean@`true` if this gate is currently opened. -is_opened=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_opening) ---- ----_Can only be used if this is Gate_ ----@return boolean@`true` if this gate is currently opening. -is_opening=function()end, ----Checks if this rail and other rail both belong to the same rail block. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_rail_in_same_rail_block_as) ---- ----_Can only be used if this is Rail_ ----@param other_rail LuaEntity ----@return boolean -is_rail_in_same_rail_block_as=function(other_rail)end, ----Checks if this rail and other rail both belong to the same rail segment. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_rail_in_same_rail_segment_as) ---- ----_Can only be used if this is Rail_ ----@param other_rail LuaEntity ----@return boolean -is_rail_in_same_rail_segment_as=function(other_rail)end, ----Is this entity or tile ghost or item request proxy registered for construction? If false, it means a construction robot has been dispatched to build the entity, or it is not an entity that can be constructed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_registered_for_construction) ----@return boolean -is_registered_for_construction=function()end, ----Is this entity registered for deconstruction with this force? If false, it means a construction robot has been dispatched to deconstruct it, or it is not marked for deconstruction. The complexity is effectively O(1) - it depends on the number of objects targeting this entity which should be small enough. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_registered_for_deconstruction) ----@param force ForceIdentification@The force construction manager to check. ----@return boolean -is_registered_for_deconstruction=function(force)end, ----Is this entity registered for repair? If false, it means a construction robot has been dispatched to upgrade it, or it is not damaged. This is worst-case O(N) complexity where N is the current number of things in the repair queue. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_registered_for_repair) ----@return boolean -is_registered_for_repair=function()end, ----Is this entity registered for upgrade? If false, it means a construction robot has been dispatched to upgrade it, or it is not marked for upgrade. This is worst-case O(N) complexity where N is the current number of things in the upgrade queue. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_registered_for_upgrade) ----@return boolean -is_registered_for_upgrade=function()end, ----**Events:** ---- * May raise [on_rocket_launch_ordered](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) instantly. ----Raised if the rocket launch was successfully initiated. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.launch_rocket) ---- ----_Can only be used if this is RocketSilo_ ----@return boolean@`true` if the rocket was successfully launched. Return value of `false` means the silo is not ready for launch. -launch_rocket=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@class LuaEntity.mine_param ----If provided the item(s) will be transferred into this inventory. If provided, this must be an inventory created with [LuaGameScript::create_inventory](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) or be a basic inventory owned by some entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@field inventory? LuaInventory ----If true, when the item(s) don't fit into the given inventory the entity is force mined. If false, the mining operation fails when there isn't enough room to transfer all of the items into the inventory. Defaults to false. This is ignored and acts as `true` if no inventory is provided. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@field force? boolean ----If true, [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) will be raised. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@field raise_destroyed? boolean ----If true, the minable state of the entity is ignored. Defaults to `false`. If false, an entity that isn't minable (set as not-minable in the prototype or isn't minable for other reasons) will fail to be mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@field ignore_minable? boolean - - ----Mines this entity. ---- ----**Note:** 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with. ---- ----**Note:** The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory. ---- ----**Events:** ---- * May raise [script_raised_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) instantly. ----Raised if the `raise_destroyed` flag was set and the entity was successfully mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine) ----@param param?LuaEntity.mine_param ----@return boolean@Whether mining succeeded. -mine=function(param)end, ----Sets the entity to be deconstructed by construction robots. ---- ----**Events:** ---- * May raise [on_marked_for_deconstruction](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) instantly. ----Raised if the entity way successfully marked for deconstruction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.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 boolean@if the entity was marked for deconstruction. -order_deconstruction=function(force,player)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@class LuaEntity.order_upgrade_param ----The force whose robots are supposed to do the upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@field force ForceIdentification ----The prototype of the entity to upgrade to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@field target EntityPrototypeIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@field player? PlayerIdentification ----The new direction if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@field direction? defines.direction - - ----Sets the entity to be upgraded by construction robots. ---- ----**Events:** ---- * May raise [on_marked_for_upgrade](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) instantly. ----Raised if the entity way successfully marked for upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade) ----@param param LuaEntity.order_upgrade_param ----@return boolean@Whether the entity was marked for upgrade. -order_upgrade=function(param)end, ----Plays a note with the given instrument and note. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.play_note) ---- ----_Can only be used if this is ProgrammableSpeaker_ ----@param instrument uint ----@param note uint ----@return boolean@Whether the request is valid. The sound may or may not be played depending on polyphony settings. -play_note=function(instrument,note)end, ----Release the unit from the spawner which spawned it. This allows the spawner to continue spawning additional units. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.release_from_spawner) ---- ----_Can only be used if this is Unit_ -release_from_spawner=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@class LuaEntity.remove_fluid_param ----Fluid prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@field name string ----Amount to remove ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@field amount double ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@field minimum_temperature? double ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@field maximum_temperature? double ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@field temperature? double - - ----Remove fluid from this entity. ---- ----**Note:** If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid) ----@param param LuaEntity.remove_fluid_param ----@return double@Amount of fluid actually removed. -remove_fluid=function(param)end, ----Remove an offer from a market. ---- ----**Note:** The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_market_item) ---- ----_Can only be used if this is Market_ ----@param offer uint@Index of offer to remove. ----@return boolean@`true` if the offer was successfully removed; `false` when the given index was not valid. -remove_market_item=function(offer)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_to_close) ---- ----_Can only be used if this is Gate_ ----@param force ForceIdentification@The force that requests the gate to be closed. -request_to_close=function(force)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_to_open) ---- ----_Can only be used if this is Gate_ ----@param force ForceIdentification@The force that requests the gate to be open. ----@param extra_time uint?@Extra ticks to stay open. -request_to_open=function(force,extra_time)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive) ----@class LuaEntity.revive_param ----If `true` the function will return item request proxy as the third return value. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive) ----@field return_item_request_proxy? boolean ----If true, and an entity ghost; [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) will be called. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive) ----@field raise_revive? boolean - - ----Revive a ghost. I.e. turn it from a ghost to a real entity or tile. ---- ----**Events:** ---- * May raise [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive) instantly. ----Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived. ---- ---- * May raise [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) instantly. ----Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive) ----@param param?LuaEntity.revive_param ----@return {[string]: uint}?@Any items the new real entity collided with or `nil` if the ghost could not be revived. ----@return LuaEntity?@The revived entity if an entity ghost was successfully revived. ----@return LuaEntity?@The item request proxy if it was requested with `return_item_request_proxy`. -revive=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@class LuaEntity.rotate_param ----If `true`, rotate the entity in the counter-clockwise direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@field reverse? boolean ----If not specified, the [on_player_rotated_entity](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) event will not be fired. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@field by_player? PlayerIdentification ----If the player is not given should extra items be spilled or returned as a second return value from this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@field spill_items? boolean ----When true, each spilled item will be flagged with the [LuaEntity::to_be_looted](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@field enable_looted? boolean ----When provided the spilled items will be marked for deconstruction by this force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@field force? LuaForce|string - - ----Rotates this entity as if the player rotated it. ---- ----**Events:** ---- * May raise [on_player_rotated_entity](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) instantly. ----Raised if the `by_player` argument was given and the rotation was successful. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate) ----@param param?LuaEntity.rotate_param ----@return boolean@Whether the rotation was successful. ----@return {[string]: uint}?@Count of spilled items indexed by their prototype names if `spill_items` was `true`. -rotate=function(param)end, ----Set the source of this beam. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_beam_source) ---- ----_Can only be used if this is Beam_ ----@param source LuaEntity|MapPosition -set_beam_source=function(source)end, ----Set the target of this beam. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_beam_target) ---- ----_Can only be used if this is Beam_ ----@param target LuaEntity|MapPosition -set_beam_target=function(target)end, ----Give the entity a command. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_command) ---- ----_Can only be used if this is Unit_ ----@param command Command -set_command=function(command)end, ----Give the entity a distraction command. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_distraction_command) ---- ----_Can only be used if this is Unit_ ----@param command Command -set_distraction_command=function(command)end, ----Sets the driver of this vehicle. ---- ----**Note:** This differs over [LuaEntity::set_passenger](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger) in that the passenger can't drive the vehicle. ---- ----**Events:** ---- * May raise [on_player_driving_changed_state](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver) ---- ----_Can only be used if this is Vehicle_ ----@param driver LuaEntity|PlayerIdentification@The new driver or `nil` to eject the current driver if any. -set_driver=function(driver)end, ----Set the filter for a slot in an inserter, loader, or logistic storage container. ---- ----**Note:** The entity must allow filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter) ----@param slot_index uint@Index of the slot to set the filter for. ----@param item string|nil@Prototype name of the item to filter, or `nil` to clear the filter. -set_filter=function(slot_index,item)end, ----Sets the heat setting for this heat interface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_heat_setting) ---- ----_Can only be used if this is HeatInterface_ ----@param filter HeatSetting@The new setting. -set_heat_setting=function(filter)end, ----Sets the filter for this infinity container at the given index. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_container_filter) ---- ----_Can only be used if this is InfinityContainer_ ----@param index uint@The index to set. ----@param filter InfinityInventoryFilter|nil@The new filter, or `nil` to clear the filter. -set_infinity_container_filter=function(index,filter)end, ----Sets the filter for this infinity pipe. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_pipe_filter) ---- ----_Can only be used if this is InfinityPipe_ ----@param filter InfinityPipeFilter|nil@The new filter, or `nil` to clear the filter. -set_infinity_pipe_filter=function(filter)end, ----Sets the passenger of this car or spidertron. ---- ----**Note:** This differs over [LuaEntity::get_driver](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_driver) in that the passenger can't drive the car. ---- ----**Events:** ---- * May raise [on_player_driving_changed_state](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger) ---- ----_Can only be used if this is Car or SpiderVehicle_ ----@param passenger LuaEntity|PlayerIdentification -set_passenger=function(passenger)end, ----Sets the current recipe in this assembly machine. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_recipe) ---- ----_Can only be used if this is AssemblingMachine_ ----@param recipe string|LuaRecipe@The new recipe or `nil` to clear the recipe. ----@return {[string]: uint}@Any items removed from this entity as a result of setting the recipe. -set_recipe=function(recipe)end, ----Set a logistic requester slot. ---- ----**Note:** Useable only on entities that have requester slots. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_request_slot) ----@param request ItemStackIdentification@What to request. ----@param slot uint@The slot index. ----@return boolean@Whether the slot was set. -set_request_slot=function(request,slot)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive) ----@class LuaEntity.silent_revive_param ----If `true` the function will return item request proxy as the third parameter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive) ----@field return_item_request_proxy? boolean ----If true, and an entity ghost; [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) will be called. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive) ----@field raise_revive? boolean - - ----Revives a ghost silently. ---- ----**Events:** ---- * May raise [script_raised_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive) instantly. ----Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived. ---- ---- * May raise [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) instantly. ----Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive) ----@param param?LuaEntity.silent_revive_param ----@return {[string]: uint}?@Any items the new real entity collided with or `nil` if the ghost could not be revived. ----@return LuaEntity?@The revived entity if an entity ghost was successfully revived. ----@return LuaEntity?@The item request proxy if it was requested with `return_item_request_proxy`. -silent_revive=function(param)end, ----Triggers spawn_decoration actions defined in the entity prototype or does nothing if entity is not "turret" or "unit-spawner". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.spawn_decorations) -spawn_decorations=function()end, ----Only works if the entity is a speech-bubble, with an "effect" defined in its wrapper_flow_style. Starts animating the opacity of the speech bubble towards zero, and destroys the entity when it hits zero. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.start_fading_out) -start_fading_out=function()end, ----Sets the [speed](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.speed) of the given SpiderVehicle to zero. Notably does not clear its [autopilot_destination](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destination), which it will continue moving towards if set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stop_spider) ---- ----_Can only be used if this is SpiderVehicle_ -stop_spider=function()end, ----Whether this entity supports a backer name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.supports_backer_name) ----@return boolean -supports_backer_name=function()end, ----Is this entity marked for deconstruction? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_deconstructed) ----@return boolean -to_be_deconstructed=function()end, ----Is this entity marked for upgrade? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_upgraded) ----@return boolean -to_be_upgraded=function()end, ----Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid. ---- ----**Note:** This property can also be read and written on the equipment grid of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.toggle_equipment_movement_bonus) -toggle_equipment_movement_bonus=function()end, ----Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. The game doesn't do this automatically as we don't want to loose performance by checking this in normal games. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.update_connections) -update_connections=function()end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEntityPrototype.lua b/.vscode/factorio/runtime-api-LuaEntityPrototype.lua deleted file mode 100644 index e7f47dd..0000000 --- a/.vscode/factorio/runtime-api-LuaEntityPrototype.lua +++ /dev/null @@ -1,1554 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaEntityPrototype --- This file is automatically generated. Edits will be overwritten. - ----Prototype of an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html) ----@class LuaEntityPrototype:LuaObject ----[R] ----The active energy usage of this rocket silo or combinator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.active_energy_usage) ---- ----_Can only be used if this is RocketSilo or Combinator_ ----@field active_energy_usage? double ----[R] ----Entities this entity can be pasted onto in addition to the normal allowed ones. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.additional_pastable_entities) ----@field additional_pastable_entities LuaEntityPrototype[] ----[R] ----The bounding box that specifies which tiles adjacent to the offshore pump should be checked. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.adjacent_tile_collision_box) ---- ----_Can only be used if this is OffshorePump_ ----@field adjacent_tile_collision_box? BoundingBox ----[R] ----Tiles adjacent to the offshore pump must not collide with this collision mask. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.adjacent_tile_collision_mask) ---- ----_Can only be used if this is OffshorePump_ ----@field adjacent_tile_collision_mask? CollisionMask ----[R] ----If this mask is not empty, tiles adjacent to the offshore pump must not collide with this collision mask. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.adjacent_tile_collision_test) ---- ----_Can only be used if this is OffshorePump_ ----@field adjacent_tile_collision_test? CollisionMask ----[R] ----Whether this unit prototype is affected by tile walking speed modifiers. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.affected_by_tiles) ---- ----_Can only be used if this is Unit_ ----@field affected_by_tiles? boolean ----[R] ----The air resistance of this rolling stock prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.air_resistance) ---- ----_Can only be used if this is RollingStock_ ----@field air_resistance? double ----[R] ----The alert icon shift of this entity prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_icon_shift) ----@field alert_icon_shift Vector ----[R] ----Whether this turret raises an alert when attacking ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_when_attacking) ---- ----_Can only be used if this is Turret_ ----@field alert_when_attacking? boolean ----[R] ----Whether this entity raises an alert when damaged. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_when_damaged) ---- ----_Can only be used if this is EntityWithHealth_ ----@field alert_when_damaged? boolean ----[R] ----Whether this market allows access to all forces or just friendly ones. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_access_to_all_forces) ---- ----_Can only be used if this is Market_ ----@field allow_access_to_all_forces? boolean ----[R] ----Whether this inserter allows burner leeching. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_burner_leech) ---- ----_Can only be used if this is Inserter_ ----@field allow_burner_leech? boolean ----[R] ----When false copy-paste is not allowed for this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_copy_paste) ----@field allow_copy_paste boolean ----[R] ----Whether this inserter allows custom pickup and drop vectors. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_custom_vectors) ---- ----_Can only be used if this is Inserter_ ----@field allow_custom_vectors? boolean ----[R] ----Whether this vehicle allows passengers. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_passengers) ---- ----_Can only be used if this is Vehicle_ ----@field allow_passengers? boolean ----[R] ----True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_run_time_change_of_is_military_target) ---- ----_Can only be used if this is EntityWithOwner_ ----@field allow_run_time_change_of_is_military_target? boolean ----[R] ----The allowed module effects for this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allowed_effects) ----@field allowed_effects? {[string]: boolean} ----[R] ----Whether the lamp is always on (except when out of power or turned off by the circuit network). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.always_on) ---- ----_Can only be used if this is Lamp_ ----@field always_on? boolean ----[R] ----Name of the ammo category of this land mine. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ammo_category) ---- ----_Can only be used if this is LandMine_ ----@field ammo_category? string ----[R] ----The animation speed coefficient of this belt connectable prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.animation_speed_coefficient) ---- ----_Can only be used if this is BeltConnectable_ ----@field animation_speed_coefficient? double ----[R] ----The attack parameters for this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.attack_parameters) ----@field attack_parameters? AttackParameters ----[R] ----The attack result of this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.attack_result) ----@field attack_result? TriggerItem[] ----[R] ----The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automated_ammo_count) ---- ----_Can only be used if this is ArtilleryTurret or AmmoTurret_ ----@field automated_ammo_count? uint ----[R] ----Whether this spider vehicle prototype automatically cycles weapons. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automatic_weapon_cycling) ---- ----_Can only be used if this is SpiderVehicle_ ----@field automatic_weapon_cycling? boolean ----[R] ----Autoplace specification for this entity prototype, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.autoplace_specification) ----@field autoplace_specification? AutoplaceSpecification ----[R] ----The base productivity of this crafting machine, lab, or mining drill. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.base_productivity) ---- ----_Can only be used if this is CraftingMachine, Lab or MiningDrill_ ----@field base_productivity? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.belt_distance) ---- ----_Can only be used if this is Loader_ ----@field belt_distance? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.belt_length) ---- ----_Can only be used if this is Loader_ ----@field belt_length? double ----[R] ----The speed of this transport belt. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.belt_speed) ---- ----_Can only be used if this is TransportBeltConnectable_ ----@field belt_speed? double ----[R] ----The braking force of this vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.braking_force) ---- ----_Can only be used if this is Vehicle_ ----@field braking_force? double ----[R] ----The evolution requirement to build this entity as a base when expanding enemy bases. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.build_base_evolution_requirement) ----@field build_base_evolution_requirement double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.build_distance) ---- ----_Can only be used if this is Character_ ----@field build_distance? uint ----[R] ----The log2 of grid size of the building ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.building_grid_bit_shift) ----@field building_grid_bit_shift uint ----[R] ----The burner energy source prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burner_prototype) ----@field burner_prototype? LuaBurnerPrototype ----[R] ----Whether this generator prototype burns fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burns_fluid) ---- ----_Can only be used if this is Generator_ ----@field burns_fluid? boolean ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.call_for_help_radius) ---- ----_Can only be used if this is Spawner_ ----@field call_for_help_radius? double ----[R] ----Whether this unit prototype can open gates. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.can_open_gates) ---- ----_Can only be used if this is Unit_ ----@field can_open_gates? boolean ----[R] ----The collision mask used only for collision test with tile directly at offshore pump position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.center_collision_mask) ---- ----_Can only be used if this is OffshorePump_ ----@field center_collision_mask? CollisionMask ----[R] ----The chain shooting cooldown modifier of this spider vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chain_shooting_cooldown_modifier) ---- ----_Can only be used if this is SpiderVehicle_ ----@field chain_shooting_cooldown_modifier? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.character_corpse) ---- ----_Can only be used if this is Character_ ----@field character_corpse? LuaEntityPrototype ----[R] ----The chunk exploration radius of this spider vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chunk_exploration_radius) ---- ----_Can only be used if this is SpiderVehicle_ ----@field chunk_exploration_radius? double ----[R] ----The item prototype name used to destroy this cliff. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.cliff_explosive_prototype) ---- ----_Can only be used if this is Cliff_ ----@field cliff_explosive_prototype? string ----[R] ----The bounding box used for collision checking. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_box) ----@field collision_box BoundingBox ----[R] ----The collision masks this entity uses ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_mask) ----@field collision_mask CollisionMask ----[R] ----Does this prototype collision mask collide with itself? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_mask_collides_with_self) ----@field collision_mask_collides_with_self boolean ----[R] ----Does this prototype collision mask collide with tiles only? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_mask_collides_with_tiles_only) ----@field collision_mask_collides_with_tiles_only boolean ----[R] ----Does this prototype collision mask consider tile transitions? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_mask_considers_tile_transitions) ----@field collision_mask_considers_tile_transitions boolean ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.collision_mask_with_flags) ----@field collision_mask_with_flags CollisionMaskWithFlags ----[R] ----The color of the prototype, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.color) ----@field color? Color ----[R] ----The construction radius for this roboport prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.construction_radius) ---- ----_Can only be used if this is Roboport_ ----@field construction_radius? double ----[R] ----The energy consumption of this car prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.consumption) ---- ----_Can only be used if this is Car_ ----@field consumption? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.container_distance) ---- ----_Can only be used if this is Loader_ ----@field container_distance? double ----[R] ----Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.corpses) ---- ----_Can only be used if this is EntityWithHealth_ ----@field corpses? {[string]: LuaEntityPrototype} ----[R] ----If this simple-entity is counted as a rock for the deconstruction planner "trees and rocks only" filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.count_as_rock_for_filtered_deconstruction) ---- ----_Can only be used if this is SimpleEntity_ ----@field count_as_rock_for_filtered_deconstruction? boolean ----[R] ----The crafting categories this entity prototype supports. ---- ----**Note:** The value in the dictionary is meaningless and exists just to allow for easy lookup. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.crafting_categories) ---- ----_Can only be used if this is CraftingMachine Character_ ----@field crafting_categories? {[string]: boolean} ----[R] ----The crafting speed.. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.crafting_speed) ---- ----_Can only be used if this is CraftingMachine_ ----@field crafting_speed? double ----[R] ----If this prototype will attempt to create a ghost of itself on death. ---- ----**Note:** If this is false then a ghost will never be made, if it's true a ghost may be made. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death) ----@field create_ghost_on_death boolean ----[R] ----The trigger to run when this entity is created, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_effect) ----@field created_effect? TriggerItem[] ----[R] ----The smoke trigger run when this entity is built, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field created_smoke? LuaEntityPrototype.created_smoke ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.damage_hit_tint) ---- ----_Can only be used if this is Character_ ----@field damage_hit_tint? Color ----[R] ----Value between 0 and 1 darkness where all lamps of this lamp prototype are off. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.darkness_for_all_lamps_off) ---- ----_Can only be used if this is Lamp_ ----@field darkness_for_all_lamps_off? float ----[R] ----Value between 0 and 1 darkness where all lamps of this lamp prototype are on. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.darkness_for_all_lamps_on) ---- ----_Can only be used if this is Lamp_ ----@field darkness_for_all_lamps_on? float ----[R] ----The hardcoded default collision mask (with flags) for this entity prototype type. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.default_collision_mask_with_flags) ----@field default_collision_mask_with_flags CollisionMaskWithFlags ----[R] ----Whether this generator prototype destroys non-fuel fluids. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.destroy_non_fuel_fluid) ---- ----_Can only be used if this is Generator_ ----@field destroy_non_fuel_fluid? boolean ----[R] ----The distraction cooldown of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.distraction_cooldown) ---- ----_Can only be used if this is Unit_ ----@field distraction_cooldown? uint ----[R] ----The distribution effectivity for this beacon prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.distribution_effectivity) ---- ----_Can only be used if this is Beacon_ ----@field distribution_effectivity? double ----[R] ----The door opening speed for this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.door_opening_speed) ---- ----_Can only be used if this is RocketSilo_ ----@field door_opening_speed? double ----[R] ----Whether this logistics or construction robot renders its cargo when flying. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.draw_cargo) ---- ----_Can only be used if this is RobotWithLogisticsInterface_ ----@field draw_cargo? boolean ----[R] ----The bounding box used for drawing the entity icon. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.drawing_box) ----@field drawing_box BoundingBox ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.drop_item_distance) ---- ----_Can only be used if this is Character_ ----@field drop_item_distance? uint ----[R] ----The dying time of this corpse prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.dying_speed) ---- ----_Can only be used if this is Corpse_ ----@field dying_speed? float ----[R] ----The effectivity of this car prototype, generator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.effectivity) ---- ----_Can only be used if this is Car or Generator_ ----@field effectivity? double ----[R] ----The electric energy source prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.electric_energy_source_prototype) ----@field electric_energy_source_prototype? LuaElectricEnergySourcePrototype ----[R] ----Amount of pollution emissions per second this entity will create. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.emissions_per_second) ----@field emissions_per_second double ----[R] ----The enemy map color used when charting this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.enemy_map_color) ----@field enemy_map_color Color ----[R] ----The energy used per hitpoint taken for this vehicle during collisions. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.energy_per_hit_point) ---- ----_Can only be used if this is Vehicle_ ----@field energy_per_hit_point? double ----[R] ----The energy consumed per tile moved for this flying robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.energy_per_move) ---- ----_Can only be used if this is FlyingRobot_ ----@field energy_per_move? double ----[R] ----The energy consumed per tick for this flying robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.energy_per_tick) ---- ----_Can only be used if this is FlyingRobot_ ----@field energy_per_tick? double ----[R] ----The direct energy usage of this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.energy_usage) ----@field energy_usage? double ----[R] ----The engine starting speed for this rocket silo rocket prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.engine_starting_speed) ---- ----_Can only be used if this is RocketSiloRocket_ ----@field engine_starting_speed? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.enter_vehicle_distance) ---- ----_Can only be used if this is Character_ ----@field enter_vehicle_distance? double ----[R] ----Whether this explosion has a beam. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.explosion_beam) ---- ----_Can only be used if this is Explosion_ ----@field explosion_beam? double ----[R] ----Whether this explosion rotates. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.explosion_rotate) ---- ----_Can only be used if this is Explosion_ ----@field explosion_rotate? double ----[R] ----The group of mutually fast-replaceable entities, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fast_replaceable_group) ----@field fast_replaceable_group? string ----[R] ----The filter count of this inserter, loader, or logistic chest. For logistic containers, `nil` means no limit. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.filter_count) ---- ----_Can only be used if this is Inserter, Loader or LogisticContainer_ ----@field filter_count? uint ----[R] ----The final attack result for this projectile. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.final_attack_result) ---- ----_Can only be used if this is Projectile_ ----@field final_attack_result? TriggerItem[] ----[R] ----The fixed recipe name for this assembling machine prototype, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fixed_recipe) ---- ----_Can only be used if this is AssemblingMachine_ ----@field fixed_recipe? string ----[R] ----The flags for this entity prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.flags) ----@field flags EntityPrototypeFlags ----[R] ----The fluid this offshore pump produces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid) ---- ----_Can only be used if this is OffshorePump_ ----@field fluid? LuaFluidPrototype ----[R] ----The fluid capacity of this entity or 0 if this entity doesn't support fluids. ---- ----**Note:** Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_capacity) ----@field fluid_capacity double ----[R] ----The fluid energy source prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_energy_source_prototype) ----@field fluid_energy_source_prototype? LuaFluidEnergySourcePrototype ----[R] ----The fluid usage of this generator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_usage_per_tick) ---- ----_Can only be used if this is Generator_ ----@field fluid_usage_per_tick? double ----[R] ----The fluidbox prototypes for this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluidbox_prototypes) ----@field fluidbox_prototypes LuaFluidBoxPrototype[] ----[R] ----The flying acceleration for this rocket silo rocket prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.flying_acceleration) ---- ----_Can only be used if this is RocketSiloRocket_ ----@field flying_acceleration? double ----[R] ----The flying speed for this rocket silo rocket prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.flying_speed) ---- ----_Can only be used if this is RocketSiloRocket_ ----@field flying_speed? double ----[R] ----The friction of this vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.friction_force) ---- ----_Can only be used if this is Vehicle_ ----@field friction_force? double ----[R] ----The friendly map color used when charting this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.friendly_map_color) ----@field friendly_map_color Color ----[R] ----The equipment grid prototype for this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.grid_prototype) ----@field grid_prototype? LuaEquipmentGridPrototype ----[R] ----Group of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.group) ----@field group LuaGroup ----[R] ----A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.guns) ----@field guns? {[string]: LuaItemPrototype} ----[R] ----Whether this unit, car, or character prototype has belt immunity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.has_belt_immunity) ---- ----_Can only be used if this is Unit, Car or Character_ ----@field has_belt_immunity? boolean ----[R] ----Amount this entity can heal per tick, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.healing_per_tick) ----@field healing_per_tick? float ----[R] ----The heat buffer prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_buffer_prototype) ----@field heat_buffer_prototype? LuaHeatBufferPrototype ----[R] ----The heat energy source prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_energy_source_prototype) ----@field heat_energy_source_prototype? LuaHeatEnergySourcePrototype ----[R] ----The height of this spider vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.height) ---- ----_Can only be used if this is SpiderVehicle_ ----@field height? double ----[R] ----The idle energy usage of this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.idle_energy_usage) ---- ----_Can only be used if this is RocketSilo_ ----@field idle_energy_usage? double ----[R] ----A vector of the gun prototypes of this car, spider vehicule, or artillery wagon or turret. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.indexed_guns) ---- ----_Can only be used if this is Car, SpiderVehicle, ArtilleryTurret or ArtilleryWagon_ ----@field indexed_guns? LuaItemPrototype[] ----[R] ----Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.infinite_depletion_resource_amount) ---- ----_Can only be used if this is ResourceEntity_ ----@field infinite_depletion_resource_amount? uint ----[R] ----Whether this resource is infinite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.infinite_resource) ---- ----_Can only be used if this is ResourceEntity_ ----@field infinite_resource? boolean ----[R] ----The max number of ingredients this crafting machine prototype supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ingredient_count) ---- ----_Can only be used if this is CraftingMachine_ ----@field ingredient_count? uint ----[R] ----True if this inserter chases items on belts for pickup. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_chases_belt_items) ---- ----_Can only be used if this is Inserter_ ----@field inserter_chases_belt_items? boolean ----[R] ----The drop position for this inserter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_drop_position) ---- ----_Can only be used if this is Inserter_ ----@field inserter_drop_position? Vector ----[R] ----The extension speed of this inserter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_extension_speed) ---- ----_Can only be used if this is Inserter_ ----@field inserter_extension_speed? double ----[R] ----The pickup position for this inserter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_pickup_position) ---- ----_Can only be used if this is Inserter_ ----@field inserter_pickup_position? Vector ----[R] ----The rotation speed of this inserter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_rotation_speed) ---- ----_Can only be used if this is Inserter_ ----@field inserter_rotation_speed? double ----[R] ----The built-in stack size bonus of this inserter prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.inserter_stack_size_bonus) ---- ----_Can only be used if this is Inserter_ ----@field inserter_stack_size_bonus? double ----[R] ----The instruments for this programmable speaker. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.instruments) ---- ----_Can only be used if this is ProgrammableSpeaker_ ----@field instruments? ProgrammableSpeakerInstrument[] ----[R] ----Everything in the following list is considered a building. ---- ----- AccumulatorPrototype ----- ArtilleryTurretPrototype ----- BeaconPrototype ----- BoilerPrototype ----- BurnerGeneratorPrototype ----- CombinatorPrototype → ArithmeticCombinator, DeciderCombinator ----- ConstantCombinatorPrototype ----- ContainerPrototype → LogisticContainer, InfinityContainer ----- CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace ----- ElectricEnergyInterfacePrototype ----- ElectricPolePrototype ----- EnemySpawnerPrototype ----- GatePrototype ----- GeneratorPrototype ----- HeatInterfacePrototype ----- HeatPipePrototype ----- InserterPrototype ----- LabPrototype ----- LampPrototype ----- LinkedContainerPrototype ----- MarketPrototype ----- MiningDrillPrototype ----- OffshorePumpPrototype ----- PipePrototype → InfinityPipe ----- PipeToGroundPrototype ----- PlayerPortPrototype ----- PowerSwitchPrototype ----- ProgrammableSpeakerPrototype ----- PumpPrototype ----- RadarPrototype ----- RailPrototype → CurvedRail, StraightRail ----- RailSignalBasePrototype → RailChainSignal, RailSignal ----- ReactorPrototype ----- RoboportPrototype ----- SimpleEntityPrototype ----- SimpleEntityWithOwnerPrototype → SimpleEntityWithForce ----- SolarPanelPrototype ----- StorageTankPrototype ----- TrainStopPrototype ----- TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt ----- TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret ----- WallPrototype ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_building) ----@field is_building boolean ----[R] ----True if this is entity-with-owner ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_entity_with_owner) ----@field is_entity_with_owner boolean ----[R] ----True if this entity-with-owner is military target ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_military_target) ---- ----_Can only be used if this is EntityWithOwner_ ----@field is_military_target? boolean ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.item_pickup_distance) ---- ----_Can only be used if this is Character_ ----@field item_pickup_distance? double ----[R] ----The item slot count of this constant combinator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.item_slot_count) ---- ----_Can only be used if this is ConstantCombinator_ ----@field item_slot_count? uint ----[R] ----Items that when placed will produce this entity, if any. Construction bots will always choose the first item in this list to build this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.items_to_place_this) ----@field items_to_place_this? SimpleItemStack[] ----[R] ----The item prototype names that are the inputs of this lab prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.lab_inputs) ---- ----_Can only be used if this is Lab_ ----@field lab_inputs? string[] ----[R] ----The lamp energy usage of this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.lamp_energy_usage) ---- ----_Can only be used if this is RocketSilo_ ----@field lamp_energy_usage? double ----[R] ----The rocket launch delay for this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.launch_wait_time) ---- ----_Can only be used if this is RocketSilo_ ----@field launch_wait_time? uint8 ----[R] ----The light blinking speed for this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.light_blinking_speed) ---- ----_Can only be used if this is RocketSilo_ ----@field light_blinking_speed? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.localised_description) ----@field localised_description LocalisedString ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.localised_name) ----@field localised_name LocalisedString ----[R] ----The logistic mode of this logistic container. One of `"requester"`, `"active-provider"`, `"passive-provider"`, `"buffer"`, `"storage"`, `"none"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_mode) ---- ----_Can only be used if this is LogisticContainer_ ----@field logistic_mode? string ----[R] ----The logistic parameters for this roboport. ---- ----**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/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ---- ----_Can only be used if this is Roboport_ ----@field logistic_parameters? LuaEntityPrototype.logistic_parameters ----[R] ----The logistic radius for this roboport prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_radius) ---- ----_Can only be used if this is Roboport_ ----@field logistic_radius? double ----[R] ----Loot that will be dropped when this entity is killed, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.loot) ---- ----_Can only be used if this is EntityWithHealth_ ----@field loot? Loot[] ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.loot_pickup_distance) ---- ----_Can only be used if this is Character_ ----@field loot_pickup_distance? double ----[R] ----The manual range modifier for this artillery turret or wagon prototype. ---- ----subclass(ArtilleryWagon, ArtilleryTurret) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier) ----@field manual_range_modifier? double ----[R] ----The map color used when charting this entity if a friendly or enemy color isn't defined, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.map_color) ----@field map_color? Color ----[R] ----The bounding box used for map generator collision checking. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.map_generator_bounding_box) ----@field map_generator_bounding_box BoundingBox ----[R] ----The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_circuit_wire_distance) ----@field max_circuit_wire_distance double ----[R] ----Count of enemies this spawner can sustain. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_count_of_owned_units) ---- ----_Can only be used if this is Spawner_ ----@field max_count_of_owned_units? double ----[R] ----The maximum darkness at which this unit spawner can spawn entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_darkness_to_spawn) ---- ----_Can only be used if this is Spawner_ ----@field max_darkness_to_spawn? float ----[R] ----The radius of the area constantly revealed by this radar, in chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_distance_of_nearby_sector_revealed) ---- ----_Can only be used if this is Radar_ ----@field max_distance_of_nearby_sector_revealed? uint ----[R] ----The radius of the area this radar can chart, in chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_distance_of_sector_revealed) ---- ----_Can only be used if this is Radar_ ----@field max_distance_of_sector_revealed? uint ----[R] ----The max energy for this flying robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_energy) ---- ----_Can only be used if this is FlyingRobot_ ----@field max_energy? double ----[R] ----The theoretical maximum energy production for this this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_energy_production) ----@field max_energy_production double ----[R] ----The theoretical maximum energy usage for this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_energy_usage) ----@field max_energy_usage double ----[R] ----How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_friends_around_to_spawn) ---- ----_Can only be used if this is Spawner_ ----@field max_friends_around_to_spawn? double ----[R] ----Max health of this entity. Will be `0` if this is not an entity with health. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_health) ----@field max_health float ----[R] ----The max payload size of this logistics or construction robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_payload_size) ---- ----_Can only be used if this is RobotWithLogisticsInterface_ ----@field max_payload_size? uint ----[R] ----The maximum polyphony for this programmable speaker. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_polyphony) ---- ----_Can only be used if this is ProgrammableSpeaker_ ----@field max_polyphony? uint ----[R] ----The default maximum power output of this generator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_power_output) ---- ----_Can only be used if this is Generator_ ----@field max_power_output? double ----[R] ----The maximum pursue distance of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_pursue_distance) ---- ----_Can only be used if this is Unit_ ----@field max_pursue_distance? double ----[R] ----The max speed of this projectile or flying robot prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_speed) ---- ----_Can only be used if this is Projectile or FlyingRobot_ ----@field max_speed? double ----[R] ----The maximum energy for this flying robot above which it won't try to recharge when stationing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_to_charge) ---- ----_Can only be used if this is FlyingRobot_ ----@field max_to_charge? float ----[R] ----The max underground distance for underground belts and underground pipes. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_underground_distance) ---- ----_Can only be used if this is UndergroundBelt or PipeToGround_ ----@field max_underground_distance? uint8 ----[R] ----The maximum wire distance for this entity. 0 if the entity doesn't support wires. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_wire_distance) ----@field max_wire_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_corner_sliding_distance) ---- ----_Can only be used if this is Character_ ----@field maximum_corner_sliding_distance? double ----[R] ----The maximum fluid temperature of this generator prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_temperature) ---- ----_Can only be used if this is Generator_ ----@field maximum_temperature? double ----[R] ----The minimum darkness at which this unit spawner can spawn entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.min_darkness_to_spawn) ---- ----_Can only be used if this is Spawner_ ----@field min_darkness_to_spawn? float ----[R] ----The minimum pursue time of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.min_pursue_time) ---- ----_Can only be used if this is Unit_ ----@field min_pursue_time? uint ----[R] ----The minimum energy for this flying robot before it tries to recharge. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.min_to_charge) ---- ----_Can only be used if this is FlyingRobot_ ----@field min_to_charge? float ----[R] ----Whether this entity is minable and what can be obtained by mining it. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field mineable_properties LuaEntityPrototype.mineable_properties ----[R] ----Minimum amount of this resource. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.minimum_resource_amount) ---- ----_Can only be used if this is ResourceEntity_ ----@field minimum_resource_amount? uint ----[R] ----The mining radius of this mining drill prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mining_drill_radius) ---- ----_Can only be used if this is MiningDrill_ ----@field mining_drill_radius? double ----[R] ----The mining speed of this mining drill/character prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mining_speed) ---- ----_Can only be used if this is MiningDrill or Character_ ----@field mining_speed? double ----[R] ----The module inventory size. `nil` if this entity doesn't support modules. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.module_inventory_size) ----@field module_inventory_size? uint ----[R] ----Whether this unit prototype can move while shooting. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.move_while_shooting) ---- ----_Can only be used if this is Unit_ ----@field move_while_shooting? boolean ----[R] ----Name of this prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.name) ----@field name string ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.neighbour_bonus) ---- ----_Can only be used if this is Reactor_ ----@field neighbour_bonus? double ----[R] ----The next upgrade for this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.next_upgrade) ----@field next_upgrade? LuaEntityPrototype ----[R] ----The normal amount for this resource. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.normal_resource_amount) ---- ----_Can only be used if this is ResourceEntity_ ----@field normal_resource_amount? 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/LuaEntityPrototype.html#LuaEntityPrototype.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/LuaEntityPrototype.html#LuaEntityPrototype.order) ----@field order string ----[R] ----The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.pollution_to_join_attack) ---- ----_Can only be used if this is Unit_ ----@field pollution_to_join_attack? float ----[R] ----True if this entity prototype should be included during tile collision checks with [LuaTilePrototype::check_collision_with_entities](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.check_collision_with_entities) enabled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.protected_from_tile_building) ----@field protected_from_tile_building boolean ----[R] ----The pumping speed of this offshore or normal pump. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.pumping_speed) ---- ----_Can only be used if this is OffshorePump or Pump_ ----@field pumping_speed? double ----[R] ----The radar range of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.radar_range) ---- ----_Can only be used if this is Unit_ ----@field radar_range? uint ----[R] ----The radius of this entity prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.radius) ----@field radius double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.reach_distance) ---- ----_Can only be used if this is Character_ ----@field reach_distance? uint ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.reach_resource_distance) ---- ----_Can only be used if this is Character_ ----@field reach_resource_distance? double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.related_underground_belt) ---- ----_Can only be used if this is TransportBelt_ ----@field related_underground_belt? LuaEntityPrototype ----[R] ----The remains left behind when this entity is mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.remains_when_mined) ----@field remains_when_mined LuaEntityPrototype[] ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.remove_decoratives) ----@field remove_decoratives string ----[R] ----Repair-speed modifier for this entity, if any. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.repair_speed_modifier) ---- ----_Can only be used if this is EntityWithHealth_ ----@field repair_speed_modifier? uint ----[R] ----The base researching speed of this lab prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.researching_speed) ---- ----_Can only be used if this is Lab_ ----@field researching_speed? double ----[R] ----List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resistances) ---- ----_Can only be used if this is EntityWithHealth_ ----@field resistances? {[string]: Resistance} ----[R] ----The resource categories this character or mining drill supports. ---- ----**Note:** The value in the dictionary is meaningless and exists just to allow for easy lookup. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_categories) ---- ----_Can only be used if this is MiningDrill or Character_ ----@field resource_categories? {[string]: boolean} ----[R] ----Name of the category of this resource. ---- ----**Note:** During data stage, this property is named "category". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_category) ---- ----_Can only be used if this is ResourceEntity_ ----@field resource_category? string ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.respawn_time) ---- ----_Can only be used if this is Character_ ----@field respawn_time? uint ----[R] ----The result units and spawn points with weight and evolution factor for a biter spawner entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.result_units) ---- ----_Can only be used if this is Spawner_ ----@field result_units? UnitSpawnDefinition[] ----[R] ----The rising speed for this rocket silo rocket prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.rising_speed) ---- ----_Can only be used if this is RocketSiloRocket_ ----@field rising_speed? double ----[R] ----The rocket entity prototype associated with this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.rocket_entity_prototype) ---- ----_Can only be used if this is RocketSilo_ ----@field rocket_entity_prototype? LuaEntityPrototype ----[R] ----The rocket parts required for this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.rocket_parts_required) ---- ----_Can only be used if this is RocketSilo_ ----@field rocket_parts_required? uint ----[R] ----The rocket rising delay for this rocket silo prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.rocket_rising_delay) ---- ----_Can only be used if this is RocketSilo_ ----@field rocket_rising_delay? uint8 ----[R] ----The rotation speed of this car prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.rotation_speed) ---- ----_Can only be used if this is Car_ ----@field rotation_speed? double ----[R] ----The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.running_speed) ---- ----_Can only be used if this is Character_ ----@field running_speed? double ----[R] ----Whether this generator prototype scales fluid usage. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.scale_fluid_usage) ---- ----_Can only be used if this is Generator_ ----@field scale_fluid_usage? boolean ----[R] ----The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.secondary_collision_box) ----@field secondary_collision_box? BoundingBox ----[R] ----Is this entity selectable? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.selectable_in_game) ----@field selectable_in_game boolean ----[R] ----The bounding box used for drawing selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.selection_box) ----@field selection_box BoundingBox ----[R] ----The selection priority of this entity - a value between 0 and 255 ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.selection_priority) ----@field selection_priority uint ----[R] ----The cursor size used when shooting at this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.shooting_cursor_size) ----@field shooting_cursor_size double ----[R] ----The spawning cooldown for this enemy spawner prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawn_cooldown) ---- ----_Can only be used if this is Spawner_ ----@field spawn_cooldown? LuaEntityPrototype.spawn_cooldown ----[R] ----How far from the spawner can the units be spawned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawning_radius) ---- ----_Can only be used if this is Spawner_ ----@field spawning_radius? double ----[R] ----What spaces should be between the spawned units. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawning_spacing) ---- ----_Can only be used if this is Spawner_ ----@field spawning_spacing? double ----[R] ----The spawning time modifier of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawning_time_modifier) ---- ----_Can only be used if this is Unit_ ----@field spawning_time_modifier? double ----[R] ----The default speed of this flying robot, rolling stock or unit. For rolling stocks, this is their `max_speed`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed) ---- ----_Can only be used if this is FlyingRobot, RollingStock or Unit_ ----@field speed? double ----[R] ----The speed multiplier when this flying robot is out of energy. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed_multiplier_when_out_of_energy) ---- ----_Can only be used if this is FlyingRobot_ ----@field speed_multiplier_when_out_of_energy? float ----[R] ----Whether this inserter is a stack-type. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.stack) ---- ----_Can only be used if this is Inserter_ ----@field stack? boolean ----[R] ----The bounding box used to attach sticker type entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.sticker_box) ----@field sticker_box BoundingBox ----[R] ----Subgroup of this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.subgroup) ----@field subgroup LuaGroup ----[R] ----The supply area of this electric pole or beacon prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.supply_area_distance) ---- ----_Can only be used if this is ElectricPole or Beacon_ ----@field supply_area_distance? double ----[R] ----Whether this entity prototype could possibly ever be rotated. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.supports_direction) ----@field supports_direction boolean ----[R] ----If this car prototype uses tank controls to drive. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tank_driving) ---- ----_Can only be used if this is Car_ ----@field tank_driving? boolean ----[R] ----The target temperature of this boiler prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.target_temperature) ---- ----_Can only be used if this is Boiler_ ----@field target_temperature? double ----[R] ----The terrain friction modifier for this vehicle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.terrain_friction_modifier) ---- ----_Can only be used if this is Vehicle_ ----@field terrain_friction_modifier? float ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ticks_to_keep_aiming_direction) ---- ----_Can only be used if this is Character_ ----@field ticks_to_keep_aiming_direction? uint ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ticks_to_keep_gun) ---- ----_Can only be used if this is Character_ ----@field ticks_to_keep_gun? uint ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ticks_to_stay_in_combat) ---- ----_Can only be used if this is Character_ ----@field ticks_to_stay_in_combat? uint ----[R] ----Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_height) ----@field tile_height uint ----[R] ----Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_width) ----@field tile_width uint ----[R] ----The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.time_to_live) ----@field time_to_live uint ----[R] ----The time it takes this land mine to arm. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.timeout) ---- ----_Can only be used if this is LandMine_ ----@field timeout? uint ----[R] ----The torso bob speed of this spider vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_bob_speed) ---- ----_Can only be used if this is SpiderVehicle_ ----@field torso_bob_speed? double ----[R] ----The torso rotation speed of this spider vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_rotation_speed) ---- ----_Can only be used if this is SpiderVehicle_ ----@field torso_rotation_speed? double ----[R] ----If it is a tree, return the number of colors it supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tree_color_count) ---- ----_Can only be used if this is Tree_ ----@field tree_color_count? uint8 ----[R] ----The collision mask entities must collide with to make this landmine blow up. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.trigger_collision_mask) ---- ----_Can only be used if this is LandMine_ ----@field trigger_collision_mask? CollisionMaskWithFlags ----[R] ----The range of this turret. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.turret_range) ---- ----_Can only be used if this is Turret_ ----@field turret_range? uint ----[R] ----The turret rotation speed of this car prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.turret_rotation_speed) ---- ----_Can only be used if this is Car_ ----@field turret_rotation_speed? double ----[R] ----Type of this prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.type) ----@field type string ----[R] ----Whether this logistic container prototype uses exact mode ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.use_exact_mode) ---- ----_Can only be used if this is LogisticContainer_ ----@field use_exact_mode? 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/LuaEntityPrototype.html#LuaEntityPrototype.valid) ----@field valid boolean ----[R] ----The vision distance of this unit prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.vision_distance) ---- ----_Can only be used if this is Unit_ ----@field vision_distance? double ----[R] ----The void energy source prototype this entity uses, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.void_energy_source_prototype) ----@field void_energy_source_prototype? LuaVoidEnergySourcePrototype ----[R] ----The weight of this vehicle prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.weight) ---- ----_Can only be used if this is Vehicle_ ----@field weight? double -local LuaEntityPrototype={ ----Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.get_inventory_size) ----@param index defines.inventory ----@return uint? -get_inventory_size=function(index)end, ----Test whether this entity prototype has a certain flag set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.has_flag) ----@param flag string@The flag to test. See [EntityPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) for a list of flags. ----@return boolean@`true` if this prototype has the given flag set. -has_flag=function(flag)end, ----All methods and properties that this object supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.help) ----@return string -help=function()end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEquipment.lua b/.vscode/factorio/runtime-api-LuaEquipment.lua deleted file mode 100644 index 98410ad..0000000 --- a/.vscode/factorio/runtime-api-LuaEquipment.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua deleted file mode 100644 index 7857a13..0000000 --- a/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua b/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua deleted file mode 100644 index 5f1046e..0000000 --- a/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua deleted file mode 100644 index 443cdc1..0000000 --- a/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua deleted file mode 100644 index fd2a836..0000000 --- a/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFlowStatistics.lua b/.vscode/factorio/runtime-api-LuaFlowStatistics.lua deleted file mode 100644 index 87e78b9..0000000 --- a/.vscode/factorio/runtime-api-LuaFlowStatistics.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFluidBox.lua b/.vscode/factorio/runtime-api-LuaFluidBox.lua deleted file mode 100644 index a6525f8..0000000 --- a/.vscode/factorio/runtime-api-LuaFluidBox.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua b/.vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua deleted file mode 100644 index c5c9966..0000000 --- a/.vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua deleted file mode 100644 index 5ba8827..0000000 --- a/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFluidPrototype.lua b/.vscode/factorio/runtime-api-LuaFluidPrototype.lua deleted file mode 100644 index def2dd5..0000000 --- a/.vscode/factorio/runtime-api-LuaFluidPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFontPrototype.lua b/.vscode/factorio/runtime-api-LuaFontPrototype.lua deleted file mode 100644 index 35bebcd..0000000 --- a/.vscode/factorio/runtime-api-LuaFontPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaForce.lua b/.vscode/factorio/runtime-api-LuaForce.lua deleted file mode 100644 index e42425d..0000000 --- a/.vscode/factorio/runtime-api-LuaForce.lua +++ /dev/null @@ -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 ----[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 ----[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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua deleted file mode 100644 index 402cf46..0000000 --- a/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaGameScript.lua b/.vscode/factorio/runtime-api-LuaGameScript.lua deleted file mode 100644 index 088e421..0000000 --- a/.vscode/factorio/runtime-api-LuaGameScript.lua +++ /dev/null @@ -1,1045 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaGameScript --- This file is automatically generated. Edits will be overwritten. - ----**Global Description:** ----This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with [LuaBootstrap::on_load](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_load). ---- ----**Class Description:** ----Main toplevel type, provides access to most of the API though its members. An instance of LuaGameScript is available as the global object named `game`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html) ----@class LuaGameScript:LuaObject ----[R] ----A dictionary containing every LuaAchievementPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.achievement_prototypes) ----@field achievement_prototypes LuaCustomTable ----[R] ----The active mods versions. The keys are mod names, the values are the versions. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.active_mods) ---- ----### Example ----This will print the names and versions of active mods to player p's console. ----``` ----for name, version in pairs(game.active_mods) do ---- p.print(name .. " version " .. version) ----end ----``` ----@field active_mods {[string]: string} ----[R] ----A dictionary containing every LuaAmmoCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ammo_category_prototypes) ----@field ammo_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaAutoplaceControlPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.autoplace_control_prototypes) ----@field autoplace_control_prototypes LuaCustomTable ----[RW] ----True by default. Can be used to disable autosaving. Make sure to turn it back on soon after. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.autosave_enabled) ----@field autosave_enabled boolean ----[R] ----Array of the names of all the backers that supported the game development early on. These are used as names for labs, locomotives, radars, roboports, and train stops. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.backer_names) ----@field backer_names LuaCustomTable ----[R] ----The players that are currently online. ---- ----This is primarily useful when you want to do some action against all online players. ---- ----**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/LuaGameScript.html#LuaGameScript.connected_players) ----@field connected_players LuaPlayer[] ----[R] ----A dictionary containing every LuaCustomInputPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.custom_input_prototypes) ----@field custom_input_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaDamagePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.damage_prototypes) ----@field damage_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaDecorativePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.decorative_prototypes) ----@field decorative_prototypes LuaCustomTable ----[R] ----The default map gen settings for this save. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.default_map_gen_settings) ----@field default_map_gen_settings MapGenSettings ----[R] ----Current scenario difficulty. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.difficulty) ----@field difficulty defines.difficulty ----[R] ----The currently active set of difficulty settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game. This is however not recommended as different difficulties can have differing technology and recipe trees, which can cause problems for players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.difficulty_settings) ---- ----### Example ----This will set the technology price multiplier to 12. ----``` ----game.difficulty_settings.technology_price_multiplier = 12 ----``` ----@field difficulty_settings DifficultySettings ----[RW] ----True by default. Can be used to disable the highlighting of resource patches when they are hovered on the map. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.draw_resource_selection) ----@field draw_resource_selection boolean ----[RW] ----Determines if enemy land mines are completely invisible or not. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.enemy_has_vision_on_land_mines) ----@field enemy_has_vision_on_land_mines boolean ----[R] ----A dictionary containing every LuaEntityPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.entity_prototypes) ----@field entity_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaEquipmentCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.equipment_category_prototypes) ----@field equipment_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaEquipmentGridPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.equipment_grid_prototypes) ----@field equipment_grid_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaEquipmentPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.equipment_prototypes) ----@field equipment_prototypes LuaCustomTable ----[R] ----True while the victory screen is shown. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.finished) ----@field finished boolean ----[R] ----True after players finished the game and clicked "continue". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.finished_but_continuing) ----@field finished_but_continuing boolean ----[R] ----A dictionary containing every LuaFluidPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.fluid_prototypes) ----@field fluid_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaFontPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.font_prototypes) ----@field font_prototypes LuaCustomTable ----[R] ----Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.forces) ----@field forces LuaCustomTable ----[R] ----A dictionary containing every LuaFuelCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.fuel_category_prototypes) ----@field fuel_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every ItemGroup indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.item_group_prototypes) ----@field item_group_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaItemPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.item_prototypes) ----@field item_prototypes LuaCustomTable ----[R] ----A dictionary containing every ItemSubgroup indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.item_subgroup_prototypes) ----@field item_subgroup_prototypes LuaCustomTable ----[R] ----A dictionary containing every MapGenPreset indexed by `name`. ---- ----**Note:** A MapGenPreset is an exact copy of the prototype table provided from the data stage. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_gen_presets) ----@field map_gen_presets LuaCustomTable ----[R] ----The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game. ---- ----**Note:** This does not contain difficulty settings, use [LuaGameScript::difficulty_settings](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.difficulty_settings) instead. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_settings) ----@field map_settings MapSettings ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_beacon_supply_area_distance) ----@field max_beacon_supply_area_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_electric_pole_connection_distance) ----@field max_electric_pole_connection_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_electric_pole_supply_area_distance) ----@field max_electric_pole_supply_area_distance float ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_force_distraction_chunk_distance) ----@field max_force_distraction_chunk_distance uint ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_force_distraction_distance) ----@field max_force_distraction_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_gate_activation_distance) ----@field max_gate_activation_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_inserter_reach_distance) ----@field max_inserter_reach_distance double ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_pipe_to_ground_distance) ----@field max_pipe_to_ground_distance uint8 ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.max_underground_belt_distance) ----@field max_underground_belt_distance uint8 ----[R] ----A dictionary containing every LuaModSettingPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.mod_setting_prototypes) ----@field mod_setting_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaModuleCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.module_category_prototypes) ----@field module_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaNamedNoiseExpression indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.named_noise_expressions) ----@field named_noise_expressions LuaCustomTable ----[R] ----A dictionary containing every LuaNoiseLayerPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.noise_layer_prototypes) ----@field noise_layer_prototypes LuaCustomTable ----[R] ----This object's name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.object_name) ----@field object_name string ----[R] ----A dictionary containing every LuaParticlePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.particle_prototypes) ----@field particle_prototypes LuaCustomTable ----[R] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.permissions) ----@field permissions LuaPermissionGroups ----[R] ----This property is only populated inside [custom command](https://lua-api.factorio.com/latest/LuaCommandProcessor.html) handlers and when writing [Lua console commands](https://wiki.factorio.com/Console#Scripting_and_cheat_commands). Returns the player that is typing the command, `nil` in all other instances. ---- ----See [LuaGameScript::players](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) for accessing all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.player) ----@field player? LuaPlayer ----[R] ----Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all. ---- ----If only a single player is required, [LuaGameScript::get_player](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_player) should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) ----@field players LuaCustomTable ----[R] ----The pollution statistics for this map. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.pollution_statistics) ----@field pollution_statistics LuaFlowStatistics ----[R] ----A dictionary containing every LuaRecipeCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.recipe_category_prototypes) ----@field recipe_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaRecipePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.recipe_prototypes) ----@field recipe_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaResourceCategoryPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.resource_category_prototypes) ----@field resource_category_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaShortcutPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.shortcut_prototypes) ----@field shortcut_prototypes LuaCustomTable ----[RW] ----Speed to update the map at. 1.0 is normal speed -- 60 UPS. ---- ----**Note:** Minimum value is 0.01. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.speed) ----@field speed float ----[R] ----The styles that [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) can use, indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.styles) ----@field styles LuaCustomTable ----[R] ----Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.surfaces) ----@field surfaces LuaCustomTable ----[R] ----A dictionary containing every [LuaTechnologyPrototype](https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html) indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.technology_prototypes) ----@field technology_prototypes LuaCustomTable ----[R] ----Current map tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) ----@field tick uint ----[RW] ----If the tick has been paused. This means that entity update has been paused. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick_paused) ----@field tick_paused boolean ----[R] ----The number of ticks since this game was 'created'. A game is 'created' either by using "new game" or "new game from scenario". ---- ----**Note:** This differs over [LuaGameScript::tick](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the [LuaGameScript::tick](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) is > 0. ---- ----**Note:** This value has no relation with [LuaGameScript::tick](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick) and can be completely different values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ticks_played) ----@field ticks_played uint ----[RW] ----The number of ticks to be run while the tick is paused. When [LuaGameScript::tick_paused](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tick_paused) is true, ticks_to_run behaves the following way: While this is > 0, the entity update is running normally and this value is decremented every tick. When this reaches 0, the game will pause again. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ticks_to_run) ----@field ticks_to_run uint ----[R] ----A dictionary containing every LuaTilePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.tile_prototypes) ----@field tile_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaTrivialSmokePrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.trivial_smoke_prototypes) ----@field trivial_smoke_prototypes LuaCustomTable ----[R] ----A dictionary containing every LuaVirtualSignalPrototype indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.virtual_signal_prototypes) ----@field virtual_signal_prototypes LuaCustomTable -game={ ----Instruct the game to perform an auto-save. ---- ----**Note:** Only the server will save in multiplayer. In single player a standard auto-save is triggered. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.auto_save) ----@param name string?@The autosave name if any. Saves will be named _autosave-*name* when provided. -auto_save=function(name)end, ----Bans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ---- * Will raise [on_player_banned](https://lua-api.factorio.com/latest/events.html#on_player_banned) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ban_player) ----@param player PlayerIdentification@The player to ban. ----@param reason LocalisedString?@The reason given if any. -ban_player=function(player,reason)end, ----Run internal consistency checks. Allegedly prints any errors it finds. ---- ----**Note:** Exists mainly for debugging reasons. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_consistency) -check_consistency=function()end, ----Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect. ---- ----**Note:** Also prints true/false if called from the console. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_prototype_translations) -check_prototype_translations=function()end, ----Counts how many distinct groups of pipes exist in the world. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.count_pipe_groups) -count_pipe_groups=function()end, ----Create a new force. ---- ----**Note:** The game currently supports a maximum of 64 forces, including the three built-in forces. This means that a maximum of 61 new forces may be created. ---- ----**Note:** Force names must be unique. ---- ----**Events:** ---- * Will raise [on_force_created](https://lua-api.factorio.com/latest/events.html#on_force_created) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_force) ----@param force string@Name of the new force ----@return LuaForce@The force that was just created -create_force=function(force)end, ----Creates an inventory that is not owned by any game object. It can be resized later with [LuaInventory::resize](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.resize). ---- ----**Note:** Make sure to destroy it when you are done with it using [LuaInventory::destroy](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.destroy). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) ----@param size uint16@The number of slots the inventory initially has. ----@return LuaInventory -create_inventory=function(size)end, ----Creates a [LuaProfiler](https://lua-api.factorio.com/latest/LuaProfiler.html), which is used for measuring script performance. ---- ----**Note:** LuaProfiler cannot be serialized. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_profiler) ----@param stopped boolean?@Create the timer stopped ----@return LuaProfiler -create_profiler=function(stopped)end, ----Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used. ---- ----**Note:** *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_random_generator) ----@param seed uint? ----@return LuaRandomGenerator -create_random_generator=function(seed)end, ----Create a new surface. ---- ----**Note:** The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface. ---- ----**Note:** Surface names must be unique. ---- ----**Events:** ---- * Will raise [on_surface_created](https://lua-api.factorio.com/latest/events.html#on_surface_created) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_surface) ----@param name string@Name of the new surface. ----@param settings MapGenSettings?@Map generation settings. ----@return LuaSurface@The surface that was just created. -create_surface=function(name,settings)end, ----Base64 decodes and inflates the given string. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.decode_string) ----@param string string@The string to decode. ----@return string?@The decoded string or `nil` if the decode failed. -decode_string=function(string)end, ----Deletes the given surface and all entities on it. ---- ----**Events:** ---- * Will raise [on_pre_surface_deleted](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted) in a future tick. ---- ---- * Will raise [on_surface_deleted](https://lua-api.factorio.com/latest/events.html#on_surface_deleted) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.delete_surface) ----@param surface string|LuaSurface@The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted. -delete_surface=function(surface)end, ----Converts the given direction into the string version of the direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.direction_to_string) ----@param direction defines.direction -direction_to_string=function(direction)end, ----Disables replay saving for the current save file. Once done there's no way to re-enable replay saving for the save file without loading an old save. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.disable_replay) -disable_replay=function()end, ----Disables tutorial triggers, that unlock new tutorials and show notices about unlocked tutorials. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.disable_tutorial_triggers) -disable_tutorial_triggers=function()end, ----Deflates and base64 encodes the given string. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.encode_string) ----@param string string@The string to encode. ----@return string?@The encoded string or `nil` if the encode failed. -encode_string=function(string)end, ----Evaluate an expression, substituting variables as provided. For details on the formula, see the relevant page on the [Factorio wiki](https://wiki.factorio.com/Prototype/Technology#unit). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.evaluate_expression) ---- ----### Example ----Calculate the number of research units required to unlock mining productivity level 10. ----``` ----local formula = game.forces["player"].technologies["mining-productivity-4"].research_unit_count_formula ----local units = game.evaluate_expression(formula, { L = 10, l = 10 }) ----``` ----@param expression string@The expression to evaluate. ----@param variables {[string]: double}?@Variables to be substituted. ----@return double -evaluate_expression=function(expression,variables)end, ----Force a CRC check. Tells all peers to calculate their current map CRC; these CRC are then compared against each other. If a mismatch is detected, the game is desynced and some peers are forced to reconnect. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.force_crc) -force_crc=function()end, ----Gets the number of entities that are active (updated each tick). ---- ----**Note:** This is very expensive to determine. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_active_entities_count) ----@param surface SurfaceIdentification?@If given, only the entities active on this surface are counted. ----@return uint -get_active_entities_count=function(surface)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_entity_by_tag) ----@param tag string ----@return LuaEntity? -get_entity_by_tag=function(tag)end, ----Returns a dictionary of all LuaAchievementPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_achievement_prototypes) ---- ----### Example ----Get every achievement prototype that is not allowed to be completed on the peaceful difficulty setting. ----``` ----local prototypes = game.get_filtered_achievement_prototypes{{filter="allowed-without-fight", invert=true}} ----``` ----@param filters AchievementPrototypeFilter[] ----@return LuaCustomTable -get_filtered_achievement_prototypes=function(filters)end, ----Returns a dictionary of all LuaDecorativePrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_decorative_prototypes) ---- ----### Example ----Get every decorative prototype that is auto-placed. ----``` ----local prototypes = game.get_filtered_decorative_prototypes{{filter="autoplace"}} ----``` ----@param filters DecorativePrototypeFilter[] ----@return LuaCustomTable -get_filtered_decorative_prototypes=function(filters)end, ----Returns a dictionary of all LuaEntityPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_entity_prototypes) ---- ----### Example ----Get every entity prototype that can craft recipes involving fluids in the way some assembling machines can. ----``` ----local prototypes = game.get_filtered_entity_prototypes{{filter="crafting-category", crafting_category="crafting-with-fluid"}} ----``` ----@param filters EntityPrototypeFilter[] ----@return LuaCustomTable -get_filtered_entity_prototypes=function(filters)end, ----Returns a dictionary of all LuaEquipmentPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_equipment_prototypes) ---- ----### Example ----Get every equipment prototype that functions as a battery. ----``` ----local prototypes = game.get_filtered_equipment_prototypes{{filter="type", type="battery-equipment"}} ----``` ----@param filters EquipmentPrototypeFilter[] ----@return LuaCustomTable -get_filtered_equipment_prototypes=function(filters)end, ----Returns a dictionary of all LuaFluidPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_fluid_prototypes) ---- ----### Example ----Get every fluid prototype that has a heat capacity of exactly `100`. ----``` ----local prototypes = game.get_filtered_fluid_prototypes{{filter="heat-capacity", comparison="=", value=100}} ----``` ----@param filters FluidPrototypeFilter[] ----@return LuaCustomTable -get_filtered_fluid_prototypes=function(filters)end, ----Returns a dictionary of all LuaItemPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_item_prototypes) ---- ----### Example ----Get every item prototype that, when launched with a rocket, produces a result. ----``` ----local prototypes = game.get_filtered_item_prototypes{{filter="has-rocket-launch-products"}} ----``` ----@param filters ItemPrototypeFilter[] ----@return LuaCustomTable -get_filtered_item_prototypes=function(filters)end, ----Returns a dictionary of all LuaModSettingPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_mod_setting_prototypes) ---- ----### Example ----Get every mod setting prototype that belongs to the specified mod. ----``` ----local prototypes = game.get_filtered_mod_setting_prototypes{{filter="mod", mod="space-exploration"}} ----``` ----@param filters ModSettingPrototypeFilter[] ----@return LuaCustomTable -get_filtered_mod_setting_prototypes=function(filters)end, ----Returns a dictionary of all LuaRecipePrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_recipe_prototypes) ---- ----### Example ----Get every recipe prototype that takes less than half a second to craft (at crafting speed `1`). ----``` ----local prototypes = game.get_filtered_recipe_prototypes{{filter="energy", comparison="<", value=0.5}} ----``` ----@param filters RecipePrototypeFilter[] ----@return LuaCustomTable -get_filtered_recipe_prototypes=function(filters)end, ----Returns a dictionary of all LuaTechnologyPrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_technology_prototypes) ---- ----### Example ----Get every technology prototype that can be researched at the start of the game. ----``` ----local prototypes = game.get_filtered_technology_prototypes{{filter="has-prerequisites", invert=true}} ----``` ----@param filters TechnologyPrototypeFilter[] ----@return LuaCustomTable -get_filtered_technology_prototypes=function(filters)end, ----Returns a dictionary of all LuaTilePrototypes that fit the given filters. The prototypes are indexed by `name`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_filtered_tile_prototypes) ---- ----### Example ----Get every tile prototype that improves a player's walking speed by at least 50%. ----``` ----local prototypes = game.get_filtered_tile_prototypes{{filter="walking-speed-modifier", comparison="≥", value=1.5}} ----``` ----@param filters TilePrototypeFilter[] ----@return LuaCustomTable -get_filtered_tile_prototypes=function(filters)end, ----Gets the map exchange string for the map generation settings that were used to create this map. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_map_exchange_string) ----@return string -get_map_exchange_string=function()end, ----Gets the given player or returns `nil` if no player is found. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_player) ----@param player uint|string@The player index or name. ----@return LuaPlayer? -get_player=function(player)end, ----Gets the inventories created through [LuaGameScript::create_inventory](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory) ---- ----**Note:** Inventories created through console commands will be owned by `"core"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_script_inventories) ----@param mod string?@The mod who's inventories to get. If not provided all inventories are returned. ----@return {[string]: LuaInventory[]}@A mapping of mod name to array of inventories owned by that mod. -get_script_inventories=function(mod)end, ----Gets the given surface or returns `nil` if no surface is found. ---- ----**Note:** This is a shortcut for game.surfaces[...] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_surface) ----@param surface uint|string@The surface index or name. ----@return LuaSurface? -get_surface=function(surface)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_train_stops) ----@class LuaGameScript.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/LuaGameScript.html#LuaGameScript.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/LuaGameScript.html#LuaGameScript.get_train_stops) ----@field surface? SurfaceIdentification ----The force to search. Not providing a force will match stops in any force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_train_stops) ----@field force? ForceIdentification - - ----Gets train stops matching the given filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_train_stops) ----@param param?LuaGameScript.get_train_stops_param ----@return LuaEntity[] -get_train_stops=function(param)end, ----Is this the demo version of Factorio? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_demo) ----@return boolean -is_demo=function()end, ----Is the map loaded is multiplayer? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_multiplayer) ----@return boolean -is_multiplayer=function()end, ----Checks if the given SoundPath is valid. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sound_path) ----@param sound_path SoundPath@Path to the sound. ----@return boolean -is_valid_sound_path=function(sound_path)end, ----Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path) ----@param sprite_path SpritePath@Path to the image. ----@return boolean -is_valid_sprite_path=function(sprite_path)end, ----Convert a JSON string to a table. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.json_to_table) ----@param json string@The string to convert. ----@return AnyBasic?@The returned object, or `nil` if the JSON string was invalid. -json_to_table=function(json)end, ----Kicks the given player from this multiplayer game. Does nothing if this is a single player game or if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ---- * Will raise [on_player_kicked](https://lua-api.factorio.com/latest/events.html#on_player_kicked) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.kick_player) ----@param player PlayerIdentification@The player to kick. ----@param reason LocalisedString?@The reason given if any. -kick_player=function(player,reason)end, ----Marks two forces to be merged together. All players and entities in the source force will be reassigned to the target force. The source force will then be destroyed. Importantly, this does not merge technologies or bonuses, which are instead retained from the target force. ---- ----**Note:** The three built-in forces (player, enemy and neutral) can't be destroyed, meaning they can't be used as the source argument to this function. ---- ----**Note:** The source force is not removed until the end of the current tick, or if called during the [on_forces_merging](https://lua-api.factorio.com/latest/events.html#on_forces_merging) or [on_forces_merged](https://lua-api.factorio.com/latest/events.html#on_forces_merged) event, the end of the next tick. ---- ----**Events:** ---- * Will raise [on_forces_merged](https://lua-api.factorio.com/latest/events.html#on_forces_merged) in a future tick. ---- ---- * Will raise [on_forces_merging](https://lua-api.factorio.com/latest/events.html#on_forces_merging) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.merge_forces) ----@param source ForceIdentification@The force to remove. ----@param destination ForceIdentification@The force to reassign all entities to. -merge_forces=function(source,destination)end, ----Mutes the given player. Does nothing if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ---- * Will raise [on_player_muted](https://lua-api.factorio.com/latest/events.html#on_player_muted) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.mute_player) ----@param player PlayerIdentification@The player to mute. -mute_player=function(player)end, ----Convert a map exchange string to map gen settings and map settings. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.parse_map_exchange_string) ----@param map_exchange_string string ----@return MapExchangeStringData -parse_map_exchange_string=function(map_exchange_string)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.play_sound) ----@class LuaGameScript.play_sound_param ----The sound to play. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.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/LuaGameScript.html#LuaGameScript.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/LuaGameScript.html#LuaGameScript.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/LuaGameScript.html#LuaGameScript.play_sound) ----@field override_sound_type? SoundType - - ----Play a sound for every player in the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.play_sound) ----@param param LuaGameScript.play_sound_param -play_sound=function(param)end, ----Print text to the chat console all players. ---- ----**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/LuaGameScript.html#LuaGameScript.print) ----@param message LocalisedString ----@param color Color? -print=function(message,color)end, ----Purges the given players messages from the game. Does nothing if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.purge_player) ----@param player PlayerIdentification@The player to purge. -purge_player=function(player)end, ----Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities. ---- ----**Note:** All specified entity prototypes must be autoplacable. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.regenerate_entity) ----@param entities string|string[]@Prototype names of entity or entities to autoplace. -regenerate_entity=function(entities)end, ----Forces a reload of all mods. ---- ----**Note:** This will act like saving and loading from the mod(s) perspective. ---- ----**Note:** This will do nothing if run in multiplayer. ---- ----**Note:** This disables the replay if replay is enabled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_mods) -reload_mods=function()end, ----Forces a reload of the scenario script from the original scenario location. ---- ----**Note:** This disables the replay if replay is enabled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_script) -reload_script=function()end, ----Remove players who are currently not connected from the map. ---- ----**Events:** ---- * Will raise [on_player_removed](https://lua-api.factorio.com/latest/events.html#on_player_removed) instantly. ---- ---- * Will raise [on_pre_player_removed](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_offline_players) ----@param players (LuaPlayer|string)[]?@List of players to remove. If not specified, remove all offline players. -remove_offline_players=function(players)end, ----Remove a file or directory in the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). Can be used to remove files created by [LuaGameScript::write_file](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_path) ----@param path string@The path to the file or directory to remove, relative to `script-output`. -remove_path=function(path)end, ----Reset scenario state (game_finished, player_won, etc.). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reset_game_state) -reset_game_state=function()end, ----Resets the amount of time played for this map. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reset_time_played) -reset_time_played=function()end, ----Saves the current configuration of Atlas to a file. This will result in huge file containing all of the game graphics moved to as small space as possible. ---- ----**Note:** Exists mainly for debugging reasons. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.save_atlas) -save_atlas=function()end, ----Instruct the server to save the map. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.server_save) ----@param name string?@Save name. If not specified, writes into the currently-running save. -server_save=function(name)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@class LuaGameScript.set_game_state_param ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field game_finished? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field player_won? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field next_level? string ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field can_continue? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field victorious_force? ForceIdentification - - ----Set scenario state. Any parameters not provided do not change the current state. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@param param LuaGameScript.set_game_state_param -set_game_state=function(param)end, ----Forces the screenshot saving system to wait until all queued screenshots have been written to disk. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_wait_for_screenshots_to_finish) -set_wait_for_screenshots_to_finish=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@class LuaGameScript.show_message_dialog_param ----What the dialog should say ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@field text LocalisedString ----Path to an image to show on the dialog ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@field image? string ----If specified, dialog will show an arrow pointing to this place. When not specified, the arrow will point to the player's position. (Use `point_to={type="nowhere"}` to remove the arrow entirely.) The dialog itself will be placed near the arrow's target. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@field point_to? GuiArrowSpecification ----The gui style to use for this speech bubble. Must be of type speech_bubble. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@field style? string ----Must be of type flow_style. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@field wrapper_frame_style? string - - ----Show an in-game message dialog. ---- ----**Note:** Can only be used when the map contains exactly one player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog) ----@param param LuaGameScript.show_message_dialog_param -show_message_dialog=function(param)end, ----Convert a table to a JSON string ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.table_to_json) ----@param data table ----@return string -table_to_json=function(data)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@class LuaGameScript.take_screenshot_param ----The player to focus on. Defaults to the local player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field player? PlayerIdentification ----If defined, the screenshot will only be taken for this player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field by_player? PlayerIdentification ----If defined, the screenshot will be taken on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field surface? SurfaceIdentification ----If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field position? MapPosition ----The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field resolution? TilePosition ----The map zoom to take the screenshot at. Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field zoom? double ----The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"screenshot.png"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field path? string ----Whether to include GUIs in the screenshot or not. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field show_gui? boolean ----Whether to include entity info ("Alt mode") or not. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field show_entity_info? boolean ----When `true` and when `player` is specified, the building preview for the item in the player's cursor will also be rendered. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field show_cursor_building_preview? boolean ----Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field anti_alias? boolean ----The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field quality? int ----Whether to save the screenshot even during replay playback. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field allow_in_replay? boolean ----Overrides the current surface daytime for the duration of screenshot rendering. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field daytime? double ----Overrides the tick of water animation, if animated water is enabled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field water_tick? uint ----Screenshot requests are processed in between game update and render. The game may skip rendering (ie. drop frames) if the previous frame has not finished rendering or the game simulation starts to fall below 60 updates per second. If `force_render` is set to `true`, the game won't drop frames and process the screenshot request at the end of the update in which the request was created. This is not honored on multiplayer clients that are catching up to server. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@field force_render? boolean - - ----Take a screenshot of the game and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter. ---- ----**Note:** If Factorio is running headless, this function will do nothing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot) ----@param param LuaGameScript.take_screenshot_param -take_screenshot=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@class LuaGameScript.take_technology_screenshot_param ----The force whose technology to screenshot. If not given, the `"player`" force is used. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field force? ForceIdentification ----The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"technology-screenshot.png"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field path? string ----If given, the screenshot will only be taken for this player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field by_player? PlayerIdentification ----The technology to highlight. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field selected_technology? TechnologyIdentification ----If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field skip_disabled? boolean ----The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@field quality? int - - ----Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name of the image file can be specified via the `path` parameter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot) ----@param param LuaGameScript.take_technology_screenshot_param -take_technology_screenshot=function(param)end, ----Unbans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ---- * Will raise [on_player_unbanned](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unban_player) ----@param player PlayerIdentification@The player to unban. -unban_player=function(player)end, ----Unmutes the given player. Does nothing if the player running this isn't an admin. ---- ----**Events:** ---- * Will raise [on_console_command](https://lua-api.factorio.com/latest/events.html#on_console_command) instantly. ---- ---- * Will raise [on_player_unmuted](https://lua-api.factorio.com/latest/events.html#on_player_unmuted) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unmute_player) ----@param player PlayerIdentification@The player to unmute. -unmute_player=function(player)end, ----Write a file to the `script-output` folder, located in the game's [user data directory](https://wiki.factorio.com/User_data_directory). The name and file extension of the file can be specified via the `filename` parameter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file) ----@param filename string@The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`. ----@param data LocalisedString@The content to write to the file. ----@param append boolean?@If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`. ----@param for_player uint?@If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present. -write_file=function(filename,data,append,for_player)end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua b/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua deleted file mode 100644 index b0d67bd..0000000 --- a/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaGroup.lua b/.vscode/factorio/runtime-api-LuaGroup.lua deleted file mode 100644 index 255a279..0000000 --- a/.vscode/factorio/runtime-api-LuaGroup.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaGui.lua b/.vscode/factorio/runtime-api-LuaGui.lua deleted file mode 100644 index 2e8d9c7..0000000 --- a/.vscode/factorio/runtime-api-LuaGui.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaGuiElement.lua b/.vscode/factorio/runtime-api-LuaGuiElement.lua deleted file mode 100644 index 70cac00..0000000 --- a/.vscode/factorio/runtime-api-LuaGuiElement.lua +++ /dev/null @@ -1,1175 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaGuiElement --- This file is automatically generated. Edits will be overwritten. - ----An element of a custom GUI. This type is used to represent any kind of a GUI element - labels, buttons and frames are all instances of this type. Just like [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html), different kinds of elements support different attributes; attempting to access an attribute on an element that doesn't support it (for instance, trying to access the `column_count` of a `textfield`) will result in a runtime error. ---- ----The following types of GUI element are supported: ---- ----- `"button"`: A clickable element. Relevant event: [on_gui_click](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----- `"sprite-button"`: A `button` that displays a sprite rather than text. Relevant event: [on_gui_click](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----- `"checkbox"`: A clickable element with a check mark that can be turned off or on. Relevant event: [on_gui_checked_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----- `"flow"`: An invisible container that lays out its children either horizontally or vertically. ----- `"frame"`: A non-transparent box that contains other elements. It can have a title (set via the `caption` attribute). Just like a `flow`, it lays out its children either horizontally or vertically. Relevant event: [on_gui_location_changed](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----- `"label"`: A piece of text. ----- `"line"`: A horizontal or vertical separation line. ----- `"progressbar"`: A partially filled bar that can be used to indicate progress. ----- `"table"`: An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains. ----- `"textfield"`: A single-line box the user can type into. Relevant events: [on_gui_text_changed](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed), [on_gui_confirmed](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----- `"radiobutton"`: A clickable element that is functionally identical to a `checkbox`, but has a circular appearance. Relevant event: [on_gui_checked_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----- `"sprite"`: An element that shows an image. ----- `"scroll-pane"`: An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars. ----- `"drop-down"`: A drop-down containing strings of text. Relevant event: [on_gui_selection_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----- `"list-box"`: A list of strings, only one of which can be selected at a time. Shows a scroll bar if necessary. Relevant event: [on_gui_selection_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----- `"camera"`: A camera that shows the game at the given position on the given surface. It can visually track an [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) that is set after the element has been created. ----- `"choose-elem-button"`: A button that lets the player pick from a certain kind of prototype, with optional filtering. Relevant event: [on_gui_elem_changed](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----- `"text-box"`: A multi-line `textfield`. Relevant event: [on_gui_text_changed](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----- `"slider"`: A horizontal number line which can be used to choose a number. Relevant event: [on_gui_value_changed](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----- `"minimap"`: A minimap preview, similar to the normal player minimap. It can visually track an [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) that is set after the element has been created. ----- `"entity-preview"`: A preview of an entity. The [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) has to be set after the element has been created. ----- `"empty-widget"`: An empty element that just exists. The root GUI elements `screen` and `relative` are `empty-widget`s. ----- `"tabbed-pane"`: A collection of `tab`s and their contents. Relevant event: [on_gui_selected_tab_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----- `"tab"`: A tab for use in a `tabbed-pane`. ----- `"switch"`: A switch with three possible states. Can have labels attached to either side. Relevant event: [on_gui_switch_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ---- ----Each GUI element allows access to its children by having them as attributes. Thus, one can use the `parent.child` syntax to refer to children. Lua also supports the `parent["child"]` syntax to refer to the same element. This can be used in cases where the child has a name that isn't a valid Lua identifier. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html) ---- ----### Example ----This will add a label called `greeting` to the top flow. Immediately after, it will change its text to illustrate accessing child elements. ----``` ----game.player.gui.top.add{type="label", name="greeting", caption="Hi"} ----game.player.gui.top.greeting.caption = "Hello there!" ----game.player.gui.top["greeting"].caption = "Actually, never mind, I don't like your face" ----``` ---- ----### Example ----This will add a tabbed-pane and 2 tabs with contents. ----``` ----local tabbed_pane = game.player.gui.top.add{type="tabbed-pane"} ----local tab1 = tabbed_pane.add{type="tab", caption="Tab 1"} ----local tab2 = tabbed_pane.add{type="tab", caption="Tab 2"} ----local label1 = tabbed_pane.add{type="label", caption="Label 1"} ----local label2 = tabbed_pane.add{type="label", caption="Label 2"} ----tabbed_pane.add_tab(tab1, label1) ----tabbed_pane.add_tab(tab2, label2) ----``` ----@class LuaGuiElement:LuaObject ----[RW] ----Whether this textfield (when in numeric mode) allows decimal numbers. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_decimal) ---- ----_Can only be used if this is textfield_ ----@field allow_decimal boolean ----[RW] ----Whether this textfield (when in numeric mode) allows negative numbers. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_negative) ---- ----_Can only be used if this is textfield_ ----@field allow_negative boolean ----[RW] ----Whether the `"none"` state is allowed for this switch. ---- ----**Note:** This can't be set to false if the current switch_state is 'none'. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state) ---- ----_Can only be used if this is switch_ ----@field allow_none_state boolean ----[RW] ----The anchor for this relative widget, if any. Setting `nil` clears the anchor. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.anchor) ----@field anchor? GuiAnchor ----[RW] ----Whether this frame auto-centers on window resize when stored in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.auto_center) ---- ----_Can only be used if this is frame_ ----@field auto_center boolean ----[RW] ----The text to display after the normal tab text (designed to work with numbers) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.badge_text) ---- ----_Can only be used if this is tab_ ----@field badge_text LocalisedString ----[RW] ----The text displayed on this element. For frames, this is the "heading". For other elements, like buttons or labels, this is the content. ---- ----**Note:** Whilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.caption) ----@field caption LocalisedString ----[R] ----The child-elements of this GUI element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.children) ----@field children LuaGuiElement[] ----[R] ----Names of all the children of this element. These are the identifiers that can be used to access the child as an attribute of this element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.children_names) ----@field children_names string[] ----[RW] ----Makes it so right-clicking on this textfield clears and focuses it. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_and_focus_on_right_click) ---- ----_Can only be used if this is textfield or text-box_ ----@field clear_and_focus_on_right_click boolean ----[RW] ----The sprite to display on this sprite-button when it is clicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clicked_sprite) ---- ----_Can only be used if this is sprite-button_ ----@field clicked_sprite SpritePath ----[R] ----The number of columns in this table. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.column_count) ---- ----_Can only be used if this is table_ ----@field column_count uint ----[R] ----Direction of this element's layout. May be either `"horizontal"` or `"vertical"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction) ---- ----_Can only be used if this is frame, flow or line_ ----@field direction string ----[RW] ----The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level. ---- ----**Note:** Only top-level elements in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen) can be `drag_target`s. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target) ---- ----### Example ----This creates a frame that contains a dragging handle which can move the frame. ----``` ----local frame = player.gui.screen.add{type="frame", direction="vertical"} ----local dragger = frame.add{type="empty-widget", style="draggable_space"} ----dragger.style.size = {128, 24} ----dragger.drag_target = frame ----``` ---- ----_Can only be used if this is flow, frame, label, table or empty-widget_ ----@field drag_target? LuaGuiElement ----[RW] ----Whether this table should draw a horizontal grid line below the first table row. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_horizontal_line_after_headers) ---- ----_Can only be used if this is table_ ----@field draw_horizontal_line_after_headers boolean ----[RW] ----Whether this table should draw horizontal grid lines. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_horizontal_lines) ---- ----_Can only be used if this is table_ ----@field draw_horizontal_lines boolean ----[RW] ----Whether this table should draw vertical grid lines. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_vertical_lines) ---- ----_Can only be used if this is table_ ----@field draw_vertical_lines boolean ----[RW] ----The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`. ---- ----**Note:** Writing to this field does not change or clear the currently selected element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_filters) ---- ----### Example ----This will configure a choose-elem-button of type `"entity"` to only show items of type `"furnace"`. ----``` ----button.elem_filters = {{filter = "type", type = "furnace"}} ----``` ---- ----### Example ----Then, there are some types of filters that work on a specific kind of attribute. The following will configure a choose-elem-button of type `"entity"` to only show entities that have their `"hidden"` [flags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) set. ----``` ----button.elem_filters = {{filter = "hidden"}} ----``` ---- ----### Example ----Lastly, these filters can be combined at will, taking care to specify how they should be combined (either `"and"` or `"or"`. The following will filter for any `"entities"` that are `"furnaces"` and that are not `"hidden"`. ----``` ----button.elem_filters = {{filter = "type", type = "furnace"}, {filter = "hidden", invert = true, mode = "and"}} ----``` ---- ----_Can only be used if this is choose-elem-button_ ----@field elem_filters? PrototypeFilter ----[R] ----The elem type of this choose-elem-button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_type) ---- ----_Can only be used if this is choose-elem-button_ ----@field elem_type string ----[RW] ----The elem value of this choose-elem-button, if any. ---- ----**Note:** The `"signal"` type operates with [SignalID](https://lua-api.factorio.com/latest/Concepts.html#SignalID), while all other types use strings. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_value) ---- ----_Can only be used if this is choose-elem-button_ ----@field elem_value? string|SignalID ----[RW] ----Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.enabled) ----@field enabled boolean ----[RW] ----The entity associated with this entity-preview, camera, minimap, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) ---- ----_Can only be used if this is entity-preview, camera or minimap_ ----@field entity? LuaEntity ----[RW] ----The force this minimap is using, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force) ---- ----_Can only be used if this is minimap_ ----@field force? string ----[R] ----The GUI this element is a child of. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.gui) ----@field gui LuaGui ----[RW] ----Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.horizontal_scroll_policy) ---- ----_Can only be used if this is scroll-pane_ ----@field horizontal_scroll_policy string ----[RW] ----The sprite to display on this sprite-button when it is hovered. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.hovered_sprite) ---- ----_Can only be used if this is sprite-button_ ----@field hovered_sprite SpritePath ----[RW] ----Whether this GUI element is ignored by interaction. This makes clicks on this element 'go through' to the GUI element or even the game surface below it. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.ignored_by_interaction) ----@field ignored_by_interaction boolean ----[R] ----The index of this GUI element (unique amongst the GUI elements of a LuaPlayer). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index) ----@field index uint ----[RW] ----Whether this textfield displays as a password field, which renders all characters as `*`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.is_password) ---- ----_Can only be used if this is textfield_ ----@field is_password boolean ----[RW] ----The items in this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items) ---- ----_Can only be used if this is drop-down or list-box_ ----@field items LocalisedString[] ----[RW] ----The text shown for the left switch label. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.left_label_caption) ---- ----_Can only be used if this is switch_ ----@field left_label_caption LocalisedString ----[RW] ----The tooltip shown on the left switch label. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.left_label_tooltip) ---- ----_Can only be used if this is switch_ ----@field left_label_tooltip LocalisedString ----[RW] ----The location of this widget when stored in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen). `nil` if not set or not in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.location) ----@field location? GuiLocation ----[RW] ----Whether this choose-elem-button can be changed by the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.locked) ---- ----_Can only be used if this is choose-elem-button_ ----@field locked boolean ----[RW] ----Whether this textfield loses focus after [defines.events.on_gui_confirmed](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_confirmed) is fired. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.lose_focus_on_confirm) ---- ----_Can only be used if this is textfield_ ----@field lose_focus_on_confirm boolean ----[RW] ----The player index this minimap is using. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.minimap_player_index) ---- ----_Can only be used if this is minimap_ ----@field minimap_player_index uint ----[RW] ----The mouse button filters for this button or sprite-button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter) ---- ----_Can only be used if this is button or sprite-button_ ----@field mouse_button_filter MouseButtonFlags ----[RW] ----The name of this element. `""` if no name was set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.name) ---- ----### Example ----``` ----game.player.gui.top.greeting.name == "greeting" ----``` ----@field name string ----[RW] ----The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.number) ---- ----_Can only be used if this is sprite-button_ ----@field number double ----[RW] ----Whether this textfield is limited to only numberic characters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.numeric) ---- ----_Can only be used if this is textfield_ ----@field numeric 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/LuaGuiElement.html#LuaGuiElement.object_name) ----@field object_name string ----[R] ----The direct parent of this element. `nil` if this is a top-level element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.parent) ----@field parent? LuaGuiElement ----[R] ----Index into [LuaGameScript::players](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) specifying the player who owns this element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.player_index) ----@field player_index uint ----[RW] ----The position this camera or minimap is focused on, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position) ---- ----_Can only be used if this is camera or minimap_ ----@field position MapPosition ----[RW] ----Whether this text-box is read-only. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.read_only) ---- ----_Can only be used if this is text-box_ ----@field read_only boolean ----[RW] ----Whether the sprite widget should resize according to the sprite in it. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.resize_to_sprite) ---- ----_Can only be used if this is sprite_ ----@field resize_to_sprite boolean ----[RW] ----The text shown for the right switch label. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.right_label_caption) ---- ----_Can only be used if this is switch_ ----@field right_label_caption LocalisedString ----[RW] ----The tooltip shown on the right switch label. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.right_label_tooltip) ---- ----_Can only be used if this is switch_ ----@field right_label_tooltip LocalisedString ----[RW] ----Whether the contents of this text-box are selectable. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selectable) ---- ----_Can only be used if this is text-box_ ----@field selectable boolean ----[RW] ----The selected index for this dropdown or listbox. Returns `0` if none is selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index) ---- ----_Can only be used if this is drop-down or list-box_ ----@field selected_index uint ----[RW] ----The selected tab index for this tabbed pane, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_tab_index) ---- ----_Can only be used if this is tabbed-pane_ ----@field selected_tab_index? uint ----[RW] ----Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.show_percent_for_small_numbers) ---- ----_Can only be used if this is sprite-button_ ----@field show_percent_for_small_numbers boolean ----[RW] ----The value of this slider element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.slider_value) ---- ----_Can only be used if this is slider_ ----@field slider_value double ----[RW] ----The sprite to display on this sprite-button or sprite in the default state. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite) ---- ----_Can only be used if this is sprite-button or sprite_ ----@field sprite SpritePath ----[RW] ----Is this checkbox or radiobutton checked? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state) ---- ----_Can only be used if this is checkbox or radiobutton_ ----@field state boolean ----[RW] ----The style of this element. When read, this evaluates to a [LuaStyle](https://lua-api.factorio.com/latest/LuaStyle.html). For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.style) ----@field style LuaStyle|string ----[RW] ----The surface index this camera or minimap is using. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index) ---- ----_Can only be used if this is camera or minimap_ ----@field surface_index uint ----[RW] ----The switch state (left, none, right) for this switch. ---- ----**Note:** If [LuaGuiElement::allow_none_state](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state) is false this can't be set to `"none"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.switch_state) ---- ----_Can only be used if this is switch_ ----@field switch_state string ----[R] ----The tabs and contents being shown in this tabbed-pane. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tabs) ---- ----_Can only be used if this is tabbed-pane_ ----@field tabs TabAndContent[] ----[RW] ----The tags associated with this LuaGuiElement. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tags) ----@field tags Tags ----[RW] ----The text contained in this textfield or text-box. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.text) ---- ----_Can only be used if this is textfield or text-box_ ----@field text string ----[RW] ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tooltip) ----@field tooltip LocalisedString ----[R] ----The type of this GUI element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.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/LuaGuiElement.html#LuaGuiElement.valid) ----@field valid boolean ----[RW] ----How much this progress bar is filled. It is a value in the range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.value) ---- ----_Can only be used if this is progressbar_ ----@field value double ----[RW] ----Whether the content of this table should be vertically centered. Overrides [LuaStyle::column_alignments](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.column_alignments). Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.vertical_centering) ---- ----_Can only be used if this is table_ ----@field vertical_centering boolean ----[RW] ----Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.vertical_scroll_policy) ---- ----_Can only be used if this is scroll-pane_ ----@field vertical_scroll_policy string ----[RW] ----Sets whether this GUI element is visible or completely hidden, taking no space in the layout. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.visible) ----@field visible boolean ----[RW] ----Whether this text-box will word-wrap automatically. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.word_wrap) ---- ----_Can only be used if this is text-box_ ----@field word_wrap boolean ----[RW] ----The zoom this camera or minimap is using. This value must be positive. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom) ---- ----_Can only be used if this is camera or minimap_ ----@field zoom double ----[R] ----The indexing operator. Gets children by name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index) ----@field [string|uint]? LuaGuiElement -local LuaGuiElement={ ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@class LuaGuiElement.add_param ----The kind of element to add. Has to be one of the GUI element types listed at the top of this page. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field type string ----Name of the child element. It must be unique within the parent element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field name? string ----Text displayed on the child element. For frames, this is their title. For other elements, like buttons or labels, this is the content. Whilst this attribute may be used on all elements, it doesn't make sense for tables and flows as they won't display it. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field caption? LocalisedString ----Tooltip of the child element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field tooltip? LocalisedString ----Whether the child element is enabled. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field enabled? boolean ----Whether the child element is visible. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field visible? boolean ----Whether the child element is ignored by interaction. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field ignored_by_interaction? boolean ----The name of the style prototype to apply to the new element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field style? string ----[Tags](https://lua-api.factorio.com/latest/Concepts.html#Tags) associated with the child element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field tags? Tags ----Location in its parent that the child element should slot into. By default, the child will be appended onto the end. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field index? uint ----Where to position the child element when in the `relative` element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field anchor? GuiAnchor ----Applies to **"button"**: (optional) ----Which mouse buttons the button responds to. Defaults to `"left-and-right"`. ---- ----Applies to **"sprite-button"**: (optional) ----The mouse buttons that the button responds to. Defaults to `"left-and-right"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field mouse_button_filter? MouseButtonFlags ----Applies to **"flow"**: (optional) ----The initial direction of the flow's layout. See [LuaGuiElement::direction](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). Defaults to `"horizontal"`. ---- ----Applies to **"frame"**: (optional) ----The initial direction of the frame's layout. See [LuaGuiElement::direction](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). Defaults to `"horizontal"`. ---- ----Applies to **"line"**: (optional) ----The initial direction of the line. Defaults to `"horizontal"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field direction? string ----Applies to **"table"**: (required) ----Number of columns. This can't be changed after the table is created. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field column_count uint ----Applies to **"table"**: (optional) ----Whether the table should draw vertical grid lines. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field draw_vertical_lines? boolean ----Applies to **"table"**: (optional) ----Whether the table should draw horizontal grid lines. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field draw_horizontal_lines? boolean ----Applies to **"table"**: (optional) ----Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field draw_horizontal_line_after_headers? boolean ----Applies to **"table"**: (optional) ----Whether the content of the table should be vertically centered. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field vertical_centering? boolean ----Applies to **"textfield"**: (optional) ----The initial text contained in the textfield. ---- ----Applies to **"text-box"**: (optional) ----The initial text contained in the text-box. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field text? string ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field numeric? boolean ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field allow_decimal? boolean ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field allow_negative? boolean ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field is_password? boolean ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field lose_focus_on_confirm? boolean ----Applies to **"textfield"**: (optional) ----Defaults to `false`. ---- ----Applies to **"text-box"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field clear_and_focus_on_right_click? boolean ----Applies to **"progressbar"**: (optional) ----The initial value of the progressbar, in the range [0, 1]. Defaults to `0`. ---- ----Applies to **"slider"**: (optional) ----The initial value for the slider. Defaults to `minimum_value`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field value? double ----Applies to **"checkbox"**: (required) ----The initial checked-state of the checkbox. ---- ----Applies to **"radiobutton"**: (required) ----The initial checked-state of the radiobutton. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field state boolean ----Applies to **"sprite-button"**: (optional) ----Path to the image to display on the button. ---- ----Applies to **"sprite"**: (optional) ----Path to the image to display. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field sprite? SpritePath ----Applies to **"sprite-button"**: (optional) ----Path to the image to display on the button when it is hovered. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field hovered_sprite? SpritePath ----Applies to **"sprite-button"**: (optional) ----Path to the image to display on the button when it is clicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field clicked_sprite? SpritePath ----Applies to **"sprite-button"**: (optional) ----The number shown on the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field number? double ----Applies to **"sprite-button"**: (optional) ----Formats small numbers as percentages. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field show_percent_for_small_numbers? boolean ----Applies to **"sprite"**: (optional) ----Whether the widget should resize according to the sprite in it. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field resize_to_sprite? boolean ----Applies to **"scroll-pane"**: (optional) ----Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field horizontal_scroll_policy? string ----Applies to **"scroll-pane"**: (optional) ----Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field vertical_scroll_policy? string ----Applies to **"drop-down"**: (optional) ----The initial items in the dropdown. ---- ----Applies to **"list-box"**: (optional) ----The initial items in the listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field items? LocalisedString[] ----Applies to **"drop-down"**: (optional) ----The index of the initially selected item. Defaults to 0. ---- ----Applies to **"list-box"**: (optional) ----The index of the initially selected item. Defaults to 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field selected_index? uint ----Applies to **"camera"**: (required) ----The position the camera centers on. ---- ----Applies to **"minimap"**: (optional) ----The position the minimap centers on. Defaults to the player's current position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field position MapPosition ----Applies to **"camera"**: (optional) ----The surface that the camera will render. Defaults to the player's current surface. ---- ----Applies to **"minimap"**: (optional) ----The surface the camera will render. Defaults to the player's current surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field surface_index? uint ----Applies to **"camera"**: (optional) ----The initial camera zoom. Defaults to `0.75`. ---- ----Applies to **"minimap"**: (optional) ----The initial camera zoom. Defaults to `0.75`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field zoom? double ----Applies to **"choose-elem-button"**: (required) ----The type of the button - one of the following values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field elem_type string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"item"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field item? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"tile"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field tile? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"entity"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field entity? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"signal"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field signal? SignalID ----Applies to **"choose-elem-button"**: (optional) ----If type is `"fluid"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field fluid? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"recipe"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field recipe? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"decorative"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field decorative? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"item-group"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field item-group? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"achievement"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field achievement? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"equipment"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field equipment? string ----Applies to **"choose-elem-button"**: (optional) ----If type is `"technology"` - the default value for the button. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field technology? string ----Applies to **"choose-elem-button"**: (optional) ----Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field elem_filters? PrototypeFilter ----Applies to **"slider"**: (optional) ----The minimum value for the slider. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field minimum_value? double ----Applies to **"slider"**: (optional) ----The maximum value for the slider. Defaults to `30`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field maximum_value? double ----Applies to **"slider"**: (optional) ----The minimum value the slider can move. Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field value_step? double ----Applies to **"slider"**: (optional) ----Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field discrete_slider? boolean ----Applies to **"slider"**: (optional) ----Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field discrete_values? boolean ----Applies to **"minimap"**: (optional) ----The player index the map should use. Defaults to the current player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field chart_player_index? uint ----Applies to **"minimap"**: (optional) ----The force this minimap should use. Defaults to the player's current force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field force? string ----Applies to **"tab"**: (optional) ----The text to display after the normal tab text (designed to work with numbers). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field badge_text? LocalisedString ----Applies to **"switch"**: (optional) ----Possible values are `"left"`, `"right"`, or `"none"`. If set to "none", `allow_none_state` must be `true`. Defaults to `"left"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field switch_state? string ----Applies to **"switch"**: (optional) ----Whether the switch can be set to a middle state. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field allow_none_state? boolean ----Applies to **"switch"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field left_label_caption? LocalisedString ----Applies to **"switch"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field left_label_tooltip? LocalisedString ----Applies to **"switch"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field right_label_caption? LocalisedString ----Applies to **"switch"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@field right_label_tooltip? LocalisedString - - ----Add a new child element to this GuiElement. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ----@param param LuaGuiElement.add_param ----@return LuaGuiElement@The GUI element that was added. -add=function(param)end, ----Inserts a string at the end or at the given index of this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item) ---- ----_Can only be used if this is drop-down or list-box_ ----@param string LocalisedString@The text to insert. ----@param index uint?@The index at which to insert the item. -add_item=function(string,index)end, ----Adds the given tab and content widgets to this tabbed pane as a new tab. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_tab) ---- ----_Can only be used if this is tabbed-pane_ ----@param tab LuaGuiElement@The tab to add, must be a GUI element of type "tab". ----@param content LuaGuiElement@The content to show when this tab is selected. Can be any type of GUI element. -add_tab=function(tab,content)end, ----Moves this GUI element to the "front" so it will draw over other elements. ---- ----**Note:** Only works for elements in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.bring_to_front) -bring_to_front=function()end, ----Remove children of this element. Any [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroyed elements become invalid after this operation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear) ---- ----### Example ----``` ----game.player.gui.top.clear() ----``` -clear=function()end, ----Removes the items in this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items) ---- ----_Can only be used if this is drop-down or list-box_ -clear_items=function()end, ----Closes the dropdown list if this is a dropdown and it is open. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.close_dropdown) -close_dropdown=function()end, ----Remove this element, along with its children. Any [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroyed elements become invalid after this operation. ---- ----**Note:** The top-level GUI elements - [LuaGui::top](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.top), [LuaGui::left](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.left), [LuaGui::center](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.center) and [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen) - can't be destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.destroy) ---- ----### Example ----``` ----game.player.gui.top.greeting.destroy() ----``` -destroy=function()end, ----Focuses this GUI element if possible. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.focus) -focus=function()end, ----Forces this frame to re-auto-center. Only works on frames stored directly in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen). ---- ----**Events:** ---- * Will raise [on_gui_location_changed](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force_auto_center) ---- ----_Can only be used if this is frame_ -force_auto_center=function()end, ----Gets the index that this element has in its parent element. ---- ----**Note:** This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_index_in_parent) ----@return uint -get_index_in_parent=function()end, ----Gets the item at the given index from this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item) ---- ----_Can only be used if this is drop-down or list-box_ ----@param index uint@The index to get ----@return LocalisedString -get_item=function(index)end, ----The mod that owns this Gui element or `nil` if it's owned by the scenario script. ---- ----**Note:** This has a not-super-expensive, but non-free cost to get. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_mod) ----@return string? -get_mod=function()end, ----Returns whether this slider only allows being moved to discrete positions. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_discrete_slider) ----@return boolean -get_slider_discrete_slider=function()end, ----Returns whether this slider only allows discrete values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_discrete_values) ----@return boolean -get_slider_discrete_values=function()end, ----Gets this sliders maximum value. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_maximum) ----@return double -get_slider_maximum=function()end, ----Gets this sliders minimum value. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_minimum) ----@return double -get_slider_minimum=function()end, ----Gets the minimum distance this slider can move. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_value_step) ----@return double -get_slider_value_step=function()end, ----All methods and properties that this object supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.help) ----@return string -help=function()end, ----Removes the item at the given index from this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item) ---- ----_Can only be used if this is drop-down or list-box_ ----@param index uint@The index -remove_item=function(index)end, ----Removes the given tab and its associated content from this tabbed pane. ---- ----**Note:** Removing a tab does not destroy the tab or the tab contents. It just removes them from the view. ---- ----**Note:** When removing tabs, [LuaGuiElement::selected_tab_index](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_tab_index) needs to be manually updated. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_tab) ---- ----_Can only be used if this is tabbed-pane_ ----@param tab LuaGuiElement@The tab to remove. If not given, it removes all tabs. -remove_tab=function(tab)end, ----Scrolls this scroll bar to the bottom. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_bottom) ---- ----_Can only be used if this is scroll-pane or text-box_ -scroll_to_bottom=function()end, ----Scrolls this scroll bar such that the specified GUI element is visible to the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_element) ---- ----_Can only be used if this is scroll-pane_ ----@param element LuaGuiElement@The element to scroll to. ----@param scroll_mode string?@Where the element should be positioned in the scroll-pane. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`. -scroll_to_element=function(element,scroll_mode)end, ----Scrolls the scroll bar such that the specified listbox item is visible to the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_item) ---- ----_Can only be used if this is list-box_ ----@param index int@The item index to scroll to. ----@param scroll_mode string?@Where the item should be positioned in the list-box. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`. -scroll_to_item=function(index,scroll_mode)end, ----Scrolls this scroll bar to the left. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_left) ---- ----_Can only be used if this is scroll-pane or text-box_ -scroll_to_left=function()end, ----Scrolls this scroll bar to the right. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_right) ---- ----_Can only be used if this is scroll-pane or text-box_ -scroll_to_right=function()end, ----Scrolls this scroll bar to the top. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_top) ---- ----_Can only be used if this is scroll-pane or text-box_ -scroll_to_top=function()end, ----Selects a range of text in this textbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.select) ---- ----### Example ----Select the characters `amp` from `example`: ----``` ----textbox.select(3, 5) ----``` ---- ----### Example ----Move the cursor to the start of the text box: ----``` ----textbox.select(1, 0) ----``` ---- ----_Can only be used if this is textfield or text-box_ ----@param start int@The index of the first character to select ----@param end_ int@The index of the last character to select -select=function(start,end_)end, ----Selects all the text in this textbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.select_all) ---- ----_Can only be used if this is textfield or text-box_ -select_all=function()end, ----Sets the given string at the given index in this dropdown or listbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item) ---- ----_Can only be used if this is drop-down or list-box_ ----@param index uint@The index whose text to replace. ----@param string LocalisedString@The text to set at the given index. -set_item=function(index,string)end, ----Sets whether this slider only allows being moved to discrete positions. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_discrete_slider) ----@param value boolean -set_slider_discrete_slider=function(value)end, ----Sets whether this slider only allows discrete values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_discrete_values) ----@param value boolean -set_slider_discrete_values=function(value)end, ----Sets this sliders minimum and maximum values. ---- ----**Note:** The minimum can't be >= the maximum. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_minimum_maximum) ----@param minimum double ----@param maximum double -set_slider_minimum_maximum=function(minimum,maximum)end, ----Sets the minimum distance this slider can move. ---- ----**Note:** The minimum distance can't be > (max - min). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_value_step) ----@param value double -set_slider_value_step=function(value)end, ----Swaps the children at the given indices in this element. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.swap_children) ----@param index_1 uint@The index of the first child. ----@param index_2 uint@The index of the second child. -swap_children=function(index_1,index_2)end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua b/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua deleted file mode 100644 index 7ba8043..0000000 --- a/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua deleted file mode 100644 index 499a8dc..0000000 --- a/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua b/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua deleted file mode 100644 index 1d8ceed..0000000 --- a/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaInventory.lua b/.vscode/factorio/runtime-api-LuaInventory.lua deleted file mode 100644 index 674143c..0000000 --- a/.vscode/factorio/runtime-api-LuaInventory.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaItemPrototype.lua b/.vscode/factorio/runtime-api-LuaItemPrototype.lua deleted file mode 100644 index 7b7e30e..0000000 --- a/.vscode/factorio/runtime-api-LuaItemPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaItemStack.lua b/.vscode/factorio/runtime-api-LuaItemStack.lua deleted file mode 100644 index 2bffa2f..0000000 --- a/.vscode/factorio/runtime-api-LuaItemStack.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua b/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua deleted file mode 100644 index 633cc26..0000000 --- a/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua b/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua deleted file mode 100644 index 6866fb6..0000000 --- a/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua +++ /dev/null @@ -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:{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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLogisticCell.lua b/.vscode/factorio/runtime-api-LuaLogisticCell.lua deleted file mode 100644 index 7294d0b..0000000 --- a/.vscode/factorio/runtime-api-LuaLogisticCell.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua deleted file mode 100644 index e155051..0000000 --- a/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua b/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua deleted file mode 100644 index a4dd1d7..0000000 --- a/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaLogisticPoint.lua b/.vscode/factorio/runtime-api-LuaLogisticPoint.lua deleted file mode 100644 index 4ef9766..0000000 --- a/.vscode/factorio/runtime-api-LuaLogisticPoint.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua b/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua deleted file mode 100644 index 83e9283..0000000 --- a/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua b/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua deleted file mode 100644 index 4b09205..0000000 --- a/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua deleted file mode 100644 index bfadf89..0000000 --- a/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua b/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua deleted file mode 100644 index 46e7c67..0000000 --- a/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua b/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua deleted file mode 100644 index 9c74a0a..0000000 --- a/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaParticlePrototype.lua b/.vscode/factorio/runtime-api-LuaParticlePrototype.lua deleted file mode 100644 index 9f56a54..0000000 --- a/.vscode/factorio/runtime-api-LuaParticlePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaPermissionGroup.lua b/.vscode/factorio/runtime-api-LuaPermissionGroup.lua deleted file mode 100644 index 9d1c569..0000000 --- a/.vscode/factorio/runtime-api-LuaPermissionGroup.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaPermissionGroups.lua b/.vscode/factorio/runtime-api-LuaPermissionGroups.lua deleted file mode 100644 index fdcccae..0000000 --- a/.vscode/factorio/runtime-api-LuaPermissionGroups.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaPlayer.lua b/.vscode/factorio/runtime-api-LuaPlayer.lua deleted file mode 100644 index 9f8fb08..0000000 --- a/.vscode/factorio/runtime-api-LuaPlayer.lua +++ /dev/null @@ -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 ----[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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaProfiler.lua b/.vscode/factorio/runtime-api-LuaProfiler.lua deleted file mode 100644 index 4519bac..0000000 --- a/.vscode/factorio/runtime-api-LuaProfiler.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua deleted file mode 100644 index 6e4e352..0000000 --- a/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRCON.lua b/.vscode/factorio/runtime-api-LuaRCON.lua deleted file mode 100644 index fcfab71..0000000 --- a/.vscode/factorio/runtime-api-LuaRCON.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua deleted file mode 100644 index db087f7..0000000 --- a/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRailPath.lua b/.vscode/factorio/runtime-api-LuaRailPath.lua deleted file mode 100644 index 659b629..0000000 --- a/.vscode/factorio/runtime-api-LuaRailPath.lua +++ /dev/null @@ -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 ----[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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua deleted file mode 100644 index 1873eb0..0000000 --- a/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRandomGenerator.lua b/.vscode/factorio/runtime-api-LuaRandomGenerator.lua deleted file mode 100644 index 709a286..0000000 --- a/.vscode/factorio/runtime-api-LuaRandomGenerator.lua +++ /dev/null @@ -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 - - diff --git a/.vscode/factorio/runtime-api-LuaRecipe.lua b/.vscode/factorio/runtime-api-LuaRecipe.lua deleted file mode 100644 index ba56776..0000000 --- a/.vscode/factorio/runtime-api-LuaRecipe.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua deleted file mode 100644 index 08bee72..0000000 --- a/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRecipePrototype.lua b/.vscode/factorio/runtime-api-LuaRecipePrototype.lua deleted file mode 100644 index 68e5321..0000000 --- a/.vscode/factorio/runtime-api-LuaRecipePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRemote.lua b/.vscode/factorio/runtime-api-LuaRemote.lua deleted file mode 100644 index 8ad3c5f..0000000 --- a/.vscode/factorio/runtime-api-LuaRemote.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRendering.lua b/.vscode/factorio/runtime-api-LuaRendering.lua deleted file mode 100644 index cc35ca4..0000000 --- a/.vscode/factorio/runtime-api-LuaRendering.lua +++ /dev/null @@ -1,1356 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaRendering --- This file is automatically generated. Edits will be overwritten. - ----**Global Description:** ----Allows rendering of geometric shapes, text and sprites in the game world. ---- ----**Class Description:** ----Allows rendering of geometric shapes, text and sprites in the game world. Each render object is identified by an id that is universally unique for the lifetime of a whole game. ---- ----**Note:** If an entity target of an object is destroyed or changes surface, then the object is also destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html) ----@class LuaRendering:LuaObject ----[R] ----This object's name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.object_name) ----@field object_name string -rendering={ ----Reorder this object so that it is drawn in front of the already existing objects. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.bring_to_front) ----@param id uint64 -bring_to_front=function(id)end, ----Destroys all render objects. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.clear) ----@param mod_name string?@If provided, only the render objects created by this mod are destroyed. -clear=function(mod_name)end, ----Destroy the object with the given id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.destroy) ----@param id uint64 -destroy=function(id)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@class LuaRendering.draw_animation_param ----Name of an [animation prototype](https://wiki.factorio.com/Prototype/Animation). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field animation string ----The orientation of the animation. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field orientation? RealOrientation ----Horizontal scale of the animation. Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field x_scale? double ----Vertical scale of the animation. Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field y_scale? double ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field tint? Color ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field render_layer? RenderLayer ----How many frames the animation goes forward per tick. Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field animation_speed? double ----Offset of the animation in frames. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field animation_offset? double ----If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field orientation_target? MapPosition|LuaEntity ----Only used if `orientation_target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field orientation_target_offset? Vector ----Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field oriented_offset? Vector ----Center of the animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field visible? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@field only_in_alt_mode? boolean - - ----Create an animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_animation) ----@param param LuaRendering.draw_animation_param ----@return uint64@Id of the render object -draw_animation=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@class LuaRendering.draw_arc_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field color Color ----The radius of the outer edge of the arc, in tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field max_radius double ----The radius of the inner edge of the arc, in tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field min_radius double ----Where the arc starts, in radian. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field start_angle float ----The angle of the arc, in radian. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field angle float ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field draw_on_ground? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@field only_in_alt_mode? boolean - - ----Create an arc. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_arc) ----@param param LuaRendering.draw_arc_param ----@return uint64@Id of the render object -draw_arc=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@class LuaRendering.draw_circle_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field color Color ----In tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field radius double ----Width of the outline, used only if filled = false. Value is in pixels (32 per tile). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field width? float ----If the circle should be filled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field filled boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field draw_on_ground? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@field only_in_alt_mode? boolean - - ----Create a circle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_circle) ----@param param LuaRendering.draw_circle_param ----@return uint64@Id of the render object -draw_circle=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@class LuaRendering.draw_light_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field sprite SpritePath ----The orientation of the light. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field orientation? RealOrientation ----Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field scale? float ----Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field intensity? float ----The minimum darkness at which this light is rendered. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field minimum_darkness? float ----If this light has the same orientation as the entity target, default is false. Note that `orientation` is still applied to the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field oriented? boolean ----Defaults to white (no tint). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field color? Color ----Center of the light. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field visible? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@field only_in_alt_mode? boolean - - ----Create a light. ---- ----**Note:** The base game uses the utility sprites `light_medium` and `light_small` for lights. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light) ----@param param LuaRendering.draw_light_param ----@return uint64@Id of the render object -draw_light=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@class LuaRendering.draw_line_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field color Color ----In pixels (32 per tile). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field width float ----Length of the gaps that this line has, in tiles. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field gap_length? double ----Length of the dashes that this line has. Used only if gap_length > 0. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field dash_length? double ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field from MapPosition|LuaEntity ----Only used if `from` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field from_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field to MapPosition|LuaEntity ----Only used if `to` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field to_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field draw_on_ground? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ----@field only_in_alt_mode? boolean - - ----Create a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_line) ---- ----### Example ----Draw a white and 2 pixel wide line from {0, 0} to {2, 2}. ----``` ----rendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2} ----``` ---- ----### Example ----Draw a red and 3 pixel wide line from {0, 0} to {0, 5}. The line has 1 tile long dashes and gaps. ----``` ----rendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {0, 5}, color = {r = 1}, width = 3, gap_length = 1, dash_length = 1} ----``` ----@param param LuaRendering.draw_line_param ----@return uint64@Id of the render object -draw_line=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@class LuaRendering.draw_polygon_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field color Color ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field vertices ScriptRenderVertexTarget[] ----Acts like an offset applied to all vertices that are not set to an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field target? MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field target_offset? Vector ----The orientation applied to all vertices. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field orientation? RealOrientation ----If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that `orientation` is still applied. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field orientation_target? MapPosition|LuaEntity ----Only used if `orientation_target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field orientation_target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field draw_on_ground? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@field only_in_alt_mode? boolean - - ----Create a triangle mesh defined by a triangle strip. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_polygon) ----@param param LuaRendering.draw_polygon_param ----@return uint64@Id of the render object -draw_polygon=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@class LuaRendering.draw_rectangle_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field color Color ----Width of the outline, used only if filled = false. Value is in pixels (32 per tile). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field width? float ----If the rectangle should be filled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field filled boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field left_top MapPosition|LuaEntity ----Only used if `left_top` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field left_top_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field right_bottom MapPosition|LuaEntity ----Only used if `right_bottom` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field right_bottom_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field draw_on_ground? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@field only_in_alt_mode? boolean - - ----Create a rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_rectangle) ----@param param LuaRendering.draw_rectangle_param ----@return uint64@Id of the render object -draw_rectangle=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@class LuaRendering.draw_sprite_param ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field sprite SpritePath ----The orientation of the sprite. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field orientation? RealOrientation ----Horizontal scale of the sprite. Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field x_scale? double ----Vertical scale of the sprite. Default is 1. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field y_scale? double ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field tint? Color ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field render_layer? RenderLayer ----If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field orientation_target? MapPosition|LuaEntity ----Only used if `orientation_target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field orientation_target_offset? Vector ----Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field oriented_offset? Vector ----Center of the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field surface SurfaceIdentification ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field visible? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ----@field only_in_alt_mode? boolean - - ----Create a sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_sprite) ---- ----### Example ----This will draw an iron plate icon at the character's feet. The sprite will move together with the character. ----``` ----rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, surface = game.player.surface} ----``` ---- ----### Example ----This will draw an iron plate icon at the character's head. The sprite will move together with the character. ----``` ----rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, target_offset = {0, -2}, surface = game.player.surface} ----``` ----@param param LuaRendering.draw_sprite_param ----@return uint64@Id of the render object -draw_sprite=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@class LuaRendering.draw_text_param ----The text to display. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field text LocalisedString ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field surface SurfaceIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field target_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field color Color ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field scale? double ----Name of font to use. Defaults to the same font as flying-text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field font? string ----In ticks. Defaults to living forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field time_to_live? uint ----The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field forces? ForceIdentification[] ----The players that this object is rendered to. Passing `nil` or an empty table will render it to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field players? PlayerIdentification[] ----If this is rendered to anyone at all. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field visible? boolean ----If this should be drawn below sprites and entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field draw_on_ground? boolean ----The orientation of the text. Default is 0. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field orientation? RealOrientation ----Defaults to "left". Other options are "right" and "center". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field alignment? string ----Defaults to "top". Other options are "middle", "baseline" and "bottom". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field vertical_alignment? string ----Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field scale_with_zoom? boolean ----If this should only be rendered in alt mode. Defaults to false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@field only_in_alt_mode? boolean - - ----Create a text. ---- ----**Note:** Not all fonts support scaling. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text) ----@param param LuaRendering.draw_text_param ----@return uint64@Id of the render object -draw_text=function(param)end, ----Get the alignment of the text with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_alignment) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@return string?@`nil` if the object is not a text. -get_alignment=function(id)end, ----Gets an array of all valid object ids. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_all_ids) ----@param mod_name string?@If provided, get only the render objects created by this mod. ----@return uint64[] -get_all_ids=function(mod_name)end, ----Get the angle of the arc with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_angle) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@return float?@Angle in radian. `nil` if the object is not a arc. -get_angle=function(id)end, ----Get the animation prototype name of the animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_animation) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@return string?@`nil` if the object is not an animation. -get_animation=function(id)end, ----Get the animation offset of the animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_animation_offset) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@return double?@Animation offset in frames. `nil` if the object is not an animation. -get_animation_offset=function(id)end, ----Get the animation speed of the animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_animation_speed) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@return double?@Animation speed in frames per tick. `nil` if the object is not an animation. -get_animation_speed=function(id)end, ----Get the color or tint of the object with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_color) ---- ----_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@return Color?@`nil` if the object does not support color. -get_color=function(id)end, ----Get the dash length of the line with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_dash_length) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@return double?@`nil` if the object is not a line. -get_dash_length=function(id)end, ----Get whether this is being drawn on the ground, under most entities and sprites. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_draw_on_ground) ---- ----_Can only be used if this is Text, Line, Circle, Rectangle, Arc or Polygon_ ----@param id uint64 ----@return boolean -get_draw_on_ground=function(id)end, ----Get if the circle or rectangle with this id is filled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_filled) ---- ----_Can only be used if this is Circle or Rectangle_ ----@param id uint64 ----@return boolean?@`nil` if the object is not a circle or rectangle. -get_filled=function(id)end, ----Get the font of the text with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_font) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@return string?@`nil` if the object is not a text. -get_font=function(id)end, ----Get the forces that the object with this id is rendered to or `nil` if visible to all forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_forces) ----@param id uint64 ----@return LuaForce[]? -get_forces=function(id)end, ----Get from where the line with this id is drawn. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_from) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if this object is not a line. -get_from=function(id)end, ----Get the length of the gaps in the line with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_gap_length) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@return double?@`nil` if the object is not a line. -get_gap_length=function(id)end, ----Get the intensity of the light with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_intensity) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@return float?@`nil` if the object is not a light. -get_intensity=function(id)end, ----Get where top left corner of the rectangle with this id is drawn. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_left_top) ---- ----_Can only be used if this is Rectangle_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if the object is not a rectangle. -get_left_top=function(id)end, ----Get the radius of the outer edge of the arc with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_max_radius) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@return double?@`nil` if the object is not a arc. -get_max_radius=function(id)end, ----Get the radius of the inner edge of the arc with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_min_radius) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@return double?@`nil` if the object is not a arc. -get_min_radius=function(id)end, ----Get the minimum darkness at which the light with this id is rendered. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_minimum_darkness) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@return float?@`nil` if the object is not a light. -get_minimum_darkness=function(id)end, ----Get whether this is only rendered in alt-mode. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_only_in_alt_mode) ----@param id uint64 ----@return boolean -get_only_in_alt_mode=function(id)end, ----Get the orientation of the object with this id. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation) ---- ----_Can only be used if this is Text, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@return RealOrientation?@`nil` if the object is not a text, polygon, sprite, light or animation. -get_orientation=function(id)end, ----The object rotates so that it faces this target. Note that `orientation` is still applied to the object. Get the orientation_target of the object with this id. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation_target) ---- ----_Can only be used if this is Polygon, Sprite or Animation_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if no target or if this object is not a polygon, sprite, or animation. -get_orientation_target=function(id)end, ----Get if the light with this id is rendered has the same orientation as the target entity. Note that `orientation` is still applied to the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_oriented) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@return boolean?@`nil` if the object is not a light. -get_oriented=function(id)end, ----Offsets the center of the sprite or animation if `orientation_target` is given. This offset will rotate together with the sprite or animation. Get the oriented_offset of the sprite or animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_oriented_offset) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@return Vector?@`nil` if this object is not a sprite or animation. -get_oriented_offset=function(id)end, ----Get the players that the object with this id is rendered to or `nil` if visible to all players. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_players) ----@param id uint64 ----@return LuaPlayer[]? -get_players=function(id)end, ----Get the radius of the circle with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_radius) ---- ----_Can only be used if this is Circle_ ----@param id uint64 ----@return double?@`nil` if the object is not a circle. -get_radius=function(id)end, ----Get the render layer of the sprite or animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_render_layer) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@return RenderLayer?@`nil` if the object is not a sprite or animation. -get_render_layer=function(id)end, ----Get where bottom right corner of the rectangle with this id is drawn. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_right_bottom) ---- ----_Can only be used if this is Rectangle_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if the object is not a rectangle. -get_right_bottom=function(id)end, ----Get the scale of the text or light with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_scale) ---- ----_Can only be used if this is Text or Light_ ----@param id uint64 ----@return double?@`nil` if the object is not a text or light. -get_scale=function(id)end, ----Get if the text with this id scales with player zoom. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_scale_with_zoom) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@return boolean?@`nil` if the object is not a text. -get_scale_with_zoom=function(id)end, ----Get the sprite of the sprite or light with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_sprite) ---- ----_Can only be used if this is Sprite or Light_ ----@param id uint64 ----@return SpritePath?@`nil` if the object is not a sprite or light. -get_sprite=function(id)end, ----Get where the arc with this id starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_start_angle) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@return float?@Angle in radian. `nil` if the object is not a arc. -get_start_angle=function(id)end, ----The surface the object with this id is rendered on. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_surface) ----@param id uint64 ----@return LuaSurface -get_surface=function(id)end, ----Get where the object with this id is drawn. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_target) ---- ----_Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if the object does not support target. -get_target=function(id)end, ----Get the text that is displayed by the text with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_text) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@return LocalisedString?@`nil` if the object is not a text. -get_text=function(id)end, ----Get the time to live of the object with this id. This will be 0 if the object does not expire. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_time_to_live) ----@param id uint64 ----@return uint -get_time_to_live=function(id)end, ----Get where the line with this id is drawn to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_to) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@return ScriptRenderTarget?@`nil` if the object is not a line. -get_to=function(id)end, ----Gets the type of the given object. The types are "text", "line", "circle", "rectangle", "arc", "polygon", "sprite", "light" and "animation". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_type) ----@param id uint64 ----@return string -get_type=function(id)end, ----Get the vertical alignment of the text with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_vertical_alignment) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@return string?@`nil` if the object is not a text. -get_vertical_alignment=function(id)end, ----Get the vertices of the polygon with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_vertices) ---- ----_Can only be used if this is Polygon_ ----@param id uint64 ----@return ScriptRenderTarget[]?@`nil` if the object is not a polygon. -get_vertices=function(id)end, ----Get whether this is rendered to anyone at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_visible) ----@param id uint64 ----@return boolean -get_visible=function(id)end, ----Get the width of the object with this id. Value is in pixels (32 per tile). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_width) ---- ----_Can only be used if this is Line, Circle or Rectangle_ ----@param id uint64 ----@return float?@`nil` if the object does not support width. -get_width=function(id)end, ----Get the horizontal scale of the sprite or animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_x_scale) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@return double?@`nil` if the object is not a sprite or animation. -get_x_scale=function(id)end, ----Get the vertical scale of the sprite or animation with this id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_y_scale) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@return double?@`nil` if the object is not a sprite or animation. -get_y_scale=function(id)end, ----Does a font with this name exist? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.is_font_valid) ----@param font_name string ----@return boolean -is_font_valid=function(font_name)end, ----Does a valid object with this id exist? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.is_valid) ----@param id uint64 ----@return boolean -is_valid=function(id)end, ----Set the alignment of the text with this id. Does nothing if this object is not a text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_alignment) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@param alignment string@"left", "right" or "center". -set_alignment=function(id,alignment)end, ----Set the angle of the arc with this id. Does nothing if this object is not a arc. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_angle) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@param angle float@angle in radian -set_angle=function(id,angle)end, ----Set the animation prototype name of the animation with this id. Does nothing if this object is not an animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_animation) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@param animation string -set_animation=function(id,animation)end, ----Set the animation offset of the animation with this id. Does nothing if this object is not an animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_animation_offset) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@param animation_offset double@Animation offset in frames. -set_animation_offset=function(id,animation_offset)end, ----Set the animation speed of the animation with this id. Does nothing if this object is not an animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_animation_speed) ---- ----_Can only be used if this is Animation_ ----@param id uint64 ----@param animation_speed double@Animation speed in frames per tick. -set_animation_speed=function(id,animation_speed)end, ----Set the color or tint of the object with this id. Does nothing if this object does not support color. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_color) ---- ----_Can only be used if this is Text, Line, Circle, Rectangle, Arc, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@param color Color -set_color=function(id,color)end, ----Set the corners of the rectangle with this id. Does nothing if this object is not a rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_corners) ---- ----_Can only be used if this is Rectangle_ ----@param id uint64 ----@param left_top MapPosition|LuaEntity ----@param left_top_offset Vector ----@param right_bottom MapPosition|LuaEntity ----@param right_bottom_offset Vector -set_corners=function(id,left_top,left_top_offset,right_bottom,right_bottom_offset)end, ----Set the dash length of the line with this id. Does nothing if this object is not a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_dash_length) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@param dash_length double -set_dash_length=function(id,dash_length)end, ----Set the length of the dashes and the length of the gaps in the line with this id. Does nothing if this object is not a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_dashes) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@param dash_length double ----@param gap_length double -set_dashes=function(id,dash_length,gap_length)end, ----Set whether this is being drawn on the ground, under most entities and sprites. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_draw_on_ground) ---- ----_Can only be used if this is Text, Line, Circle, Rectangle, Arc or Polygon_ ----@param id uint64 ----@param draw_on_ground boolean -set_draw_on_ground=function(id,draw_on_ground)end, ----Set if the circle or rectangle with this id is filled. Does nothing if this object is not a circle or rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_filled) ---- ----_Can only be used if this is Circle or Rectangle_ ----@param id uint64 ----@param filled boolean -set_filled=function(id,filled)end, ----Set the font of the text with this id. Does nothing if this object is not a text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_font) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@param font string -set_font=function(id,font)end, ----Set the forces that the object with this id is rendered to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_forces) ----@param id uint64 ----@param forces ForceIdentification[]@Providing an empty array will set the object to be visible to all forces. -set_forces=function(id,forces)end, ----Set from where the line with this id is drawn. Does nothing if the object is not a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_from) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@param from MapPosition|LuaEntity ----@param from_offset Vector? -set_from=function(id,from,from_offset)end, ----Set the length of the gaps in the line with this id. Does nothing if this object is not a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_gap_length) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@param gap_length double -set_gap_length=function(id,gap_length)end, ----Set the intensity of the light with this id. Does nothing if this object is not a light. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_intensity) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@param intensity float -set_intensity=function(id,intensity)end, ----Set where top left corner of the rectangle with this id is drawn. Does nothing if this object is not a rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_left_top) ---- ----_Can only be used if this is Rectangle_ ----@param id uint64 ----@param left_top MapPosition|LuaEntity ----@param left_top_offset Vector? -set_left_top=function(id,left_top,left_top_offset)end, ----Set the radius of the outer edge of the arc with this id. Does nothing if this object is not a arc. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_max_radius) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@param max_radius double -set_max_radius=function(id,max_radius)end, ----Set the radius of the inner edge of the arc with this id. Does nothing if this object is not a arc. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_min_radius) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@param min_radius double -set_min_radius=function(id,min_radius)end, ----Set the minimum darkness at which the light with this id is rendered. Does nothing if this object is not a light. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_minimum_darkness) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@param minimum_darkness float -set_minimum_darkness=function(id,minimum_darkness)end, ----Set whether this is only rendered in alt-mode. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_only_in_alt_mode) ----@param id uint64 ----@param only_in_alt_mode boolean -set_only_in_alt_mode=function(id,only_in_alt_mode)end, ----Set the orientation of the object with this id. Does nothing if this object is not a text, polygon, sprite, light or animation. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation) ---- ----_Can only be used if this is Text, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@param orientation RealOrientation -set_orientation=function(id,orientation)end, ----The object rotates so that it faces this target. Note that `orientation` is still applied to the object. Set the orientation_target of the object with this id. Does nothing if this object is not a polygon, sprite, or animation. Set to `nil` if the object should not have an orientation_target. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation_target) ---- ----_Can only be used if this is Polygon, Sprite or Animation_ ----@param id uint64 ----@param orientation_target MapPosition|LuaEntity ----@param orientation_target_offset Vector? -set_orientation_target=function(id,orientation_target,orientation_target_offset)end, ----Set if the light with this id is rendered has the same orientation as the target entity. Does nothing if this object is not a light. Note that `orientation` is still applied to the sprite. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_oriented) ---- ----_Can only be used if this is Light_ ----@param id uint64 ----@param oriented boolean -set_oriented=function(id,oriented)end, ----Offsets the center of the sprite or animation if `orientation_target` is given. This offset will rotate together with the sprite or animation. Set the oriented_offset of the sprite or animation with this id. Does nothing if this object is not a sprite or animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_oriented_offset) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@param oriented_offset Vector -set_oriented_offset=function(id,oriented_offset)end, ----Set the players that the object with this id is rendered to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_players) ----@param id uint64 ----@param players PlayerIdentification[]@Providing an empty array will set the object to be visible to all players. -set_players=function(id,players)end, ----Set the radius of the circle with this id. Does nothing if this object is not a circle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_radius) ---- ----_Can only be used if this is Circle_ ----@param id uint64 ----@param radius double -set_radius=function(id,radius)end, ----Set the render layer of the sprite or animation with this id. Does nothing if this object is not a sprite or animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_render_layer) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@param render_layer RenderLayer -set_render_layer=function(id,render_layer)end, ----Set where top bottom right of the rectangle with this id is drawn. Does nothing if this object is not a rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_right_bottom) ---- ----_Can only be used if this is Rectangle_ ----@param id uint64 ----@param right_bottom MapPosition|LuaEntity ----@param right_bottom_offset Vector? -set_right_bottom=function(id,right_bottom,right_bottom_offset)end, ----Set the scale of the text or light with this id. Does nothing if this object is not a text or light. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_scale) ---- ----_Can only be used if this is Text or Light_ ----@param id uint64 ----@param scale double -set_scale=function(id,scale)end, ----Set if the text with this id scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes. Does nothing if this object is not a text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_scale_with_zoom) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@param scale_with_zoom boolean -set_scale_with_zoom=function(id,scale_with_zoom)end, ----Set the sprite of the sprite or light with this id. Does nothing if this object is not a sprite or light. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_sprite) ---- ----_Can only be used if this is Sprite or Light_ ----@param id uint64 ----@param sprite SpritePath -set_sprite=function(id,sprite)end, ----Set where the arc with this id starts. Does nothing if this object is not a arc. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_start_angle) ---- ----_Can only be used if this is Arc_ ----@param id uint64 ----@param start_angle float@angle in radian -set_start_angle=function(id,start_angle)end, ----Set where the object with this id is drawn. Does nothing if this object does not support target. ---- ----**Note:** Polygon vertices that are set to an entity will ignore this. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_target) ---- ----_Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_ ----@param id uint64 ----@param target MapPosition|LuaEntity ----@param target_offset Vector? -set_target=function(id,target,target_offset)end, ----Set the text that is displayed by the text with this id. Does nothing if this object is not a text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_text) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@param text LocalisedString -set_text=function(id,text)end, ----Set the time to live of the object with this id. Set to 0 if the object should not expire. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_time_to_live) ----@param id uint64 ----@param time_to_live uint -set_time_to_live=function(id,time_to_live)end, ----Set where the line with this id is drawn to. Does nothing if this object is not a line. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_to) ---- ----_Can only be used if this is Line_ ----@param id uint64 ----@param to MapPosition|LuaEntity ----@param to_offset Vector? -set_to=function(id,to,to_offset)end, ----Set the vertical alignment of the text with this id. Does nothing if this object is not a text. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_vertical_alignment) ---- ----_Can only be used if this is Text_ ----@param id uint64 ----@param alignment string@"top", "middle", "baseline" or "bottom" -set_vertical_alignment=function(id,alignment)end, ----Set the vertices of the polygon with this id. Does nothing if this object is not a polygon. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_vertices) ---- ----_Can only be used if this is Polygon_ ----@param id uint64 ----@param vertices ScriptRenderVertexTarget[] -set_vertices=function(id,vertices)end, ----Set whether this is rendered to anyone at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_visible) ----@param id uint64 ----@param visible boolean -set_visible=function(id,visible)end, ----Set the width of the object with this id. Does nothing if this object does not support width. Value is in pixels (32 per tile). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_width) ---- ----_Can only be used if this is Line, Circle or Rectangle_ ----@param id uint64 ----@param width float -set_width=function(id,width)end, ----Set the horizontal scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_x_scale) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@param x_scale double -set_x_scale=function(id,x_scale)end, ----Set the vertical scale of the sprite or animation with this id. Does nothing if this object is not a sprite or animation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_y_scale) ---- ----_Can only be used if this is Sprite or Animation_ ----@param id uint64 ----@param y_scale double -set_y_scale=function(id,y_scale)end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua deleted file mode 100644 index db06385..0000000 --- a/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua deleted file mode 100644 index 71ce162..0000000 --- a/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaSettings.lua b/.vscode/factorio/runtime-api-LuaSettings.lua deleted file mode 100644 index bce6d2d..0000000 --- a/.vscode/factorio/runtime-api-LuaSettings.lua +++ /dev/null @@ -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 ----[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 ----[R] ----The startup mod settings, indexed by prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.startup) ----@field startup LuaCustomTable -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 -get_player_settings=function(player)end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua b/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua deleted file mode 100644 index 4d22ac5..0000000 --- a/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua b/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua deleted file mode 100644 index 37b278b..0000000 --- a/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaStyle.lua b/.vscode/factorio/runtime-api-LuaStyle.lua deleted file mode 100644 index 5decce4..0000000 --- a/.vscode/factorio/runtime-api-LuaStyle.lua +++ /dev/null @@ -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 ----[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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaSurface.lua b/.vscode/factorio/runtime-api-LuaSurface.lua deleted file mode 100644 index 350053c..0000000 --- a/.vscode/factorio/runtime-api-LuaSurface.lua +++ /dev/null @@ -1,1724 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section LuaSurface --- This file is automatically generated. Edits will be overwritten. - ----A "domain" of the world. Surfaces can only be created and deleted through the API. Surfaces are uniquely identified by their name. Every game contains at least the surface "nauvis". ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html) ----@class LuaSurface:LuaObject ----[RW] ----When set to true, the sun will always shine. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.always_day) ----@field always_day boolean ----[RW] ----Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT). ---- ----The LUT is multiplied by `((1 - weight) + brightness * weight)` and result is clamped to range [0, 1]. ---- ----Default is `{0, 0, 0}`, which means no influence. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.brightness_visual_weights) ---- ----### Example ----Makes night on the surface pitch black, assuming [LuaSurface::min_brightness](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.min_brightness) being set to default value `0.15`. ----``` ----game.surfaces[1].brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 } ----``` ----@field brightness_visual_weights ColorModifier ----[R] ----Amount of darkness at the current time, as a number in range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.darkness) ----@field darkness float ----[RW] ----The daytime when dawn starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.dawn) ----@field dawn double ----[RW] ----Current time of day, as a number in range [0, 1). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.daytime) ----@field daytime double ----[RW] ----The daytime when dusk starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.dusk) ----@field dusk double ----[RW] ----The daytime when evening starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.evening) ----@field evening double ----[RW] ----True if daytime is currently frozen. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.freeze_daytime) ----@field freeze_daytime boolean ----[RW] ----When set to true, new chunks will be generated with lab tiles, instead of using the surface's map generation settings. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.generate_with_lab_tiles) ----@field generate_with_lab_tiles boolean ----[R] ----Unique ID associated with this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.index) ----@field index uint ----[RW] ----The generation settings for this surface. These can be modified to after surface generation, but note that this will not retroactively update the surface. To manually adjust it, [LuaSurface::regenerate_entity](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_entity), [LuaSurface::regenerate_decorative](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_decorative) and [LuaSurface::delete_chunk](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk) can be used. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.map_gen_settings) ----@field map_gen_settings MapGenSettings ----[RW] ----The minimal brightness during the night. Default is `0.15`. The value has an effect on the game simalution only, it doesn't have any effect on rendering. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.min_brightness) ----@field min_brightness double ----[RW] ----The daytime when morning starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.morning) ----@field morning double ----[RW] ----The name of this surface. Names are unique among surfaces. ---- ----**Note:** the default surface can't be renamed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.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/LuaSurface.html#LuaSurface.object_name) ----@field object_name string ----[RW] ----Is peaceful mode enabled on this surface? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.peaceful_mode) ----@field peaceful_mode boolean ----[RW] ----If clouds are shown on this surface. ---- ----**Note:** If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.show_clouds) ----@field show_clouds boolean ----[RW] ----The multiplier of solar power on this surface. Cannot be less than 0. ---- ----**Note:** Solar equipment is still limited to its maximum power output. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.solar_power_multiplier) ----@field solar_power_multiplier double ----[RW] ----The number of ticks per day for this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.ticks_per_day) ----@field ticks_per_day 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/LuaSurface.html#LuaSurface.valid) ----@field valid boolean ----[RW] ----Current wind direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.wind_orientation) ----@field wind_orientation RealOrientation ----[RW] ----Change in wind orientation per tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.wind_orientation_change) ----@field wind_orientation_change double ----[RW] ----Current wind speed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.wind_speed) ----@field wind_speed double -local LuaSurface={ ----Adds the given script area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.add_script_area) ----@param area ScriptArea ----@return uint@The id of the created area. -add_script_area=function(area)end, ----Adds the given script position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.add_script_position) ----@param area ScriptPosition ----@return uint@The id of the created position. -add_script_position=function(area)end, ----Sets the given area to the checkerboard lab tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.build_checkerboard) ----@param area BoundingBox@The tile area. -build_checkerboard=function(area)end, ----Send a group to build a new base. ---- ----**Note:** The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.build_enemy_base) ----@param position MapPosition@Location of the new base. ----@param unit_count uint@Number of biters to send for the base-building task. ----@param force ForceIdentification?@Force the new base will belong to. Defaults to enemy. -build_enemy_base=function(position,unit_count,force)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.calculate_tile_properties) ----@param property_names string[]@Names of properties (e.g. "elevation") to calculate ----@param positions MapPosition[]@Positions for which to calculate property values ----@return {[string]: double[]}@Table of property value lists, keyed by property name -calculate_tile_properties=function(property_names,positions)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@class LuaSurface.can_fast_replace_param ----Name of the entity to check. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@field name string ----Where the entity would be placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@field position MapPosition ----Direction the entity would be placed. Defaults to `north`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@field direction? defines.direction ----The force that would place the entity. Defaults to the `"neutral"` force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@field force? ForceIdentification - - ----If there exists an entity at the given location that can be fast-replaced with the given entity parameters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_fast_replace) ----@param param LuaSurface.can_fast_replace_param ----@return boolean -can_fast_replace=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@class LuaSurface.can_place_entity_param ----Name of the entity prototype to check. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field name string ----Where the entity would be placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field position MapPosition ----Direction of the placed entity. Defaults to `north`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field direction? defines.direction ----The force that would place the entity. Defaults to the `"neutral"` force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field force? ForceIdentification ----Which type of check should be carried out. Defaults to `ghost_revive`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field build_check_type? defines.build_check_type ----If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field forced? boolean ----The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@field inner_name? string - - ----Check for collisions with terrain or other entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ----@param param LuaSurface.can_place_entity_param ----@return boolean -can_place_entity=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@class LuaSurface.cancel_deconstruct_area_param ----The area to cancel deconstruction orders in. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@field area BoundingBox ----The force whose deconstruction orders to cancel. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@field force ForceIdentification ----The player to set the last_user to if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@field player? PlayerIdentification ----If chunks covered by fog-of-war are skipped. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@field skip_fog_of_war? boolean ----The deconstruction item to use if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@field item? LuaItemStack - - ----Cancel a deconstruction order. ---- ----**Events:** ---- * May raise [on_cancelled_deconstruction](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) instantly. ----Raised for every entity whose deconstruction has been successfully cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area) ----@param param LuaSurface.cancel_deconstruct_area_param -cancel_deconstruct_area=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@class LuaSurface.cancel_upgrade_area_param ----The area to cancel upgrade orders in. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@field area BoundingBox ----The force whose upgrade orders to cancel. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@field force ForceIdentification ----The player to set the last_user to if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@field player? PlayerIdentification ----If chunks covered by fog-of-war are skipped. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@field skip_fog_of_war? boolean ----The upgrade item to use if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@field item? LuaItemStack - - ----Cancel a upgrade order. ---- ----**Events:** ---- * May raise [on_cancelled_upgrade](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) instantly. ----Raised for every entity whose upgrade has been successfully cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area) ----@param param LuaSurface.cancel_upgrade_area_param -cancel_upgrade_area=function(param)end, ----Clears this surface deleting all entities and chunks on it. ---- ----**Events:** ---- * Will raise [on_pre_surface_cleared](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared) in a future tick. ---- ---- * Will raise [on_surface_cleared](https://lua-api.factorio.com/latest/events.html#on_surface_cleared) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clear) ----@param ignore_characters boolean?@Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed). -clear=function(ignore_characters)end, ----Clears all pollution on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clear_pollution) -clear_pollution=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@class LuaSurface.clone_area_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field source_area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field destination_area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field destination_surface? SurfaceIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field destination_force? LuaForce|string ----If tiles should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field clone_tiles? boolean ----If entities should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field clone_entities? boolean ----If decoratives should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field clone_decoratives? boolean ----If the destination entities should be cleared ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field clear_destination_entities? boolean ----If the destination decoratives should be cleared ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field clear_destination_decoratives? boolean ----If the destination surface should be expanded when destination_area is outside current bounds. Default false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field expand_map? boolean ----If true, the building effect smoke will be shown around the new entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@field create_build_effect_smoke? boolean - - ----Clones the given area. ---- ----**Note:** Entities are cloned in an order such that they can always be created, eg rails before trains. ---- ----**Events:** ---- * Will raise [on_area_cloned](https://lua-api.factorio.com/latest/events.html#on_area_cloned) instantly. ----Raised after the individual `on_entity_cloned` events. ---- ---- * Will raise [on_entity_cloned](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) instantly. ----Raised for every entity that was cloned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area) ----@param param LuaSurface.clone_area_param -clone_area=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@class LuaSurface.clone_brush_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field source_offset TilePosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field destination_offset TilePosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field source_positions TilePosition[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field destination_surface? SurfaceIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field destination_force? LuaForce|string ----If tiles should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field clone_tiles? boolean ----If entities should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field clone_entities? boolean ----If decoratives should be cloned ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field clone_decoratives? boolean ----If the destination entities should be cleared ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field clear_destination_entities? boolean ----If the destination decoratives should be cleared ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field clear_destination_decoratives? boolean ----If the destination surface should be expanded when destination_area is outside current bounds. Default false. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field expand_map? boolean ----If manual-style collision checks should be done. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field manual_collision_mode? boolean ----If true, the building effect smoke will be shown around the new entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@field create_build_effect_smoke? boolean - - ----Clones the given area. ---- ----**Note:** [defines.events.on_entity_cloned](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_cloned) is raised for each entity, and then [defines.events.on_area_cloned](https://lua-api.factorio.com/latest/defines.html#defines.events.on_area_cloned) is raised. ---- ----**Note:** Entities are cloned in an order such that they can always be created, eg rails before trains. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush) ----@param param LuaSurface.clone_brush_param -clone_brush=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@class LuaSurface.clone_entities_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field entities LuaEntity[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field destination_offset Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field destination_surface? SurfaceIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field destination_force? ForceIdentification ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field snap_to_grid? boolean ----If true, the building effect smoke will be shown around the new entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@field create_build_effect_smoke? boolean - - ----Clones the given entities. ---- ----**Note:** Entities are cloned in an order such that they can always be created, eg rails before trains. ---- ----**Events:** ---- * Will raise [on_entity_cloned](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) instantly. ----Raised for every entity that was cloned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities) ----@param param LuaSurface.clone_entities_param -clone_entities=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@class LuaSurface.count_entities_filtered_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field area? BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field position? MapPosition ----If given with position, will count all entities within the radius of the position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field radius? double ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field type? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field ghost_name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field ghost_type? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field direction? defines.direction|defines.direction[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field force? ForceIdentification|ForceIdentification[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field to_be_deconstructed? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field to_be_upgraded? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field limit? uint ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field is_military_target? boolean ----Whether the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@field invert? boolean - - ----Count entities of given type or name in a given area. Works just like [LuaSurface::find_entities_filtered](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities. ---- ----If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_entities_filtered) ----@param param LuaSurface.count_entities_filtered_param ----@return uint -count_entities_filtered=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@class LuaSurface.count_tiles_filtered_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field area? BoundingBox ----Ignored if not given with radius. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field position? MapPosition ----If given with position, will return all entities within the radius of the position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field radius? double ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field force? ForceIdentification|ForceIdentification[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field limit? uint ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field has_hidden_tile? boolean ----Can be further filtered by supplying a `force` filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field has_tile_ghost? boolean ----Can be further filtered by supplying a `force` filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field to_be_deconstructed? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----If the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@field invert? boolean - - ----Count tiles of a given name in a given area. Works just like [LuaSurface::find_tiles_filtered](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered), except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles. ---- ----If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.count_tiles_filtered) ----@param param LuaSurface.count_tiles_filtered_param ----@return uint -count_tiles_filtered=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives) ----@class LuaSurface.create_decoratives_param ----If collision should be checked against entities/tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives) ----@field check_collision? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives) ----@field decoratives Decorative[] - - ----Adds the given decoratives to the surface. ---- ----**Note:** This will merge decoratives of the same type that already exist effectively increasing the "amount" field. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives) ----@param param LuaSurface.create_decoratives_param -create_decoratives=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@class LuaSurface.create_entity_param ----The entity prototype name to create. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field name string ----Where to create the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field position MapPosition ----Desired orientation of the entity after creation. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field direction? defines.direction ----Force of the entity, default is enemy. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field force? ForceIdentification ----Entity with health for the new entity to target. ---- ----Applies to **"item-request-proxy"**: (required) ----The target items are to be delivered to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field target? LuaEntity|MapPosition ----Source entity. Used for beams and highlight-boxes. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field source? LuaEntity|MapPosition ----If true, building will attempt to simulate fast-replace building. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field fast_replace? boolean ----If given set the last_user to this player. If fast_replace is true simulate fast replace using this player. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field player? PlayerIdentification ----If false while fast_replace is true and player is nil any items from fast-replacing will be deleted instead of dropped on the ground. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field spill? boolean ----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. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field raise_built? boolean ----If false, the building effect smoke will not be shown around the new entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field create_build_effect_smoke? boolean ----If true, entity types that have spawn_decorations property will apply triggers defined in the property. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field spawn_decorations? boolean ----If true, any characters that are in the way of the entity are teleported out of the way. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field move_stuck_players? boolean ----If provided, the entity will attempt to pull stored values from this item (for example; creating a spidertron from a previously named and mined spidertron) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field item? LuaItemStack ----Applies to **"assembling-machine"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field recipe? string ----Applies to **"beam"**: (optional) ----Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined). ---- ----Applies to **"stream"**: (optional) ----Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field target_position? MapPosition ----Applies to **"beam"**: (optional) ----Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined). ---- ----Applies to **"stream"**: (optional) ----Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field source_position? MapPosition ----Applies to **"beam"**: (optional) ----If set, beam will be destroyed when distance between source and target is greater than this value. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field max_length? uint ----Applies to **"beam"**: (optional) ----If set, beam will be destroyed after this value of ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field duration? uint ----Applies to **"beam"**: (optional) ----Source position will be offset by this value when rendering the beam. ---- ----Applies to **"stream"**: (optional) ----Source position will be offset by this value when rendering the stream. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field source_offset? Vector ----Applies to **"container"**: (optional) ----Inventory index where the red limiting bar should be set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field bar? uint ----Applies to **"cliff"**: (optional) ----If not specified, `direction` will be used instead. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field cliff_orientation? CliffOrientation ----Applies to **"flying-text"**: (required) ----The string to show. ---- ----Applies to **"speech-bubble"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field text LocalisedString ----Applies to **"flying-text"**: (optional) ----Color of the displayed text. ---- ----Applies to **"rolling-stock"**: (optional) ----The color of this rolling stock, if it supports colors. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field color? Color ----Applies to **"flying-text"**: (optional) ---- ----Applies to **"highlight-box"**: (optional) ----The player to render the highlight box for. If not provided, it will be rendered for all players. ---- ----Applies to **"simple-entity-with-owner"**: (optional) ---- ----Applies to **"simple-entity-with-force"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field render_player_index? uint ----Applies to **"entity-ghost"**: (required) ----The prototype name of the entity contained in the ghost. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field inner_name string ----Applies to **"entity-ghost"**: (optional) ----If `false` the ghost entity will not expire. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field expires? boolean ----Applies to **"fire"**: (optional) ----With how many small flames should the fire on ground be created. Defaults to the initial flame count of the prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field initial_ground_flame_count? uint8 ----Applies to **"inserter"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field conditions InserterCircuitConditions ----Applies to **"inserter"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field filters InventoryFilter[] ----Applies to **"item-entity"**: (required) ----The stack of items to create. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field stack SimpleItemStack ----Applies to **"item-request-proxy"**: (required) ----The stacks of items to be delivered to target entity from logistic network. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field modules {[string]: uint} ----Applies to **"rolling-stock"**: (optional) ----The orientation of this rolling stock. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field orientation? RealOrientation ----Applies to **"locomotive"**: (optional) ----Whether the locomotive should snap to an adjacent train stop. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field snap_to_train_stop? boolean ----Applies to **"logistic-container"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field request_filters? InventoryFilter[] ----Applies to **"particle"**: (required) ---- ----Applies to **"artillery-flare"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field movement Vector ----Applies to **"particle"**: (required) ---- ----Applies to **"artillery-flare"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field height float ----Applies to **"particle"**: (required) ---- ----Applies to **"artillery-flare"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field vertical_speed float ----Applies to **"particle"**: (required) ---- ----Applies to **"artillery-flare"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field frame_speed float ----Applies to **"projectile"**: (required) ---- ----Applies to **"artillery-projectile"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field speed double ----Applies to **"projectile"**: (optional) ---- ----Applies to **"artillery-projectile"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field max_range? double ----Applies to **"resource"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field amount uint ----Applies to **"resource"**: (optional) ----If colliding trees are removed normally for this resource entity based off the prototype tree removal values. Default is true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field enable_tree_removal? boolean ----Applies to **"resource"**: (optional) ----If colliding cliffs are removed. Default is true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field enable_cliff_removal? boolean ----Applies to **"resource"**: (optional) ----If true, the resource entity will be placed to center of a tile as map generator would place it, otherwise standard non-resource grid alignment rules will apply. Default is true. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field snap_to_tile_center? boolean ----Applies to **"underground-belt"**: (optional) ----`"output"` or `"input"`; default is `"input"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field type? string ----Applies to **"programmable-speaker"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field parameters? ProgrammableSpeakerParameters ----Applies to **"programmable-speaker"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field alert_parameters? ProgrammableSpeakerAlertParameters ----Applies to **"character-corpse"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field inventory_size? uint ----Applies to **"character-corpse"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field player_index? uint ----Applies to **"highlight-box"**: (optional) ----The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field bounding_box? BoundingBox ----Applies to **"highlight-box"**: (optional) ----Specifies the graphical appearance (color) of the highlight box. Defaults to `"electricity"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field box_type? CursorBoxRenderType ----Applies to **"highlight-box"**: (optional) ----The blink interval for this highlight box. Makes it be shown every `blink_interval` ticks. Defaults to `0` (constantly shown). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field blink_interval? uint ----Applies to **"highlight-box"**: (optional) ----The amount of time in ticks that the highlight box will exist for. Defaults to existing forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field time_to_live? uint ----Applies to **"speech-bubble"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field lifetime? uint - - ----Create an entity on this surface. ---- ----**Events:** ---- * May raise [script_raised_built](https://lua-api.factorio.com/latest/events.html#script_raised_built) instantly. ----Raised if the `raise_built` flag was set and the entity was successfully created. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ---- ----### Example ----``` ----asm = game.surfaces[1].create_entity{name = "assembling-machine-1", position = {15, 3}, force = game.forces.player, recipe = "iron-stick"} ----``` ---- ----### Example ----Creates a filter inserter with circuit conditions and a filter ----``` ----game.surfaces[1].create_entity{ ---- name = "filter-inserter", position = {20, 15}, force = game.player.force, ---- conditions = {red = {name = "wood", count = 3, operator = ">"}, ---- green = {name = "iron-ore", count = 1, operator = "<"}, ---- logistics = {name = "wood", count = 3, operator = "="}}, ---- filters = {{index = 1, name = "iron-ore"}} ----} ----``` ---- ----### Example ----Creates a requester chest already set to request 128 iron plates. ----``` ----game.surfaces[1].create_entity{ ---- name = "logistic-chest-requester", position = {game.player.position.x+3, game.player.position.y}, ---- force = game.player.force, request_filters = {{index = 1, name = "iron-plate", count = 128}} ----} ----``` ---- ----### Example ----``` ----game.surfaces[1].create_entity{name = "big-biter", position = {15, 3}, force = game.forces.player} -- Friendly biter ----game.surfaces[1].create_entity{name = "medium-biter", position = {15, 3}, force = game.forces.enemy} -- Enemy biter ----``` ---- ----### Example ----Creates a basic inserter at the player's location facing north ----``` ----game.surfaces[1].create_entity{name = "inserter", position = game.player.position, direction = defines.direction.north} ----``` ----@param param LuaSurface.create_entity_param ----@return LuaEntity?@The created entity or `nil` if the creation failed. -create_entity=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@class LuaSurface.create_particle_param ----The particle name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field name string ----Where to create the particle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field position MapPosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field movement Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field height float ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field vertical_speed float ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@field frame_speed float - - ----Creates a particle at the given location ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_particle) ----@param param LuaSurface.create_particle_param -create_particle=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_trivial_smoke) ----@class LuaSurface.create_trivial_smoke_param ----The smoke prototype name to create. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_trivial_smoke) ----@field name string ----Where to create the smoke. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_trivial_smoke) ----@field position MapPosition - - ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_trivial_smoke) ----@param param LuaSurface.create_trivial_smoke_param -create_trivial_smoke=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group) ----@class LuaSurface.create_unit_group_param ----Initial position of the new unit group. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group) ----@field position MapPosition ----Force of the new unit group. Defaults to `"enemy"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group) ----@field force? ForceIdentification - - ----Create a new unit group at a given position. ---- ----**Events:** ---- * Will raise [on_unit_group_created](https://lua-api.factorio.com/latest/events.html#on_unit_group_created) instantly. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group) ----@param param LuaSurface.create_unit_group_param ----@return LuaUnitGroup -create_unit_group=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@class LuaSurface.deconstruct_area_param ----The area to mark for deconstruction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@field area BoundingBox ----The force whose bots should perform the deconstruction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@field force ForceIdentification ----The player to set the last_user to if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@field player? PlayerIdentification ----If chunks covered by fog-of-war are skipped. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@field skip_fog_of_war? boolean ----The deconstruction item to use if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@field item? LuaItemStack - - ----Place a deconstruction request. ---- ----**Events:** ---- * May raise [on_marked_for_deconstruction](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) instantly. ----Raised for every entity that has been successfully marked for deconstruction. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area) ----@param param LuaSurface.deconstruct_area_param -deconstruct_area=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.decorative_prototype_collides) ----@param prototype string@The decorative prototype to check ----@param position MapPosition@The position to check -decorative_prototype_collides=function(prototype,position)end, ----**Events:** ---- * Will raise [on_chunk_deleted](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) in a future tick. ---- ---- * Will raise [on_pre_chunk_deleted](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk) ----@param position ChunkPosition@The chunk position to delete -delete_chunk=function(position)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@class LuaSurface.destroy_decoratives_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field area? BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field position? TilePosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field name? string|string[]|LuaDecorativePrototype|LuaDecorativePrototype[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field from_layer? string ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field to_layer? string ----Soft decoratives can be drawn over rails. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field exclude_soft? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field limit? uint ----If the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@field invert? boolean - - ----Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives) ----@param param LuaSurface.destroy_decoratives_param -destroy_decoratives=function(param)end, ----Sets the given script area to the new values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.edit_script_area) ----@param id uint@The area to edit. ----@param area ScriptArea -edit_script_area=function(id,area)end, ----Sets the given script position to the new values. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.edit_script_position) ----@param id uint@The position to edit. ----@param area ScriptPosition -edit_script_position=function(id,area)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.entity_prototype_collides) ----@param prototype EntityPrototypeIdentification@The entity prototype to check ----@param position MapPosition@The position to check ----@param use_map_generation_bounding_box boolean@If the map generation bounding box should be used instead of the collision bounding box ----@param direction defines.direction? -entity_prototype_collides=function(prototype,position,use_map_generation_bounding_box,direction)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@class LuaSurface.find_decoratives_filtered_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field area? BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field position? TilePosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field name? string|string[]|LuaDecorativePrototype|LuaDecorativePrototype[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field from_layer? string ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field to_layer? string ----Soft decoratives can be drawn over rails. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field exclude_soft? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field limit? uint ----If the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ----@field invert? boolean - - ----Find decoratives of a given name in a given area. ---- ----If no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_decoratives_filtered) ---- ----### Example ----``` ----game.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, name = "sand-decal"} -- gets all sand-decals in the rectangle ----game.surfaces[1].find_decoratives_filtered{area = {{-10, -10}, {10, 10}}, limit = 5} -- gets the first 5 decoratives in the rectangle ----``` ----@param param LuaSurface.find_decoratives_filtered_param ----@return DecorativeResult[] -find_decoratives_filtered=function(param)end, ----Find enemy units (entities with type "unit") of a given force within an area. ---- ----**Note:** This is more efficient than [LuaSurface::find_entities](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_enemy_units) ---- ----### Example ----Find all units who would be interested to attack the player, within 100-tile area. ----``` ----local enemies = game.player.surface.find_enemy_units(game.player.position, 100) ----``` ----@param center MapPosition@Center of the search area ----@param radius double@Radius of the circular search area ----@param force LuaForce|string?@Force to find enemies of. If not given, uses the player force. ----@return LuaEntity[] -find_enemy_units=function(center,radius,force)end, ----Find entities in a given area. ---- ----If no area is given all entities on the surface are returned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities) ---- ----### Example ----Will evaluate to a list of all entities within given area. ----``` ----game.surfaces["nauvis"].find_entities({{-10, -10}, {10, 10}}) ----``` ----@param area BoundingBox? ----@return LuaEntity[] -find_entities=function(area)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@class LuaSurface.find_entities_filtered_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field area? BoundingBox ----Has precedence over area field. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field position? MapPosition ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field radius? double ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field type? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field ghost_name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field ghost_type? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field direction? defines.direction|defines.direction[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field force? ForceIdentification|ForceIdentification[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field to_be_deconstructed? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field to_be_upgraded? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field limit? uint ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field is_military_target? boolean ----Whether the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ----@field invert? boolean - - ----Find all entities of the given type or name in the given area. ---- ----If no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned. ---- ----- If no `area` or `position` are given, the entire surface is searched. ----- If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). ----- If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities. ----- If `area` is specified, this returns the entities colliding with that area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered) ---- ----### Example ----``` ----game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, type = "resource"} -- gets all resources in the rectangle ----game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = "iron-ore"} -- gets all iron ores in the rectangle ----game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, name = {"iron-ore", "copper-ore"}} -- gets all iron ore and copper ore in the rectangle ----game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, force = "player"} -- gets player owned entities in the rectangle ----game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, limit = 5} -- gets the first 5 entities in the rectangle ----game.surfaces[1].find_entities_filtered{position = {0, 0}, radius = 10} -- gets all entities within 10 tiles of the position [0,0]. ----``` ----@param param LuaSurface.find_entities_filtered_param ----@return LuaEntity[] -find_entities_filtered=function(param)end, ----Find a specific entity at a specific position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entity) ---- ----### Example ----``` ----game.player.selected.surface.find_entity('filter-inserter', {0,0}) ----``` ----@param entity string@Entity to look for. ----@param position MapPosition@Coordinates to look at. ----@return LuaEntity?@`nil` if no such entity is found. -find_entity=function(entity,position)end, ----Find the logistic network that covers a given position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_logistic_network_by_position) ----@param position MapPosition ----@param force ForceIdentification@Force the logistic network should belong to. ----@return LuaLogisticNetwork?@The found network or `nil` if no such network was found. -find_logistic_network_by_position=function(position,force)end, ----Finds all of the logistics networks whose construction area intersects with the given position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_logistic_networks_by_construction_area) ----@param position MapPosition ----@param force ForceIdentification@Force the logistic networks should belong to. ----@return LuaLogisticNetwork[] -find_logistic_networks_by_construction_area=function(position,force)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy) ----@class LuaSurface.find_nearest_enemy_param ----Center of the search area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy) ----@field position MapPosition ----Radius of the circular search area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy) ----@field max_distance double ----The force the result will be an enemy of. Uses the player force if not specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy) ----@field force? ForceIdentification - - ----Find the enemy military target ([military entity](https://wiki.factorio.com/Military_units_and_structures)) closest to the given position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy) ----@param param LuaSurface.find_nearest_enemy_param ----@return LuaEntity?@The nearest enemy military target or `nil` if no enemy could be found within the given area. -find_nearest_enemy=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy_entity_with_owner) ----@class LuaSurface.find_nearest_enemy_entity_with_owner_param ----Center of the search area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy_entity_with_owner) ----@field position MapPosition ----Radius of the circular search area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy_entity_with_owner) ----@field max_distance double ----The force the result will be an enemy of. Uses the player force if not specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy_entity_with_owner) ----@field force? ForceIdentification - - ----Find the enemy entity-with-owner closest to the given position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy_entity_with_owner) ----@param param LuaSurface.find_nearest_enemy_entity_with_owner_param ----@return LuaEntity@The nearest enemy entity-with-owner or `nil` if no enemy could be found within the given area. -find_nearest_enemy_entity_with_owner=function(param)end, ----Find a non-colliding position within a given radius. ---- ----**Note:** Special care needs to be taken when using a radius of `0`. The game will not stop searching until it finds a suitable position, so it is important to make sure such a position exists. One particular case where it would not be able to find a solution is running it before any chunks have been generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_non_colliding_position) ----@param name string@Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.) ----@param center MapPosition@Center of the search area. ----@param radius double@Max distance from `center` to search in. A radius of `0` means an infinitely-large search area. ----@param precision double@The step length from the given position as it searches, in tiles. Minimum value is `0.01`. ----@param force_to_tile_center boolean?@Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Default false. ----@return MapPosition?@The non-colliding position. May be `nil` if no suitable position was found. -find_non_colliding_position=function(name,center,radius,precision,force_to_tile_center)end, ----Find a non-colliding position within a given rectangle. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_non_colliding_position_in_box) ----@param name string@Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.) ----@param search_space BoundingBox@The rectangle to search inside. ----@param precision double@The step length from the given position as it searches, in tiles. Minimum value is 0.01. ----@param force_to_tile_center boolean?@Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Default false. ----@return MapPosition?@The non-colliding position. May be `nil` if no suitable position was found. -find_non_colliding_position_in_box=function(name,search_space,precision,force_to_tile_center)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@class LuaSurface.find_tiles_filtered_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field area? BoundingBox ----Ignored if not given with radius. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field position? MapPosition ----If given with position, will return all entities within the radius of the position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field radius? double ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field name? string|string[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field force? ForceIdentification|ForceIdentification[] ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field limit? uint ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field has_hidden_tile? boolean ----Can be further filtered by supplying a `force` filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field has_tile_ghost? boolean ----Can be further filtered by supplying a `force` filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field to_be_deconstructed? boolean ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field collision_mask? CollisionMaskLayer|CollisionMaskLayer[] ----Whether the filters should be inverted. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@field invert? boolean - - ----Find all tiles of the given name in the given area. ---- ----If no filters are given, this returns all tiles in the search area. ---- ----If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_tiles_filtered) ----@param param LuaSurface.find_tiles_filtered_param ----@return LuaTile[] -find_tiles_filtered=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units) ----@class LuaSurface.find_units_param ----Box to find units within. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units) ----@field area BoundingBox ----Force performing the search. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units) ----@field force LuaForce|string ----Only forces which meet the condition will be included in the search. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units) ----@field condition ForceCondition - - ----Find units (entities with type "unit") of a given force and force condition within a given area. ---- ----**Note:** This is more efficient than [LuaSurface::find_entities](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units) ---- ----### Example ----Find friendly units to "player" force ----``` ----local friendly_units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = "player", condition = "friend") ----``` ---- ----### Example ----Find units of "player" force ----``` ----local units = game.player.surface.find_units({area = {{-10, -10},{10, 10}}, force = "player", condition = "same"}) ----``` ----@param param LuaSurface.find_units_param ----@return LuaEntity[] -find_units=function(param)end, ----Blocks and generates all chunks that have been requested using all available threads. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.force_generate_chunk_requests) -force_generate_chunk_requests=function()end, ----Get an iterator going over every chunk on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_chunks) ----@return LuaChunkIterator -get_chunks=function()end, ----Gets the closest entity in the list to this position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_closest) ----@param position MapPosition ----@param entities LuaEntity[]@The Entities to check ----@return LuaEntity? -get_closest=function(position,entities)end, ----Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position. ---- ----**Note:** This won't find tiles in non-generated chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_connected_tiles) ----@param position TilePosition@The tile position to start at. ----@param tiles string[]@The tiles to search for. ----@return TilePosition[]@The resulting set of tiles. -get_connected_tiles=function(position,tiles)end, ----Returns all the military targets (entities with force) on this chunk for the given force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_entities_with_force) ----@param position ChunkPosition@The chunk's position. ----@param force LuaForce|string@Entities of this force will be returned. ----@return LuaEntity[] -get_entities_with_force=function(position,force)end, ----The hidden tile name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_hidden_tile) ----@param position TilePosition@The tile position. ----@return string?@`nil` if there isn't one for the given position. -get_hidden_tile=function(position)end, ----Gets the map exchange string for the current map generation settings of this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_map_exchange_string) ----@return string -get_map_exchange_string=function()end, ----Get the pollution for a given position. ---- ----**Note:** Pollution is stored per chunk, so this will return the same value for all positions in one chunk. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_pollution) ---- ----### Example ----``` ----game.surfaces[1].get_pollution({1,2}) ----``` ----@param position MapPosition ----@return double -get_pollution=function(position)end, ----Gets a random generated chunk position or 0,0 if no chunks have been generated on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_random_chunk) ----@return ChunkPosition -get_random_chunk=function()end, ----Gets the resource amount of all resources on this surface ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_resource_counts) ----@return {[string]: uint} -get_resource_counts=function()end, ----Gets the first script area by name or id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_script_area) ----@param key string|uint?@The name or id of the area to get. ----@return ScriptArea? -get_script_area=function(key)end, ----Gets the script areas that match the given name or if no name is given all areas are returned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_script_areas) ----@param name string? ----@return ScriptArea[] -get_script_areas=function(name)end, ----Gets the first script position by name or id. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_script_position) ----@param key string|uint?@The name or id of the position to get. ----@return ScriptPosition? -get_script_position=function(key)end, ----Gets the script positions that match the given name or if no name is given all positions are returned. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_script_positions) ----@param name string? ----@return ScriptPosition[] -get_script_positions=function(name)end, ----Gets the starting area radius of this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_starting_area_radius) ----@return double -get_starting_area_radius=function()end, ----Get the tile at a given position. An alternative call signature for this method is passing it a single [TilePosition](https://lua-api.factorio.com/latest/Concepts.html#TilePosition). ---- ----**Note:** Non-integer values will result in them being rounded down. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_tile) ----@param x int ----@param y int ----@return LuaTile -get_tile=function(x,y)end, ----Gets the total amount of pollution on the surface by iterating over all of the chunks containing pollution. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_total_pollution) ----@return double -get_total_pollution=function()end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_train_stops) ----@class LuaSurface.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/LuaSurface.html#LuaSurface.get_train_stops) ----@field name? string|string[] ----The force to search. Not providing a force will match stops in any force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_train_stops) ----@field force? ForceIdentification - - ----Gets train stops matching the given filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_train_stops) ----@param param?LuaSurface.get_train_stops_param ----@return LuaEntity[] -get_train_stops=function(param)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_trains) ----@param force ForceIdentification?@The force to search. Not providing a force will match trains in any force. ----@return LuaTrain[] -get_trains=function(force)end, ----All methods and properties that this object supports. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.help) ----@return string -help=function()end, ----Is a given chunk generated? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.is_chunk_generated) ----@param position ChunkPosition@The chunk's position. ----@return boolean -is_chunk_generated=function(position)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.play_sound) ----@class LuaSurface.play_sound_param ----The sound to play. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.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/LuaSurface.html#LuaSurface.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/LuaSurface.html#LuaSurface.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/LuaSurface.html#LuaSurface.play_sound) ----@field override_sound_type? SoundType - - ----Play a sound for every player on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.play_sound) ----@param param LuaSurface.play_sound_param -play_sound=function(param)end, ----Spawn pollution at the given position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.pollute) ----@param source MapPosition@Where to spawn the pollution. ----@param amount double@How much pollution to add. -pollute=function(source,amount)end, ----Print text to the chat console of all players on this surface. ---- ----**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/LuaSurface.html#LuaSurface.print) ----@param message LocalisedString ----@param color Color? -print=function(message,color)end, ----Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives. ---- ----**Note:** All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_decorative) ----@param decoratives string|string[]?@Prototype names of decorative or decoratives to autoplace. When `nil` all decoratives with an autoplace are used. ----@param chunks ChunkPosition[]?@The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored. -regenerate_decorative=function(decoratives,chunks)end, ----Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities. ---- ----**Note:** All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_entity) ----@param entities string|string[]?@Prototype names of entity or entities to autoplace. When `nil` all entities with an autoplace are used. ----@param chunks ChunkPosition[]?@The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored. -regenerate_entity=function(entities,chunks)end, ----Removes the given script area. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.remove_script_area) ----@param id uint ----@return boolean@If the area was actually removed. False when it didn't exist. -remove_script_area=function(id)end, ----Removes the given script position. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.remove_script_position) ----@param id uint ----@return boolean@If the position was actually removed. False when it didn't exist. -remove_script_position=function(id)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@class LuaSurface.request_path_param ----The dimensions of the object that's supposed to travel the path. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field bounding_box BoundingBox ----The list of masks the `bounding_box` collides with. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field collision_mask CollisionMaskWithFlags|string[] ----The position from which to start pathfinding. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field start MapPosition ----The position to find a path to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field goal MapPosition ----The force for which to generate the path, determining which gates can be opened for example. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field force ForceIdentification ----How close the pathfinder needs to get to its `goal` (in tiles). Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field radius? double ----Flags that affect pathfinder behavior. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field pathfind_flags? PathfinderFlags ----Whether the path request can open gates. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field can_open_gates? boolean ----Defines how coarse the pathfinder's grid is. Smaller values mean a coarser grid (negative numbers allowed). Allowed values are from -8 to 8. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field path_resolution_modifier? int ----Makes the pathfinder ignore collisions with this entity if it is given. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@field entity_to_ignore? LuaEntity - - ----Generates a path with the specified constraints (as an array of [PathfinderWaypoints](https://lua-api.factorio.com/latest/Concepts.html#PathfinderWaypoint)) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use [LuaEntity::set_command](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_command) instead. ---- ----The resulting path is ultimately returned asynchronously via [on_script_path_request_finished](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished). ---- ----**Events:** ---- * Will raise [on_script_path_request_finished](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) in a future tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) ----@param param LuaSurface.request_path_param ----@return uint@A unique handle to identify this call when [on_script_path_request_finished](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) fires. -request_path=function(param)end, ----Request that the game's map generator generate chunks at the given position for the given radius on this surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_to_generate_chunks) ----@param position MapPosition@Where to generate the new chunks. ----@param radius uint@The chunk radius from `position` to generate new chunks in. -request_to_generate_chunks=function(position,radius)end, ----Set generated status of a chunk. Useful when copying chunks. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_chunk_generated_status) ----@param position ChunkPosition@The chunk's position. ----@param status defines.chunk_generated_status@The chunk's new status. -set_chunk_generated_status=function(position,status)end, ----Set the hidden tile for the specified position. While during normal gameplay only [non-mineable](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) tiles can become hidden, this method allows any kind of tile to be set as the hidden one. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_hidden_tile) ----@param position TilePosition@The tile position. ----@param tile string|LuaTilePrototype@The new hidden tile or `nil` to clear the hidden tile. -set_hidden_tile=function(position,tile)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@class LuaSurface.set_multi_command_param ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@field command Command ----Number of units to give the command to. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@field unit_count uint ----Force of the units this command is to be given to. If not specified, uses the enemy force. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@field force? ForceIdentification ----Radius to search for units. The search area is centered on the destination of the command. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@field unit_search_distance? uint - - ----Give a command to multiple units. This will automatically select suitable units for the task. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_multi_command) ----@param param LuaSurface.set_multi_command_param ----@return uint@Number of units actually sent. May be less than `count` if not enough units were available. -set_multi_command=function(param)end, ----Set tiles at specified locations. Can automatically correct the edges around modified tiles. ---- ----Placing a [mineable](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) tile on top of a non-mineable one will turn the latter into the [LuaTile::hidden_tile](https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.hidden_tile) for that tile. Placing a mineable tile on a mineable one or a non-mineable tile on a non-mineable one will not modify the hidden tile. This restriction can however be circumvented by using [LuaSurface::set_hidden_tile](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_hidden_tile). ---- ----**Note:** It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one. ---- ----**Events:** ---- * May raise [script_raised_set_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) instantly. ----Raised if the `raise_event` flag was set. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_tiles) ----@param tiles Tile[] ----@param correct_tiles boolean?@If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`. ----@param remove_colliding_entities boolean|string?@`true`, `false`, or `abort_on_collision`. Defaults to `true`. ----@param remove_colliding_decoratives boolean?@`true` or `false`. Defaults to `true`. ----@param raise_event boolean?@`true` or `false`. Defaults to `false`. -set_tiles=function(tiles,correct_tiles,remove_colliding_entities,remove_colliding_decoratives,raise_event)end, ----Spill items on the ground centered at a given location. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.spill_item_stack) ----@param position MapPosition@Center of the spillage ----@param items ItemStackIdentification@Items to spill ----@param enable_looted boolean?@When true, each created item will be flagged with the [LuaEntity::to_be_looted](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.to_be_looted) flag. ----@param force LuaForce|string?@When provided (and not `nil`) the items will be marked for deconstruction by this force. ----@param allow_belts boolean?@Whether items can be spilled onto belts. Defaults to `true`. ----@return LuaEntity[]@The created item-on-ground entities. -spill_item_stack=function(position,items,enable_looted,force,allow_belts)end, ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@class LuaSurface.upgrade_area_param ----The area to mark for upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@field area BoundingBox ----The force whose bots should perform the upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@field force ForceIdentification ----The player to set the last_user to if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@field player? PlayerIdentification ----If chunks covered by fog-of-war are skipped. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@field skip_fog_of_war? boolean ----The upgrade item to use. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@field item LuaItemStack - - ----Place an upgrade request. ---- ----**Events:** ---- * May raise [on_marked_for_upgrade](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) instantly. ----Raised for every entity that has been successfully marked for upgrade. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area) ----@param param LuaSurface.upgrade_area_param -upgrade_area=function(param)end, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTechnology.lua b/.vscode/factorio/runtime-api-LuaTechnology.lua deleted file mode 100644 index 86d5b25..0000000 --- a/.vscode/factorio/runtime-api-LuaTechnology.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua b/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua deleted file mode 100644 index 5c7abe4..0000000 --- a/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTile.lua b/.vscode/factorio/runtime-api-LuaTile.lua deleted file mode 100644 index ec52229..0000000 --- a/.vscode/factorio/runtime-api-LuaTile.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTilePrototype.lua b/.vscode/factorio/runtime-api-LuaTilePrototype.lua deleted file mode 100644 index 5e661ca..0000000 --- a/.vscode/factorio/runtime-api-LuaTilePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTrain.lua b/.vscode/factorio/runtime-api-LuaTrain.lua deleted file mode 100644 index de94ed4..0000000 --- a/.vscode/factorio/runtime-api-LuaTrain.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua b/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua deleted file mode 100644 index fe5f8fb..0000000 --- a/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua b/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua deleted file mode 100644 index a69a771..0000000 --- a/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTransportLine.lua b/.vscode/factorio/runtime-api-LuaTransportLine.lua deleted file mode 100644 index 5ee69b0..0000000 --- a/.vscode/factorio/runtime-api-LuaTransportLine.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua b/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua deleted file mode 100644 index 1bb2645..0000000 --- a/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaUnitGroup.lua b/.vscode/factorio/runtime-api-LuaUnitGroup.lua deleted file mode 100644 index 4ac630a..0000000 --- a/.vscode/factorio/runtime-api-LuaUnitGroup.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua b/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua deleted file mode 100644 index 692d4d3..0000000 --- a/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua deleted file mode 100644 index 993b488..0000000 --- a/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua b/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua deleted file mode 100644 index 0d50915..0000000 --- a/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua +++ /dev/null @@ -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, -} - - diff --git a/.vscode/factorio/runtime-api-builtin.lua b/.vscode/factorio/runtime-api-builtin.lua deleted file mode 100644 index 896b078..0000000 --- a/.vscode/factorio/runtime-api-builtin.lua +++ /dev/null @@ -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 - - diff --git a/.vscode/factorio/runtime-api-concepts.lua b/.vscode/factorio/runtime-api-concepts.lua deleted file mode 100644 index 758cb4e..0000000 --- a/.vscode/factorio/runtime-api-concepts.lua +++ /dev/null @@ -1,4112 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section concepts --- This file is automatically generated. Edits will be overwritten. - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AchievementPrototypeFilter) ----@class AchievementPrototypeFilter ----The condition to filter on. One of `"allowed-without-fight"`, `"type"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AchievementPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AchievementPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AchievementPrototypeFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type, or a list of acceptable types. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AchievementPrototypeFilter) ----@field type string|string[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AdvancedMapGenSettings) ----@class AdvancedMapGenSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AdvancedMapGenSettings) ----@field pollution PollutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AdvancedMapGenSettings) ----@field enemy_evolution EnemyEvolutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AdvancedMapGenSettings) ----@field enemy_expansion EnemyExpansionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AdvancedMapGenSettings) ----@field difficulty_settings DifficultySettings - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@class Alert ----The tick this alert was created. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field target? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field prototype? LuaEntityPrototype ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field position? MapPosition ----The SignalID used for a custom alert. Only present for custom alerts. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field icon? SignalID ----The message for a custom alert. Only present for custom alerts. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alert) ----@field message? LocalisedString - ----A [string](https://lua-api.factorio.com/latest/Builtin-Types.html#string) that specifies where a GUI element should be. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Alignment) ----@alias Alignment "top-left"|"middle-left"|"left"|"bottom-left"|"top-center"|"middle-center"|"center"|"bottom-center"|"top-right"|"right"|"bottom-right" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@class AmmoType ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field action? TriggerItem[] ----One of `"entity"` (fires at an entity), `"position"` (fires directly at a position), or `"direction"` (fires in a direction). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field target_type string ----When `true`, the gun will be able to shoot even when the target is out of range. Only applies when `target_type` is `position`. The gun will fire at the maximum range in the direction of the target position. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field clamp_position? boolean ----Ammo category of this ammo. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field category string ----Energy consumption of a single shot, if applicable. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field energy_consumption? double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field range_modifier? double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field cooldown_modifier? double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AmmoType) ----@field consumption_modifier? double - ----Any basic type (string, number, boolean), table, or LuaObject. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Any) ----@alias Any string|boolean|number|table|LuaObject - ----Any basic type (string, number, boolean) or table. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AnyBasic) ----@alias AnyBasic string|boolean|number|table - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@class ArithmeticCombinatorParameters ----First signal to use in an operation. If not specified, the second argument will be the value of `first_constant`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field first_signal? SignalID ----Second signal to use in an operation. If not specified, the second argument will be the value of `second_constant`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field second_signal? SignalID ----Constant to use as the first argument of the operation. Has no effect when `first_signal` is set. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field first_constant? int ----Constant to use as the second argument of the operation. Has no effect when `second_signal` is set. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field second_constant? int ----Must be one of `"*"`, `"/"`, `"+"`, `"-"`, `"%"`, `"^"`, `"<<"`, `">>"`, `"AND"`, `"OR"`, `"XOR"`. When not specified, defaults to `"*"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field operation? string ----Specifies the signal to output. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ArithmeticCombinatorParameters) ----@field output_signal? SignalID - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameterFluid) ----@class AttackParameterFluid ----Name of the [LuaFluidPrototype](https://lua-api.factorio.com/latest/LuaFluidPrototype.html). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameterFluid) ----@field type string ----Multiplier applied to the damage of an attack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameterFluid) ----@field damage_modifier double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@class AttackParameters ----The type of AttackParameter. One of `'projectile'`, `'stream'` or `'beam'`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field type string ----Maximum range of attack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field range float ----Minimum range of attack. Used with flamethrower turrets to prevent self-immolation. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field min_range float ----Defines how the range is determined. Either `'center-to-center'` or `'bounding-box-to-bounding-box'`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field range_mode string ----When searching for the nearest enemy to attack, `fire_penalty` is added to the enemy's distance if they are on fire. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field fire_penalty float ----When searching for an enemy to attack, a higher `rotate_penalty` will discourage targeting enemies that would take longer to turn to face. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field rotate_penalty float ----When searching for an enemy to attack, a higher `health_penalty` will discourage targeting enemies with high health. A negative penalty will do the opposite. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field health_penalty float ----If less than `range`, the entity will choose a random distance between `range` and `min_attack_distance` and attack from that distance. Used for spitters. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field min_attack_distance float ----The arc that the entity can attack in as a fraction of a circle. A value of `1` means the full 360 degrees. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field turn_range float ----Multiplier applied to the damage of an attack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field damage_modifier float ----Multiplier applied to the ammo consumption of an attack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field ammo_consumption_modifier float ----Minimum amount of ticks between shots. If this is less than `1`, multiple shots can be performed per tick. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field cooldown float ----Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field warmup uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field movement_slow_down_factor double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field movement_slow_down_cooldown float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field ammo_type? AmmoType ----List of the names of compatible [LuaAmmoCategoryPrototypes](https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field ammo_categories? string[] ----Applies to **"projectile"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field projectile_center Vector ----Applies to **"projectile"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field projectile_creation_distance float ----Applies to **"projectile"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field projectile_orientation_offset float ----Applies to **"projectile"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field shell_particle? CircularParticleCreationSpecification ----Applies to **"projectile"**: (optional) ---- ----Applies to **"stream"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field projectile_creation_parameters? CircularProjectileCreationSpecification[] ----Applies to **"stream"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field gun_barrel_length float ----Applies to **"stream"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field gun_center_shift {[string]: Vector} ----Applies to **"stream"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field fluid_consumption float ----Applies to **"stream"**: (optional) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AttackParameters) ----@field fluids? AttackParameterFluid[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceControl) ----@class AutoplaceControl ----For things that are placed as spots such as ores and enemy bases, frequency is generally proportional to number of spots placed per unit area. For continuous features such as forests, frequency is how compressed the probability function is over distance, i.e. the inverse of 'scale' (similar to terrain_segmentation). When the [LuaAutoplaceControlPrototype](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html) is of the category `"terrain"`, then scale is shown in the map generator GUI instead of frequency. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceControl) ----@field frequency MapGenSize ----For things that are placed as spots, size is proportional to the area of each spot. For continuous features, size affects how much of the map is covered with the thing, and is called 'coverage' in the GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceControl) ----@field size MapGenSize ----Has different effects for different things, but generally affects the 'health' or density of a thing that is placed without affecting where it is placed. For trees, richness affects tree health. For ores, richness multiplies the amount of ore at any given tile in a patch. Metadata about autoplace controls (such as whether or not 'richness' does anything for them) can be found in the [LuaAutoplaceControlPrototype](https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html) by looking up `game.autoplace_control_prototypes[(control prototype name)]`, e.g. `game.autoplace_control_prototypes["enemy-base"].richness` is false, because enemy base autoplacement doesn't use richness. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceControl) ----@field richness MapGenSize - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSettings) ----@class AutoplaceSettings ----Whether missing autoplace names for this type should be default enabled. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSettings) ----@field treat_missing_as_default boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSettings) ----@field settings {[string]: AutoplaceControl} - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@class AutoplaceSpecification ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field probability_expression NoiseExpression ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field richness_expression NoiseExpression ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field coverage double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field sharpness double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field max_probability double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field placement_density uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field richness_base double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field richness_multiplier double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field richness_multiplier_distance_bonus double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field starting_area_size uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field order string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field default_enabled boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field peaks? AutoplaceSpecificationPeak[] ----Control prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field control? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field tile_restriction? AutoplaceSpecificationRestriction[] ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field force string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification) ----@field random_probability_penalty double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@class AutoplaceSpecificationPeak ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field influence double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field max_influence double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field min_influence double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field richness_influence double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field noisePersistence double ----Prototype name of the noise layer. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field noise_layer? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field noise_octaves_difference double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field water_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field water_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field water_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field water_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field elevation_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field elevation_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field elevation_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field elevation_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field temperature_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field temperature_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field temperature_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field temperature_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field starting_area_weight_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field starting_area_weight_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field starting_area_weight_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field starting_area_weight_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field tier_from_start_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field tier_from_start_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field tier_from_start_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field tier_from_start_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field distance_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field distance_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field distance_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field distance_top_property_limit double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field aux_optimal double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field aux_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field aux_max_range double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationPeak) ----@field aux_top_property_limit double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationRestriction) ----@class AutoplaceSpecificationRestriction ----Tile prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationRestriction) ----@field first? string ----Second prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecificationRestriction) ----@field second? string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BeamTarget) ----@class BeamTarget ----The target entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BeamTarget) ----@field entity? LuaEntity ----The target position. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BeamTarget) ----@field position? MapPosition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@class BlueprintEntity ----The entity's unique identifier in the blueprint. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field entity_number uint ----The prototype name of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field name string ----The position of the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field position MapPosition ----The direction the entity is facing. Only present for entities that can face in different directions and when the entity is not facing north. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field direction? defines.direction ----The entity tags of the entity, if there are any. Only relevant for entity ghosts. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field tags? Tags ----The items that the entity will request when revived, if there are any. It's a mapping of prototype names to amounts. Only relevant for entity ghosts. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field items? {[string]: uint} ----The circuit network connections of the entity, if there are any. Only relevant for entities that support circuit connections. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field connections? BlueprintCircuitConnection ----The control behavior of the entity, if it has one. The format of the control behavior depends on the entity's type. Only relevant for entities that support control behaviors. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field control_behavior? BlueprintControlBehavior ----The schedule of the entity, if it has one. Only relevant for locomotives. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field schedule? TrainScheduleRecord[] ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field orientation? number ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field recipe? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field inventory? BlueprintEntity.inventory ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field bar? number ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field filters? InventoryFilter[] ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field type? "input"|"output" ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field input_priority? "left"|"right" ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field output_priority? "left"|"right" ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field filter? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field filter_mode? "whitelist"|"blacklist" ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field override_stack_size? number ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field request_filters? LogisticFilter[] ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field request_from_buffers? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field parameters? ProgrammableSpeakerParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field alert_parameters? ProgrammableSpeakerAlertParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field color? Color ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field station? string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintItemIcon) ----@class BlueprintItemIcon ----Name of the item prototype whose icon should be used. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintItemIcon) ----@field name string ----Index of the icon in the blueprint icons slots. Has to be an integer in the range [1, 4]. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintItemIcon) ----@field index uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintSignalIcon) ----@class BlueprintSignalIcon ----The icon to use. It can be any item icon as well as any virtual signal icon. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintSignalIcon) ----@field signal SignalID ----Index of the icon in the blueprint icons slots. Has to be an integer in the range [1, 4]. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintSignalIcon) ----@field index uint - ----Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition), the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero, however it is ignored when provided to the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ---- ----### Example ----Explicit definition: ----``` ----{left_top = {x = -2, y = -3}, right_bottom = {x = 5, y = 8}} ----``` ---- ----### Example ----Shorthand: ----``` ----{{-2, -3}, {5, 8}} ----``` ----@alias BoundingBox BoundingBox.0|BoundingBox.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@class CapsuleAction ----One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field type string ----Applies to **"artillery-remote"**: (required) ----Name of the [flare prototype](https://lua-api.factorio.com/latest/LuaEntityPrototype.html). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field flare? string ----Applies to **"throw"**: (required) ---- ----Applies to **"use-on-self"**: (required) ---- ----Applies to **"destroy-cliffs"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field attack_parameters AttackParameters ----Applies to **"throw"**: (required) ----Whether using the capsule consumes an item from the stack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field uses_stack boolean ----Applies to **"equipment-remote"**: (required) ----Name of the [LuaEquipmentPrototype](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field equipment string ----Applies to **"destroy-cliffs"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field radius float ----Applies to **"destroy-cliffs"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field timeout uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec) ----@class ChartTagSpec ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec) ----@field position MapPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec) ----@field icon? SignalID ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec) ----@field text? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec) ----@field last_user? PlayerIdentification - ----Coordinates of a chunk in a [LuaSurface](https://lua-api.factorio.com/latest/LuaSurface.html) where each integer `x`/`y` represents a different chunk. This uses the same format as [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition), meaning it can be specified either with or without explicit keys. A [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) can be translated to a ChunkPosition by dividing the `x`/`y` values by 32. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@alias ChunkPosition ChunkPosition.0|ChunkPosition.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPositionAndArea) ----@class ChunkPositionAndArea ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPositionAndArea) ----@field x int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPositionAndArea) ----@field y int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPositionAndArea) ----@field area BoundingBox - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) ----@class CircuitCondition ----Specifies how the inputs should be compared. If not specified, defaults to `"<"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) ----@field comparator? ComparatorString ----Defaults to blank ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) ----@field first_signal? SignalID ----What to compare `first_signal` to. If not specified, `first_signal` will be compared to `constant`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) ----@field second_signal? SignalID ----Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitCondition) ----@field constant? int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConditionDefinition) ----@class CircuitConditionDefinition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConditionDefinition) ----@field condition CircuitCondition ----Whether the condition is currently fulfilled ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConditionDefinition) ----@field fulfilled? boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConnectionDefinition) ----@class CircuitConnectionDefinition ----Wire color, either [defines.wire_type.red](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) or [defines.wire_type.green](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConnectionDefinition) ----@field wire defines.wire_type ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConnectionDefinition) ----@field target_entity LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConnectionDefinition) ----@field source_circuit_id defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircuitConnectionDefinition) ----@field target_circuit_id defines.circuit_connector_id - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@class CircularParticleCreationSpecification ----Name of the [LuaEntityPrototype](https://lua-api.factorio.com/latest/LuaEntityPrototype.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field direction float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field direction_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field speed float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field speed_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field starting_frame_speed float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field starting_frame_speed_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field height float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field height_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field vertical_speed float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field vertical_speed_deviation float ----This vector is a table with `x` and `y` keys instead of an array. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field center Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field creation_distance double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field creation_distance_orientation double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularParticleCreationSpecification) ----@field use_source_position boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularProjectileCreationSpecification) ----@class CircularProjectileCreationSpecification ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularProjectileCreationSpecification) ----@field [1] RealOrientation _ ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CircularProjectileCreationSpecification) ----@field [2] Vector _ - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffOrientation) ----@alias CliffOrientation "west-to-east"|"north-to-south"|"east-to-west"|"south-to-north"|"west-to-north"|"north-to-east"|"east-to-south"|"south-to-west"|"west-to-south"|"north-to-west"|"east-to-north"|"south-to-east"|"west-to-none"|"none-to-east"|"east-to-none"|"none-to-west"|"north-to-none"|"none-to-south"|"south-to-none"|"none-to-north" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ----@class CliffPlacementSettings ----Name of the cliff prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ----@field name string ----Elevation at which the first row of cliffs is placed. The default is `10`, and this cannot be set from the map generation GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ----@field cliff_elevation_0 float ----Elevation difference between successive rows of cliffs. This is inversely proportional to 'frequency' in the map generation GUI. Specifically, when set from the GUI the value is `40 / frequency`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ----@field cliff_elevation_interval float ----Corresponds to 'continuity' in the GUI. This value is not used directly, but is used by the 'cliffiness' noise expression, which in combination with elevation and the two cliff elevation properties drives cliff placement (cliffs are placed when elevation crosses the elevation contours defined by `cliff_elevation_0` and `cliff_elevation_interval` when 'cliffiness' is greater than `0.5`). The default 'cliffiness' expression interprets this value such that larger values result in longer unbroken walls of cliffs, and smaller values (between `0` and `1`) result in larger gaps in cliff walls. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ----@field richness MapGenSize - ----A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMask) ----@alias CollisionMask {[CollisionMaskLayer]: true} - ----A [string](https://lua-api.factorio.com/latest/Builtin-Types.html#string) specifying a collision mask layer. ---- ----In addition to the listed layers, there is `"layer-13"` through `"layer-55"`. These layers are currently unused by the game but may change. If a mod is going to use one of the unused layers it's recommended to start at the higher layers because the base game will take from the lower ones. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMaskLayer) ----@alias CollisionMaskLayer "ground-tile"|"water-tile"|"resource-layer"|"doodad-layer"|"floor-layer"|"item-layer"|"ghost-layer"|"object-layer"|"player-layer"|"train-layer"|"rail-layer"|"transport-belt-layer"|"not-setup" - ----A [CollisionMask](https://lua-api.factorio.com/latest/Concepts.html#CollisionMask) which also includes any flags this mask has. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMaskWithFlags) ----@class CollisionMaskWithFlags ----@field [CollisionMaskLayer] true|nil ----Any two entities that both have this option enabled on their prototype and have an identical collision mask layers list will not collide. Other collision mask options are not included in the identical layer list check. This does mean that two different prototypes with the same collision mask layers and this option enabled will not collide. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMaskWithFlags) ----@field ["not-colliding-with-itself"] true|nil ----Uses the prototypes position rather than its collision box when doing collision checks with tile prototypes. Allows the prototype to overlap colliding tiles up until its center point. This is only respected for character movement and cars driven by players. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMaskWithFlags) ----@field ["consider-tile-transitions"] true|nil ----Any prototype with this collision option will only be checked for collision with other prototype's collision masks if they are a tile. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CollisionMaskWithFlags) ----@field ["colliding-with-tiles-only"] true|nil - ----Red, green, blue and alpha values, all in range [0, 1] or all in range [0, 255] if any value is > 1. All values here are optional. Color channels default to `0`, the alpha channel defaults to `1`. ---- ----Similar to [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition), Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers. The game usually expects colors to be in pre-multiplied form (color channels are pre-multiplied by alpha). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ---- ----### Example ----``` ----red1 = {r = 0.5, g = 0, b = 0, a = 0.5} -- Half-opacity red ----red2 = {r = 0.5, a = 0.5} -- Same color as red1 ----black = {} -- All channels omitted: black ----red1_short = {0.5, 0, 0, 0.5} -- Same color as red1 in short-hand notation ----``` ----@alias Color Color.0|Color.1 - ----Same as [Color](https://lua-api.factorio.com/latest/Concepts.html#Color), but red, green, blue and alpha values can be any floating point number, without any special handling of the range [1, 255]. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@alias ColorModifier ColorModifier.0|ColorModifier.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@class Command ----Type of command. The remaining fields depend on the value of this field. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field type defines.command ----Applies to **"defines.command.attack"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field target LuaEntity ----Applies to **"defines.command.attack"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.go_to_location"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.group"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.attack_area"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.wander"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.stop"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.flee"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----Applies to **"defines.command.build_base"**: (optional) ----Defaults to `defines.distraction.by_enemy`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field distraction? defines.distraction ----Applies to **"defines.command.go_to_location"**: (optional) ----The position to path to. Either this or `destination_entity` need to be specified. If both are, `destination_entity` is used. ---- ----Applies to **"defines.command.attack_area"**: (required) ----Center of the attack area. ---- ----Applies to **"defines.command.build_base"**: (required) ----Where to build the base. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field destination? MapPosition ----Applies to **"defines.command.go_to_location"**: (optional) ----The entity to path to. Either this or `destination` need to be specified. If both are, `destination_entity` is used. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field destination_entity? LuaEntity ----Applies to **"defines.command.go_to_location"**: (optional) ----Flags that affect pathfinder behavior. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field pathfind_flags? PathfinderFlags ----Applies to **"defines.command.go_to_location"**: (optional) ----How close the pathfinder needs to get to its destination (in tiles). Defaults to `3`. ---- ----Applies to **"defines.command.attack_area"**: (required) ----Radius of the attack area. ---- ----Applies to **"defines.command.wander"**: (optional) ----Defaults to 10. Does not apply when `wander_in_group` is `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field radius? double ----Applies to **"defines.command.compound"**: (required) ----How the commands should be chained together. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field structure_type defines.compound_command ----Applies to **"defines.command.compound"**: (required) ----The sub-commands. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field commands Command[] ----Applies to **"defines.command.group"**: (required) ----The group whose command to follow. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field group LuaUnitGroup ----Applies to **"defines.command.group"**: (optional) ----Whether the unit will use the group distraction or the commands distraction. Defaults to true. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field use_group_distraction? boolean ----Applies to **"defines.command.wander"**: (optional) ----When commanding a group, defines how the group will wander. When `true`, the units in the group will wander around inside the group's radius, just like gathering biters. When `false`, the units will wander as a group, ie they will all walk together in the same random direction. Default is true for groups. Passing true for a single unit is an error. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field wander_in_group? boolean ----Applies to **"defines.command.wander"**: (optional) ----Ticks to wander before successfully completing the command. Default is max uint, which means wander forever. ---- ----Applies to **"defines.command.stop"**: (optional) ----Ticks to wander before successfully completing the command. Default is max uint, which means stop forever. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field ticks_to_wait? uint ----Applies to **"defines.command.flee"**: (required) ----The entity to flee from ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field from LuaEntity ----Applies to **"defines.command.build_base"**: (optional) ----Whether the units should ignore expansion candidate chunks. When `false`, they will obey and not build a base in a non-candidate chunk. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Command) ----@field ignore_planner? boolean - ----A string that specifies how the inputs should be compared ---- ----**Note:** While the API accepts both versions for `"less/greater than or equal to"` and `"not equal"`, it'll always return `"≥"`, `"≤"` or `"≠"` respectively when reading them back. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ComparatorString) ----@alias ComparatorString "="|">"|"<"|"≥"|">="|"≤"|"<="|"≠"|"!=" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@class ConfigurationChangedData ----Old version of the map. Present only when loading map version other than the current version. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@field old_version? string ----New version of the map. Present only when loading map version other than the current version. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@field new_version? string ----Dictionary of mod changes. It is indexed by mod name. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@field mod_changes {[string]: ModChangeData} ----`true` when mod startup settings have changed since the last time this save was loaded. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@field mod_startup_settings_changed boolean ----`true` when mod prototype migrations have been applied since the last time this save was loaded. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConfigurationChangedData) ----@field migration_applied boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConstantCombinatorParameters) ----@class ConstantCombinatorParameters ----Signal to emit. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConstantCombinatorParameters) ----@field signal SignalID ----Value of the signal to emit. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConstantCombinatorParameters) ----@field count int ----Index of the constant combinator's slot to set this signal to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ConstantCombinatorParameters) ----@field index uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CraftingQueueItem) ----@class CraftingQueueItem ----The index of the item in the crafting queue. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CraftingQueueItem) ----@field index uint ----The recipe being crafted. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CraftingQueueItem) ----@field recipe string ----The amount of items being crafted. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CraftingQueueItem) ----@field count uint ----The item is a prerequisite for another item in the queue. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CraftingQueueItem) ----@field prerequisite boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CursorBoxRenderType) ----@alias CursorBoxRenderType "entity"|"not-allowed"|"electricity"|"pair"|"copy"|"train-visualization"|"logistics"|"blueprint-snap-rectangle" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CustomCommandData) ----@class CustomCommandData ----The name of the command. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CustomCommandData) ----@field name string ----The tick the command was used in. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CustomCommandData) ----@field tick uint ----The player who issued the command, or `nil` if it was issued from the server console. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CustomCommandData) ----@field player_index? uint ----The parameter passed after the command, if there is one. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CustomCommandData) ----@field parameter? string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@class CutsceneWaypoint ----Position to pan the camera to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@field position? MapPosition ----Entity or unit group to pan the camera to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@field target? LuaEntity|LuaUnitGroup ----How many ticks it will take to reach this waypoint from the previous one. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@field transition_time uint ----Time in ticks to wait before moving to the next waypoint. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@field time_to_wait uint ----Zoom level to be set when the waypoint is reached. When not specified, the previous waypoint's zoom is used. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CutsceneWaypoint) ----@field zoom? double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@class DeciderCombinatorParameters ----Defaults to blank. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field first_signal? SignalID ----Second signal to use in an operation, if any. If this is not specified, the second argument to a decider combinator's operation is assumed to be the value of `constant`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field second_signal? SignalID ----Constant to use as the second argument of operation. Defaults to `0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field constant? uint ----Specifies how the inputs should be compared. If not specified, defaults to `"<"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field comparator? ComparatorString ----Defaults to blank. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field output_signal? SignalID ----Defaults to `true`. When `false`, will output a value of `1` for the given `output_signal`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DeciderCombinatorParameters) ----@field copy_count_from_input? boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Decorative) ----@class Decorative ----The name of the decorative prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Decorative) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Decorative) ----@field position TilePosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Decorative) ----@field amount uint8 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@class DecorativePrototypeFilter ----The condition to filter on. One of `"decal"`, `"autoplace"`, `"collision-mask"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@field invert? boolean ----Applies to **"collision-mask"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@field mask CollisionMask|CollisionMaskWithFlags ----Applies to **"collision-mask"**: (required) ----How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"` ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativePrototypeFilter) ----@field mask_mode string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativeResult) ----@class DecorativeResult ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativeResult) ----@field position TilePosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativeResult) ----@field decorative LuaDecorativePrototype ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DecorativeResult) ----@field amount uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DifficultySettings) ----@class DifficultySettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DifficultySettings) ----@field recipe_difficulty defines.difficulty_settings.recipe_difficulty ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DifficultySettings) ----@field technology_difficulty defines.difficulty_settings.technology_difficulty ----A value in range [0.001, 1000]. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DifficultySettings) ----@field technology_price_multiplier double ----Either `"after-victory"`, `"always"` or `"never"`. Changing this to `"always"` or `"after-victory"` does not automatically unlock the research queue. See [LuaForce](https://lua-api.factorio.com/latest/LuaForce.html) for that. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DifficultySettings) ----@field research_queue_setting string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DisplayResolution) ----@class DisplayResolution ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DisplayResolution) ----@field width uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#DisplayResolution) ----@field height uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyEvolutionMapSettings) ----@class EnemyEvolutionMapSettings ----Whether enemy evolution is enabled at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyEvolutionMapSettings) ----@field enabled boolean ----The amount evolution naturally progresses by every second. Defaults to `0.000004`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyEvolutionMapSettings) ----@field time_factor double ----The amount evolution progresses for every destroyed spawner. Defaults to `0.002`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyEvolutionMapSettings) ----@field destroy_factor double ----The amount evolution progresses for every unit of pollution. Defaults to `0.0000009`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyEvolutionMapSettings) ----@field pollution_factor double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@class EnemyExpansionMapSettings ----Whether enemy expansion is enabled at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field enabled boolean ----Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to `7`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field max_expansion_distance uint ----Defaults to `2`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field friendly_base_influence_radius uint ----Defaults to `2`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field enemy_building_influence_radius uint ----Defaults to `0.1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field building_coefficient double ----Defaults to `2.0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field other_base_coefficient double ----Defaults to `0.5`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field neighbouring_chunk_coefficient double ----Defaults to `0.4`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field neighbouring_base_chunk_coefficient double ----A chunk has to have at most this high of a percentage of unbuildable tiles for it to be considered a candidate to avoid chunks full of water as candidates. Defaults to `0.9`, or 90%. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field max_colliding_tiles_coefficient double ----The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `5`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field settler_group_min_size uint ----The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `20`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field settler_group_max_size uint ----The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3,600=14,400` ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field min_expansion_cooldown uint ----The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3,600=216,000` ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EnemyExpansionMapSettings) ----@field max_expansion_cooldown uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@class EntityPrototypeFilter ----The condition to filter on. One of `"flying-robot"`, `"robot-with-logistics-interface"`, `"rail"`, `"ghost"`, `"explosion"`, `"vehicle"`, `"crafting-machine"`, `"rolling-stock"`, `"turret"`, `"transport-belt-connectable"`, `"wall-connectable"`, `"buildable"`, `"placable-in-editor"`, `"clonable"`, `"selectable"`, `"hidden"`, `"entity-with-health"`, `"building"`, `"fast-replaceable"`, `"uses-direction"`, `"minable"`, `"circuit-connectable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"name"`, `"type"`, `"collision-mask"`, `"flag"`, `"build-base-evolution-requirement"`, `"selection-priority"`, `"emissions"`, `"crafting-category"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field invert? boolean ----Applies to **"name"**: (required) ----The prototype name, or list of acceptable names. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field name string|string[] ----Applies to **"type"**: (required) ----The prototype type, or a list of acceptable types. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field type string|string[] ----Applies to **"collision-mask"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field mask CollisionMask|CollisionMaskWithFlags ----Applies to **"collision-mask"**: (required) ----How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"` ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field mask_mode string ----Applies to **"flag"**: (required) ----One of the values in [EntityPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field flag string ----Applies to **"build-base-evolution-requirement"**: (required) ---- ----Applies to **"selection-priority"**: (required) ---- ----Applies to **"emissions"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field comparison ComparatorString ----Applies to **"build-base-evolution-requirement"**: (required) ----The value to compare against. ---- ----Applies to **"selection-priority"**: (required) ----The value to compare against. ---- ----Applies to **"emissions"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field value double ----Applies to **"crafting-category"**: (required) ----Matches if the prototype is for a crafting machine with this crafting category. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ----@field crafting_category string - ----A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all. ---- ----By default, none of these flags are set. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@class EntityPrototypeFlags ----Prevents the entity from being rotated before or after placement. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-rotatable"] true|nil ----Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["placeable-neutral"] true|nil ----Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["placeable-player"] true|nil ----Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["placeable-enemy"] true|nil ----Determines whether the entity needs to be aligned with the invisible grid within the world. Most entities are confined in this way, with a few exceptions such as trees and land mines. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["placeable-off-grid"] true|nil ----Makes it possible to blueprint, deconstruct, and repair the entity (which can be turned off again using the specific flags). Makes it possible for the biter AI to target the entity as a distraction. Enables dust to automatically be created when building the entity. If the entity does not have a `map_color` set, this flag makes the entity appear on the map with the default color specified by the UtilityConstants. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["player-creation"] true|nil ----Uses 45 degree angle increments when selecting direction. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["building-direction-8-way"] true|nil ----Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["filter-directions"] true|nil ----Fast replace will not apply when building while moving. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["fast-replaceable-no-build-while-moving"] true|nil ----Used to specify that the entity breathes air, and is thus affected by poison. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["breaths-air"] true|nil ----Used to specify that the entity can not be 'healed' by repair packs. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-repairable"] true|nil ----Prevents the entity from being drawn on the map. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-on-map"] true|nil ----Prevents the entity from being deconstructed. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-deconstructable"] true|nil ----Prevents the entity from being part of a blueprint. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-blueprintable"] true|nil ----Hides the entity from the bonus GUI and from the "made in"-property of recipe tooltips. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["hidden"] true|nil ----Hides the alt-info of this entity when in alt-mode. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["hide-alt-info"] true|nil ----Does not fast replace this entity over other entity types when building while moving. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["fast-replaceable-no-cross-type-while-moving"] true|nil ----@field ["no-gap-fill-while-building"] true|nil ----Does not apply fire stickers to the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-flammable"] true|nil ----Prevents inserters and loaders from taking items from this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["no-automated-item-removal"] true|nil ----Prevents inserters and loaders from inserting items into this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["no-automated-item-insertion"] true|nil ----Prevents the entity from being copy-pasted. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["no-copy-paste"] true|nil ----Disallows selection of the entity even when a selection box is specified for other reasons. For example, selection boxes are used to determine the size of outlines to be shown when highlighting entities inside electric pole ranges. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-selectable-in-game"] true|nil ----Prevents the entity from being selected by the upgrade planner. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-upgradable"] true|nil ----Prevents the entity from being shown in the kill statistics. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-in-kill-statistics"] true|nil ----Prevents the entity from being shown in the "made in" list in recipe tooltips. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) ----@field ["not-in-made-in"] true|nil - ----An entity prototype may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeIdentification) ----@alias EntityPrototypeIdentification LuaEntity|LuaEntityPrototype|string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPoint) ----@class EquipmentPoint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPoint) ----@field x uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPoint) ----@field y uint - ----Position inside an equipment grid. This uses the same format as [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition), meaning it can be specified either with or without explicit keys. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ---- ----### Example ----Explicit definition: ----``` ----{x = 5, y = 2} ----{y = 2, x = 5} ----``` ---- ----### Example ----Shorthand: ----``` ----{1, 2} ----``` ----@alias EquipmentPosition EquipmentPosition.0|EquipmentPosition.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPrototypeFilter) ----@class EquipmentPrototypeFilter ----The condition to filter on. One of `"item-to-place"`, `"type"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPrototypeFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type, or a list of acceptable types. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPrototypeFilter) ----@field type string|string[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EventData) ----@class EventData ----The identifier of the event this handler was registered to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EventData) ----@field name defines.events ----The tick during which the event happened. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EventData) ----@field tick uint ----The name of the mod that raised the event if it was raised using [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EventData) ----@field mod_name? string - ----Used to filter out irrelevant event callbacks in a performant way. ---- ----**Note:** Filters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EventFilter) ----@alias EventFilter (LuaEntityClonedEventFilter|LuaEntityDamagedEventFilter|LuaPlayerMinedEntityEventFilter|LuaPreRobotMinedEntityEventFilter|LuaRobotBuiltEntityEventFilter|LuaPostEntityDiedEventFilter|LuaEntityDiedEventFilter|LuaScriptRaisedReviveEventFilter|LuaPrePlayerMinedEntityEventFilter|LuaEntityMarkedForDeconstructionEventFilter|LuaPreGhostDeconstructedEventFilter|LuaPreGhostUpgradedEventFilter|LuaEntityDeconstructionCancelledEventFilter|LuaEntityMarkedForUpgradeEventFilter|LuaSectorScannedEventFilter|LuaRobotMinedEntityEventFilter|LuaScriptRaisedDestroyEventFilter|LuaUpgradeCancelledEventFilter|LuaScriptRaisedBuiltEventFilter|LuaPlayerBuiltEntityEventFilter|LuaPlayerRepairedEntityEventFilter)[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Fluid) ----@class Fluid ----Fluid prototype name of the fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Fluid) ----@field name string ----Amount of the fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Fluid) ----@field amount double ----The temperature. When reading from [LuaFluidBox](https://lua-api.factorio.com/latest/LuaFluidBox.html), this field will always be present. It is not necessary to specify it when writing, however. When not specified, the fluid will be set to the fluid's default temperature as specified in the fluid's prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Fluid) ----@field temperature? double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxConnection) ----@class FluidBoxConnection ----The connection type: "input", "output", or "input-output". ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxConnection) ----@field type string ----The 4 cardinal direction connection points for this pipe. This vector is a table with `x` and `y` keys instead of an array. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxConnection) ----@field positions Vector[] ----The maximum tile distance this underground connection can connect at if this is an underground pipe. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxConnection) ----@field max_underground_distance? uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilter) ----@class FluidBoxFilter ----Fluid prototype name of the filtered fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilter) ----@field name string ----The minimum temperature allowed into the fluidbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilter) ----@field minimum_temperature double ----The maximum temperature allowed into the fluidbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilter) ----@field maximum_temperature double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilterSpec) ----@class FluidBoxFilterSpec ----Fluid prototype name of the filtered fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilterSpec) ----@field name string ----The minimum temperature allowed into the fluidbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilterSpec) ----@field minimum_temperature? double ----The maximum temperature allowed into the fluidbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilterSpec) ----@field maximum_temperature? double ----Force the filter to be set, regardless of current fluid content. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidBoxFilterSpec) ----@field force? boolean - ----A fluid may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidIdentification) ----@alias FluidIdentification string|LuaFluidPrototype|Fluid - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@class FluidPrototypeFilter ----The condition to filter on. One of `"hidden"`, `"name"`, `"subgroup"`, `"default-temperature"`, `"max-temperature"`, `"heat-capacity"`, `"fuel-value"`, `"emissions-multiplier"`, `"gas-temperature"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field invert? boolean ----Applies to **"name"**: (required) ----The prototype name, or list of acceptable names. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field name string|string[] ----Applies to **"subgroup"**: (required) ----A [LuaGroup](https://lua-api.factorio.com/latest/LuaGroup.html) (subgroup) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field subgroup string ----Applies to **"default-temperature"**: (required) ---- ----Applies to **"max-temperature"**: (required) ---- ----Applies to **"heat-capacity"**: (required) ---- ----Applies to **"fuel-value"**: (required) ---- ----Applies to **"emissions-multiplier"**: (required) ---- ----Applies to **"gas-temperature"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field comparison ComparatorString ----Applies to **"default-temperature"**: (required) ----The value to compare against. ---- ----Applies to **"max-temperature"**: (required) ----The value to compare against. ---- ----Applies to **"heat-capacity"**: (required) ----The value to compare against. ---- ----Applies to **"fuel-value"**: (required) ----The value to compare against. ---- ----Applies to **"emissions-multiplier"**: (required) ----The value to compare against. ---- ----Applies to **"gas-temperature"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#FluidPrototypeFilter) ----@field value double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ForceCondition) ----@alias ForceCondition "all"|"enemy"|"ally"|"friend"|"not-friend"|"same"|"not-same" - ----A force may be specified in one of two ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ForceIdentification) ----@alias ForceIdentification string|LuaForce - ----Parameters that affect the look and control of the game. Updating any of the member attributes here will immediately take effect in the game engine. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings) ----@class GameViewSettings} - ----[RW] ----Show the flashing alert icons next to the player's toolbar. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_alert_gui) ----@field show_alert_gui boolean ----[RW] ----Show the controller GUI elements. This includes the toolbar, the selected tool slot, the armour slot, and the gun and ammunition slots. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_controller_gui) ----@field show_controller_gui boolean ----[RW] ----Show overlay icons on entities. Also known as "alt-mode". ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_entity_info) ----@field show_entity_info boolean ----[RW] ----Shows or hides the view options when map is opened. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_map_view_options) ----@field show_map_view_options boolean ----[RW] ----Show the chart in the upper right-hand corner of the screen. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_minimap) ----@field show_minimap boolean ----[RW] ----Shows or hides quickbar of shortcuts. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_quickbar) ----@field show_quickbar boolean ----[RW] ----When `true` (`false` is default), the rails will always show the rail block visualisation. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_rail_block_visualisation) ----@field show_rail_block_visualisation boolean ----[RW] ----Show research progress and name in the upper right-hand corner of the screen. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_research_info) ----@field show_research_info boolean ----[RW] ----Shows or hides the shortcut bar. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_shortcut_bar) ----@field show_shortcut_bar boolean ----[RW] ----Shows or hides the buttons row. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_side_menu) ----@field show_side_menu boolean ----[RW] ----When `true` (the default), mousing over an entity will select it. Otherwise, moving the mouse won't update entity selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.update_entity_selection) ----@field update_entity_selection boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@class GuiAnchor ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@field gui defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@field position defines.relative_gui_position ----If provided, only anchors the GUI element when the opened things type matches the type. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@field type? string ----If provided, only anchors the GUI element when the opened thing matches the name. `name` takes precedence over `names`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@field name? string ----If provided, only anchors the GUI element when the opened thing matches one of the names. When reading an anchor, `names` is always populated. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiAnchor) ----@field names? string[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@class GuiArrowSpecification ----This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field type string ----Applies to **"entity"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field entity LuaEntity ----Applies to **"position"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field position MapPosition ----Applies to **"crafting_queue"**: (required) ----Index in the crafting queue to point to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field crafting_queueindex uint ----Applies to **"item_stack"**: (required) ----Which inventory the stack is in. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field inventory_index defines.inventory ----Applies to **"item_stack"**: (required) ----Which stack to point to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field item_stack_index uint ----Applies to **"item_stack"**: (required) ----Must be either `"player"`, `"target"`, `"player-quickbar"` or `"player-equipment-bar"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiArrowSpecification) ----@field source string - ----Screen coordinates of a GUI element in a [LuaGui](https://lua-api.factorio.com/latest/LuaGui.html). This uses the same format as [TilePosition](https://lua-api.factorio.com/latest/Concepts.html#TilePosition), meaning it can be specified either with or without explicit keys. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@alias GuiLocation GuiLocation.0|GuiLocation.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatConnection) ----@class HeatConnection ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatConnection) ----@field position Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatConnection) ----@field direction defines.direction - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatSetting) ----@class HeatSetting ----The target temperature. Defaults to the minimum temperature of the heat buffer. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatSetting) ----@field temperature? double ----`"at-least"`, `"at-most"`, `"exactly"`, `"add"`, or `"remove"`. Defaults to `"at-least"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#HeatSetting) ----@field mode? string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter) ----@class InfinityInventoryFilter ----Name of the item. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter) ----@field name string ----The count of the filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter) ----@field count? uint ----`"at-least"`, `"at-most"`, or `"exactly"`. Defaults to `"at-least"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter) ----@field mode? string ----The index of this filter in the filters list. Not required when writing a filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityInventoryFilter) ----@field index uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter) ----@class InfinityPipeFilter ----Name of the fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter) ----@field name string ----The fill percentage the pipe (e.g. 0.5 for 50%). Can't be negative. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter) ----@field percentage? double ----The temperature of the fluid. Defaults to the default/minimum temperature of the fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter) ----@field temperature? double ----`"at-least"`, `"at-most"`, `"exactly"`, `"add"`, or `"remove"`. Defaults to `"at-least"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InfinityPipeFilter) ----@field mode? string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@class Ingredient ----`"item"` or `"fluid"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field type string ----Prototype name of the required item or fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field name string ----Amount of the item or fluid. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field amount double ----How much of this ingredient is a catalyst. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field catalyst_amount? uint|double ----Applies to **"fluid"**: (optional) ----The minimum fluid temperature required. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field minimum_temperature? double ----Applies to **"fluid"**: (optional) ----The maximum fluid temperature allowed. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Ingredient) ----@field maximum_temperature? double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InserterCircuitConditions) ----@class InserterCircuitConditions ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InserterCircuitConditions) ----@field circuit? CircuitCondition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InserterCircuitConditions) ----@field logistics? CircuitCondition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InventoryFilter) ----@class InventoryFilter ----Position of the corresponding filter slot. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InventoryFilter) ----@field index uint ----Item prototype name of the item to filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#InventoryFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@class ItemPrototypeFilter ----The condition to filter on. One of `"tool"`, `"mergeable"`, `"item-with-inventory"`, `"selection-tool"`, `"item-with-label"`, `"has-rocket-launch-products"`, `"fuel"`, `"place-result"`, `"burnt-result"`, `"place-as-tile"`, `"placed-as-equipment-result"`, `"name"`, `"type"`, `"flag"`, `"subgroup"`, `"fuel-category"`, `"stack-size"`, `"default-request-amount"`, `"wire-count"`, `"fuel-value"`, `"fuel-acceleration-multiplier"`, `"fuel-top-speed-multiplier"`, `"fuel-emissions-multiplier"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field invert? boolean ----Applies to **"place-result"**: (optional) ----Filters for the place result. ---- ----Applies to **"burnt-result"**: (optional) ----Filters for the burnt result. ---- ----Applies to **"place-as-tile"**: (optional) ----Filters for the placed tile. ---- ----Applies to **"placed-as-equipment-result"**: (optional) ----Filters for the placed equipment. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field elem_filters? EntityPrototypeFilter[] ----Applies to **"name"**: (required) ----The prototype name, or list of acceptable names. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field name string|string[] ----Applies to **"type"**: (required) ----The prototype type, or a list of acceptable types. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field type string|string[] ----Applies to **"flag"**: (required) ----One of the values in [ItemPrototypeFlags](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field flag string ----Applies to **"subgroup"**: (required) ----A [LuaGroup](https://lua-api.factorio.com/latest/LuaGroup.html) (subgroup) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field subgroup string ----Applies to **"fuel-category"**: (required) ----A [LuaFuelCategoryPrototype](https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field fuel-category string ----Applies to **"stack-size"**: (required) ---- ----Applies to **"default-request-amount"**: (required) ---- ----Applies to **"wire-count"**: (required) ---- ----Applies to **"fuel-value"**: (required) ---- ----Applies to **"fuel-acceleration-multiplier"**: (required) ---- ----Applies to **"fuel-top-speed-multiplier"**: (required) ---- ----Applies to **"fuel-emissions-multiplier"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field comparison ComparatorString ----Applies to **"stack-size"**: (required) ----The value to compare against. ---- ----Applies to **"default-request-amount"**: (required) ----The value to compare against. ---- ----Applies to **"wire-count"**: (required) ----The value to compare against. ---- ----Applies to **"fuel-value"**: (required) ----The value to compare against. ---- ----Applies to **"fuel-acceleration-multiplier"**: (required) ----The value to compare against. ---- ----Applies to **"fuel-top-speed-multiplier"**: (required) ----The value to compare against. ---- ----Applies to **"fuel-emissions-multiplier"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ----@field value uint - ----A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all. ---- ----By default, none of these flags are set. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@class ItemPrototypeFlags ----Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["draw-logistic-overlay"] true|nil ----Hides the item in the logistic requests and filters GUIs (among others). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["hidden"] true|nil ----Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["always-show"] true|nil ----Hides the item from the bonus GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["hide-from-bonus-gui"] true|nil ----Hides the item from the tooltip that's shown when hovering over a burner inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["hide-from-fuel-tooltip"] true|nil ----Prevents the item from being stacked. It also prevents the item from stacking in assembling machine input slots, which can otherwise exceed the item stack size if required by the recipe. Additionally, the item does not show an item count when in the cursor. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["not-stackable"] true|nil ----Makes the item act as an extension to the inventory that it is placed in. Only has an effect for items with inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["can-extend-inventory"] true|nil ----Makes construction bots prefer this item when building the entity specified by its `place_result`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["primary-place-result"] true|nil ----Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["mod-openable"] true|nil ----Makes it so the item is deleted when clearing the cursor, instead of being put into the player's inventory. The copy-paste tools use this by default, for example. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["only-in-cursor"] true|nil ----Allows the item to be spawned by a quickbar shortcut or custom input. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags) ----@field ["spawnable"] true|nil - ----An item prototype may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeIdentification) ----@alias ItemPrototypeIdentification LuaItemStack|LuaItemPrototype|string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@class ItemStackDefinition ----Prototype name of the item the stack holds. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field name string ----Number of items the stack holds. If not specified, defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field count? uint ----Health of the items in the stack. Defaults to `1.0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field health? float ----Durability of the tool items in the stack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field durability? double ----Amount of ammo in the ammo items in the stack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field ammo? double ----Tags of the items with tags in the stack. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackDefinition) ----@field tags? string[] - ----An item may be specified in one of two ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackIdentification) ----@alias ItemStackIdentification SimpleItemStack|LuaItemStack - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackLocation) ----@class ItemStackLocation ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackLocation) ----@field inventory defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemStackLocation) ----@field slot uint - ----Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key. ---- ----The key identifies the string template. For example, `"gui-alert-tooltip.attack"` (for the template `"__1__ ---- objects are being damaged"`; see the file `data/core/locale/en.cfg`). ---- ----The template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters. ---- ----As a special case, when the key is just the empty string, all the parameters will be concatenated (after processing, if any are localised strings). If there is only one parameter, it will be used as is. ---- ----Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number, boolean or `nil`, which will be converted to their textual representation. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LocalisedString) ---- ----### Example ----In the English translation, this will print `"No ammo"`; in the Czech translation, it will print `"Bez munice"`: ----``` ----game.player.print({"description.no-ammo"}) ----``` ---- The `description.no-ammo` template contains no placeholders, so no further parameters are necessary. ---- ----### Example ----In the English translation, this will print `"Durability: 5/9"`; in the Japanese one, it will print `"耐久度: 5/9"`: ----``` ----game.player.print({"description.durability", 5, 9}) ----``` ---- ----### Example ----This will print `"hello"` in all translations: ----``` ----game.player.print({"", "hello"}) ----``` ---- ----### Example ----This will print `"Iron plate: 60"` in the English translation and `"Eisenplatte: 60"` in the German translation. ----``` ----game.print({"", {"item-name.iron-plate"}, ": ", 60}) ----``` ----@alias LocalisedString string|number|boolean|LuaObject|nil|(string|LocalisedString)[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticFilter) ----@class LogisticFilter ----The index this filter applies to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticFilter) ----@field index uint ----The item name for this filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticFilter) ----@field name string ----The count for this filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticFilter) ----@field count uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticParameters) ----@class LogisticParameters ----The item. `nil` clears the filter. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticParameters) ----@field name? string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticParameters) ----@field min? uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LogisticParameters) ----@field max? uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Loot) ----@class Loot ----Item prototype name of the result. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Loot) ----@field item string ----Probability that any loot at all will drop, as a number in range [0, 1]. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Loot) ----@field probability double ----Minimum amount of loot to drop. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Loot) ----@field count_min double ----Maximum amount of loot to drop. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Loot) ----@field count_max double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@class LuaEntityClonedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@class LuaEntityDamagedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`, `"original-damage-amount"`, `"final-damage-amount"`, `"damage-type"`, `"final-health"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----Applies to **"damage-type"**: (required) ----A [LuaDamagePrototype](https://lua-api.factorio.com/latest/LuaDamagePrototype.html) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field name string ----Applies to **"original-damage-amount"**: (required) ---- ----Applies to **"final-damage-amount"**: (required) ---- ----Applies to **"final-health"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field comparison ComparatorString ----Applies to **"original-damage-amount"**: (required) ----The value to compare against. ---- ----Applies to **"final-damage-amount"**: (required) ----The value to compare against. ---- ----Applies to **"final-health"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter) ----@field value float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@class LuaEntityDeconstructionCancelledEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@class LuaEntityDiedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@class LuaEntityMarkedForDeconstructionEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@class LuaEntityMarkedForUpgradeEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@class LuaPlayerBuiltEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`, `"force"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field name string ----Applies to **"force"**: (required) ----The entity force ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter) ----@field force string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@class LuaPlayerMinedEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@class LuaPlayerRepairedEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter) ----@class LuaPostEntityDiedEventFilter ----The condition to filter on. Can only be `"type"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter) ----@field type string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@class LuaPreGhostDeconstructedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@class LuaPreGhostUpgradedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@class LuaPrePlayerMinedEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@class LuaPreRobotMinedEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@class LuaRobotBuiltEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`, `"force"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field name string ----Applies to **"force"**: (required) ----The entity force ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter) ----@field force string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@class LuaRobotMinedEntityEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@class LuaScriptRaisedBuiltEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@class LuaScriptRaisedDestroyEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@class LuaScriptRaisedReviveEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@class LuaSectorScannedEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@class LuaUpgradeCancelledEventFilter ----The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type ---- ----Applies to **"ghost_type"**: (required) ----The ghost prototype type ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@field type string ----Applies to **"name"**: (required) ----The prototype name ---- ----Applies to **"ghost_name"**: (required) ----The ghost prototype name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter) ----@field name string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@class MapAndDifficultySettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field pollution PollutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field enemy_evolution EnemyEvolutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field enemy_expansion EnemyExpansionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field unit_group UnitGroupMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field steering SteeringMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field path_finder PathFinderMapSettings ----If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field max_failed_behavior_count uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapAndDifficultySettings) ----@field difficulty_settings DifficultySettings - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapExchangeStringData) ----@class MapExchangeStringData ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapExchangeStringData) ----@field map_settings MapAndDifficultySettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapExchangeStringData) ----@field map_gen_settings MapGenSettings - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenPreset) ----@class MapGenPreset ----The string used to alphabetically sort the presets. It is a simple string that has no additional semantic meaning. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenPreset) ----@field order string ----Whether this is the preset that is selected by default. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenPreset) ----@field default? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenPreset) ----@field basic_settings? MapGenSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenPreset) ----@field advanced_settings? AdvancedMapGenSettings - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@class MapGenSettings ----The inverse of 'water scale' in the map generator GUI. Lower `terrain_segmentation` increases the scale of elevation features (lakes, continents, etc). This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field terrain_segmentation MapGenSize ----The equivalent to 'water coverage' in the map generator GUI. Specifically, when this value is non-zero, `water_level = 10 * log2` (the value of this field), and the elevation generator subtracts water level from elevation before adding starting lakes. If water is set to 'none', elevation is clamped to a small positive value before adding starting lakes. This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field water MapGenSize ----Indexed by autoplace control prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field autoplace_controls {[string]: AutoplaceControl} ----Whether undefined `autoplace_controls` should fall back to the default controls or not. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field default_enable_all_autoplace_controls boolean ----Each setting in this dictionary maps the string type to the settings for that type. Valid types are `"entity"`, `"tile"` and `"decorative"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field autoplace_settings {[string]: AutoplaceSettings} ----Map generation settings for entities of the type "cliff". ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field cliff_settings CliffPlacementSettings ----The random seed used to generated this map. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field seed uint ----Width in tiles. If `0`, the map has 'infinite' width, with the actual limitation being one million tiles in each direction from the center. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field width uint ----Height in tiles. If `0`, the map has 'infinite' height, with the actual limitation being one million tiles in each direction from the center. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field height uint ----Size of the starting area. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field starting_area MapGenSize ----Positions of the starting areas. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field starting_points MapPosition[] ----Whether peaceful mode is enabled for this map. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field peaceful_mode boolean ----Overrides for tile property value generators. Values either name a NamedNoiseExpression or can be literal numbers, stored as strings (e.g. `"5"`). All other controls can be overridden by a property expression names. Notable properties: ----- `moisture` - a value between 0 and 1 that determines whether a tile becomes sandy (low moisture) or grassy (high moisture). ----- `aux` - a value between 0 and 1 that determines whether low-moisture tiles become sand or red desert. ----- `temperature` - provides a value (vaguely representing degrees Celsius, varying between -20 and 50) that is used (together with moisture and aux) as part of tree and decorative placement. ----- `elevation` - tiles values less than zero become water. Cliffs are placed along certain contours according to [CliffPlacementSettings](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings). ----- `cliffiness` - determines whether (when >0.5) or not (when <0.5) a cliff will be placed at an otherwise suitable (according to [CliffPlacementSettings](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings)) location. ----- `enemy-base-intensity` - a number that is referenced by both `enemy-base-frequency` and `enemy-base-radius`. i.e. if this is overridden, enemy base frequency and size will both be affected and do something reasonable. By default, this expression returns a value proportional to distance from any starting point, clamped at about 7. ----- `enemy-base-frequency` - a number representing average number of enemy bases per tile for a region, by default in terms of `enemy-base-intensity`. ----- `enemy-base-radius` - a number representing the radius of an enemy base, if one were to be placed on the given tile, by default proportional to a constant plus `enemy-base-intensity`. Climate controls ('Moisture' and 'Terrain type' at the bottom of the Terrain tab in the map generator GUI) don't have their own dedicated structures in MapGenSettings. Instead, their values are stored as property expression overrides with long names: ----- `control-setting:moisture:frequency:multiplier` - frequency (inverse of scale) multiplier for moisture noise. Default is 1. ----- `control-setting:moisture:bias` - global bias for moisture (which normally varies between 0 and 1). Default is 0. ----- `control-setting:aux:frequency:multiplier` - frequency (inverse of scale) multiplier for aux (called 'terrain type' in the GUI) noise. Default is 1. ----- `control-setting:aux:bias` - global bias for aux/terrain type (which normally varies between 0 and 1). Default is 0. All other MapGenSettings feed into named noise expressions, and therefore placement can be overridden by including the name of a property in this dictionary. The probability and richness functions for placing specific tiles, entities, and decoratives can be overridden by including an entry named `{tile|entity|decorative}:(prototype name):{probability|richness}`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings) ----@field property_expression_names {[string]: string} - ----A floating point number specifying an amount. ---- ----For backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number (when queried, a number will always be returned): ---- ----**Note:** The map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapGenSize) ----@alias MapGenSize float|"none"|"very-low"|"very-small"|"very-poor"|"low"|"small"|"poor"|"normal"|"medium"|"regular"|"high"|"big"|"good"|"very-high"|"very-big"|"very-good" - ----Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements. ---- ----The coordinates are saved as a fixed-size 32 bit integer, with 8 bits reserved for decimal precision, meaning the smallest value step is `1/2^8 = 0.00390625` tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ---- ----### Example ----Explicit definition: ----``` ----{x = 5.5, y = 2} ----{y = 2.25, x = 5.125} ----``` ---- ----### Example ----Shorthand: ----``` ----{1.625, 2.375} ----``` ----@alias MapPosition MapPosition.0|MapPosition.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@class MapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field pollution PollutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field enemy_evolution EnemyEvolutionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field enemy_expansion EnemyExpansionMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field unit_group UnitGroupMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field steering SteeringMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field path_finder PathFinderMapSettings ----If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapSettings) ----@field max_failed_behavior_count uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@class MapViewSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-logistic-network? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-electric-network? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-turret-range? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-pollution? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-train-station-names? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-player-names? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-networkless-logistic-members? boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapViewSettings) ----@field show-non-standard-map-info? boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModChangeData) ----@class ModChangeData ----Old version of the mod. May be `nil` if the mod wasn't previously present (i.e. it was just added). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModChangeData) ----@field old_version string ----New version of the mod. May be `nil` if the mod is no longer present (i.e. it was just removed). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModChangeData) ----@field new_version string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSetting) ----@class ModSetting ----The value of the mod setting. The type depends on the kind of setting. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSetting) ----@field value int|double|boolean|string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@class ModSettingPrototypeFilter ----The condition to filter on. One of `"type"`, `"mod"`, `"setting-type"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@field invert? boolean ----Applies to **"type"**: (required) ----The prototype type, or a list of acceptable types. ---- ----Applies to **"setting-type"**: (required) ----The setting scope type (`"startup"`, `"runtime-global"`, or `"runtime-per-user"`) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@field type string|string[] ----Applies to **"mod"**: (required) ----The mod name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModSettingPrototypeFilter) ----@field mod string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffectValue) ----@class ModuleEffectValue ----The percentual increase of the attribute. A value of `0.6` means a 60% increase. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffectValue) ----@field bonus float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ----@class ModuleEffects ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ----@field consumption? ModuleEffectValue ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ----@field speed? ModuleEffectValue ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ----@field productivity? ModuleEffectValue ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ----@field pollution? ModuleEffectValue - ----A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all. ---- ----To write to this, use an array[[string](https://lua-api.factorio.com/latest/Builtin-Types.html#string)] of the mouse buttons that should be possible to use with on button. The flag `"left-and-right"` can also be set, which will set `"left"` and `"right"` to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MouseButtonFlags) ----@class MouseButtonFlags ----@field ["left"] true|nil ----@field ["right"] true|nil ----@field ["middle"] true|nil ----@field ["button-4"] true|nil ----@field ["button-5"] true|nil ----@field ["button-6"] true|nil ----@field ["button-7"] true|nil ----@field ["button-8"] true|nil ----@field ["button-9"] true|nil - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#NoiseExpression) ----@class NoiseExpression ----Names the type of the expression and determines what other fields are required. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#NoiseExpression) ----@field type string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#NthTickEventData) ----@class NthTickEventData ----The tick during which the event happened. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#NthTickEventData) ----@field tick uint ----The nth tick this handler was registered to. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#NthTickEventData) ----@field nth_tick uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Offer) ----@class Offer ----List of prices. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Offer) ----@field price Ingredient[] ----The action that will take place when a player accepts the offer. Usually a `"give-item"` modifier. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Offer) ----@field offer TechnologyModifier - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition) ----@class OldTileAndPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition) ----@field old_tile LuaTilePrototype ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#OldTileAndPosition) ----@field position TilePosition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@class PathFinderMapSettings ----The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field fwd2bwd_ratio uint ----When looking at which node to check next, their heuristic value is multiplied by this ratio. The higher it is, the more the search is directed straight at the goal. Defaults to `2`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field goal_pressure_ratio double ----The maximum number of nodes that are expanded per tick. Defaults to `1,000`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field max_steps_worked_per_tick double ----The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8,000`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field max_work_done_per_tick uint ----Whether to cache paths at all. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field use_path_cache boolean ----Number of elements in the short cache. Defaults to `5`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field short_cache_size uint ----Number of elements in the long cache. Defaults to `25`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field long_cache_size uint ----The minimal distance to the goal in tiles required to be searched in the short path cache. Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field short_cache_min_cacheable_distance double ----The minimal number of nodes required to be searched in the short path cache. Defaults to `50`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field short_cache_min_algo_steps_to_cache uint ----The minimal distance to the goal in tiles required to be searched in the long path cache. Defaults to `30`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field long_cache_min_cacheable_distance double ----When looking for a connection to a cached path, search at most for this number of steps times the original estimate. Defaults to `100`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field cache_max_connect_to_cache_steps_multiplier uint ----When looking for a path from cache, make sure it doesn't start too far from the requested start in relative terms. Defaults to `0.2`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field cache_accept_path_start_distance_ratio double ----When looking for a path from cache, make sure it doesn't end too far from the requested end in relative terms. This is typically more lenient than the start ratio since the end target could be moving. Defaults to `0.15`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field cache_accept_path_end_distance_ratio double ----Same principle as `cache_accept_path_start_distance_ratio`, but used for negative cache queries. Defaults to `0.3`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field negative_cache_accept_path_start_distance_ratio double ----Same principle as `cache_accept_path_end_distance_ratio`, but used for negative cache queries. Defaults to `0.3`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field negative_cache_accept_path_end_distance_ratio double ----When assigning a rating to the best path, this multiplier times start distances is considered. Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field cache_path_start_distance_rating_multiplier double ----When assigning a rating to the best path, this multiplier times end distances is considered. This value is typically higher than the start multiplier as this results in better end path quality. Defaults to `20`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field cache_path_end_distance_rating_multiplier double ----A penalty that is applied for another unit that is on the way to the goal. This is mainly relevant for situations where a group of units has arrived at the target they are supposed to attack, making units further back circle around to reach the target. Defaults to `30`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field stale_enemy_with_same_destination_collision_penalty double ----The distance in tiles after which other moving units are not considered for pathfinding. Defaults to `5`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field ignore_moving_enemy_collision_distance double ----A penalty that is applied for another unit that is too close and either not moving or has a different goal. Defaults to `30`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field enemy_with_different_destination_collision_penalty double ----The general collision penalty with other units. Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field general_entity_collision_penalty double ----The collision penalty for positions that require the destruction of an entity to get to. Defaults to `3`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field general_entity_subsequent_collision_penalty double ----The collision penalty for collisions in the extended bounding box but outside the entity's actual bounding box. Defaults to `3`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field extended_collision_penalty double ----The amount of path finder requests accepted per tick regardless of the requested path's length. Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field max_clients_to_accept_any_new_request uint ----When the `max_clients_to_accept_any_new_request` amount is exhausted, only path finder requests with a short estimate will be accepted until this amount (per tick) is reached. Defaults to `100`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field max_clients_to_accept_short_new_request uint ----The maximum direct distance in tiles before a request is no longer considered short. Defaults to `100`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field direct_distance_to_consider_short_request uint ----The maximum amount of nodes a short request will traverse before being rescheduled as a long request. Defaults to `1000`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field short_request_max_steps uint ----The amount of steps that are allocated to short requests each tick, as a percentage of all available steps. Defaults to `0.5`, or 50%. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field short_request_ratio double ----The minimum amount of steps that are guaranteed to be performed for every request. Defaults to `2000`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field min_steps_to_check_path_find_termination uint ----If the actual amount of steps is higher than the initial estimate by this factor, pathfinding is terminated. Defaults to `2000.0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field start_to_goal_cost_multiplier_to_terminate_path_find double ----The thresholds of waiting clients after each of which the per-tick work limit will be increased by the corresponding value in `overload_multipliers`. This is to avoid clients having to wait too long. Must have the same number of elements as `overload_multipliers`. Defaults to `{0, 100, 500}`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field overload_levels uint[] ----The multipliers to the amount of per-tick work applied after the corresponding thresholds in `overload_levels` have been reached. Must have the same number of elements as `overload_multipliers`. Defaults to `{2, 3, 4}`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field overload_multipliers double[] ----The delay in ticks between decrementing the score of all paths in the negative cache by one. Defaults to `20`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathFinderMapSettings) ----@field negative_path_cache_delay_interval uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@class PathfinderFlags ----Allows pathing through friendly entities. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field allow_destroy_friendly_entities? boolean ----Allows the pathfinder to path through entities of the same force. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field allow_paths_through_own_entities? boolean ----Enables path caching. This can be more efficient, but might fail to respond to changes in the environment. Defaults to `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field cache? boolean ----Makes the pathfinder try to path in straight lines. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field prefer_straight_paths? boolean ----Sets lower priority on the path request, meaning it might take longer to find a path at the expense of speeding up others. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field low_priority? boolean ----Makes the pathfinder not break in the middle of processing this pathfind, no matter how much work is needed. Defaults to `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderFlags) ----@field no_break? boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderWaypoint) ----@class PathfinderWaypoint ----The position of the waypoint on its surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderWaypoint) ----@field position MapPosition ----`true` if the path from the previous waypoint to this one goes through an entity that must be destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PathfinderWaypoint) ----@field needs_destroy_to_reach boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PlaceAsTileResult) ----@class PlaceAsTileResult ----The tile prototype. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PlaceAsTileResult) ----@field result LuaTilePrototype ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PlaceAsTileResult) ----@field condition_size uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PlaceAsTileResult) ----@field condition CollisionMask - ----A player may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PlayerIdentification) ----@alias PlayerIdentification uint|string|LuaPlayer - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@class PollutionMapSettings ----Whether pollution is enabled at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field enabled boolean ----The amount that is diffused to a neighboring chunk (possibly repeated for other directions as well). Defaults to `0.02`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field diffusion_ratio double ----The amount of PUs that need to be in a chunk for it to start diffusing. Defaults to `15`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field min_to_diffuse double ----The amount of pollution eaten by a chunk's tiles as a percentage of 1. Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field ageing double ----Any amount of pollution larger than this value is visualized as this value instead. Defaults to `150`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field expected_max_per_chunk double ----Any amount of pollution smaller than this value (but bigger than zero) is visualized as this value instead. Defaults to `50`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field min_to_show_per_chunk double ----Defaults to `60`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field min_pollution_to_damage_trees double ----Defaults to `150`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field pollution_with_max_forest_damage double ----Defaults to `50`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field pollution_per_tree_damage double ----Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field pollution_restored_per_tree_damage double ----Defaults to `20`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field max_pollution_to_restore_trees double ----Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings) ----@field enemy_attack_pollution_consumption_modifier double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@class Product ----`"item"` or `"fluid"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field type string ----Prototype name of the result. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field name string ----Amount of the item or fluid to give. If not specified, `amount_min`, `amount_max` and `probability` must all be specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field amount? double ----Minimal amount of the item or fluid to give. Has no effect when `amount` is specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field amount_min? uint|double ----Maximum amount of the item or fluid to give. Has no effect when `amount` is specified. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field amount_max? uint|double ----A value in range [0, 1]. Item or fluid is only given with this probability; otherwise no product is produced. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field probability? double ----How much of this product is a catalyst. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field catalyst_amount? uint|double ----Applies to **"fluid"**: (optional) ----The fluid temperature of this product. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Product) ----@field temperature? double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlertParameters) ----@class ProgrammableSpeakerAlertParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlertParameters) ----@field show_alert boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlertParameters) ----@field show_on_map boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlertParameters) ----@field icon_signal_id SignalID ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerAlertParameters) ----@field alert_message string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerCircuitParameters) ----@class ProgrammableSpeakerCircuitParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerCircuitParameters) ----@field signal_value_is_pitch boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerCircuitParameters) ----@field instrument_id uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerCircuitParameters) ----@field note_id uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerInstrument) ----@class ProgrammableSpeakerInstrument ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerInstrument) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerInstrument) ----@field notes string[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerParameters) ----@class ProgrammableSpeakerParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerParameters) ----@field playback_volume double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerParameters) ----@field playback_globally boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ProgrammableSpeakerParameters) ----@field allow_polyphony boolean - ----Types `"signal"` and `"item-group"` do not support filters. ---- ----**Note:** Filters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#PrototypeFilter) ----@alias PrototypeFilter (ItemPrototypeFilter|TilePrototypeFilter|EntityPrototypeFilter|FluidPrototypeFilter|RecipePrototypeFilter|DecorativePrototypeFilter|AchievementPrototypeFilter|EquipmentPrototypeFilter|TechnologyPrototypeFilter)[] - ----The smooth orientation. It is a [float](https://lua-api.factorio.com/latest/Builtin-Types.html#float) in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates "north", a value of `0.5` indicates "south". ---- ----For example then, a value of `0.625` would indicate "south-west", and a value of `0.875` would indicate "north-west". ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RealOrientation) ----@alias RealOrientation float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@class RecipePrototypeFilter ----The condition to filter on. One of `"enabled"`, `"hidden"`, `"hidden-from-flow-stats"`, `"hidden-from-player-crafting"`, `"allow-as-intermediate"`, `"allow-intermediates"`, `"allow-decomposition"`, `"always-show-made-in"`, `"always-show-products"`, `"show-amount-in-title"`, `"has-ingredients"`, `"has-products"`, `"has-ingredient-item"`, `"has-ingredient-fluid"`, `"has-product-item"`, `"has-product-fluid"`, `"subgroup"`, `"category"`, `"energy"`, `"emissions-multiplier"`, `"request-paste-multiplier"`, `"overload-multiplier"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field invert? boolean ----Applies to **"has-ingredient-item"**: (optional) ----Matches if at least 1 ingredient is an item that matches these filters. ---- ----Applies to **"has-ingredient-fluid"**: (optional) ----Matches if at least 1 ingredient is a fluid that matches these filters. ---- ----Applies to **"has-product-item"**: (optional) ----Matches if at least 1 product is an item that matches these filters. ---- ----Applies to **"has-product-fluid"**: (optional) ----Matches if at least 1 product is a fluid that matches these filters. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field elem_filters? ItemPrototypeFilter[] ----Applies to **"subgroup"**: (required) ----A [LuaGroup](https://lua-api.factorio.com/latest/LuaGroup.html) (subgroup) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field subgroup string ----Applies to **"category"**: (required) ----A [LuaRecipeCategoryPrototype](https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html) name ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field category string ----Applies to **"energy"**: (required) ---- ----Applies to **"emissions-multiplier"**: (required) ---- ----Applies to **"request-paste-multiplier"**: (required) ---- ----Applies to **"overload-multiplier"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field comparison ComparatorString ----Applies to **"energy"**: (required) ----The value to compare against. ---- ----Applies to **"emissions-multiplier"**: (required) ----The value to compare against. ---- ----Applies to **"request-paste-multiplier"**: (required) ----The value to compare against. ---- ----Applies to **"overload-multiplier"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RecipePrototypeFilter) ----@field value double - ----A number between 0 and 255 inclusive, represented by one of the following named strings or the string version of the number. For example `"27"` and `"decals"` are both valid. Higher values are rendered above lower values. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RenderLayer) ----@alias RenderLayer string|"water-tile"|"ground-tile"|"tile-transition"|"decals"|"lower-radius-visualization"|"radius-visualization"|"transport-belt-integration"|"resource"|"building-smoke"|"decorative"|"ground-patch"|"ground-patch-higher"|"ground-patch-higher2"|"remnants"|"floor"|"transport-belt"|"transport-belt-endings"|"floor-mechanics-under-corpse"|"corpse"|"floor-mechanics"|"item"|"lower-object"|"transport-belt-circuit-connector"|"lower-object-above-shadow"|"object"|"higher-object-under"|"higher-object-above"|"item-in-inserter-hand"|"wires"|"wires-above"|"entity-info-icon"|"entity-info-icon-above"|"explosion"|"projectile"|"smoke"|"air-object"|"air-entity-info-icon"|"light-effect"|"selection-box"|"higher-selection-box"|"collision-selection-box"|"arrow"|"cursor" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Resistance) ----@class Resistance ----Absolute damage decrease ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Resistance) ----@field decrease float ----Percentual damage decrease ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Resistance) ----@field percent float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RidingState) ----@class RidingState ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RidingState) ----@field acceleration defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#RidingState) ----@field direction defines.riding.direction - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptArea) ----@class ScriptArea ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptArea) ----@field area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptArea) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptArea) ----@field color Color ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptArea) ----@field id uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptPosition) ----@class ScriptPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptPosition) ----@field position MapPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptPosition) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptPosition) ----@field color Color ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptPosition) ----@field id uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) ----@class ScriptRenderTarget ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) ----@field entity? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) ----@field entity_offset? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderTarget) ----@field position? MapPosition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderVertexTarget) ----@class ScriptRenderVertexTarget ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderVertexTarget) ----@field target MapPosition|LuaEntity ----Only used if `target` is a LuaEntity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ScriptRenderVertexTarget) ----@field target_offset? Vector - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectedPrototypeData) ----@class SelectedPrototypeData ----E.g. `"entity"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectedPrototypeData) ----@field base_type string ----E.g. `"tree"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectedPrototypeData) ----@field derived_type string ----E.g. `"tree-05"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectedPrototypeData) ----@field name string - ----A set of flags on a selection tool that define how entities and tiles are selected. Active flags are in the dictionary as `true`, while inactive flags aren't present at all. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@class SelectionModeFlags ----Selects entities and tiles as if selecting them for a blueprint. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["blueprint"] true|nil ----Selects entities and tiles as if selecting them for deconstruction. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["deconstruct"] true|nil ----Selects entities and tiles as if selecting them for deconstruction cancellation. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["cancel-deconstruct"] true|nil ----Selects items on the ground. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["items"] true|nil ----Selects trees. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["trees"] true|nil ----Selects entities which are considered a [building](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_building), plus landmines. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["buildable-type"] true|nil ----Selects no entities or tiles, but is useful to select an area. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["nothing"] true|nil ----Selects entities and tiles that can be [built by an item](https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.place_result). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["items-to-place"] true|nil ----Selects all entities. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["any-entity"] true|nil ----Selects all tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["any-tile"] true|nil ----Selects entities with the same force as the selecting player. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["same-force"] true|nil ----Selects entities with a different force as the selecting player. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["not-same-force"] true|nil ----Selects entities from a [friendly](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_friend) force. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["friend"] true|nil ----Selects entities from an [enemy](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.is_enemy) force. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["enemy"] true|nil ----Selects entities as if selecting them for upgrading. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["upgrade"] true|nil ----Selects entities as if selecting them for upgrade cancellation. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["cancel-upgrade"] true|nil ----Selects entities as if selecting them for downgrading. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["downgrade"] true|nil ----Selects entities that are [entities with health](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_entity_with_health). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["entity-with-health"] true|nil ----Deprecated. Replaced by `is-military-target`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["entity-with-force"] true|nil ----Selects entities that are [military targets](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_military_target). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["is-military-target"] true|nil ----Selects entities that are [entities with owner](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_entity_with_owner). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["entity-with-owner"] true|nil ----Selects entities that are not `rolling-stocks`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectionModeFlags) ----@field ["avoid-rolling-stock"] true|nil - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Signal) ----@class Signal ----ID of the signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Signal) ----@field signal SignalID ----Value of the signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Signal) ----@field count int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SignalID) ----@class SignalID ----`"item"`, `"fluid"`, or `"virtual"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SignalID) ----@field type string ----Name of the item, fluid or virtual signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SignalID) ----@field name? string - ----An item stack may be specified in one of two ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SimpleItemStack) ---- ----### Example ----Both of these lines specify an item stack of one iron plate: ----``` ----{name="iron-plate"} ----``` ---- ----``` ----{name="iron-plate", count=1} ----``` ---- ----### Example ----This is a stack of 47 copper plates: ----``` ----{name="copper-plate", count=47} ----``` ---- ----### Example ----These are both full stacks of iron plates (for iron-plate, a full stack is 100 plates): ----``` ----"iron-plate" ----``` ---- ----``` ----{name="iron-plate", count=100} ----``` ----@alias SimpleItemStack string|ItemStackDefinition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@class SmokeSource ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field name string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field frequency double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field offset double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field position? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field north_position? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field east_position? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field south_position? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field west_position? Vector ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field deviation? MapPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_frame_speed uint16 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_frame_speed_deviation double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_frame uint16 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_frame_deviation double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field slow_down_factor uint8 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field height float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field height_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_vertical_speed float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field starting_vertical_speed_deviation float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SmokeSource) ----@field vertical_speed_slowdown float - ----It can be either the name of a [sound prototype](https://wiki.factorio.com/Prototype/Sound) defined in the data stage, or a path in the form `"type/name"`. The latter option can be sorted into three categories. ---- ----The validity of a SoundPath can be verified at runtime using [LuaGameScript::is_valid_sound_path](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sound_path). ---- ----The utility and ambient types each contain general use sound prototypes defined by the game itself. ----- `"utility"` - Uses the [UtilitySounds](https://wiki.factorio.com/Prototype/UtilitySounds) prototype. Example: `"utility/wire_connect_pole"` ----- `"ambient"` - Uses [AmbientSound](https://wiki.factorio.com/Prototype/AmbientSound) prototypes. Example: `"ambient/resource-deficiency"` ---- ----The following types can be combined with any tile name as long as its prototype defines the ---- corresponding sound. ----- `"tile-walking"` - Uses [Tile::walking_sound](https://wiki.factorio.com/Prototype/Tile#walking_sound). Example: `"tile-walking/concrete"` ----- `"tile-mined"` - Uses [Tile::mined_sound](https://wiki.factorio.com/Prototype/Tile#mined_sound) ----- `"tile-build-small"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound). Example: `"tile-build-small/concrete"` ----- `"tile-build-medium"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound) ----- `"tile-build-large"` - Uses [Tile::build_sound](https://wiki.factorio.com/Prototype/Tile#build_sound) ---- ----The following types can be combined with any entity name as long as its prototype defines the ---- corresponding sound. ----- `"entity-build"` - Uses [Entity::build_sound](https://wiki.factorio.com/Prototype/Entity#build_sound). Example: `"entity-build/wooden-chest"` ----- `"entity-mined"` - Uses [Entity::mined_sound](https://wiki.factorio.com/Prototype/Entity#mined_sound) ----- `"entity-mining"` - Uses [Entity::mining_sound](https://wiki.factorio.com/Prototype/Entity#mining_sound) ----- `"entity-vehicle_impact"` - Uses [Entity::vehicle_impact_sound](https://wiki.factorio.com/Prototype/Entity#vehicle_impact_sound) ----- `"entity-rotated"` - Uses [Entity::rotated_sound](https://wiki.factorio.com/Prototype/Entity#rotated_sound) ----- `"entity-open"` - Uses [Entity::open_sound](https://wiki.factorio.com/Prototype/Entity#open_sound) ----- `"entity-close"` - Uses [Entity::close_sound](https://wiki.factorio.com/Prototype/Entity#close_sound) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SoundPath) ----@alias SoundPath string - ----Defines which slider in the game's sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SoundType) ----@alias SoundType "game-effect"|"gui-effect"|"ambient"|"environment"|"walking"|"alert"|"wind" - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SpawnPointDefinition) ----@class SpawnPointDefinition ----Evolution factor for which this weight applies. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SpawnPointDefinition) ----@field evolution_factor double ----Probability of spawning this unit at this evolution factor. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SpawnPointDefinition) ----@field weight double - ----It can be either the name of a [sprite prototype](https://wiki.factorio.com/Prototype/Sprite) defined in the data stage, or a path in form "type/name". ---- ----The validity of a SpritePath can be verified at runtime using [LuaGameScript::is_valid_sprite_path](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path). ---- ----The supported types are: ----- `"item"` - for example "item/iron-plate" is the icon sprite of iron plate ----- `"entity"` - for example "entity/small-biter" is the icon sprite of the small biter ----- `"technology"` ----- `"recipe"` ----- `"item-group"` ----- `"fluid"` ----- `"tile"` ----- `"virtual-signal"` ----- `"achievement"` ----- `"equipment"` ----- `"file"` - path to an image file located inside the current scenario. This file is not preloaded so it will be slower; for frequently used sprites, it is better to define sprite prototype and use it instead. ----- `"utility"` - sprite defined in the utility-sprites object, these are the pictures used by the game internally for the UI. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SpritePath) ----@alias SpritePath string - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSetting) ----@class SteeringMapSetting ----Does not include the radius of the unit. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSetting) ----@field radius double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSetting) ----@field separation_factor double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSetting) ----@field separation_force double ----Used to make steering look better for aesthetic purposes. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSetting) ----@field force_unit_fuzzy_goto_behavior boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSettings) ----@class SteeringMapSettings ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSettings) ----@field default SteeringMapSetting ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SteeringMapSettings) ----@field moving SteeringMapSetting - ----A surface may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SurfaceIdentification) ----@alias SurfaceIdentification uint|string|LuaSurface - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TabAndContent) ----@class TabAndContent ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TabAndContent) ----@field tab LuaGuiElement ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TabAndContent) ----@field content LuaGuiElement - ----A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Tags) ---- ----### Example ----``` ----{a = 1, b = true, c = "three", d = {e = "f"}} ----``` ----@alias Tags {[string]: AnyBasic} - ----A technology may be specified in one of three ways. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyIdentification) ----@alias TechnologyIdentification string|LuaTechnology|LuaTechnologyPrototype - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@class TechnologyModifier ----Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field type string ----Applies to **"gun-speed"**: (required) ----Prototype name of the ammunition category that is affected ---- ----Applies to **"ammo-damage"**: (required) ----Prototype name of the ammunition category that is affected ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field ammo_category string ----Applies to **"gun-speed"**: (required) ----Modification value. This will be added to the current gun speed modifier upon researching. ---- ----Applies to **"ammo-damage"**: (required) ----Modification value. This will be added to the current ammo damage modifier upon researching. ---- ----Applies to **"turret-attack"**: (required) ----Modification value. This will be added to the current turret damage modifier upon researching. ---- ----Applies to **"Other types"**: (required) ----Modification value. This value will be added to the variable it modifies. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field modifier double ----Applies to **"give-item"**: (required) ----Item prototype name to give. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field item string ----Applies to **"give-item"**: (optional) ----Number of items to give. Defaults to `1`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field count? uint ----Applies to **"turret-attack"**: (required) ----Turret prototype name this modifier will affect. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field turret_id string ----Applies to **"unlock-recipe"**: (required) ----Recipe prototype name to unlock. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field recipe string ----Applies to **"nothing"**: (required) ----Description of this nothing modifier. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyModifier) ----@field effect_description LocalisedString - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@class TechnologyPrototypeFilter ----The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field invert? boolean ----Applies to **"research-unit-ingredient"**: (required) ----The research ingredient to check. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field ingredient string ----Applies to **"level"**: (required) ---- ----Applies to **"max-level"**: (required) ---- ----Applies to **"time"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field comparison ComparatorString ----Applies to **"level"**: (required) ----The value to compare against. ---- ----Applies to **"max-level"**: (required) ----The value to compare against. ---- ----Applies to **"time"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TechnologyPrototypeFilter) ----@field value uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Tile) ----@class Tile ----The position of the tile. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Tile) ----@field position TilePosition ----The prototype name of the tile. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Tile) ----@field name string - ----Coordinates of a tile on a [LuaSurface](https://lua-api.factorio.com/latest/LuaSurface.html) where each integer `x`/`y` represents a different tile. This uses the same format as [MapPosition](https://lua-api.factorio.com/latest/Concepts.html#MapPosition), except it rounds any non-integer `x`/`y` down to whole numbers. It can be specified either with or without explicit keys. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@alias TilePosition TilePosition.0|TilePosition.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@class TilePrototypeFilter ----The condition to filter on. One of `"minable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"collision-mask"`, `"walking-speed-modifier"`, `"vehicle-friction-modifier"`, `"decorative-removal-probability"`, `"emissions"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field filter string ----How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field mode? string ----Inverts the condition. Default is `false`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field invert? boolean ----Applies to **"collision-mask"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field mask CollisionMask|CollisionMaskWithFlags ----Applies to **"collision-mask"**: (required) ----How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"` ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field mask_mode string ----Applies to **"walking-speed-modifier"**: (required) ---- ----Applies to **"vehicle-friction-modifier"**: (required) ---- ----Applies to **"decorative-removal-probability"**: (required) ---- ----Applies to **"emissions"**: (required) ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field comparison ComparatorString ----Applies to **"walking-speed-modifier"**: (required) ----The value to compare against. ---- ----Applies to **"vehicle-friction-modifier"**: (required) ----The value to compare against. ---- ----Applies to **"decorative-removal-probability"**: (required) ----The value to compare against. ---- ----Applies to **"emissions"**: (required) ----The value to compare against. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePrototypeFilter) ----@field value double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainSchedule) ----@class TrainSchedule ----Index of the currently active record ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainSchedule) ----@field current uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainSchedule) ----@field records TrainScheduleRecord[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@class TrainScheduleRecord ----Name of the station. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@field station? string ----Rail to path to. Ignored if `station` is present. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@field rail? LuaEntity ----When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to [LuaEntity::connected_rail_direction](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connected_rail_direction) of a TrainStop. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@field rail_direction? defines.rail_direction ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@field wait_conditions? WaitCondition[] ----Only present when the station is temporary, the value is then always `true`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TrainScheduleRecord) ----@field temporary? boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerDelivery) ----@class TriggerDelivery ----One of `"instant"`, `"projectile"`, `"flame-thrower"`, `"beam"`, `"stream"`, `"artillery"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerDelivery) ----@field type string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerDelivery) ----@field source_effects TriggerEffectItem[] ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerDelivery) ----@field target_effects TriggerEffectItem[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerEffectItem) ----@class TriggerEffectItem ----One of`"damage"`, `"create-entity"`, `"create-explosion"`, `"create-fire"`, `"create-smoke"`, `"create-trivial-smoke"`, `"create-particle"`, `"create-sticker"`, `"nested-result"`, `"play-sound"`, `"push-back"`, `"destroy-cliffs"`, `"show-explosion-on-chart"`, `"insert-item"`, `"script"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerEffectItem) ----@field type string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerEffectItem) ----@field repeat_count uint ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerEffectItem) ----@field affects_target boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerEffectItem) ----@field show_in_tooltip boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@class TriggerItem ----One of `"direct"`, `"area"`, `"line"`, `"cluster"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field type string ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field action_delivery? TriggerDelivery[] ----The trigger will only affect entities that contain any of these flags. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field entity_flags? EntityPrototypeFlags ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field ignore_collision_condition boolean ----The trigger will only affect entities that would collide with given collision mask. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field collision_mask CollisionMask ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field trigger_target_mask TriggerTargetMask ----If `"enemy"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `"ally"` is the opposite of `"enemy"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field force ForceCondition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerItem) ----@field repeat_count uint - ----A set of trigger target masks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TriggerTargetMask) ----@alias TriggerTargetMask {[string]: boolean} - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@class UnitGroupMapSettings ----The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3,600` ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field min_group_gathering_time uint ----The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3,600=36,000` ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_group_gathering_time uint ----After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3,600=7,200` ticks. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_wait_time_for_late_members uint ----The minimum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `5.0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field min_group_radius double ----The maximum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `30.0`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_group_radius double ----The maximum speed a percentage of its regular speed that a group member can speed up to when catching up with the group. Defaults to `1.4`, or 140%. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_member_speedup_when_behind double ----The minimum speed a percentage of its regular speed that a group member can slow down to when ahead of the group. Defaults to `0.6`, or 60%. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_member_slowdown_when_ahead double ----The minimum speed as a percentage of its maximum speed that a group will slow down to so members that fell behind can catch up. Defaults to `0.3`, or 30%. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_group_slowdown_factor double ----When a member of a group falls back more than this factor times the group radius, the group will slow down to its `max_group_slowdown_factor` speed to let them catch up. Defaults to `3`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_group_member_fallback_factor double ----When a member of a group falls back more than this factor times the group radius, it will be dropped from the group. Defaults to `10`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field member_disown_distance double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field tick_tolerance_when_member_arrives uint ----The maximum number of automatically created unit groups gathering for attack at any time. Defaults to `30`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_gathering_unit_groups uint ----The maximum number of members for an attack unit group. This only affects automatically created unit groups, manual groups created through the API are unaffected. Defaults to `200`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitGroupMapSettings) ----@field max_unit_group_size uint - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitSpawnDefinition) ----@class UnitSpawnDefinition ----Prototype name of the unit that would be spawned. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitSpawnDefinition) ----@field unit string ----The points at which to spawn the unit. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UnitSpawnDefinition) ----@field spawn_points SpawnPointDefinition[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter) ----@class UpgradeFilter ----`"item"`, or `"entity"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter) ----@field type string ----Name of the item, or entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#UpgradeFilter) ----@field name? string - ----A vector is a two-element array containing the `x` and `y` components. In some specific cases, the vector is a table with `x` and `y` keys instead, which the documentation will point out. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ---- ----### Example ----``` ----right = {1.0, 0.0} ----``` ----@alias Vector Vector.0|Vector.1 - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#VehicleAutomaticTargetingParameters) ----@class VehicleAutomaticTargetingParameters ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#VehicleAutomaticTargetingParameters) ----@field auto_target_without_gunner boolean ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#VehicleAutomaticTargetingParameters) ----@field auto_target_with_gunner boolean - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ----@class WaitCondition ----One of `"time"`, `"inactivity"`, `"full"`, `"empty"`, `"item_count"`, `"circuit"`, `"robots_inactive"`, `"fluid_count"`, `"passenger_present"`, `"passenger_not_present"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ----@field type string ----Either `"and"`, or `"or"`. Tells how this condition is to be compared with the preceding conditions in the corresponding `wait_conditions` array. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ----@field compare_type string ----Number of ticks to wait when `type` is `"time"`, or number of ticks of inactivity when `type` is `"inactivity"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ----@field ticks? uint ----Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"`, and a circuit condition is configured. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ----@field condition? CircuitCondition - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@class WireConnectionDefinition ----Wire color, either [defines.wire_type.red](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) or [defines.wire_type.green](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.green). ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field wire defines.wire_type ----The entity to (dis)connect the source entity with. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field target_entity LuaEntity ----Mandatory if the source entity has more than one circuit connection using circuit wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field source_circuit_id? defines.circuit_connector_id ----Mandatory if the target entity has more than one circuit connection using circuit wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field target_circuit_id? defines.circuit_connector_id ----Mandatory if the source entity has more than one wire connection using copper wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field source_wire_id? defines.circuit_connector_id ----Mandatory if the target entity has more than one wire connection using copper wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WireConnectionDefinition) ----@field target_wire_id? defines.circuit_connector_id - - diff --git a/.vscode/factorio/runtime-api-custom.lua b/.vscode/factorio/runtime-api-custom.lua deleted file mode 100644 index 7cca405..0000000 --- a/.vscode/factorio/runtime-api-custom.lua +++ /dev/null @@ -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 - - diff --git a/.vscode/factorio/runtime-api-defines.lua b/.vscode/factorio/runtime-api-defines.lua deleted file mode 100644 index d711fb2..0000000 --- a/.vscode/factorio/runtime-api-defines.lua +++ /dev/null @@ -1,2918 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section defines --- This file is automatically generated. Edits will be overwritten. - ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines) ----@class defines -defines={} - ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type) ----@class defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.custom) ----@class defines.alert_type.custom : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.entity_destroyed) ----@class defines.alert_type.entity_destroyed : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.entity_under_attack) ----@class defines.alert_type.entity_under_attack : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.no_material_for_construction) ----@class defines.alert_type.no_material_for_construction : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.no_storage) ----@class defines.alert_type.no_storage : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.not_enough_construction_robots) ----@class defines.alert_type.not_enough_construction_robots : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.not_enough_repair_packs) ----@class defines.alert_type.not_enough_repair_packs : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.train_out_of_fuel) ----@class defines.alert_type.train_out_of_fuel : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type.turret_fire) ----@class defines.alert_type.turret_fire : defines.alert_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.alert_type) ----@class defines.alert_type.__index ----@field custom defines.alert_type.custom ----@field entity_destroyed defines.alert_type.entity_destroyed ----@field entity_under_attack defines.alert_type.entity_under_attack ----@field no_material_for_construction defines.alert_type.no_material_for_construction ----@field no_storage defines.alert_type.no_storage ----@field not_enough_construction_robots defines.alert_type.not_enough_construction_robots ----@field not_enough_repair_packs defines.alert_type.not_enough_repair_packs ----@field train_out_of_fuel defines.alert_type.train_out_of_fuel ----@field turret_fire defines.alert_type.turret_fire -defines.alert_type={} ----AI command exit status. See [LuaEntity::set_command](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_command) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result) ----@class defines.behavior_result ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result.deleted) ----@class defines.behavior_result.deleted : defines.behavior_result ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result.fail) ----@class defines.behavior_result.fail : defines.behavior_result ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result.in_progress) ----@class defines.behavior_result.in_progress : defines.behavior_result ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result.success) ----@class defines.behavior_result.success : defines.behavior_result ----AI command exit status. See [LuaEntity::set_command](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_command) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.behavior_result) ----@class defines.behavior_result.__index ----@field deleted defines.behavior_result.deleted ----@field fail defines.behavior_result.fail ----@field in_progress defines.behavior_result.in_progress ----@field success defines.behavior_result.success -defines.behavior_result={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type) ----@class defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.blueprint_ghost) ----@class defines.build_check_type.blueprint_ghost : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.ghost_revive) ----@class defines.build_check_type.ghost_revive : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.manual) ----@class defines.build_check_type.manual : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.manual_ghost) ----@class defines.build_check_type.manual_ghost : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.script) ----@class defines.build_check_type.script : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type.script_ghost) ----@class defines.build_check_type.script_ghost : defines.build_check_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.build_check_type) ----@class defines.build_check_type.__index ----@field blueprint_ghost defines.build_check_type.blueprint_ghost ----@field ghost_revive defines.build_check_type.ghost_revive ----@field manual defines.build_check_type.manual ----@field manual_ghost defines.build_check_type.manual_ghost ----@field script defines.build_check_type.script ----@field script_ghost defines.build_check_type.script_ghost -defines.build_check_type={} ----State of a chain signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state) ----@class defines.chain_signal_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state.all_open) ----@class defines.chain_signal_state.all_open : defines.chain_signal_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state.none) ----@class defines.chain_signal_state.none : defines.chain_signal_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state.none_open) ----@class defines.chain_signal_state.none_open : defines.chain_signal_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state.partially_open) ----@class defines.chain_signal_state.partially_open : defines.chain_signal_state ----State of a chain signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chain_signal_state) ----@class defines.chain_signal_state.__index ----@field all_open defines.chain_signal_state.all_open ----@field none defines.chain_signal_state.none ----@field none_open defines.chain_signal_state.none_open ----@field partially_open defines.chain_signal_state.partially_open -defines.chain_signal_state={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status) ----@class defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.basic_tiles) ----@class defines.chunk_generated_status.basic_tiles : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.corrected_tiles) ----@class defines.chunk_generated_status.corrected_tiles : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.custom_tiles) ----@class defines.chunk_generated_status.custom_tiles : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.entities) ----@class defines.chunk_generated_status.entities : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.nothing) ----@class defines.chunk_generated_status.nothing : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status.tiles) ----@class defines.chunk_generated_status.tiles : defines.chunk_generated_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.chunk_generated_status) ----@class defines.chunk_generated_status.__index ----@field basic_tiles defines.chunk_generated_status.basic_tiles ----@field corrected_tiles defines.chunk_generated_status.corrected_tiles ----@field custom_tiles defines.chunk_generated_status.custom_tiles ----@field entities defines.chunk_generated_status.entities ----@field nothing defines.chunk_generated_status.nothing ----@field tiles defines.chunk_generated_status.tiles -defines.chunk_generated_status={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index) ----@class defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.arithmetic_combinator) ----@class defines.circuit_condition_index.arithmetic_combinator : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.constant_combinator) ----@class defines.circuit_condition_index.constant_combinator : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.decider_combinator) ----@class defines.circuit_condition_index.decider_combinator : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.inserter_circuit) ----@class defines.circuit_condition_index.inserter_circuit : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.inserter_logistic) ----@class defines.circuit_condition_index.inserter_logistic : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.lamp) ----@class defines.circuit_condition_index.lamp : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.offshore_pump) ----@class defines.circuit_condition_index.offshore_pump : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index.pump) ----@class defines.circuit_condition_index.pump : defines.circuit_condition_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_condition_index) ----@class defines.circuit_condition_index.__index ----@field arithmetic_combinator defines.circuit_condition_index.arithmetic_combinator ----@field constant_combinator defines.circuit_condition_index.constant_combinator ----@field decider_combinator defines.circuit_condition_index.decider_combinator ----@field inserter_circuit defines.circuit_condition_index.inserter_circuit ----@field inserter_logistic defines.circuit_condition_index.inserter_logistic ----@field lamp defines.circuit_condition_index.lamp ----@field offshore_pump defines.circuit_condition_index.offshore_pump ----@field pump defines.circuit_condition_index.pump -defines.circuit_condition_index={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) ----@class defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.accumulator) ----@class defines.circuit_connector_id.accumulator : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.combinator_input) ----@class defines.circuit_connector_id.combinator_input : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.combinator_output) ----@class defines.circuit_connector_id.combinator_output : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.constant_combinator) ----@class defines.circuit_connector_id.constant_combinator : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.container) ----@class defines.circuit_connector_id.container : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.electric_pole) ----@class defines.circuit_connector_id.electric_pole : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.inserter) ----@class defines.circuit_connector_id.inserter : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.lamp) ----@class defines.circuit_connector_id.lamp : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.linked_container) ----@class defines.circuit_connector_id.linked_container : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.offshore_pump) ----@class defines.circuit_connector_id.offshore_pump : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.programmable_speaker) ----@class defines.circuit_connector_id.programmable_speaker : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.pump) ----@class defines.circuit_connector_id.pump : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.rail_chain_signal) ----@class defines.circuit_connector_id.rail_chain_signal : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.rail_signal) ----@class defines.circuit_connector_id.rail_signal : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.roboport) ----@class defines.circuit_connector_id.roboport : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.storage_tank) ----@class defines.circuit_connector_id.storage_tank : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id.wall) ----@class defines.circuit_connector_id.wall : defines.circuit_connector_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.circuit_connector_id) ----@class defines.circuit_connector_id.__index ----@field accumulator defines.circuit_connector_id.accumulator ----@field combinator_input defines.circuit_connector_id.combinator_input ----@field combinator_output defines.circuit_connector_id.combinator_output ----@field constant_combinator defines.circuit_connector_id.constant_combinator ----@field container defines.circuit_connector_id.container ----@field electric_pole defines.circuit_connector_id.electric_pole ----@field inserter defines.circuit_connector_id.inserter ----@field lamp defines.circuit_connector_id.lamp ----@field linked_container defines.circuit_connector_id.linked_container ----@field offshore_pump defines.circuit_connector_id.offshore_pump ----@field programmable_speaker defines.circuit_connector_id.programmable_speaker ----@field pump defines.circuit_connector_id.pump ----@field rail_chain_signal defines.circuit_connector_id.rail_chain_signal ----@field rail_signal defines.circuit_connector_id.rail_signal ----@field roboport defines.circuit_connector_id.roboport ----@field storage_tank defines.circuit_connector_id.storage_tank ----@field wall defines.circuit_connector_id.wall -defines.circuit_connector_id={} ----Command given to units describing what they should do. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command) ----@class defines.command ----Attack another entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.attack) ----@class defines.command.attack : defines.command ----Go to a place and attack what you see. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.attack_area) ----@class defines.command.attack_area : defines.command ----Go to a position and build a base there. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.build_base) ----@class defines.command.build_base : defines.command ----Chain commands together, see [defines.compound_command](https://lua-api.factorio.com/latest/defines.html#defines.compound_command). ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.compound) ----@class defines.command.compound : defines.command ----Flee from another entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.flee) ----@class defines.command.flee : defines.command ----Go to a specific position. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.go_to_location) ----@class defines.command.go_to_location : defines.command ----Do what your group wants you to do. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.group) ----@class defines.command.group : defines.command ----Stop moving and stay where you are. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.stop) ----@class defines.command.stop : defines.command ----Chill. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command.wander) ----@class defines.command.wander : defines.command ----Command given to units describing what they should do. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.command) ----@class defines.command.__index ----@field attack defines.command.attack ----@field attack_area defines.command.attack_area ----@field build_base defines.command.build_base ----@field compound defines.command.compound ----@field flee defines.command.flee ----@field go_to_location defines.command.go_to_location ----@field group defines.command.group ----@field stop defines.command.stop ----@field wander defines.command.wander -defines.command={} ----How commands are joined together in a compound command (see [defines.command.compound](https://lua-api.factorio.com/latest/defines.html#defines.command.compound)). ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.compound_command) ----@class defines.compound_command ----Fail on first failure. Only succeeds if all commands (executed one after another) succeed. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.compound_command.logical_and) ----@class defines.compound_command.logical_and : defines.compound_command ----Succeed on first success. Only fails if all commands (executed one after another) fail. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.compound_command.logical_or) ----@class defines.compound_command.logical_or : defines.compound_command ----Execute all commands in sequence and fail or succeed depending on the return status of the last command. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.compound_command.return_last) ----@class defines.compound_command.return_last : defines.compound_command ----How commands are joined together in a compound command (see [defines.command.compound](https://lua-api.factorio.com/latest/defines.html#defines.command.compound)). ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.compound_command) ----@class defines.compound_command.__index ----@field logical_and defines.compound_command.logical_and ----@field logical_or defines.compound_command.logical_or ----@field return_last defines.compound_command.return_last -defines.compound_command={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior) ----@class defines.control_behavior ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior) ----@class defines.control_behavior.__index -defines.control_behavior={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter) ----@class defines.control_behavior.inserter ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter) ----@class defines.control_behavior.inserter.__index -defines.control_behavior.inserter={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation) ----@class defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation.enable_disable) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.enable_disable : defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation.none) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.none : defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation.read_hand_contents) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.read_hand_contents : defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation.set_filters) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.set_filters : defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation.set_stack_size) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.set_stack_size : defines.control_behavior.inserter.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.circuit_mode_of_operation) ----@class defines.control_behavior.inserter.circuit_mode_of_operation.__index ----@field enable_disable defines.control_behavior.inserter.circuit_mode_of_operation.enable_disable ----@field none defines.control_behavior.inserter.circuit_mode_of_operation.none ----@field read_hand_contents defines.control_behavior.inserter.circuit_mode_of_operation.read_hand_contents ----@field set_filters defines.control_behavior.inserter.circuit_mode_of_operation.set_filters ----@field set_stack_size defines.control_behavior.inserter.circuit_mode_of_operation.set_stack_size -defines.control_behavior.inserter.circuit_mode_of_operation={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.hand_read_mode) ----@class defines.control_behavior.inserter.hand_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.hand_read_mode.hold) ----@class defines.control_behavior.inserter.hand_read_mode.hold : defines.control_behavior.inserter.hand_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.hand_read_mode.pulse) ----@class defines.control_behavior.inserter.hand_read_mode.pulse : defines.control_behavior.inserter.hand_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.inserter.hand_read_mode) ----@class defines.control_behavior.inserter.hand_read_mode.__index ----@field hold defines.control_behavior.inserter.hand_read_mode.hold ----@field pulse defines.control_behavior.inserter.hand_read_mode.pulse -defines.control_behavior.inserter.hand_read_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.lamp) ----@class defines.control_behavior.lamp ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.lamp) ----@class defines.control_behavior.lamp.__index -defines.control_behavior.lamp={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.lamp.circuit_mode_of_operation) ----@class defines.control_behavior.lamp.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.lamp.circuit_mode_of_operation.use_colors) ----@class defines.control_behavior.lamp.circuit_mode_of_operation.use_colors : defines.control_behavior.lamp.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.lamp.circuit_mode_of_operation) ----@class defines.control_behavior.lamp.circuit_mode_of_operation.__index ----@field use_colors defines.control_behavior.lamp.circuit_mode_of_operation.use_colors -defines.control_behavior.lamp.circuit_mode_of_operation={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container) ----@class defines.control_behavior.logistic_container ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container) ----@class defines.control_behavior.logistic_container.__index -defines.control_behavior.logistic_container={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container.circuit_mode_of_operation) ----@class defines.control_behavior.logistic_container.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container.circuit_mode_of_operation.send_contents) ----@class defines.control_behavior.logistic_container.circuit_mode_of_operation.send_contents : defines.control_behavior.logistic_container.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container.circuit_mode_of_operation.set_requests) ----@class defines.control_behavior.logistic_container.circuit_mode_of_operation.set_requests : defines.control_behavior.logistic_container.circuit_mode_of_operation ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.logistic_container.circuit_mode_of_operation) ----@class defines.control_behavior.logistic_container.circuit_mode_of_operation.__index ----@field send_contents defines.control_behavior.logistic_container.circuit_mode_of_operation.send_contents ----@field set_requests defines.control_behavior.logistic_container.circuit_mode_of_operation.set_requests -defines.control_behavior.logistic_container.circuit_mode_of_operation={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill) ----@class defines.control_behavior.mining_drill ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill) ----@class defines.control_behavior.mining_drill.__index -defines.control_behavior.mining_drill={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill.resource_read_mode) ----@class defines.control_behavior.mining_drill.resource_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill.resource_read_mode.entire_patch) ----@class defines.control_behavior.mining_drill.resource_read_mode.entire_patch : defines.control_behavior.mining_drill.resource_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill.resource_read_mode.this_miner) ----@class defines.control_behavior.mining_drill.resource_read_mode.this_miner : defines.control_behavior.mining_drill.resource_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.mining_drill.resource_read_mode) ----@class defines.control_behavior.mining_drill.resource_read_mode.__index ----@field entire_patch defines.control_behavior.mining_drill.resource_read_mode.entire_patch ----@field this_miner defines.control_behavior.mining_drill.resource_read_mode.this_miner -defines.control_behavior.mining_drill.resource_read_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt) ----@class defines.control_behavior.transport_belt ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt) ----@class defines.control_behavior.transport_belt.__index -defines.control_behavior.transport_belt={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt.content_read_mode) ----@class defines.control_behavior.transport_belt.content_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt.content_read_mode.hold) ----@class defines.control_behavior.transport_belt.content_read_mode.hold : defines.control_behavior.transport_belt.content_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt.content_read_mode.pulse) ----@class defines.control_behavior.transport_belt.content_read_mode.pulse : defines.control_behavior.transport_belt.content_read_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.transport_belt.content_read_mode) ----@class defines.control_behavior.transport_belt.content_read_mode.__index ----@field hold defines.control_behavior.transport_belt.content_read_mode.hold ----@field pulse defines.control_behavior.transport_belt.content_read_mode.pulse -defines.control_behavior.transport_belt.content_read_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type) ----@class defines.control_behavior.type ----[LuaAccumulatorControlBehavior](https://lua-api.factorio.com/latest/LuaAccumulatorControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.accumulator) ----@class defines.control_behavior.type.accumulator : defines.control_behavior.type ----[LuaArithmeticCombinatorControlBehavior](https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.arithmetic_combinator) ----@class defines.control_behavior.type.arithmetic_combinator : defines.control_behavior.type ----[LuaConstantCombinatorControlBehavior](https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.constant_combinator) ----@class defines.control_behavior.type.constant_combinator : defines.control_behavior.type ----[LuaContainerControlBehavior](https://lua-api.factorio.com/latest/LuaContainerControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.container) ----@class defines.control_behavior.type.container : defines.control_behavior.type ----[LuaDeciderCombinatorControlBehavior](https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.decider_combinator) ----@class defines.control_behavior.type.decider_combinator : defines.control_behavior.type ----[LuaGenericOnOffControlBehavior](https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.generic_on_off) ----@class defines.control_behavior.type.generic_on_off : defines.control_behavior.type ----[LuaInserterControlBehavior](https://lua-api.factorio.com/latest/LuaInserterControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.inserter) ----@class defines.control_behavior.type.inserter : defines.control_behavior.type ----[LuaLampControlBehavior](https://lua-api.factorio.com/latest/LuaLampControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.lamp) ----@class defines.control_behavior.type.lamp : defines.control_behavior.type ----[LuaLogisticContainerControlBehavior](https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.logistic_container) ----@class defines.control_behavior.type.logistic_container : defines.control_behavior.type ----[LuaMiningDrillControlBehavior](https://lua-api.factorio.com/latest/LuaMiningDrillControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.mining_drill) ----@class defines.control_behavior.type.mining_drill : defines.control_behavior.type ----[LuaProgrammableSpeakerControlBehavior](https://lua-api.factorio.com/latest/LuaProgrammableSpeakerControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.programmable_speaker) ----@class defines.control_behavior.type.programmable_speaker : defines.control_behavior.type ----[LuaRailChainSignalControlBehavior](https://lua-api.factorio.com/latest/LuaRailChainSignalControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.rail_chain_signal) ----@class defines.control_behavior.type.rail_chain_signal : defines.control_behavior.type ----[LuaRailSignalControlBehavior](https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.rail_signal) ----@class defines.control_behavior.type.rail_signal : defines.control_behavior.type ----[LuaRoboportControlBehavior](https://lua-api.factorio.com/latest/LuaRoboportControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.roboport) ----@class defines.control_behavior.type.roboport : defines.control_behavior.type ----[LuaStorageTankControlBehavior](https://lua-api.factorio.com/latest/LuaStorageTankControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.storage_tank) ----@class defines.control_behavior.type.storage_tank : defines.control_behavior.type ----[LuaTrainStopControlBehavior](https://lua-api.factorio.com/latest/LuaTrainStopControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.train_stop) ----@class defines.control_behavior.type.train_stop : defines.control_behavior.type ----[LuaTransportBeltControlBehavior](https://lua-api.factorio.com/latest/LuaTransportBeltControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.transport_belt) ----@class defines.control_behavior.type.transport_belt : defines.control_behavior.type ----[LuaWallControlBehavior](https://lua-api.factorio.com/latest/LuaWallControlBehavior.html) ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type.wall) ----@class defines.control_behavior.type.wall : defines.control_behavior.type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.control_behavior.type) ----@class defines.control_behavior.type.__index ----@field accumulator defines.control_behavior.type.accumulator ----@field arithmetic_combinator defines.control_behavior.type.arithmetic_combinator ----@field constant_combinator defines.control_behavior.type.constant_combinator ----@field container defines.control_behavior.type.container ----@field decider_combinator defines.control_behavior.type.decider_combinator ----@field generic_on_off defines.control_behavior.type.generic_on_off ----@field inserter defines.control_behavior.type.inserter ----@field lamp defines.control_behavior.type.lamp ----@field logistic_container defines.control_behavior.type.logistic_container ----@field mining_drill defines.control_behavior.type.mining_drill ----@field programmable_speaker defines.control_behavior.type.programmable_speaker ----@field rail_chain_signal defines.control_behavior.type.rail_chain_signal ----@field rail_signal defines.control_behavior.type.rail_signal ----@field roboport defines.control_behavior.type.roboport ----@field storage_tank defines.control_behavior.type.storage_tank ----@field train_stop defines.control_behavior.type.train_stop ----@field transport_belt defines.control_behavior.type.transport_belt ----@field wall defines.control_behavior.type.wall -defines.control_behavior.type={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers) ----@class defines.controllers ----The controller controls a character. This is the default controller in freeplay. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.character) ----@class defines.controllers.character : defines.controllers ----The player can't interact with the world, and the camera pans around in a predefined manner. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.cutscene) ----@class defines.controllers.cutscene : defines.controllers ----The Editor Controller near ultimate power to do almost anything in the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.editor) ----@class defines.controllers.editor : defines.controllers ----Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.ghost) ----@class defines.controllers.ghost : defines.controllers ----The controller isn't tied to a character. This is the default controller in sandbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.god) ----@class defines.controllers.god : defines.controllers ----Can't change anything in the world but can view anything. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers.spectator) ----@class defines.controllers.spectator : defines.controllers ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.controllers) ----@class defines.controllers.__index ----@field character defines.controllers.character ----@field cutscene defines.controllers.cutscene ----@field editor defines.controllers.editor ----@field ghost defines.controllers.ghost ----@field god defines.controllers.god ----@field spectator defines.controllers.spectator -defines.controllers={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item) ----@class defines.deconstruction_item ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item) ----@class defines.deconstruction_item.__index -defines.deconstruction_item={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.entity_filter_mode) ----@class defines.deconstruction_item.entity_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.entity_filter_mode.blacklist) ----@class defines.deconstruction_item.entity_filter_mode.blacklist : defines.deconstruction_item.entity_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.entity_filter_mode.whitelist) ----@class defines.deconstruction_item.entity_filter_mode.whitelist : defines.deconstruction_item.entity_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.entity_filter_mode) ----@class defines.deconstruction_item.entity_filter_mode.__index ----@field blacklist defines.deconstruction_item.entity_filter_mode.blacklist ----@field whitelist defines.deconstruction_item.entity_filter_mode.whitelist -defines.deconstruction_item.entity_filter_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_filter_mode) ----@class defines.deconstruction_item.tile_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_filter_mode.blacklist) ----@class defines.deconstruction_item.tile_filter_mode.blacklist : defines.deconstruction_item.tile_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_filter_mode.whitelist) ----@class defines.deconstruction_item.tile_filter_mode.whitelist : defines.deconstruction_item.tile_filter_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_filter_mode) ----@class defines.deconstruction_item.tile_filter_mode.__index ----@field blacklist defines.deconstruction_item.tile_filter_mode.blacklist ----@field whitelist defines.deconstruction_item.tile_filter_mode.whitelist -defines.deconstruction_item.tile_filter_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode) ----@class defines.deconstruction_item.tile_selection_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode.always) ----@class defines.deconstruction_item.tile_selection_mode.always : defines.deconstruction_item.tile_selection_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode.never) ----@class defines.deconstruction_item.tile_selection_mode.never : defines.deconstruction_item.tile_selection_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode.normal) ----@class defines.deconstruction_item.tile_selection_mode.normal : defines.deconstruction_item.tile_selection_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode.only) ----@class defines.deconstruction_item.tile_selection_mode.only : defines.deconstruction_item.tile_selection_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.deconstruction_item.tile_selection_mode) ----@class defines.deconstruction_item.tile_selection_mode.__index ----@field always defines.deconstruction_item.tile_selection_mode.always ----@field never defines.deconstruction_item.tile_selection_mode.never ----@field normal defines.deconstruction_item.tile_selection_mode.normal ----@field only defines.deconstruction_item.tile_selection_mode.only -defines.deconstruction_item.tile_selection_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty) ----@class defines.difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty.easy) ----@class defines.difficulty.easy : defines.difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty.hard) ----@class defines.difficulty.hard : defines.difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty.normal) ----@class defines.difficulty.normal : defines.difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty) ----@class defines.difficulty.__index ----@field easy defines.difficulty.easy ----@field hard defines.difficulty.hard ----@field normal defines.difficulty.normal -defines.difficulty={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings) ----@class defines.difficulty_settings ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings) ----@class defines.difficulty_settings.__index -defines.difficulty_settings={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.recipe_difficulty) ----@class defines.difficulty_settings.recipe_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.recipe_difficulty.expensive) ----@class defines.difficulty_settings.recipe_difficulty.expensive : defines.difficulty_settings.recipe_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.recipe_difficulty.normal) ----@class defines.difficulty_settings.recipe_difficulty.normal : defines.difficulty_settings.recipe_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.recipe_difficulty) ----@class defines.difficulty_settings.recipe_difficulty.__index ----@field expensive defines.difficulty_settings.recipe_difficulty.expensive ----@field normal defines.difficulty_settings.recipe_difficulty.normal -defines.difficulty_settings.recipe_difficulty={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.technology_difficulty) ----@class defines.difficulty_settings.technology_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.technology_difficulty.expensive) ----@class defines.difficulty_settings.technology_difficulty.expensive : defines.difficulty_settings.technology_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.technology_difficulty.normal) ----@class defines.difficulty_settings.technology_difficulty.normal : defines.difficulty_settings.technology_difficulty ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.difficulty_settings.technology_difficulty) ----@class defines.difficulty_settings.technology_difficulty.__index ----@field expensive defines.difficulty_settings.technology_difficulty.expensive ----@field normal defines.difficulty_settings.technology_difficulty.normal -defines.difficulty_settings.technology_difficulty={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction) ----@class defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.east) ----@class defines.direction.east : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.north) ----@class defines.direction.north : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.northeast) ----@class defines.direction.northeast : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.northwest) ----@class defines.direction.northwest : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.south) ----@class defines.direction.south : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.southeast) ----@class defines.direction.southeast : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.southwest) ----@class defines.direction.southwest : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction.west) ----@class defines.direction.west : defines.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.direction) ----@class defines.direction.__index ----@field east defines.direction.east ----@field north defines.direction.north ----@field northeast defines.direction.northeast ----@field northwest defines.direction.northwest ----@field south defines.direction.south ----@field southeast defines.direction.southeast ----@field southwest defines.direction.southwest ----@field west defines.direction.west -defines.direction={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason) ----@class defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.afk) ----@class defines.disconnect_reason.afk : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.banned) ----@class defines.disconnect_reason.banned : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.cannot_keep_up) ----@class defines.disconnect_reason.cannot_keep_up : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.desync_limit_reached) ----@class defines.disconnect_reason.desync_limit_reached : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.dropped) ----@class defines.disconnect_reason.dropped : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.kicked) ----@class defines.disconnect_reason.kicked : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.kicked_and_deleted) ----@class defines.disconnect_reason.kicked_and_deleted : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.quit) ----@class defines.disconnect_reason.quit : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.reconnect) ----@class defines.disconnect_reason.reconnect : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.switching_servers) ----@class defines.disconnect_reason.switching_servers : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason.wrong_input) ----@class defines.disconnect_reason.wrong_input : defines.disconnect_reason ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.disconnect_reason) ----@class defines.disconnect_reason.__index ----@field afk defines.disconnect_reason.afk ----@field banned defines.disconnect_reason.banned ----@field cannot_keep_up defines.disconnect_reason.cannot_keep_up ----@field desync_limit_reached defines.disconnect_reason.desync_limit_reached ----@field dropped defines.disconnect_reason.dropped ----@field kicked defines.disconnect_reason.kicked ----@field kicked_and_deleted defines.disconnect_reason.kicked_and_deleted ----@field quit defines.disconnect_reason.quit ----@field reconnect defines.disconnect_reason.reconnect ----@field switching_servers defines.disconnect_reason.switching_servers ----@field wrong_input defines.disconnect_reason.wrong_input -defines.disconnect_reason={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction) ----@class defines.distraction ----Attack closer enemy entities, including entities "built" by player (belts, inserters, chests). ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction.by_anything) ----@class defines.distraction.by_anything : defines.distraction ----Attack when attacked. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction.by_damage) ----@class defines.distraction.by_damage : defines.distraction ----Attack closer enemy entities with force. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction.by_enemy) ----@class defines.distraction.by_enemy : defines.distraction ----Perform command even if someone attacks the unit. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction.none) ----@class defines.distraction.none : defines.distraction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.distraction) ----@class defines.distraction.__index ----@field by_anything defines.distraction.by_anything ----@field by_damage defines.distraction.by_damage ----@field by_enemy defines.distraction.by_enemy ----@field none defines.distraction.none -defines.distraction={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status) ----@class defines.entity_status ----Used by rail signals. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.cant_divide_segments) ----@class defines.entity_status.cant_divide_segments : defines.entity_status ----Used by accumulators. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.charging) ----@class defines.entity_status.charging : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.closed_by_circuit_network) ----@class defines.entity_status.closed_by_circuit_network : defines.entity_status ----Used by constant combinators: Combinator is turned off via switch in GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.disabled) ----@class defines.entity_status.disabled : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.disabled_by_control_behavior) ----@class defines.entity_status.disabled_by_control_behavior : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.disabled_by_script) ----@class defines.entity_status.disabled_by_script : defines.entity_status ----Used by accumulators. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.discharging) ----@class defines.entity_status.discharging : defines.entity_status ----Used by crafting machines. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.fluid_ingredient_shortage) ----@class defines.entity_status.fluid_ingredient_shortage : defines.entity_status ----Used by crafting machines, boilers, burner energy sources and reactors: Reactor/burner has full burnt result inventory, boiler has full output fluidbox. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.full_output) ----@class defines.entity_status.full_output : defines.entity_status ----Used by accumulators. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.fully_charged) ----@class defines.entity_status.fully_charged : defines.entity_status ----Used by crafting machines. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.item_ingredient_shortage) ----@class defines.entity_status.item_ingredient_shortage : defines.entity_status ----Used by the rocket silo. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.launching_rocket) ----@class defines.entity_status.launching_rocket : defines.entity_status ----Used by boilers and fluid turrets: Boiler still has some fluid but is about to run out. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.low_input_fluid) ----@class defines.entity_status.low_input_fluid : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.low_power) ----@class defines.entity_status.low_power : defines.entity_status ----Used by heat energy sources. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.low_temperature) ----@class defines.entity_status.low_temperature : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.marked_for_deconstruction) ----@class defines.entity_status.marked_for_deconstruction : defines.entity_status ----Used by mining drills when the mining fluid is missing. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.missing_required_fluid) ----@class defines.entity_status.missing_required_fluid : defines.entity_status ----Used by labs. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.missing_science_packs) ----@class defines.entity_status.missing_science_packs : defines.entity_status ----Used by power switches. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.networks_connected) ----@class defines.entity_status.networks_connected : defines.entity_status ----Used by power switches. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.networks_disconnected) ----@class defines.entity_status.networks_disconnected : defines.entity_status ----Used by ammo turrets. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_ammo) ----@class defines.entity_status.no_ammo : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_fuel) ----@class defines.entity_status.no_fuel : defines.entity_status ----Used by furnaces. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_ingredients) ----@class defines.entity_status.no_ingredients : defines.entity_status ----Used by boilers, fluid turrets and fluid energy sources: Boiler has no fluid to work with. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_input_fluid) ----@class defines.entity_status.no_input_fluid : defines.entity_status ----Used by mining drills. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_minable_resources) ----@class defines.entity_status.no_minable_resources : defines.entity_status ----Used by beacons. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_modules_to_transmit) ----@class defines.entity_status.no_modules_to_transmit : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_power) ----@class defines.entity_status.no_power : defines.entity_status ----Used by assembling machines. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_recipe) ----@class defines.entity_status.no_recipe : defines.entity_status ----Used by labs. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.no_research_in_progress) ----@class defines.entity_status.no_research_in_progress : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.normal) ----@class defines.entity_status.normal : defines.entity_status ----Used by rail signals. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.not_connected_to_rail) ----@class defines.entity_status.not_connected_to_rail : defines.entity_status ----Used by generators and solar panels. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.not_plugged_in_electric_network) ----@class defines.entity_status.not_plugged_in_electric_network : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.opened_by_circuit_network) ----@class defines.entity_status.opened_by_circuit_network : defines.entity_status ----Used by logistic containers. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.out_of_logistic_network) ----@class defines.entity_status.out_of_logistic_network : defines.entity_status ----Used by the rocket silo. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.preparing_rocket_for_launch) ----@class defines.entity_status.preparing_rocket_for_launch : defines.entity_status ----Used by roboports. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.recharging_after_power_outage) ----@class defines.entity_status.recharging_after_power_outage : defines.entity_status ----Used by lamps. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.turned_off_during_daytime) ----@class defines.entity_status.turned_off_during_daytime : defines.entity_status ----Used by inserters. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.waiting_for_source_items) ----@class defines.entity_status.waiting_for_source_items : defines.entity_status ----Used by inserters and mining drills. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.waiting_for_space_in_destination) ----@class defines.entity_status.waiting_for_space_in_destination : defines.entity_status ----Used by inserters targeting entity ghosts. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.waiting_for_target_to_be_built) ----@class defines.entity_status.waiting_for_target_to_be_built : defines.entity_status ----Used by inserters targeting rails. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.waiting_for_train) ----@class defines.entity_status.waiting_for_train : defines.entity_status ----Used by the rocket silo. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.waiting_to_launch_rocket) ----@class defines.entity_status.waiting_to_launch_rocket : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status.working) ----@class defines.entity_status.working : defines.entity_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.entity_status) ----@class defines.entity_status.__index ----@field cant_divide_segments defines.entity_status.cant_divide_segments ----@field charging defines.entity_status.charging ----@field closed_by_circuit_network defines.entity_status.closed_by_circuit_network ----@field disabled defines.entity_status.disabled ----@field disabled_by_control_behavior defines.entity_status.disabled_by_control_behavior ----@field disabled_by_script defines.entity_status.disabled_by_script ----@field discharging defines.entity_status.discharging ----@field fluid_ingredient_shortage defines.entity_status.fluid_ingredient_shortage ----@field full_output defines.entity_status.full_output ----@field fully_charged defines.entity_status.fully_charged ----@field item_ingredient_shortage defines.entity_status.item_ingredient_shortage ----@field launching_rocket defines.entity_status.launching_rocket ----@field low_input_fluid defines.entity_status.low_input_fluid ----@field low_power defines.entity_status.low_power ----@field low_temperature defines.entity_status.low_temperature ----@field marked_for_deconstruction defines.entity_status.marked_for_deconstruction ----@field missing_required_fluid defines.entity_status.missing_required_fluid ----@field missing_science_packs defines.entity_status.missing_science_packs ----@field networks_connected defines.entity_status.networks_connected ----@field networks_disconnected defines.entity_status.networks_disconnected ----@field no_ammo defines.entity_status.no_ammo ----@field no_fuel defines.entity_status.no_fuel ----@field no_ingredients defines.entity_status.no_ingredients ----@field no_input_fluid defines.entity_status.no_input_fluid ----@field no_minable_resources defines.entity_status.no_minable_resources ----@field no_modules_to_transmit defines.entity_status.no_modules_to_transmit ----@field no_power defines.entity_status.no_power ----@field no_recipe defines.entity_status.no_recipe ----@field no_research_in_progress defines.entity_status.no_research_in_progress ----@field normal defines.entity_status.normal ----@field not_connected_to_rail defines.entity_status.not_connected_to_rail ----@field not_plugged_in_electric_network defines.entity_status.not_plugged_in_electric_network ----@field opened_by_circuit_network defines.entity_status.opened_by_circuit_network ----@field out_of_logistic_network defines.entity_status.out_of_logistic_network ----@field preparing_rocket_for_launch defines.entity_status.preparing_rocket_for_launch ----@field recharging_after_power_outage defines.entity_status.recharging_after_power_outage ----@field turned_off_during_daytime defines.entity_status.turned_off_during_daytime ----@field waiting_for_source_items defines.entity_status.waiting_for_source_items ----@field waiting_for_space_in_destination defines.entity_status.waiting_for_space_in_destination ----@field waiting_for_target_to_be_built defines.entity_status.waiting_for_target_to_be_built ----@field waiting_for_train defines.entity_status.waiting_for_train ----@field waiting_to_launch_rocket defines.entity_status.waiting_to_launch_rocket ----@field working defines.entity_status.working -defines.entity_status={} ----See the [events page](https://lua-api.factorio.com/latest/events.html) for more info on what events contain and when they get raised. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events) ----@class defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_ai_command_completed) ----@class defines.events.on_ai_command_completed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_area_cloned) ----@class defines.events.on_area_cloned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_biter_base_built) ----@class defines.events.on_biter_base_built : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_brush_cloned) ----@class defines.events.on_brush_cloned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_build_base_arrived) ----@class defines.events.on_build_base_arrived : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_built_entity) ----@class defines.events.on_built_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_cancelled_deconstruction) ----@class defines.events.on_cancelled_deconstruction : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_cancelled_upgrade) ----@class defines.events.on_cancelled_upgrade : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_character_corpse_expired) ----@class defines.events.on_character_corpse_expired : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chart_tag_added) ----@class defines.events.on_chart_tag_added : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chart_tag_modified) ----@class defines.events.on_chart_tag_modified : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chart_tag_removed) ----@class defines.events.on_chart_tag_removed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chunk_charted) ----@class defines.events.on_chunk_charted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chunk_deleted) ----@class defines.events.on_chunk_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_chunk_generated) ----@class defines.events.on_chunk_generated : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_combat_robot_expired) ----@class defines.events.on_combat_robot_expired : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_console_chat) ----@class defines.events.on_console_chat : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_console_command) ----@class defines.events.on_console_command : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_cutscene_cancelled) ----@class defines.events.on_cutscene_cancelled : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_cutscene_waypoint_reached) ----@class defines.events.on_cutscene_waypoint_reached : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_difficulty_settings_changed) ----@class defines.events.on_difficulty_settings_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_cloned) ----@class defines.events.on_entity_cloned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_damaged) ----@class defines.events.on_entity_damaged : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_destroyed) ----@class defines.events.on_entity_destroyed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_died) ----@class defines.events.on_entity_died : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_logistic_slot_changed) ----@class defines.events.on_entity_logistic_slot_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_renamed) ----@class defines.events.on_entity_renamed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_settings_pasted) ----@class defines.events.on_entity_settings_pasted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_entity_spawned) ----@class defines.events.on_entity_spawned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_equipment_inserted) ----@class defines.events.on_equipment_inserted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_equipment_removed) ----@class defines.events.on_equipment_removed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_force_cease_fire_changed) ----@class defines.events.on_force_cease_fire_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_force_created) ----@class defines.events.on_force_created : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_force_friends_changed) ----@class defines.events.on_force_friends_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_force_reset) ----@class defines.events.on_force_reset : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_forces_merged) ----@class defines.events.on_forces_merged : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_forces_merging) ----@class defines.events.on_forces_merging : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_game_created_from_scenario) ----@class defines.events.on_game_created_from_scenario : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_checked_state_changed) ----@class defines.events.on_gui_checked_state_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_click) ----@class defines.events.on_gui_click : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_closed) ----@class defines.events.on_gui_closed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_confirmed) ----@class defines.events.on_gui_confirmed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_elem_changed) ----@class defines.events.on_gui_elem_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_location_changed) ----@class defines.events.on_gui_location_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_opened) ----@class defines.events.on_gui_opened : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_selected_tab_changed) ----@class defines.events.on_gui_selected_tab_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_selection_state_changed) ----@class defines.events.on_gui_selection_state_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_switch_state_changed) ----@class defines.events.on_gui_switch_state_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_text_changed) ----@class defines.events.on_gui_text_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_value_changed) ----@class defines.events.on_gui_value_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_land_mine_armed) ----@class defines.events.on_land_mine_armed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_lua_shortcut) ----@class defines.events.on_lua_shortcut : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_marked_for_deconstruction) ----@class defines.events.on_marked_for_deconstruction : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_marked_for_upgrade) ----@class defines.events.on_marked_for_upgrade : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_market_item_purchased) ----@class defines.events.on_market_item_purchased : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_mod_item_opened) ----@class defines.events.on_mod_item_opened : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_permission_group_added) ----@class defines.events.on_permission_group_added : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_permission_group_deleted) ----@class defines.events.on_permission_group_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_permission_group_edited) ----@class defines.events.on_permission_group_edited : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_permission_string_imported) ----@class defines.events.on_permission_string_imported : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_picked_up_item) ----@class defines.events.on_picked_up_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_alt_reverse_selected_area) ----@class defines.events.on_player_alt_reverse_selected_area : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_alt_selected_area) ----@class defines.events.on_player_alt_selected_area : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_ammo_inventory_changed) ----@class defines.events.on_player_ammo_inventory_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_armor_inventory_changed) ----@class defines.events.on_player_armor_inventory_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_banned) ----@class defines.events.on_player_banned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_built_tile) ----@class defines.events.on_player_built_tile : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_cancelled_crafting) ----@class defines.events.on_player_cancelled_crafting : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_changed_force) ----@class defines.events.on_player_changed_force : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_changed_position) ----@class defines.events.on_player_changed_position : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_changed_surface) ----@class defines.events.on_player_changed_surface : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_cheat_mode_disabled) ----@class defines.events.on_player_cheat_mode_disabled : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_cheat_mode_enabled) ----@class defines.events.on_player_cheat_mode_enabled : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_clicked_gps_tag) ----@class defines.events.on_player_clicked_gps_tag : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_configured_blueprint) ----@class defines.events.on_player_configured_blueprint : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_configured_spider_remote) ----@class defines.events.on_player_configured_spider_remote : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_crafted_item) ----@class defines.events.on_player_crafted_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_created) ----@class defines.events.on_player_created : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_cursor_stack_changed) ----@class defines.events.on_player_cursor_stack_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_deconstructed_area) ----@class defines.events.on_player_deconstructed_area : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_demoted) ----@class defines.events.on_player_demoted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_died) ----@class defines.events.on_player_died : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_display_resolution_changed) ----@class defines.events.on_player_display_resolution_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_display_scale_changed) ----@class defines.events.on_player_display_scale_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_driving_changed_state) ----@class defines.events.on_player_driving_changed_state : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_dropped_item) ----@class defines.events.on_player_dropped_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_fast_transferred) ----@class defines.events.on_player_fast_transferred : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_flushed_fluid) ----@class defines.events.on_player_flushed_fluid : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_gun_inventory_changed) ----@class defines.events.on_player_gun_inventory_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_joined_game) ----@class defines.events.on_player_joined_game : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_kicked) ----@class defines.events.on_player_kicked : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_left_game) ----@class defines.events.on_player_left_game : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_main_inventory_changed) ----@class defines.events.on_player_main_inventory_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_mined_entity) ----@class defines.events.on_player_mined_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_mined_item) ----@class defines.events.on_player_mined_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_mined_tile) ----@class defines.events.on_player_mined_tile : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_muted) ----@class defines.events.on_player_muted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_pipette) ----@class defines.events.on_player_pipette : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_placed_equipment) ----@class defines.events.on_player_placed_equipment : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_promoted) ----@class defines.events.on_player_promoted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_removed) ----@class defines.events.on_player_removed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_removed_equipment) ----@class defines.events.on_player_removed_equipment : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_repaired_entity) ----@class defines.events.on_player_repaired_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_respawned) ----@class defines.events.on_player_respawned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_reverse_selected_area) ----@class defines.events.on_player_reverse_selected_area : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_rotated_entity) ----@class defines.events.on_player_rotated_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_selected_area) ----@class defines.events.on_player_selected_area : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_set_quick_bar_slot) ----@class defines.events.on_player_set_quick_bar_slot : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_setup_blueprint) ----@class defines.events.on_player_setup_blueprint : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_toggled_alt_mode) ----@class defines.events.on_player_toggled_alt_mode : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_toggled_map_editor) ----@class defines.events.on_player_toggled_map_editor : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_trash_inventory_changed) ----@class defines.events.on_player_trash_inventory_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_unbanned) ----@class defines.events.on_player_unbanned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_unmuted) ----@class defines.events.on_player_unmuted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_used_capsule) ----@class defines.events.on_player_used_capsule : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_player_used_spider_remote) ----@class defines.events.on_player_used_spider_remote : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_post_entity_died) ----@class defines.events.on_post_entity_died : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_build) ----@class defines.events.on_pre_build : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_chunk_deleted) ----@class defines.events.on_pre_chunk_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_entity_settings_pasted) ----@class defines.events.on_pre_entity_settings_pasted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_ghost_deconstructed) ----@class defines.events.on_pre_ghost_deconstructed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_ghost_upgraded) ----@class defines.events.on_pre_ghost_upgraded : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_permission_group_deleted) ----@class defines.events.on_pre_permission_group_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_permission_string_imported) ----@class defines.events.on_pre_permission_string_imported : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_crafted_item) ----@class defines.events.on_pre_player_crafted_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_died) ----@class defines.events.on_pre_player_died : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_left_game) ----@class defines.events.on_pre_player_left_game : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_mined_item) ----@class defines.events.on_pre_player_mined_item : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_removed) ----@class defines.events.on_pre_player_removed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_toggled_map_editor) ----@class defines.events.on_pre_player_toggled_map_editor : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_robot_exploded_cliff) ----@class defines.events.on_pre_robot_exploded_cliff : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_script_inventory_resized) ----@class defines.events.on_pre_script_inventory_resized : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_surface_cleared) ----@class defines.events.on_pre_surface_cleared : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_surface_deleted) ----@class defines.events.on_pre_surface_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_research_cancelled) ----@class defines.events.on_research_cancelled : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_research_finished) ----@class defines.events.on_research_finished : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_research_reversed) ----@class defines.events.on_research_reversed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_research_started) ----@class defines.events.on_research_started : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_resource_depleted) ----@class defines.events.on_resource_depleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_built_entity) ----@class defines.events.on_robot_built_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_built_tile) ----@class defines.events.on_robot_built_tile : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_exploded_cliff) ----@class defines.events.on_robot_exploded_cliff : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_mined) ----@class defines.events.on_robot_mined : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_mined_entity) ----@class defines.events.on_robot_mined_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_mined_tile) ----@class defines.events.on_robot_mined_tile : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_robot_pre_mined) ----@class defines.events.on_robot_pre_mined : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_rocket_launch_ordered) ----@class defines.events.on_rocket_launch_ordered : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_rocket_launched) ----@class defines.events.on_rocket_launched : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_runtime_mod_setting_changed) ----@class defines.events.on_runtime_mod_setting_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_script_inventory_resized) ----@class defines.events.on_script_inventory_resized : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_script_path_request_finished) ----@class defines.events.on_script_path_request_finished : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_script_trigger_effect) ----@class defines.events.on_script_trigger_effect : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_sector_scanned) ----@class defines.events.on_sector_scanned : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_selected_entity_changed) ----@class defines.events.on_selected_entity_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_spider_command_completed) ----@class defines.events.on_spider_command_completed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_string_translated) ----@class defines.events.on_string_translated : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_surface_cleared) ----@class defines.events.on_surface_cleared : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_surface_created) ----@class defines.events.on_surface_created : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_surface_deleted) ----@class defines.events.on_surface_deleted : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_surface_imported) ----@class defines.events.on_surface_imported : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_surface_renamed) ----@class defines.events.on_surface_renamed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_technology_effects_reset) ----@class defines.events.on_technology_effects_reset : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_tick) ----@class defines.events.on_tick : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_train_changed_state) ----@class defines.events.on_train_changed_state : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_train_created) ----@class defines.events.on_train_created : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_train_schedule_changed) ----@class defines.events.on_train_schedule_changed : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_trigger_created_entity) ----@class defines.events.on_trigger_created_entity : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_trigger_fired_artillery) ----@class defines.events.on_trigger_fired_artillery : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_unit_added_to_group) ----@class defines.events.on_unit_added_to_group : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_unit_group_created) ----@class defines.events.on_unit_group_created : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_unit_group_finished_gathering) ----@class defines.events.on_unit_group_finished_gathering : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_unit_removed_from_group) ----@class defines.events.on_unit_removed_from_group : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.on_worker_robot_expired) ----@class defines.events.on_worker_robot_expired : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_built) ----@class defines.events.script_raised_built : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_destroy) ----@class defines.events.script_raised_destroy : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_revive) ----@class defines.events.script_raised_revive : defines.events ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events.script_raised_set_tiles) ----@class defines.events.script_raised_set_tiles : defines.events ----See the [events page](https://lua-api.factorio.com/latest/events.html) for more info on what events contain and when they get raised. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.events) ----@class defines.events.__index ----@field on_ai_command_completed defines.events.on_ai_command_completed ----@field on_area_cloned defines.events.on_area_cloned ----@field on_biter_base_built defines.events.on_biter_base_built ----@field on_brush_cloned defines.events.on_brush_cloned ----@field on_build_base_arrived defines.events.on_build_base_arrived ----@field on_built_entity defines.events.on_built_entity ----@field on_cancelled_deconstruction defines.events.on_cancelled_deconstruction ----@field on_cancelled_upgrade defines.events.on_cancelled_upgrade ----@field on_character_corpse_expired defines.events.on_character_corpse_expired ----@field on_chart_tag_added defines.events.on_chart_tag_added ----@field on_chart_tag_modified defines.events.on_chart_tag_modified ----@field on_chart_tag_removed defines.events.on_chart_tag_removed ----@field on_chunk_charted defines.events.on_chunk_charted ----@field on_chunk_deleted defines.events.on_chunk_deleted ----@field on_chunk_generated defines.events.on_chunk_generated ----@field on_combat_robot_expired defines.events.on_combat_robot_expired ----@field on_console_chat defines.events.on_console_chat ----@field on_console_command defines.events.on_console_command ----@field on_cutscene_cancelled defines.events.on_cutscene_cancelled ----@field on_cutscene_waypoint_reached defines.events.on_cutscene_waypoint_reached ----@field on_difficulty_settings_changed defines.events.on_difficulty_settings_changed ----@field on_entity_cloned defines.events.on_entity_cloned ----@field on_entity_damaged defines.events.on_entity_damaged ----@field on_entity_destroyed defines.events.on_entity_destroyed ----@field on_entity_died defines.events.on_entity_died ----@field on_entity_logistic_slot_changed defines.events.on_entity_logistic_slot_changed ----@field on_entity_renamed defines.events.on_entity_renamed ----@field on_entity_settings_pasted defines.events.on_entity_settings_pasted ----@field on_entity_spawned defines.events.on_entity_spawned ----@field on_equipment_inserted defines.events.on_equipment_inserted ----@field on_equipment_removed defines.events.on_equipment_removed ----@field on_force_cease_fire_changed defines.events.on_force_cease_fire_changed ----@field on_force_created defines.events.on_force_created ----@field on_force_friends_changed defines.events.on_force_friends_changed ----@field on_force_reset defines.events.on_force_reset ----@field on_forces_merged defines.events.on_forces_merged ----@field on_forces_merging defines.events.on_forces_merging ----@field on_game_created_from_scenario defines.events.on_game_created_from_scenario ----@field on_gui_checked_state_changed defines.events.on_gui_checked_state_changed ----@field on_gui_click defines.events.on_gui_click ----@field on_gui_closed defines.events.on_gui_closed ----@field on_gui_confirmed defines.events.on_gui_confirmed ----@field on_gui_elem_changed defines.events.on_gui_elem_changed ----@field on_gui_location_changed defines.events.on_gui_location_changed ----@field on_gui_opened defines.events.on_gui_opened ----@field on_gui_selected_tab_changed defines.events.on_gui_selected_tab_changed ----@field on_gui_selection_state_changed defines.events.on_gui_selection_state_changed ----@field on_gui_switch_state_changed defines.events.on_gui_switch_state_changed ----@field on_gui_text_changed defines.events.on_gui_text_changed ----@field on_gui_value_changed defines.events.on_gui_value_changed ----@field on_land_mine_armed defines.events.on_land_mine_armed ----@field on_lua_shortcut defines.events.on_lua_shortcut ----@field on_marked_for_deconstruction defines.events.on_marked_for_deconstruction ----@field on_marked_for_upgrade defines.events.on_marked_for_upgrade ----@field on_market_item_purchased defines.events.on_market_item_purchased ----@field on_mod_item_opened defines.events.on_mod_item_opened ----@field on_permission_group_added defines.events.on_permission_group_added ----@field on_permission_group_deleted defines.events.on_permission_group_deleted ----@field on_permission_group_edited defines.events.on_permission_group_edited ----@field on_permission_string_imported defines.events.on_permission_string_imported ----@field on_picked_up_item defines.events.on_picked_up_item ----@field on_player_alt_reverse_selected_area defines.events.on_player_alt_reverse_selected_area ----@field on_player_alt_selected_area defines.events.on_player_alt_selected_area ----@field on_player_ammo_inventory_changed defines.events.on_player_ammo_inventory_changed ----@field on_player_armor_inventory_changed defines.events.on_player_armor_inventory_changed ----@field on_player_banned defines.events.on_player_banned ----@field on_player_built_tile defines.events.on_player_built_tile ----@field on_player_cancelled_crafting defines.events.on_player_cancelled_crafting ----@field on_player_changed_force defines.events.on_player_changed_force ----@field on_player_changed_position defines.events.on_player_changed_position ----@field on_player_changed_surface defines.events.on_player_changed_surface ----@field on_player_cheat_mode_disabled defines.events.on_player_cheat_mode_disabled ----@field on_player_cheat_mode_enabled defines.events.on_player_cheat_mode_enabled ----@field on_player_clicked_gps_tag defines.events.on_player_clicked_gps_tag ----@field on_player_configured_blueprint defines.events.on_player_configured_blueprint ----@field on_player_configured_spider_remote defines.events.on_player_configured_spider_remote ----@field on_player_crafted_item defines.events.on_player_crafted_item ----@field on_player_created defines.events.on_player_created ----@field on_player_cursor_stack_changed defines.events.on_player_cursor_stack_changed ----@field on_player_deconstructed_area defines.events.on_player_deconstructed_area ----@field on_player_demoted defines.events.on_player_demoted ----@field on_player_died defines.events.on_player_died ----@field on_player_display_resolution_changed defines.events.on_player_display_resolution_changed ----@field on_player_display_scale_changed defines.events.on_player_display_scale_changed ----@field on_player_driving_changed_state defines.events.on_player_driving_changed_state ----@field on_player_dropped_item defines.events.on_player_dropped_item ----@field on_player_fast_transferred defines.events.on_player_fast_transferred ----@field on_player_flushed_fluid defines.events.on_player_flushed_fluid ----@field on_player_gun_inventory_changed defines.events.on_player_gun_inventory_changed ----@field on_player_joined_game defines.events.on_player_joined_game ----@field on_player_kicked defines.events.on_player_kicked ----@field on_player_left_game defines.events.on_player_left_game ----@field on_player_main_inventory_changed defines.events.on_player_main_inventory_changed ----@field on_player_mined_entity defines.events.on_player_mined_entity ----@field on_player_mined_item defines.events.on_player_mined_item ----@field on_player_mined_tile defines.events.on_player_mined_tile ----@field on_player_muted defines.events.on_player_muted ----@field on_player_pipette defines.events.on_player_pipette ----@field on_player_placed_equipment defines.events.on_player_placed_equipment ----@field on_player_promoted defines.events.on_player_promoted ----@field on_player_removed defines.events.on_player_removed ----@field on_player_removed_equipment defines.events.on_player_removed_equipment ----@field on_player_repaired_entity defines.events.on_player_repaired_entity ----@field on_player_respawned defines.events.on_player_respawned ----@field on_player_reverse_selected_area defines.events.on_player_reverse_selected_area ----@field on_player_rotated_entity defines.events.on_player_rotated_entity ----@field on_player_selected_area defines.events.on_player_selected_area ----@field on_player_set_quick_bar_slot defines.events.on_player_set_quick_bar_slot ----@field on_player_setup_blueprint defines.events.on_player_setup_blueprint ----@field on_player_toggled_alt_mode defines.events.on_player_toggled_alt_mode ----@field on_player_toggled_map_editor defines.events.on_player_toggled_map_editor ----@field on_player_trash_inventory_changed defines.events.on_player_trash_inventory_changed ----@field on_player_unbanned defines.events.on_player_unbanned ----@field on_player_unmuted defines.events.on_player_unmuted ----@field on_player_used_capsule defines.events.on_player_used_capsule ----@field on_player_used_spider_remote defines.events.on_player_used_spider_remote ----@field on_post_entity_died defines.events.on_post_entity_died ----@field on_pre_build defines.events.on_pre_build ----@field on_pre_chunk_deleted defines.events.on_pre_chunk_deleted ----@field on_pre_entity_settings_pasted defines.events.on_pre_entity_settings_pasted ----@field on_pre_ghost_deconstructed defines.events.on_pre_ghost_deconstructed ----@field on_pre_ghost_upgraded defines.events.on_pre_ghost_upgraded ----@field on_pre_permission_group_deleted defines.events.on_pre_permission_group_deleted ----@field on_pre_permission_string_imported defines.events.on_pre_permission_string_imported ----@field on_pre_player_crafted_item defines.events.on_pre_player_crafted_item ----@field on_pre_player_died defines.events.on_pre_player_died ----@field on_pre_player_left_game defines.events.on_pre_player_left_game ----@field on_pre_player_mined_item defines.events.on_pre_player_mined_item ----@field on_pre_player_removed defines.events.on_pre_player_removed ----@field on_pre_player_toggled_map_editor defines.events.on_pre_player_toggled_map_editor ----@field on_pre_robot_exploded_cliff defines.events.on_pre_robot_exploded_cliff ----@field on_pre_script_inventory_resized defines.events.on_pre_script_inventory_resized ----@field on_pre_surface_cleared defines.events.on_pre_surface_cleared ----@field on_pre_surface_deleted defines.events.on_pre_surface_deleted ----@field on_research_cancelled defines.events.on_research_cancelled ----@field on_research_finished defines.events.on_research_finished ----@field on_research_reversed defines.events.on_research_reversed ----@field on_research_started defines.events.on_research_started ----@field on_resource_depleted defines.events.on_resource_depleted ----@field on_robot_built_entity defines.events.on_robot_built_entity ----@field on_robot_built_tile defines.events.on_robot_built_tile ----@field on_robot_exploded_cliff defines.events.on_robot_exploded_cliff ----@field on_robot_mined defines.events.on_robot_mined ----@field on_robot_mined_entity defines.events.on_robot_mined_entity ----@field on_robot_mined_tile defines.events.on_robot_mined_tile ----@field on_robot_pre_mined defines.events.on_robot_pre_mined ----@field on_rocket_launch_ordered defines.events.on_rocket_launch_ordered ----@field on_rocket_launched defines.events.on_rocket_launched ----@field on_runtime_mod_setting_changed defines.events.on_runtime_mod_setting_changed ----@field on_script_inventory_resized defines.events.on_script_inventory_resized ----@field on_script_path_request_finished defines.events.on_script_path_request_finished ----@field on_script_trigger_effect defines.events.on_script_trigger_effect ----@field on_sector_scanned defines.events.on_sector_scanned ----@field on_selected_entity_changed defines.events.on_selected_entity_changed ----@field on_spider_command_completed defines.events.on_spider_command_completed ----@field on_string_translated defines.events.on_string_translated ----@field on_surface_cleared defines.events.on_surface_cleared ----@field on_surface_created defines.events.on_surface_created ----@field on_surface_deleted defines.events.on_surface_deleted ----@field on_surface_imported defines.events.on_surface_imported ----@field on_surface_renamed defines.events.on_surface_renamed ----@field on_technology_effects_reset defines.events.on_technology_effects_reset ----@field on_tick defines.events.on_tick ----@field on_train_changed_state defines.events.on_train_changed_state ----@field on_train_created defines.events.on_train_created ----@field on_train_schedule_changed defines.events.on_train_schedule_changed ----@field on_trigger_created_entity defines.events.on_trigger_created_entity ----@field on_trigger_fired_artillery defines.events.on_trigger_fired_artillery ----@field on_unit_added_to_group defines.events.on_unit_added_to_group ----@field on_unit_group_created defines.events.on_unit_group_created ----@field on_unit_group_finished_gathering defines.events.on_unit_group_finished_gathering ----@field on_unit_removed_from_group defines.events.on_unit_removed_from_group ----@field on_worker_robot_expired defines.events.on_worker_robot_expired ----@field script_raised_built defines.events.script_raised_built ----@field script_raised_destroy defines.events.script_raised_destroy ----@field script_raised_revive defines.events.script_raised_revive ----@field script_raised_set_tiles defines.events.script_raised_set_tiles -defines.events={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index) ----@class defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.fifty_hours) ----@class defines.flow_precision_index.fifty_hours : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.five_seconds) ----@class defines.flow_precision_index.five_seconds : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.one_hour) ----@class defines.flow_precision_index.one_hour : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.one_minute) ----@class defines.flow_precision_index.one_minute : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.one_thousand_hours) ----@class defines.flow_precision_index.one_thousand_hours : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.ten_hours) ----@class defines.flow_precision_index.ten_hours : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.ten_minutes) ----@class defines.flow_precision_index.ten_minutes : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index.two_hundred_fifty_hours) ----@class defines.flow_precision_index.two_hundred_fifty_hours : defines.flow_precision_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.flow_precision_index) ----@class defines.flow_precision_index.__index ----@field fifty_hours defines.flow_precision_index.fifty_hours ----@field five_seconds defines.flow_precision_index.five_seconds ----@field one_hour defines.flow_precision_index.one_hour ----@field one_minute defines.flow_precision_index.one_minute ----@field one_thousand_hours defines.flow_precision_index.one_thousand_hours ----@field ten_hours defines.flow_precision_index.ten_hours ----@field ten_minutes defines.flow_precision_index.ten_minutes ----@field two_hundred_fifty_hours defines.flow_precision_index.two_hundred_fifty_hours -defines.flow_precision_index={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state) ----@class defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.attacking_distraction) ----@class defines.group_state.attacking_distraction : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.attacking_target) ----@class defines.group_state.attacking_target : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.finished) ----@class defines.group_state.finished : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.gathering) ----@class defines.group_state.gathering : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.moving) ----@class defines.group_state.moving : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.pathfinding) ----@class defines.group_state.pathfinding : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state.wander_in_group) ----@class defines.group_state.wander_in_group : defines.group_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.group_state) ----@class defines.group_state.__index ----@field attacking_distraction defines.group_state.attacking_distraction ----@field attacking_target defines.group_state.attacking_target ----@field finished defines.group_state.finished ----@field gathering defines.group_state.gathering ----@field moving defines.group_state.moving ----@field pathfinding defines.group_state.pathfinding ----@field wander_in_group defines.group_state.wander_in_group -defines.group_state={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type) ----@class defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.achievement) ----@class defines.gui_type.achievement : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.blueprint_library) ----@class defines.gui_type.blueprint_library : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.bonus) ----@class defines.gui_type.bonus : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.controller) ----@class defines.gui_type.controller : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.custom) ----@class defines.gui_type.custom : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.entity) ----@class defines.gui_type.entity : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.equipment) ----@class defines.gui_type.equipment : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.item) ----@class defines.gui_type.item : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.logistic) ----@class defines.gui_type.logistic : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.none) ----@class defines.gui_type.none : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.other_player) ----@class defines.gui_type.other_player : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.permissions) ----@class defines.gui_type.permissions : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.player_management) ----@class defines.gui_type.player_management : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.production) ----@class defines.gui_type.production : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.research) ----@class defines.gui_type.research : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.script_inventory) ----@class defines.gui_type.script_inventory : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.server_management) ----@class defines.gui_type.server_management : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.tile) ----@class defines.gui_type.tile : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.trains) ----@class defines.gui_type.trains : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type.tutorials) ----@class defines.gui_type.tutorials : defines.gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.gui_type) ----@class defines.gui_type.__index ----@field achievement defines.gui_type.achievement ----@field blueprint_library defines.gui_type.blueprint_library ----@field bonus defines.gui_type.bonus ----@field controller defines.gui_type.controller ----@field custom defines.gui_type.custom ----@field entity defines.gui_type.entity ----@field equipment defines.gui_type.equipment ----@field item defines.gui_type.item ----@field logistic defines.gui_type.logistic ----@field none defines.gui_type.none ----@field other_player defines.gui_type.other_player ----@field permissions defines.gui_type.permissions ----@field player_management defines.gui_type.player_management ----@field production defines.gui_type.production ----@field research defines.gui_type.research ----@field script_inventory defines.gui_type.script_inventory ----@field server_management defines.gui_type.server_management ----@field tile defines.gui_type.tile ----@field trains defines.gui_type.trains ----@field tutorials defines.gui_type.tutorials -defines.gui_type={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action) ----@class defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.activate_copy) ----@class defines.input_action.activate_copy : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.activate_cut) ----@class defines.input_action.activate_cut : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.activate_paste) ----@class defines.input_action.activate_paste : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.add_permission_group) ----@class defines.input_action.add_permission_group : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.add_train_station) ----@class defines.input_action.add_train_station : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.admin_action) ----@class defines.input_action.admin_action : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.alt_reverse_select_area) ----@class defines.input_action.alt_reverse_select_area : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.alt_select_area) ----@class defines.input_action.alt_select_area : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.alt_select_blueprint_entities) ----@class defines.input_action.alt_select_blueprint_entities : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.alternative_copy) ----@class defines.input_action.alternative_copy : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.begin_mining) ----@class defines.input_action.begin_mining : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.begin_mining_terrain) ----@class defines.input_action.begin_mining_terrain : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.build) ----@class defines.input_action.build : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.build_rail) ----@class defines.input_action.build_rail : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.build_terrain) ----@class defines.input_action.build_terrain : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cancel_craft) ----@class defines.input_action.cancel_craft : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cancel_deconstruct) ----@class defines.input_action.cancel_deconstruct : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cancel_new_blueprint) ----@class defines.input_action.cancel_new_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cancel_research) ----@class defines.input_action.cancel_research : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cancel_upgrade) ----@class defines.input_action.cancel_upgrade : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_active_character_tab) ----@class defines.input_action.change_active_character_tab : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_active_item_group_for_crafting) ----@class defines.input_action.change_active_item_group_for_crafting : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_active_item_group_for_filters) ----@class defines.input_action.change_active_item_group_for_filters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_active_quick_bar) ----@class defines.input_action.change_active_quick_bar : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_arithmetic_combinator_parameters) ----@class defines.input_action.change_arithmetic_combinator_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_decider_combinator_parameters) ----@class defines.input_action.change_decider_combinator_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_entity_label) ----@class defines.input_action.change_entity_label : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_item_description) ----@class defines.input_action.change_item_description : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_item_label) ----@class defines.input_action.change_item_label : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_multiplayer_config) ----@class defines.input_action.change_multiplayer_config : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_picking_state) ----@class defines.input_action.change_picking_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_programmable_speaker_alert_parameters) ----@class defines.input_action.change_programmable_speaker_alert_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_programmable_speaker_circuit_parameters) ----@class defines.input_action.change_programmable_speaker_circuit_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_programmable_speaker_parameters) ----@class defines.input_action.change_programmable_speaker_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_riding_state) ----@class defines.input_action.change_riding_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_shooting_state) ----@class defines.input_action.change_shooting_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_train_stop_station) ----@class defines.input_action.change_train_stop_station : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_train_wait_condition) ----@class defines.input_action.change_train_wait_condition : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.change_train_wait_condition_data) ----@class defines.input_action.change_train_wait_condition_data : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.clear_cursor) ----@class defines.input_action.clear_cursor : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.connect_rolling_stock) ----@class defines.input_action.connect_rolling_stock : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.copy) ----@class defines.input_action.copy : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.copy_entity_settings) ----@class defines.input_action.copy_entity_settings : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.copy_opened_blueprint) ----@class defines.input_action.copy_opened_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.copy_opened_item) ----@class defines.input_action.copy_opened_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.craft) ----@class defines.input_action.craft : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cursor_split) ----@class defines.input_action.cursor_split : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cursor_transfer) ----@class defines.input_action.cursor_transfer : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.custom_input) ----@class defines.input_action.custom_input : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cycle_blueprint_book_backwards) ----@class defines.input_action.cycle_blueprint_book_backwards : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.cycle_blueprint_book_forwards) ----@class defines.input_action.cycle_blueprint_book_forwards : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.deconstruct) ----@class defines.input_action.deconstruct : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.delete_blueprint_library) ----@class defines.input_action.delete_blueprint_library : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.delete_blueprint_record) ----@class defines.input_action.delete_blueprint_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.delete_custom_tag) ----@class defines.input_action.delete_custom_tag : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.delete_permission_group) ----@class defines.input_action.delete_permission_group : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.destroy_item) ----@class defines.input_action.destroy_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.destroy_opened_item) ----@class defines.input_action.destroy_opened_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.disconnect_rolling_stock) ----@class defines.input_action.disconnect_rolling_stock : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.drag_train_schedule) ----@class defines.input_action.drag_train_schedule : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.drag_train_wait_condition) ----@class defines.input_action.drag_train_wait_condition : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.drop_blueprint_record) ----@class defines.input_action.drop_blueprint_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.drop_item) ----@class defines.input_action.drop_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.edit_blueprint_tool_preview) ----@class defines.input_action.edit_blueprint_tool_preview : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.edit_custom_tag) ----@class defines.input_action.edit_custom_tag : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.edit_permission_group) ----@class defines.input_action.edit_permission_group : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.export_blueprint) ----@class defines.input_action.export_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.fast_entity_split) ----@class defines.input_action.fast_entity_split : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.fast_entity_transfer) ----@class defines.input_action.fast_entity_transfer : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.flush_opened_entity_fluid) ----@class defines.input_action.flush_opened_entity_fluid : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.flush_opened_entity_specific_fluid) ----@class defines.input_action.flush_opened_entity_specific_fluid : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.go_to_train_station) ----@class defines.input_action.go_to_train_station : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.grab_blueprint_record) ----@class defines.input_action.grab_blueprint_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_checked_state_changed) ----@class defines.input_action.gui_checked_state_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_click) ----@class defines.input_action.gui_click : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_confirmed) ----@class defines.input_action.gui_confirmed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_elem_changed) ----@class defines.input_action.gui_elem_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_location_changed) ----@class defines.input_action.gui_location_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_selected_tab_changed) ----@class defines.input_action.gui_selected_tab_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_selection_state_changed) ----@class defines.input_action.gui_selection_state_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_switch_state_changed) ----@class defines.input_action.gui_switch_state_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_text_changed) ----@class defines.input_action.gui_text_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.gui_value_changed) ----@class defines.input_action.gui_value_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.import_blueprint) ----@class defines.input_action.import_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.import_blueprint_string) ----@class defines.input_action.import_blueprint_string : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.import_blueprints_filtered) ----@class defines.input_action.import_blueprints_filtered : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.import_permissions_string) ----@class defines.input_action.import_permissions_string : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.inventory_split) ----@class defines.input_action.inventory_split : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.inventory_transfer) ----@class defines.input_action.inventory_transfer : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.launch_rocket) ----@class defines.input_action.launch_rocket : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.lua_shortcut) ----@class defines.input_action.lua_shortcut : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.map_editor_action) ----@class defines.input_action.map_editor_action : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.market_offer) ----@class defines.input_action.market_offer : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.mod_settings_changed) ----@class defines.input_action.mod_settings_changed : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_achievements_gui) ----@class defines.input_action.open_achievements_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_blueprint_library_gui) ----@class defines.input_action.open_blueprint_library_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_blueprint_record) ----@class defines.input_action.open_blueprint_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_bonus_gui) ----@class defines.input_action.open_bonus_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_character_gui) ----@class defines.input_action.open_character_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_current_vehicle_gui) ----@class defines.input_action.open_current_vehicle_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_equipment) ----@class defines.input_action.open_equipment : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_gui) ----@class defines.input_action.open_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_item) ----@class defines.input_action.open_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_logistic_gui) ----@class defines.input_action.open_logistic_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_mod_item) ----@class defines.input_action.open_mod_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_parent_of_opened_item) ----@class defines.input_action.open_parent_of_opened_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_production_gui) ----@class defines.input_action.open_production_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_technology_gui) ----@class defines.input_action.open_technology_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_tips_and_tricks_gui) ----@class defines.input_action.open_tips_and_tricks_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_train_gui) ----@class defines.input_action.open_train_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_train_station_gui) ----@class defines.input_action.open_train_station_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.open_trains_gui) ----@class defines.input_action.open_trains_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.paste_entity_settings) ----@class defines.input_action.paste_entity_settings : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.place_equipment) ----@class defines.input_action.place_equipment : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.quick_bar_pick_slot) ----@class defines.input_action.quick_bar_pick_slot : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.quick_bar_set_selected_page) ----@class defines.input_action.quick_bar_set_selected_page : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.quick_bar_set_slot) ----@class defines.input_action.quick_bar_set_slot : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.reassign_blueprint) ----@class defines.input_action.reassign_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.remove_cables) ----@class defines.input_action.remove_cables : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.remove_train_station) ----@class defines.input_action.remove_train_station : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.reset_assembling_machine) ----@class defines.input_action.reset_assembling_machine : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.reset_item) ----@class defines.input_action.reset_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.reverse_select_area) ----@class defines.input_action.reverse_select_area : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.rotate_entity) ----@class defines.input_action.rotate_entity : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_area) ----@class defines.input_action.select_area : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_blueprint_entities) ----@class defines.input_action.select_blueprint_entities : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_entity_slot) ----@class defines.input_action.select_entity_slot : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_item) ----@class defines.input_action.select_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_mapper_slot) ----@class defines.input_action.select_mapper_slot : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_next_valid_gun) ----@class defines.input_action.select_next_valid_gun : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.select_tile_slot) ----@class defines.input_action.select_tile_slot : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.send_spidertron) ----@class defines.input_action.send_spidertron : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_auto_launch_rocket) ----@class defines.input_action.set_auto_launch_rocket : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_autosort_inventory) ----@class defines.input_action.set_autosort_inventory : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_behavior_mode) ----@class defines.input_action.set_behavior_mode : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_car_weapons_control) ----@class defines.input_action.set_car_weapons_control : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_circuit_condition) ----@class defines.input_action.set_circuit_condition : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_circuit_mode_of_operation) ----@class defines.input_action.set_circuit_mode_of_operation : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_controller_logistic_trash_filter_item) ----@class defines.input_action.set_controller_logistic_trash_filter_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_deconstruction_item_tile_selection_mode) ----@class defines.input_action.set_deconstruction_item_tile_selection_mode : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_deconstruction_item_trees_and_rocks_only) ----@class defines.input_action.set_deconstruction_item_trees_and_rocks_only : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_entity_color) ----@class defines.input_action.set_entity_color : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_entity_energy_property) ----@class defines.input_action.set_entity_energy_property : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_entity_logistic_trash_filter_item) ----@class defines.input_action.set_entity_logistic_trash_filter_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_filter) ----@class defines.input_action.set_filter : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_flat_controller_gui) ----@class defines.input_action.set_flat_controller_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_heat_interface_mode) ----@class defines.input_action.set_heat_interface_mode : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_heat_interface_temperature) ----@class defines.input_action.set_heat_interface_temperature : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_infinity_container_filter_item) ----@class defines.input_action.set_infinity_container_filter_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_infinity_container_remove_unfiltered_items) ----@class defines.input_action.set_infinity_container_remove_unfiltered_items : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_infinity_pipe_filter) ----@class defines.input_action.set_infinity_pipe_filter : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_inserter_max_stack_size) ----@class defines.input_action.set_inserter_max_stack_size : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_inventory_bar) ----@class defines.input_action.set_inventory_bar : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_linked_container_link_i_d) ----@class defines.input_action.set_linked_container_link_i_d : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_logistic_filter_item) ----@class defines.input_action.set_logistic_filter_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_logistic_filter_signal) ----@class defines.input_action.set_logistic_filter_signal : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_player_color) ----@class defines.input_action.set_player_color : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_recipe_notifications) ----@class defines.input_action.set_recipe_notifications : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_request_from_buffers) ----@class defines.input_action.set_request_from_buffers : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_research_finished_stops_game) ----@class defines.input_action.set_research_finished_stops_game : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_signal) ----@class defines.input_action.set_signal : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_splitter_priority) ----@class defines.input_action.set_splitter_priority : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_train_stopped) ----@class defines.input_action.set_train_stopped : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_trains_limit) ----@class defines.input_action.set_trains_limit : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.set_vehicle_automatic_targeting_parameters) ----@class defines.input_action.set_vehicle_automatic_targeting_parameters : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.setup_assembling_machine) ----@class defines.input_action.setup_assembling_machine : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.setup_blueprint) ----@class defines.input_action.setup_blueprint : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.setup_single_blueprint_record) ----@class defines.input_action.setup_single_blueprint_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.smart_pipette) ----@class defines.input_action.smart_pipette : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.spawn_item) ----@class defines.input_action.spawn_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.stack_split) ----@class defines.input_action.stack_split : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.stack_transfer) ----@class defines.input_action.stack_transfer : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.start_repair) ----@class defines.input_action.start_repair : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.start_research) ----@class defines.input_action.start_research : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.start_walking) ----@class defines.input_action.start_walking : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.stop_building_by_moving) ----@class defines.input_action.stop_building_by_moving : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.switch_connect_to_logistic_network) ----@class defines.input_action.switch_connect_to_logistic_network : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.switch_constant_combinator_state) ----@class defines.input_action.switch_constant_combinator_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.switch_inserter_filter_mode_state) ----@class defines.input_action.switch_inserter_filter_mode_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.switch_power_switch_state) ----@class defines.input_action.switch_power_switch_state : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.switch_to_rename_stop_gui) ----@class defines.input_action.switch_to_rename_stop_gui : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.take_equipment) ----@class defines.input_action.take_equipment : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_deconstruction_item_entity_filter_mode) ----@class defines.input_action.toggle_deconstruction_item_entity_filter_mode : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_deconstruction_item_tile_filter_mode) ----@class defines.input_action.toggle_deconstruction_item_tile_filter_mode : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_driving) ----@class defines.input_action.toggle_driving : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_enable_vehicle_logistics_while_moving) ----@class defines.input_action.toggle_enable_vehicle_logistics_while_moving : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_entity_logistic_requests) ----@class defines.input_action.toggle_entity_logistic_requests : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_equipment_movement_bonus) ----@class defines.input_action.toggle_equipment_movement_bonus : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_map_editor) ----@class defines.input_action.toggle_map_editor : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_personal_logistic_requests) ----@class defines.input_action.toggle_personal_logistic_requests : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_personal_roboport) ----@class defines.input_action.toggle_personal_roboport : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.toggle_show_entity_info) ----@class defines.input_action.toggle_show_entity_info : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.translate_string) ----@class defines.input_action.translate_string : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.undo) ----@class defines.input_action.undo : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.upgrade) ----@class defines.input_action.upgrade : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.upgrade_opened_blueprint_by_item) ----@class defines.input_action.upgrade_opened_blueprint_by_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.upgrade_opened_blueprint_by_record) ----@class defines.input_action.upgrade_opened_blueprint_by_record : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.use_artillery_remote) ----@class defines.input_action.use_artillery_remote : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.use_item) ----@class defines.input_action.use_item : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.wire_dragging) ----@class defines.input_action.wire_dragging : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action.write_to_console) ----@class defines.input_action.write_to_console : defines.input_action ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_action) ----@class defines.input_action.__index ----@field activate_copy defines.input_action.activate_copy ----@field activate_cut defines.input_action.activate_cut ----@field activate_paste defines.input_action.activate_paste ----@field add_permission_group defines.input_action.add_permission_group ----@field add_train_station defines.input_action.add_train_station ----@field admin_action defines.input_action.admin_action ----@field alt_reverse_select_area defines.input_action.alt_reverse_select_area ----@field alt_select_area defines.input_action.alt_select_area ----@field alt_select_blueprint_entities defines.input_action.alt_select_blueprint_entities ----@field alternative_copy defines.input_action.alternative_copy ----@field begin_mining defines.input_action.begin_mining ----@field begin_mining_terrain defines.input_action.begin_mining_terrain ----@field build defines.input_action.build ----@field build_rail defines.input_action.build_rail ----@field build_terrain defines.input_action.build_terrain ----@field cancel_craft defines.input_action.cancel_craft ----@field cancel_deconstruct defines.input_action.cancel_deconstruct ----@field cancel_new_blueprint defines.input_action.cancel_new_blueprint ----@field cancel_research defines.input_action.cancel_research ----@field cancel_upgrade defines.input_action.cancel_upgrade ----@field change_active_character_tab defines.input_action.change_active_character_tab ----@field change_active_item_group_for_crafting defines.input_action.change_active_item_group_for_crafting ----@field change_active_item_group_for_filters defines.input_action.change_active_item_group_for_filters ----@field change_active_quick_bar defines.input_action.change_active_quick_bar ----@field change_arithmetic_combinator_parameters defines.input_action.change_arithmetic_combinator_parameters ----@field change_decider_combinator_parameters defines.input_action.change_decider_combinator_parameters ----@field change_entity_label defines.input_action.change_entity_label ----@field change_item_description defines.input_action.change_item_description ----@field change_item_label defines.input_action.change_item_label ----@field change_multiplayer_config defines.input_action.change_multiplayer_config ----@field change_picking_state defines.input_action.change_picking_state ----@field change_programmable_speaker_alert_parameters defines.input_action.change_programmable_speaker_alert_parameters ----@field change_programmable_speaker_circuit_parameters defines.input_action.change_programmable_speaker_circuit_parameters ----@field change_programmable_speaker_parameters defines.input_action.change_programmable_speaker_parameters ----@field change_riding_state defines.input_action.change_riding_state ----@field change_shooting_state defines.input_action.change_shooting_state ----@field change_train_stop_station defines.input_action.change_train_stop_station ----@field change_train_wait_condition defines.input_action.change_train_wait_condition ----@field change_train_wait_condition_data defines.input_action.change_train_wait_condition_data ----@field clear_cursor defines.input_action.clear_cursor ----@field connect_rolling_stock defines.input_action.connect_rolling_stock ----@field copy defines.input_action.copy ----@field copy_entity_settings defines.input_action.copy_entity_settings ----@field copy_opened_blueprint defines.input_action.copy_opened_blueprint ----@field copy_opened_item defines.input_action.copy_opened_item ----@field craft defines.input_action.craft ----@field cursor_split defines.input_action.cursor_split ----@field cursor_transfer defines.input_action.cursor_transfer ----@field custom_input defines.input_action.custom_input ----@field cycle_blueprint_book_backwards defines.input_action.cycle_blueprint_book_backwards ----@field cycle_blueprint_book_forwards defines.input_action.cycle_blueprint_book_forwards ----@field deconstruct defines.input_action.deconstruct ----@field delete_blueprint_library defines.input_action.delete_blueprint_library ----@field delete_blueprint_record defines.input_action.delete_blueprint_record ----@field delete_custom_tag defines.input_action.delete_custom_tag ----@field delete_permission_group defines.input_action.delete_permission_group ----@field destroy_item defines.input_action.destroy_item ----@field destroy_opened_item defines.input_action.destroy_opened_item ----@field disconnect_rolling_stock defines.input_action.disconnect_rolling_stock ----@field drag_train_schedule defines.input_action.drag_train_schedule ----@field drag_train_wait_condition defines.input_action.drag_train_wait_condition ----@field drop_blueprint_record defines.input_action.drop_blueprint_record ----@field drop_item defines.input_action.drop_item ----@field edit_blueprint_tool_preview defines.input_action.edit_blueprint_tool_preview ----@field edit_custom_tag defines.input_action.edit_custom_tag ----@field edit_permission_group defines.input_action.edit_permission_group ----@field export_blueprint defines.input_action.export_blueprint ----@field fast_entity_split defines.input_action.fast_entity_split ----@field fast_entity_transfer defines.input_action.fast_entity_transfer ----@field flush_opened_entity_fluid defines.input_action.flush_opened_entity_fluid ----@field flush_opened_entity_specific_fluid defines.input_action.flush_opened_entity_specific_fluid ----@field go_to_train_station defines.input_action.go_to_train_station ----@field grab_blueprint_record defines.input_action.grab_blueprint_record ----@field gui_checked_state_changed defines.input_action.gui_checked_state_changed ----@field gui_click defines.input_action.gui_click ----@field gui_confirmed defines.input_action.gui_confirmed ----@field gui_elem_changed defines.input_action.gui_elem_changed ----@field gui_location_changed defines.input_action.gui_location_changed ----@field gui_selected_tab_changed defines.input_action.gui_selected_tab_changed ----@field gui_selection_state_changed defines.input_action.gui_selection_state_changed ----@field gui_switch_state_changed defines.input_action.gui_switch_state_changed ----@field gui_text_changed defines.input_action.gui_text_changed ----@field gui_value_changed defines.input_action.gui_value_changed ----@field import_blueprint defines.input_action.import_blueprint ----@field import_blueprint_string defines.input_action.import_blueprint_string ----@field import_blueprints_filtered defines.input_action.import_blueprints_filtered ----@field import_permissions_string defines.input_action.import_permissions_string ----@field inventory_split defines.input_action.inventory_split ----@field inventory_transfer defines.input_action.inventory_transfer ----@field launch_rocket defines.input_action.launch_rocket ----@field lua_shortcut defines.input_action.lua_shortcut ----@field map_editor_action defines.input_action.map_editor_action ----@field market_offer defines.input_action.market_offer ----@field mod_settings_changed defines.input_action.mod_settings_changed ----@field open_achievements_gui defines.input_action.open_achievements_gui ----@field open_blueprint_library_gui defines.input_action.open_blueprint_library_gui ----@field open_blueprint_record defines.input_action.open_blueprint_record ----@field open_bonus_gui defines.input_action.open_bonus_gui ----@field open_character_gui defines.input_action.open_character_gui ----@field open_current_vehicle_gui defines.input_action.open_current_vehicle_gui ----@field open_equipment defines.input_action.open_equipment ----@field open_gui defines.input_action.open_gui ----@field open_item defines.input_action.open_item ----@field open_logistic_gui defines.input_action.open_logistic_gui ----@field open_mod_item defines.input_action.open_mod_item ----@field open_parent_of_opened_item defines.input_action.open_parent_of_opened_item ----@field open_production_gui defines.input_action.open_production_gui ----@field open_technology_gui defines.input_action.open_technology_gui ----@field open_tips_and_tricks_gui defines.input_action.open_tips_and_tricks_gui ----@field open_train_gui defines.input_action.open_train_gui ----@field open_train_station_gui defines.input_action.open_train_station_gui ----@field open_trains_gui defines.input_action.open_trains_gui ----@field paste_entity_settings defines.input_action.paste_entity_settings ----@field place_equipment defines.input_action.place_equipment ----@field quick_bar_pick_slot defines.input_action.quick_bar_pick_slot ----@field quick_bar_set_selected_page defines.input_action.quick_bar_set_selected_page ----@field quick_bar_set_slot defines.input_action.quick_bar_set_slot ----@field reassign_blueprint defines.input_action.reassign_blueprint ----@field remove_cables defines.input_action.remove_cables ----@field remove_train_station defines.input_action.remove_train_station ----@field reset_assembling_machine defines.input_action.reset_assembling_machine ----@field reset_item defines.input_action.reset_item ----@field reverse_select_area defines.input_action.reverse_select_area ----@field rotate_entity defines.input_action.rotate_entity ----@field select_area defines.input_action.select_area ----@field select_blueprint_entities defines.input_action.select_blueprint_entities ----@field select_entity_slot defines.input_action.select_entity_slot ----@field select_item defines.input_action.select_item ----@field select_mapper_slot defines.input_action.select_mapper_slot ----@field select_next_valid_gun defines.input_action.select_next_valid_gun ----@field select_tile_slot defines.input_action.select_tile_slot ----@field send_spidertron defines.input_action.send_spidertron ----@field set_auto_launch_rocket defines.input_action.set_auto_launch_rocket ----@field set_autosort_inventory defines.input_action.set_autosort_inventory ----@field set_behavior_mode defines.input_action.set_behavior_mode ----@field set_car_weapons_control defines.input_action.set_car_weapons_control ----@field set_circuit_condition defines.input_action.set_circuit_condition ----@field set_circuit_mode_of_operation defines.input_action.set_circuit_mode_of_operation ----@field set_controller_logistic_trash_filter_item defines.input_action.set_controller_logistic_trash_filter_item ----@field set_deconstruction_item_tile_selection_mode defines.input_action.set_deconstruction_item_tile_selection_mode ----@field set_deconstruction_item_trees_and_rocks_only defines.input_action.set_deconstruction_item_trees_and_rocks_only ----@field set_entity_color defines.input_action.set_entity_color ----@field set_entity_energy_property defines.input_action.set_entity_energy_property ----@field set_entity_logistic_trash_filter_item defines.input_action.set_entity_logistic_trash_filter_item ----@field set_filter defines.input_action.set_filter ----@field set_flat_controller_gui defines.input_action.set_flat_controller_gui ----@field set_heat_interface_mode defines.input_action.set_heat_interface_mode ----@field set_heat_interface_temperature defines.input_action.set_heat_interface_temperature ----@field set_infinity_container_filter_item defines.input_action.set_infinity_container_filter_item ----@field set_infinity_container_remove_unfiltered_items defines.input_action.set_infinity_container_remove_unfiltered_items ----@field set_infinity_pipe_filter defines.input_action.set_infinity_pipe_filter ----@field set_inserter_max_stack_size defines.input_action.set_inserter_max_stack_size ----@field set_inventory_bar defines.input_action.set_inventory_bar ----@field set_linked_container_link_i_d defines.input_action.set_linked_container_link_i_d ----@field set_logistic_filter_item defines.input_action.set_logistic_filter_item ----@field set_logistic_filter_signal defines.input_action.set_logistic_filter_signal ----@field set_player_color defines.input_action.set_player_color ----@field set_recipe_notifications defines.input_action.set_recipe_notifications ----@field set_request_from_buffers defines.input_action.set_request_from_buffers ----@field set_research_finished_stops_game defines.input_action.set_research_finished_stops_game ----@field set_signal defines.input_action.set_signal ----@field set_splitter_priority defines.input_action.set_splitter_priority ----@field set_train_stopped defines.input_action.set_train_stopped ----@field set_trains_limit defines.input_action.set_trains_limit ----@field set_vehicle_automatic_targeting_parameters defines.input_action.set_vehicle_automatic_targeting_parameters ----@field setup_assembling_machine defines.input_action.setup_assembling_machine ----@field setup_blueprint defines.input_action.setup_blueprint ----@field setup_single_blueprint_record defines.input_action.setup_single_blueprint_record ----@field smart_pipette defines.input_action.smart_pipette ----@field spawn_item defines.input_action.spawn_item ----@field stack_split defines.input_action.stack_split ----@field stack_transfer defines.input_action.stack_transfer ----@field start_repair defines.input_action.start_repair ----@field start_research defines.input_action.start_research ----@field start_walking defines.input_action.start_walking ----@field stop_building_by_moving defines.input_action.stop_building_by_moving ----@field switch_connect_to_logistic_network defines.input_action.switch_connect_to_logistic_network ----@field switch_constant_combinator_state defines.input_action.switch_constant_combinator_state ----@field switch_inserter_filter_mode_state defines.input_action.switch_inserter_filter_mode_state ----@field switch_power_switch_state defines.input_action.switch_power_switch_state ----@field switch_to_rename_stop_gui defines.input_action.switch_to_rename_stop_gui ----@field take_equipment defines.input_action.take_equipment ----@field toggle_deconstruction_item_entity_filter_mode defines.input_action.toggle_deconstruction_item_entity_filter_mode ----@field toggle_deconstruction_item_tile_filter_mode defines.input_action.toggle_deconstruction_item_tile_filter_mode ----@field toggle_driving defines.input_action.toggle_driving ----@field toggle_enable_vehicle_logistics_while_moving defines.input_action.toggle_enable_vehicle_logistics_while_moving ----@field toggle_entity_logistic_requests defines.input_action.toggle_entity_logistic_requests ----@field toggle_equipment_movement_bonus defines.input_action.toggle_equipment_movement_bonus ----@field toggle_map_editor defines.input_action.toggle_map_editor ----@field toggle_personal_logistic_requests defines.input_action.toggle_personal_logistic_requests ----@field toggle_personal_roboport defines.input_action.toggle_personal_roboport ----@field toggle_show_entity_info defines.input_action.toggle_show_entity_info ----@field translate_string defines.input_action.translate_string ----@field undo defines.input_action.undo ----@field upgrade defines.input_action.upgrade ----@field upgrade_opened_blueprint_by_item defines.input_action.upgrade_opened_blueprint_by_item ----@field upgrade_opened_blueprint_by_record defines.input_action.upgrade_opened_blueprint_by_record ----@field use_artillery_remote defines.input_action.use_artillery_remote ----@field use_item defines.input_action.use_item ----@field wire_dragging defines.input_action.wire_dragging ----@field write_to_console defines.input_action.write_to_console -defines.input_action={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_method) ----@class defines.input_method ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_method.game_controller) ----@class defines.input_method.game_controller : defines.input_method ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_method.keyboard_and_mouse) ----@class defines.input_method.keyboard_and_mouse : defines.input_method ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.input_method) ----@class defines.input_method.__index ----@field game_controller defines.input_method.game_controller ----@field keyboard_and_mouse defines.input_method.keyboard_and_mouse -defines.input_method={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory) ----@class defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.artillery_turret_ammo) ----@class defines.inventory.artillery_turret_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.artillery_wagon_ammo) ----@class defines.inventory.artillery_wagon_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.assembling_machine_input) ----@class defines.inventory.assembling_machine_input : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.assembling_machine_modules) ----@class defines.inventory.assembling_machine_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.assembling_machine_output) ----@class defines.inventory.assembling_machine_output : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.beacon_modules) ----@class defines.inventory.beacon_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.burnt_result) ----@class defines.inventory.burnt_result : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.car_ammo) ----@class defines.inventory.car_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.car_trunk) ----@class defines.inventory.car_trunk : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.cargo_wagon) ----@class defines.inventory.cargo_wagon : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_ammo) ----@class defines.inventory.character_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_armor) ----@class defines.inventory.character_armor : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_corpse) ----@class defines.inventory.character_corpse : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_guns) ----@class defines.inventory.character_guns : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_main) ----@class defines.inventory.character_main : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_trash) ----@class defines.inventory.character_trash : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.character_vehicle) ----@class defines.inventory.character_vehicle : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.chest) ----@class defines.inventory.chest : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.editor_ammo) ----@class defines.inventory.editor_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.editor_armor) ----@class defines.inventory.editor_armor : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.editor_guns) ----@class defines.inventory.editor_guns : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.editor_main) ----@class defines.inventory.editor_main : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.fuel) ----@class defines.inventory.fuel : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.furnace_modules) ----@class defines.inventory.furnace_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.furnace_result) ----@class defines.inventory.furnace_result : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.furnace_source) ----@class defines.inventory.furnace_source : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.god_main) ----@class defines.inventory.god_main : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.item_main) ----@class defines.inventory.item_main : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.lab_input) ----@class defines.inventory.lab_input : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.lab_modules) ----@class defines.inventory.lab_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.mining_drill_modules) ----@class defines.inventory.mining_drill_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.roboport_material) ----@class defines.inventory.roboport_material : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.roboport_robot) ----@class defines.inventory.roboport_robot : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.robot_cargo) ----@class defines.inventory.robot_cargo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.robot_repair) ----@class defines.inventory.robot_repair : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket) ----@class defines.inventory.rocket : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket_silo_input) ----@class defines.inventory.rocket_silo_input : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket_silo_modules) ----@class defines.inventory.rocket_silo_modules : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket_silo_output) ----@class defines.inventory.rocket_silo_output : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket_silo_result) ----@class defines.inventory.rocket_silo_result : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.rocket_silo_rocket) ----@class defines.inventory.rocket_silo_rocket : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.spider_ammo) ----@class defines.inventory.spider_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.spider_trash) ----@class defines.inventory.spider_trash : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.spider_trunk) ----@class defines.inventory.spider_trunk : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory.turret_ammo) ----@class defines.inventory.turret_ammo : defines.inventory ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.inventory) ----@class defines.inventory.__index ----@field artillery_turret_ammo defines.inventory.artillery_turret_ammo ----@field artillery_wagon_ammo defines.inventory.artillery_wagon_ammo ----@field assembling_machine_input defines.inventory.assembling_machine_input ----@field assembling_machine_modules defines.inventory.assembling_machine_modules ----@field assembling_machine_output defines.inventory.assembling_machine_output ----@field beacon_modules defines.inventory.beacon_modules ----@field burnt_result defines.inventory.burnt_result ----@field car_ammo defines.inventory.car_ammo ----@field car_trunk defines.inventory.car_trunk ----@field cargo_wagon defines.inventory.cargo_wagon ----@field character_ammo defines.inventory.character_ammo ----@field character_armor defines.inventory.character_armor ----@field character_corpse defines.inventory.character_corpse ----@field character_guns defines.inventory.character_guns ----@field character_main defines.inventory.character_main ----@field character_trash defines.inventory.character_trash ----@field character_vehicle defines.inventory.character_vehicle ----@field chest defines.inventory.chest ----@field editor_ammo defines.inventory.editor_ammo ----@field editor_armor defines.inventory.editor_armor ----@field editor_guns defines.inventory.editor_guns ----@field editor_main defines.inventory.editor_main ----@field fuel defines.inventory.fuel ----@field furnace_modules defines.inventory.furnace_modules ----@field furnace_result defines.inventory.furnace_result ----@field furnace_source defines.inventory.furnace_source ----@field god_main defines.inventory.god_main ----@field item_main defines.inventory.item_main ----@field lab_input defines.inventory.lab_input ----@field lab_modules defines.inventory.lab_modules ----@field mining_drill_modules defines.inventory.mining_drill_modules ----@field roboport_material defines.inventory.roboport_material ----@field roboport_robot defines.inventory.roboport_robot ----@field robot_cargo defines.inventory.robot_cargo ----@field robot_repair defines.inventory.robot_repair ----@field rocket defines.inventory.rocket ----@field rocket_silo_input defines.inventory.rocket_silo_input ----@field rocket_silo_modules defines.inventory.rocket_silo_modules ----@field rocket_silo_output defines.inventory.rocket_silo_output ----@field rocket_silo_result defines.inventory.rocket_silo_result ----@field rocket_silo_rocket defines.inventory.rocket_silo_rocket ----@field spider_ammo defines.inventory.spider_ammo ----@field spider_trash defines.inventory.spider_trash ----@field spider_trunk defines.inventory.spider_trunk ----@field turret_ammo defines.inventory.turret_ammo -defines.inventory={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index) ----@class defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.character_provider) ----@class defines.logistic_member_index.character_provider : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.character_requester) ----@class defines.logistic_member_index.character_requester : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.character_storage) ----@class defines.logistic_member_index.character_storage : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.generic_on_off_behavior) ----@class defines.logistic_member_index.generic_on_off_behavior : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.logistic_container) ----@class defines.logistic_member_index.logistic_container : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index.vehicle_storage) ----@class defines.logistic_member_index.vehicle_storage : defines.logistic_member_index ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_member_index) ----@class defines.logistic_member_index.__index ----@field character_provider defines.logistic_member_index.character_provider ----@field character_requester defines.logistic_member_index.character_requester ----@field character_storage defines.logistic_member_index.character_storage ----@field generic_on_off_behavior defines.logistic_member_index.generic_on_off_behavior ----@field logistic_container defines.logistic_member_index.logistic_container ----@field vehicle_storage defines.logistic_member_index.vehicle_storage -defines.logistic_member_index={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode) ----@class defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.active_provider) ----@class defines.logistic_mode.active_provider : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.buffer) ----@class defines.logistic_mode.buffer : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.none) ----@class defines.logistic_mode.none : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.passive_provider) ----@class defines.logistic_mode.passive_provider : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.requester) ----@class defines.logistic_mode.requester : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode.storage) ----@class defines.logistic_mode.storage : defines.logistic_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.logistic_mode) ----@class defines.logistic_mode.__index ----@field active_provider defines.logistic_mode.active_provider ----@field buffer defines.logistic_mode.buffer ----@field none defines.logistic_mode.none ----@field passive_provider defines.logistic_mode.passive_provider ----@field requester defines.logistic_mode.requester ----@field storage defines.logistic_mode.storage -defines.logistic_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type) ----@class defines.mouse_button_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type.left) ----@class defines.mouse_button_type.left : defines.mouse_button_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type.middle) ----@class defines.mouse_button_type.middle : defines.mouse_button_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type.none) ----@class defines.mouse_button_type.none : defines.mouse_button_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type.right) ----@class defines.mouse_button_type.right : defines.mouse_button_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.mouse_button_type) ----@class defines.mouse_button_type.__index ----@field left defines.mouse_button_type.left ----@field middle defines.mouse_button_type.middle ----@field none defines.mouse_button_type.none ----@field right defines.mouse_button_type.right -defines.mouse_button_type={} ----A dictionary mapping all top-level prototypes by name to a list of their associated subtypes. This list is organized as a lookup table, meaning it maps the sub-prototype names to `0`. As an example, `defines.prototypes['entity']` looks like this: `{furnace=0, inserter=0, container=0, ...}`. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.prototypes) ----@class defines.prototypes ----A dictionary mapping all top-level prototypes by name to a list of their associated subtypes. This list is organized as a lookup table, meaning it maps the sub-prototype names to `0`. As an example, `defines.prototypes['entity']` looks like this: `{furnace=0, inserter=0, container=0, ...}`. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.prototypes) ----@class defines.prototypes.__index: {[string]:{[string]:0}} -defines.prototypes={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction) ----@class defines.rail_connection_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction.left) ----@class defines.rail_connection_direction.left : defines.rail_connection_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction.none) ----@class defines.rail_connection_direction.none : defines.rail_connection_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction.right) ----@class defines.rail_connection_direction.right : defines.rail_connection_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction.straight) ----@class defines.rail_connection_direction.straight : defines.rail_connection_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_connection_direction) ----@class defines.rail_connection_direction.__index ----@field left defines.rail_connection_direction.left ----@field none defines.rail_connection_direction.none ----@field right defines.rail_connection_direction.right ----@field straight defines.rail_connection_direction.straight -defines.rail_connection_direction={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_direction) ----@class defines.rail_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_direction.back) ----@class defines.rail_direction.back : defines.rail_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_direction.front) ----@class defines.rail_direction.front : defines.rail_direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rail_direction) ----@class defines.rail_direction.__index ----@field back defines.rail_direction.back ----@field front defines.rail_direction.front -defines.rail_direction={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position) ----@class defines.relative_gui_position ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position.bottom) ----@class defines.relative_gui_position.bottom : defines.relative_gui_position ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position.left) ----@class defines.relative_gui_position.left : defines.relative_gui_position ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position.right) ----@class defines.relative_gui_position.right : defines.relative_gui_position ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position.top) ----@class defines.relative_gui_position.top : defines.relative_gui_position ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_position) ----@class defines.relative_gui_position.__index ----@field bottom defines.relative_gui_position.bottom ----@field left defines.relative_gui_position.left ----@field right defines.relative_gui_position.right ----@field top defines.relative_gui_position.top -defines.relative_gui_position={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type) ----@class defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.accumulator_gui) ----@class defines.relative_gui_type.accumulator_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.achievement_gui) ----@class defines.relative_gui_type.achievement_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.additional_entity_info_gui) ----@class defines.relative_gui_type.additional_entity_info_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.admin_gui) ----@class defines.relative_gui_type.admin_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.arithmetic_combinator_gui) ----@class defines.relative_gui_type.arithmetic_combinator_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.armor_gui) ----@class defines.relative_gui_type.armor_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.assembling_machine_gui) ----@class defines.relative_gui_type.assembling_machine_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.assembling_machine_select_recipe_gui) ----@class defines.relative_gui_type.assembling_machine_select_recipe_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.beacon_gui) ----@class defines.relative_gui_type.beacon_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.blueprint_book_gui) ----@class defines.relative_gui_type.blueprint_book_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.blueprint_library_gui) ----@class defines.relative_gui_type.blueprint_library_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.blueprint_setup_gui) ----@class defines.relative_gui_type.blueprint_setup_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.bonus_gui) ----@class defines.relative_gui_type.bonus_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.burner_equipment_gui) ----@class defines.relative_gui_type.burner_equipment_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.car_gui) ----@class defines.relative_gui_type.car_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.constant_combinator_gui) ----@class defines.relative_gui_type.constant_combinator_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.container_gui) ----@class defines.relative_gui_type.container_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.controller_gui) ----@class defines.relative_gui_type.controller_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.decider_combinator_gui) ----@class defines.relative_gui_type.decider_combinator_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.deconstruction_item_gui) ----@class defines.relative_gui_type.deconstruction_item_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.electric_energy_interface_gui) ----@class defines.relative_gui_type.electric_energy_interface_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.electric_network_gui) ----@class defines.relative_gui_type.electric_network_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.entity_variations_gui) ----@class defines.relative_gui_type.entity_variations_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.entity_with_energy_source_gui) ----@class defines.relative_gui_type.entity_with_energy_source_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.equipment_grid_gui) ----@class defines.relative_gui_type.equipment_grid_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.furnace_gui) ----@class defines.relative_gui_type.furnace_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.generic_on_off_entity_gui) ----@class defines.relative_gui_type.generic_on_off_entity_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.heat_interface_gui) ----@class defines.relative_gui_type.heat_interface_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.infinity_pipe_gui) ----@class defines.relative_gui_type.infinity_pipe_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.inserter_gui) ----@class defines.relative_gui_type.inserter_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.item_with_inventory_gui) ----@class defines.relative_gui_type.item_with_inventory_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.lab_gui) ----@class defines.relative_gui_type.lab_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.lamp_gui) ----@class defines.relative_gui_type.lamp_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.linked_container_gui) ----@class defines.relative_gui_type.linked_container_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.loader_gui) ----@class defines.relative_gui_type.loader_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.logistic_gui) ----@class defines.relative_gui_type.logistic_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.market_gui) ----@class defines.relative_gui_type.market_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.mining_drill_gui) ----@class defines.relative_gui_type.mining_drill_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.other_player_gui) ----@class defines.relative_gui_type.other_player_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.permissions_gui) ----@class defines.relative_gui_type.permissions_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.pipe_gui) ----@class defines.relative_gui_type.pipe_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.power_switch_gui) ----@class defines.relative_gui_type.power_switch_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.production_gui) ----@class defines.relative_gui_type.production_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.programmable_speaker_gui) ----@class defines.relative_gui_type.programmable_speaker_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.rail_chain_signal_gui) ----@class defines.relative_gui_type.rail_chain_signal_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.rail_signal_gui) ----@class defines.relative_gui_type.rail_signal_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.reactor_gui) ----@class defines.relative_gui_type.reactor_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.rename_stop_gui) ----@class defines.relative_gui_type.rename_stop_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.resource_entity_gui) ----@class defines.relative_gui_type.resource_entity_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.roboport_gui) ----@class defines.relative_gui_type.roboport_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.rocket_silo_gui) ----@class defines.relative_gui_type.rocket_silo_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.script_inventory_gui) ----@class defines.relative_gui_type.script_inventory_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.server_config_gui) ----@class defines.relative_gui_type.server_config_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.spider_vehicle_gui) ----@class defines.relative_gui_type.spider_vehicle_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.splitter_gui) ----@class defines.relative_gui_type.splitter_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.standalone_character_gui) ----@class defines.relative_gui_type.standalone_character_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.storage_tank_gui) ----@class defines.relative_gui_type.storage_tank_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.tile_variations_gui) ----@class defines.relative_gui_type.tile_variations_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.train_gui) ----@class defines.relative_gui_type.train_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.train_stop_gui) ----@class defines.relative_gui_type.train_stop_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.trains_gui) ----@class defines.relative_gui_type.trains_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.transport_belt_gui) ----@class defines.relative_gui_type.transport_belt_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.upgrade_item_gui) ----@class defines.relative_gui_type.upgrade_item_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type.wall_gui) ----@class defines.relative_gui_type.wall_gui : defines.relative_gui_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.relative_gui_type) ----@class defines.relative_gui_type.__index ----@field accumulator_gui defines.relative_gui_type.accumulator_gui ----@field achievement_gui defines.relative_gui_type.achievement_gui ----@field additional_entity_info_gui defines.relative_gui_type.additional_entity_info_gui ----@field admin_gui defines.relative_gui_type.admin_gui ----@field arithmetic_combinator_gui defines.relative_gui_type.arithmetic_combinator_gui ----@field armor_gui defines.relative_gui_type.armor_gui ----@field assembling_machine_gui defines.relative_gui_type.assembling_machine_gui ----@field assembling_machine_select_recipe_gui defines.relative_gui_type.assembling_machine_select_recipe_gui ----@field beacon_gui defines.relative_gui_type.beacon_gui ----@field blueprint_book_gui defines.relative_gui_type.blueprint_book_gui ----@field blueprint_library_gui defines.relative_gui_type.blueprint_library_gui ----@field blueprint_setup_gui defines.relative_gui_type.blueprint_setup_gui ----@field bonus_gui defines.relative_gui_type.bonus_gui ----@field burner_equipment_gui defines.relative_gui_type.burner_equipment_gui ----@field car_gui defines.relative_gui_type.car_gui ----@field constant_combinator_gui defines.relative_gui_type.constant_combinator_gui ----@field container_gui defines.relative_gui_type.container_gui ----@field controller_gui defines.relative_gui_type.controller_gui ----@field decider_combinator_gui defines.relative_gui_type.decider_combinator_gui ----@field deconstruction_item_gui defines.relative_gui_type.deconstruction_item_gui ----@field electric_energy_interface_gui defines.relative_gui_type.electric_energy_interface_gui ----@field electric_network_gui defines.relative_gui_type.electric_network_gui ----@field entity_variations_gui defines.relative_gui_type.entity_variations_gui ----@field entity_with_energy_source_gui defines.relative_gui_type.entity_with_energy_source_gui ----@field equipment_grid_gui defines.relative_gui_type.equipment_grid_gui ----@field furnace_gui defines.relative_gui_type.furnace_gui ----@field generic_on_off_entity_gui defines.relative_gui_type.generic_on_off_entity_gui ----@field heat_interface_gui defines.relative_gui_type.heat_interface_gui ----@field infinity_pipe_gui defines.relative_gui_type.infinity_pipe_gui ----@field inserter_gui defines.relative_gui_type.inserter_gui ----@field item_with_inventory_gui defines.relative_gui_type.item_with_inventory_gui ----@field lab_gui defines.relative_gui_type.lab_gui ----@field lamp_gui defines.relative_gui_type.lamp_gui ----@field linked_container_gui defines.relative_gui_type.linked_container_gui ----@field loader_gui defines.relative_gui_type.loader_gui ----@field logistic_gui defines.relative_gui_type.logistic_gui ----@field market_gui defines.relative_gui_type.market_gui ----@field mining_drill_gui defines.relative_gui_type.mining_drill_gui ----@field other_player_gui defines.relative_gui_type.other_player_gui ----@field permissions_gui defines.relative_gui_type.permissions_gui ----@field pipe_gui defines.relative_gui_type.pipe_gui ----@field power_switch_gui defines.relative_gui_type.power_switch_gui ----@field production_gui defines.relative_gui_type.production_gui ----@field programmable_speaker_gui defines.relative_gui_type.programmable_speaker_gui ----@field rail_chain_signal_gui defines.relative_gui_type.rail_chain_signal_gui ----@field rail_signal_gui defines.relative_gui_type.rail_signal_gui ----@field reactor_gui defines.relative_gui_type.reactor_gui ----@field rename_stop_gui defines.relative_gui_type.rename_stop_gui ----@field resource_entity_gui defines.relative_gui_type.resource_entity_gui ----@field roboport_gui defines.relative_gui_type.roboport_gui ----@field rocket_silo_gui defines.relative_gui_type.rocket_silo_gui ----@field script_inventory_gui defines.relative_gui_type.script_inventory_gui ----@field server_config_gui defines.relative_gui_type.server_config_gui ----@field spider_vehicle_gui defines.relative_gui_type.spider_vehicle_gui ----@field splitter_gui defines.relative_gui_type.splitter_gui ----@field standalone_character_gui defines.relative_gui_type.standalone_character_gui ----@field storage_tank_gui defines.relative_gui_type.storage_tank_gui ----@field tile_variations_gui defines.relative_gui_type.tile_variations_gui ----@field train_gui defines.relative_gui_type.train_gui ----@field train_stop_gui defines.relative_gui_type.train_stop_gui ----@field trains_gui defines.relative_gui_type.trains_gui ----@field transport_belt_gui defines.relative_gui_type.transport_belt_gui ----@field upgrade_item_gui defines.relative_gui_type.upgrade_item_gui ----@field wall_gui defines.relative_gui_type.wall_gui -defines.relative_gui_type={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.render_mode) ----@class defines.render_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.render_mode.chart) ----@class defines.render_mode.chart : defines.render_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.render_mode.chart_zoomed_in) ----@class defines.render_mode.chart_zoomed_in : defines.render_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.render_mode.game) ----@class defines.render_mode.game : defines.render_mode ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.render_mode) ----@class defines.render_mode.__index ----@field chart defines.render_mode.chart ----@field chart_zoomed_in defines.render_mode.chart_zoomed_in ----@field game defines.render_mode.game -defines.render_mode={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rich_text_setting) ----@class defines.rich_text_setting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rich_text_setting.disabled) ----@class defines.rich_text_setting.disabled : defines.rich_text_setting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rich_text_setting.enabled) ----@class defines.rich_text_setting.enabled : defines.rich_text_setting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rich_text_setting.highlight) ----@class defines.rich_text_setting.highlight : defines.rich_text_setting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rich_text_setting) ----@class defines.rich_text_setting.__index ----@field disabled defines.rich_text_setting.disabled ----@field enabled defines.rich_text_setting.enabled ----@field highlight defines.rich_text_setting.highlight -defines.rich_text_setting={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding) ----@class defines.riding ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding) ----@class defines.riding.__index -defines.riding={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration) ----@class defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration.accelerating) ----@class defines.riding.acceleration.accelerating : defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration.braking) ----@class defines.riding.acceleration.braking : defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration.nothing) ----@class defines.riding.acceleration.nothing : defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration.reversing) ----@class defines.riding.acceleration.reversing : defines.riding.acceleration ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.acceleration) ----@class defines.riding.acceleration.__index ----@field accelerating defines.riding.acceleration.accelerating ----@field braking defines.riding.acceleration.braking ----@field nothing defines.riding.acceleration.nothing ----@field reversing defines.riding.acceleration.reversing -defines.riding.acceleration={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.direction) ----@class defines.riding.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.direction.left) ----@class defines.riding.direction.left : defines.riding.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.direction.right) ----@class defines.riding.direction.right : defines.riding.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.direction.straight) ----@class defines.riding.direction.straight : defines.riding.direction ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.riding.direction) ----@class defines.riding.direction.__index ----@field left defines.riding.direction.left ----@field right defines.riding.direction.right ----@field straight defines.riding.direction.straight -defines.riding.direction={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status) ----@class defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.arms_advance) ----@class defines.rocket_silo_status.arms_advance : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.arms_retract) ----@class defines.rocket_silo_status.arms_retract : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.building_rocket) ----@class defines.rocket_silo_status.building_rocket : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.create_rocket) ----@class defines.rocket_silo_status.create_rocket : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.doors_closing) ----@class defines.rocket_silo_status.doors_closing : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.doors_opened) ----@class defines.rocket_silo_status.doors_opened : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.doors_opening) ----@class defines.rocket_silo_status.doors_opening : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.engine_starting) ----@class defines.rocket_silo_status.engine_starting : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.launch_started) ----@class defines.rocket_silo_status.launch_started : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.launch_starting) ----@class defines.rocket_silo_status.launch_starting : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.lights_blinking_close) ----@class defines.rocket_silo_status.lights_blinking_close : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.lights_blinking_open) ----@class defines.rocket_silo_status.lights_blinking_open : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.rocket_flying) ----@class defines.rocket_silo_status.rocket_flying : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.rocket_ready) ----@class defines.rocket_silo_status.rocket_ready : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status.rocket_rising) ----@class defines.rocket_silo_status.rocket_rising : defines.rocket_silo_status ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.rocket_silo_status) ----@class defines.rocket_silo_status.__index ----@field arms_advance defines.rocket_silo_status.arms_advance ----@field arms_retract defines.rocket_silo_status.arms_retract ----@field building_rocket defines.rocket_silo_status.building_rocket ----@field create_rocket defines.rocket_silo_status.create_rocket ----@field doors_closing defines.rocket_silo_status.doors_closing ----@field doors_opened defines.rocket_silo_status.doors_opened ----@field doors_opening defines.rocket_silo_status.doors_opening ----@field engine_starting defines.rocket_silo_status.engine_starting ----@field launch_started defines.rocket_silo_status.launch_started ----@field launch_starting defines.rocket_silo_status.launch_starting ----@field lights_blinking_close defines.rocket_silo_status.lights_blinking_close ----@field lights_blinking_open defines.rocket_silo_status.lights_blinking_open ----@field rocket_flying defines.rocket_silo_status.rocket_flying ----@field rocket_ready defines.rocket_silo_status.rocket_ready ----@field rocket_rising defines.rocket_silo_status.rocket_rising -defines.rocket_silo_status={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.shooting) ----@class defines.shooting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.shooting.not_shooting) ----@class defines.shooting.not_shooting : defines.shooting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.shooting.shooting_enemies) ----@class defines.shooting.shooting_enemies : defines.shooting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.shooting.shooting_selected) ----@class defines.shooting.shooting_selected : defines.shooting ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.shooting) ----@class defines.shooting.__index ----@field not_shooting defines.shooting.not_shooting ----@field shooting_enemies defines.shooting.shooting_enemies ----@field shooting_selected defines.shooting.shooting_selected -defines.shooting={} ----State of an ordinary rail signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state) ----@class defines.signal_state ----Red. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state.closed) ----@class defines.signal_state.closed : defines.signal_state ----Green. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state.open) ----@class defines.signal_state.open : defines.signal_state ----Orange. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state.reserved) ----@class defines.signal_state.reserved : defines.signal_state ----Red - From circuit network. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state.reserved_by_circuit_network) ----@class defines.signal_state.reserved_by_circuit_network : defines.signal_state ----State of an ordinary rail signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.signal_state) ----@class defines.signal_state.__index ----@field closed defines.signal_state.closed ----@field open defines.signal_state.open ----@field reserved defines.signal_state.reserved ----@field reserved_by_circuit_network defines.signal_state.reserved_by_circuit_network -defines.signal_state={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state) ----@class defines.train_state ----Braking before a rail signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.arrive_signal) ----@class defines.train_state.arrive_signal : defines.train_state ----Braking before a station. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.arrive_station) ----@class defines.train_state.arrive_station : defines.train_state ----Same as no_path but all candidate train stops are full ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.destination_full) ----@class defines.train_state.destination_full : defines.train_state ----Can move if user explicitly sits in and rides the train. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.manual_control) ----@class defines.train_state.manual_control : defines.train_state ----Switched to manual control and has to stop. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.manual_control_stop) ----@class defines.train_state.manual_control_stop : defines.train_state ----Has no path and is stopped. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.no_path) ----@class defines.train_state.no_path : defines.train_state ----Doesn't have anywhere to go. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.no_schedule) ----@class defines.train_state.no_schedule : defines.train_state ----Normal state -- following the path. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.on_the_path) ----@class defines.train_state.on_the_path : defines.train_state ----Had path and lost it -- must stop. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.path_lost) ----@class defines.train_state.path_lost : defines.train_state ----Waiting at a signal. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.wait_signal) ----@class defines.train_state.wait_signal : defines.train_state ----Waiting at a station. ---- ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state.wait_station) ----@class defines.train_state.wait_station : defines.train_state ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.train_state) ----@class defines.train_state.__index ----@field arrive_signal defines.train_state.arrive_signal ----@field arrive_station defines.train_state.arrive_station ----@field destination_full defines.train_state.destination_full ----@field manual_control defines.train_state.manual_control ----@field manual_control_stop defines.train_state.manual_control_stop ----@field no_path defines.train_state.no_path ----@field no_schedule defines.train_state.no_schedule ----@field on_the_path defines.train_state.on_the_path ----@field path_lost defines.train_state.path_lost ----@field wait_signal defines.train_state.wait_signal ----@field wait_station defines.train_state.wait_station -defines.train_state={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line) ----@class defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.left_line) ----@class defines.transport_line.left_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.left_split_line) ----@class defines.transport_line.left_split_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.left_underground_line) ----@class defines.transport_line.left_underground_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.right_line) ----@class defines.transport_line.right_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.right_split_line) ----@class defines.transport_line.right_split_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.right_underground_line) ----@class defines.transport_line.right_underground_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.secondary_left_line) ----@class defines.transport_line.secondary_left_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.secondary_left_split_line) ----@class defines.transport_line.secondary_left_split_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.secondary_right_line) ----@class defines.transport_line.secondary_right_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line.secondary_right_split_line) ----@class defines.transport_line.secondary_right_split_line : defines.transport_line ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.transport_line) ----@class defines.transport_line.__index ----@field left_line defines.transport_line.left_line ----@field left_split_line defines.transport_line.left_split_line ----@field left_underground_line defines.transport_line.left_underground_line ----@field right_line defines.transport_line.right_line ----@field right_split_line defines.transport_line.right_split_line ----@field right_underground_line defines.transport_line.right_underground_line ----@field secondary_left_line defines.transport_line.secondary_left_line ----@field secondary_left_split_line defines.transport_line.secondary_left_split_line ----@field secondary_right_line defines.transport_line.secondary_right_line ----@field secondary_right_split_line defines.transport_line.secondary_right_split_line -defines.transport_line={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_connection_id) ----@class defines.wire_connection_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_connection_id.electric_pole) ----@class defines.wire_connection_id.electric_pole : defines.wire_connection_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_connection_id.power_switch_left) ----@class defines.wire_connection_id.power_switch_left : defines.wire_connection_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_connection_id.power_switch_right) ----@class defines.wire_connection_id.power_switch_right : defines.wire_connection_id ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_connection_id) ----@class defines.wire_connection_id.__index ----@field electric_pole defines.wire_connection_id.electric_pole ----@field power_switch_left defines.wire_connection_id.power_switch_left ----@field power_switch_right defines.wire_connection_id.power_switch_right -defines.wire_connection_id={} ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_type) ----@class defines.wire_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.copper) ----@class defines.wire_type.copper : defines.wire_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.green) ----@class defines.wire_type.green : defines.wire_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_type.red) ----@class defines.wire_type.red : defines.wire_type ----[View documentation](https://lua-api.factorio.com/latest/defines.html#defines.wire_type) ----@class defines.wire_type.__index ----@field copper defines.wire_type.copper ----@field green defines.wire_type.green ----@field red defines.wire_type.red -defines.wire_type={} - diff --git a/.vscode/factorio/runtime-api-events.lua b/.vscode/factorio/runtime-api-events.lua deleted file mode 100644 index c6d5af5..0000000 --- a/.vscode/factorio/runtime-api-events.lua +++ /dev/null @@ -1,4193 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section events --- This file is automatically generated. Edits will be overwritten. - ----@alias CustomInputEvent EventData.CustomInputEvent ----Called when a [CustomInput](https://wiki.factorio.com/Prototype/CustomInput) is activated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@class EventData.CustomInputEvent : EventData ----The mouse cursor position when the custom input was activated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field cursor_position MapPosition ----The prototype name of the custom input that was activated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field input_name string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field name defines.events ----The player that activated the custom input. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field player_index uint ----Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field selected_prototype? SelectedPrototypeData ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent) ----@field tick uint - ----@alias on_ai_command_completed EventData.on_ai_command_completed ----Called when a unit/group completes a command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@class EventData.on_ai_command_completed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@field result defines.behavior_result ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@field tick uint ----unit_number/group_number of the unit/group which just completed a command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@field unit_number uint ----Was this command generated by a distraction. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed) ----@field was_distracted boolean - ----@alias on_area_cloned EventData.on_area_cloned ----Called when an area of the map is cloned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@class EventData.on_area_cloned : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field clear_destination_decoratives boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field clear_destination_entities boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field clone_decoratives boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field clone_entities boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field clone_tiles boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field destination_area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field destination_force? LuaForce ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field destination_surface LuaSurface ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field source_area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field source_surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned) ----@field tick uint - ----@alias on_biter_base_built EventData.on_biter_base_built ----Called when a biter migration builds a base. ---- ----**Note:** This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built) ----@class EventData.on_biter_base_built : EventData ----The entity that was built. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built) ----@field tick uint - ----@alias on_brush_cloned EventData.on_brush_cloned ----Called when a set of positions on the map is cloned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@class EventData.on_brush_cloned : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field clear_destination_decoratives boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field clear_destination_entities boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field clone_decoratives boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field clone_entities boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field clone_tiles boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field destination_force? LuaForce ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field destination_offset TilePosition ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field destination_surface LuaSurface ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field source_offset TilePosition ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field source_positions TilePosition[] ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field source_surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned) ----@field tick uint - ----@alias on_build_base_arrived EventData.on_build_base_arrived ----Called when a [defines.command.build_base](https://lua-api.factorio.com/latest/defines.html#defines.command.build_base) command reaches its destination, and before building starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived) ----@class EventData.on_build_base_arrived : EventData ----The unit group the command was assigned to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived) ----@field group? LuaUnitGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived) ----@field tick uint ----The unit the command was assigned to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived) ----@field unit? LuaEntity - ----@alias on_built_entity EventData.on_built_entity ----Called when player builds something. Can be filtered using [LuaPlayerBuiltEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@class EventData.on_built_entity : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field created_entity LuaEntity ----The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field item? LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field player_index uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field stack LuaItemStack ----The tags associated with this entity if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field tags? Tags ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity) ----@field tick uint - ----@alias on_cancelled_deconstruction EventData.on_cancelled_deconstruction ----Called when the deconstruction of an entity is canceled. Can be filtered using [LuaEntityDeconstructionCancelledEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) ----@class EventData.on_cancelled_deconstruction : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction) ----@field tick uint - ----@alias on_cancelled_upgrade EventData.on_cancelled_upgrade ----Called when the upgrade of an entity is canceled. Can be filtered using [LuaUpgradeCancelledEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@class EventData.on_cancelled_upgrade : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field direction? defines.direction ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field target LuaEntityPrototype ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade) ----@field tick uint - ----@alias on_character_corpse_expired EventData.on_character_corpse_expired ----Called when a character corpse expires due to timeout or all of the items being removed from it. ---- ----**Note:** this is not called if the corpse is mined. See [defines.events.on_pre_player_mined_item](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_mined_item) to detect that. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired) ----@class EventData.on_character_corpse_expired : EventData ----The corpse. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired) ----@field corpse LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired) ----@field tick uint - ----@alias on_chart_tag_added EventData.on_chart_tag_added ----Called when a chart tag is created. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@class EventData.on_chart_tag_added : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@field tag LuaCustomChartTag ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added) ----@field tick uint - ----@alias on_chart_tag_modified EventData.on_chart_tag_modified ----Called when a chart tag is modified by a player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@class EventData.on_chart_tag_modified : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field old_icon? SignalID ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field old_player? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field old_text string ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field tag LuaCustomChartTag ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified) ----@field tick uint - ----@alias on_chart_tag_removed EventData.on_chart_tag_removed ----Called just before a chart tag is deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@class EventData.on_chart_tag_removed : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@field tag LuaCustomChartTag ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed) ----@field tick uint - ----@alias on_chunk_charted EventData.on_chunk_charted ----Called when a chunk is charted or re-charted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@class EventData.on_chunk_charted : EventData ----Area of the chunk. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field area BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field position ChunkPosition ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted) ----@field tick uint - ----@alias on_chunk_deleted EventData.on_chunk_deleted ----Called when one or more chunks are deleted using [LuaSurface::delete_chunk](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) ----@class EventData.on_chunk_deleted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) ----@field name defines.events ----The chunks deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) ----@field positions ChunkPosition[] ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted) ----@field tick uint - ----@alias on_chunk_generated EventData.on_chunk_generated ----Called when a chunk is generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@class EventData.on_chunk_generated : EventData ----Area of the chunk. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@field area BoundingBox ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@field name defines.events ----Position of the chunk. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@field position ChunkPosition ----The surface the chunk is on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated) ----@field tick uint - ----@alias on_combat_robot_expired EventData.on_combat_robot_expired ----Called when a combat robot expires through a lack of energy, or timeout. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired) ----@class EventData.on_combat_robot_expired : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired) ----@field name defines.events ----The entity that owns the robot if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired) ----@field owner? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired) ----@field tick uint - ----@alias on_console_chat EventData.on_console_chat ----Called when a message is sent to the in-game console, either by a player or through the server interface. ---- ----**Note:** This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat) ----@class EventData.on_console_chat : EventData ----The chat message that was sent. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat) ----@field message string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat) ----@field name defines.events ----The player doing the chatting, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat) ----@field tick uint - ----@alias on_console_command EventData.on_console_command ----Called when someone enters a command-like message regardless of it being a valid command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@class EventData.on_console_command : EventData ----The command as typed without the preceding forward slash ('/'). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@field command string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@field name defines.events ----The parameters provided if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@field parameters string ----The player if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command) ----@field tick uint - ----@alias on_cutscene_cancelled EventData.on_cutscene_cancelled ----Called when a cutscene is cancelled by the player or by script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled) ----@class EventData.on_cutscene_cancelled : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled) ----@field name defines.events ----The player the cutscene was shown to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled) ----@field tick uint - ----@alias on_cutscene_waypoint_reached EventData.on_cutscene_waypoint_reached ----Called when a cutscene is playing, each time it reaches a waypoint in that cutscene. ---- ----This refers to an index in the table previously passed to set_controller which started the cutscene. ---- ----**Note:** Due to implementation omission, waypoint_index is 0-based. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached) ----@class EventData.on_cutscene_waypoint_reached : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached) ----@field name defines.events ----The player index of the player viewing the cutscene. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached) ----@field tick uint ----The index of the waypoint we just completed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached) ----@field waypoint_index uint - ----@alias on_difficulty_settings_changed EventData.on_difficulty_settings_changed ----Called when the map difficulty settings are changed. ---- ----**Note:** It's not guaranteed that both settings are changed - just that at least one has been changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed) ----@class EventData.on_difficulty_settings_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed) ----@field old_recipe_difficulty uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed) ----@field old_technology_difficulty uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed) ----@field tick uint - ----@alias on_entity_cloned EventData.on_entity_cloned ----Called when an entity is cloned. Can be filtered for the source entity using [LuaEntityClonedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) ----@class EventData.on_entity_cloned : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) ----@field destination LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) ----@field source LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned) ----@field tick uint - ----@alias on_entity_damaged EventData.on_entity_damaged ----Called when an entity is damaged. Can be filtered using [LuaEntityDamagedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter). ---- ----**Note:** This is not called when an entities health is set directly by another mod. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@class EventData.on_entity_damaged : EventData ----The entity that did the attacking if available. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field cause? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field damage_type LuaDamagePrototype ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field entity LuaEntity ----The damage amount after resistances. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field final_damage_amount float ----The health of the entity after the damage was applied. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field final_health float ----The force that did the attacking if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field force? LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field name defines.events ----The damage amount before resistances. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field original_damage_amount float ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged) ----@field tick uint - ----@alias on_entity_destroyed EventData.on_entity_destroyed ----Called after an entity is destroyed that has been registered with [LuaBootstrap::register_on_entity_destroyed](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed). ---- ----**Note:** Depending on when a given entity is destroyed, this event will 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/events.html#on_entity_destroyed) ----@class EventData.on_entity_destroyed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) ----@field name defines.events ----The number returned by [register_on_entity_destroyed](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed) to uniquely identify this entity during this event. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) ----@field registration_number uint64 ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) ----@field tick uint ----The [LuaEntity::unit_number](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number) of the destroyed entity, if it had one. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed) ----@field unit_number? uint - ----@alias on_entity_died EventData.on_entity_died ----Called when an entity dies. Can be filtered using [LuaEntityDiedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@class EventData.on_entity_died : EventData ----The entity that did the killing if available. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field cause? LuaEntity ----The damage type if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field damage_type? LuaDamagePrototype ----The entity that died. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field entity LuaEntity ----The force that did the killing if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field force? LuaForce ----The loot generated by this entity if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field loot LuaInventory ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died) ----@field tick uint - ----@alias on_entity_logistic_slot_changed EventData.on_entity_logistic_slot_changed ----Called when one of an entity's personal logistic slots changes. ---- ----**Note:** "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@class EventData.on_entity_logistic_slot_changed : EventData ----The entity for whom a logistic slot was changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@field name defines.events ----The player who changed the slot, or `nil` if changed by script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@field player_index? uint ----The slot index that was changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@field slot_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed) ----@field tick uint - ----@alias on_entity_renamed EventData.on_entity_renamed ----Called after an entity has been renamed either by the player or through script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@class EventData.on_entity_renamed : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field by_script boolean ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field old_name string ----If by_script is true this will not be included. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed) ----@field tick uint - ----@alias on_entity_settings_pasted EventData.on_entity_settings_pasted ----Called after entity copy-paste is done. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@class EventData.on_entity_settings_pasted : EventData ----The destination entity settings were copied to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@field destination LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@field player_index uint ----The source entity settings were copied from. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@field source LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted) ----@field tick uint - ----@alias on_entity_spawned EventData.on_entity_spawned ----Called when an entity is spawned by a EnemySpawner ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned) ----@class EventData.on_entity_spawned : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned) ----@field spawner LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned) ----@field tick uint - ----@alias on_equipment_inserted EventData.on_equipment_inserted ----Called after equipment is inserted into an equipment grid. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted) ----@class EventData.on_equipment_inserted : EventData ----The equipment inserted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted) ----@field equipment LuaEquipment ----The equipment grid inserted into. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted) ----@field grid LuaEquipmentGrid ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted) ----@field tick uint - ----@alias on_equipment_removed EventData.on_equipment_removed ----Called after equipment is removed from an equipment grid. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@class EventData.on_equipment_removed : EventData ----The count of equipment removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@field count uint ----The equipment removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@field equipment string ----The equipment grid removed from. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@field grid LuaEquipmentGrid ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed) ----@field tick uint - ----@alias on_force_cease_fire_changed EventData.on_force_cease_fire_changed ----Called when the a forces cease fire values change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@class EventData.on_force_cease_fire_changed : EventData ----If the other force was added or removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@field added boolean ----The force who's cease fire changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@field name defines.events ----Which force was added or removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@field other_force LuaForce ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed) ----@field tick uint - ----@alias on_force_created EventData.on_force_created ----Called when a new force is created using `game.create_force()` ---- ----**Note:** This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created) ----@class EventData.on_force_created : EventData ----The newly created force. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created) ----@field tick uint - ----@alias on_force_friends_changed EventData.on_force_friends_changed ----Called when the a forces friends change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@class EventData.on_force_friends_changed : EventData ----If the other force was added or removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@field added boolean ----The force who's friends changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@field name defines.events ----Which force was added or removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@field other_force LuaForce ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed) ----@field tick uint - ----@alias on_force_reset EventData.on_force_reset ----Called when [LuaForce::reset](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset) is finished. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset) ----@class EventData.on_force_reset : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset) ----@field tick uint - ----@alias on_forces_merged EventData.on_forces_merged ----Called after two forces have been merged using `game.merge_forces()`. ---- ----**Note:** The source force is invalidated before this event is called and the name can be re-used in this event if desired. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@class EventData.on_forces_merged : EventData ----The force entities where reassigned to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@field destination LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@field name defines.events ----The index of the destroyed force. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@field source_index uint ----The force destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@field source_name string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged) ----@field tick uint - ----@alias on_forces_merging EventData.on_forces_merging ----Called when two forces are about to be merged using `game.merge_forces()`. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging) ----@class EventData.on_forces_merging : EventData ----The force to reassign entities to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging) ----@field destination LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging) ----@field name defines.events ----The force to be destroyed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging) ----@field source LuaForce ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging) ----@field tick uint - ----@alias on_game_created_from_scenario EventData.on_game_created_from_scenario ----Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, [LuaBootstrap::on_init](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init) is not fired. ---- ----**Note:** This event is not fired when the scenario is loaded via the map editor. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario) ----@class EventData.on_game_created_from_scenario : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario) ----@field tick uint - ----@alias on_gui_checked_state_changed EventData.on_gui_checked_state_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) checked state is changed (related to checkboxes and radio buttons). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----@class EventData.on_gui_checked_state_changed : EventData ----The element whose checked state changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed) ----@field tick uint - ----@alias on_gui_click EventData.on_gui_click ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) is clicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@class EventData.on_gui_click : EventData ----If alt was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field alt boolean ----The mouse button used if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field button defines.mouse_button_type ----If control was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field control boolean ----The clicked element. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field name defines.events ----The player who did the clicking. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field player_index uint ----If shift was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field shift boolean ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click) ----@field tick uint - ----@alias on_gui_closed EventData.on_gui_closed ----Called when the player closes the GUI they have open. ---- ----This can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised. ---- ----**Note:** It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@class EventData.on_gui_closed : EventData ----The custom GUI element that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field element? LuaGuiElement ----The entity that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field entity? LuaEntity ----The equipment that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field equipment? LuaEquipment ----The GUI type that was open. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field gui_type defines.gui_type ----The script inventory that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field inventory? LuaInventory ----The item that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field item? LuaItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field name defines.events ----The other player that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field other_player? LuaPlayer ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field player_index uint ----The technology that was automatically selected when opening the research GUI ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field technology? LuaTechnology ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field tick uint ----The tile position that was open ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed) ----@field tile_position? TilePosition - ----@alias on_gui_confirmed EventData.on_gui_confirmed ----Called when a [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) is confirmed, for example by pressing Enter in a textfield. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@class EventData.on_gui_confirmed : EventData ----If alt was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field alt boolean ----If control was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field control boolean ----The confirmed element. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field name defines.events ----The player who did the confirming. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field player_index uint ----If shift was pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field shift boolean ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed) ----@field tick uint - ----@alias on_gui_elem_changed EventData.on_gui_elem_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) element value is changed (related to choose element buttons). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----@class EventData.on_gui_elem_changed : EventData ----The element whose element value changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed) ----@field tick uint - ----@alias on_gui_location_changed EventData.on_gui_location_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) element location is changed (related to frames in `player.gui.screen`). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----@class EventData.on_gui_location_changed : EventData ----The element whose location changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) ----@field tick uint - ----@alias on_gui_opened EventData.on_gui_opened ----Called when the player opens a GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@class EventData.on_gui_opened : EventData ----The custom GUI element that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field element? LuaGuiElement ----The entity that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field entity? LuaEntity ----The equipment that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field equipment? LuaEquipment ----The GUI type that was opened. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field gui_type defines.gui_type ----The script inventory that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field inventory? LuaInventory ----The item that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field item? LuaItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field name defines.events ----The other player that was opened ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field other_player? LuaPlayer ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened) ----@field tick uint - ----@alias on_gui_selected_tab_changed EventData.on_gui_selected_tab_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) selected tab is changed (related to tabbed-panes). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----@class EventData.on_gui_selected_tab_changed : EventData ----The tabbed pane whose selected tab changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed) ----@field tick uint - ----@alias on_gui_selection_state_changed EventData.on_gui_selection_state_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) selection state is changed (related to drop-downs and listboxes). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----@class EventData.on_gui_selection_state_changed : EventData ----The element whose selection state changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed) ----@field tick uint - ----@alias on_gui_switch_state_changed EventData.on_gui_switch_state_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) switch state is changed (related to switches). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ----@class EventData.on_gui_switch_state_changed : EventData ----The switch whose switch state changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed) ----@field tick uint - ----@alias on_gui_text_changed EventData.on_gui_text_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) text is changed by the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@class EventData.on_gui_text_changed : EventData ----The edited element. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@field name defines.events ----The player who did the edit. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@field player_index uint ----The new text in the element. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@field text string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed) ----@field tick uint - ----@alias on_gui_value_changed EventData.on_gui_value_changed ----Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) slider value is changed (related to the slider element). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----@class EventData.on_gui_value_changed : EventData ----The element whose value changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----@field element LuaGuiElement ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----@field name defines.events ----The player who did the change. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed) ----@field tick uint - ----@alias on_land_mine_armed EventData.on_land_mine_armed ----Called when a land mine is armed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed) ----@class EventData.on_land_mine_armed : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed) ----@field mine LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed) ----@field tick uint - ----@alias on_lua_shortcut EventData.on_lua_shortcut ----Called when a custom Lua shortcut is pressed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut) ----@class EventData.on_lua_shortcut : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut) ----@field player_index uint ----Shortcut prototype name of the shortcut that was clicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut) ----@field prototype_name string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut) ----@field tick uint - ----@alias on_marked_for_deconstruction EventData.on_marked_for_deconstruction ----Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered using [LuaEntityMarkedForDeconstructionEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) ----@class EventData.on_marked_for_deconstruction : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction) ----@field tick uint - ----@alias on_marked_for_upgrade EventData.on_marked_for_upgrade ----Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using [LuaEntityMarkedForUpgradeEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@class EventData.on_marked_for_upgrade : EventData ----The new direction (if any) ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field direction? defines.direction ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field target LuaEntityPrototype ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade) ----@field tick uint - ----@alias on_market_item_purchased EventData.on_market_item_purchased ----Called after a player purchases some offer from a `market` entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@class EventData.on_market_item_purchased : EventData ----The amount of offers purchased. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field count uint ----The market entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field market LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field name defines.events ----The index of the offer purchased. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field offer_index uint ----The player who did the purchasing. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased) ----@field tick uint - ----@alias on_mod_item_opened EventData.on_mod_item_opened ----Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened) ----@class EventData.on_mod_item_opened : EventData ----The item clicked on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened) ----@field tick uint - ----@alias on_permission_group_added EventData.on_permission_group_added ----Called directly after a permission group is added. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added) ----@class EventData.on_permission_group_added : EventData ----The group added. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added) ----@field group LuaPermissionGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added) ----@field name defines.events ----The player that added the group. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added) ----@field tick uint - ----@alias on_permission_group_deleted EventData.on_permission_group_deleted ----Called directly after a permission group is deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@class EventData.on_permission_group_deleted : EventData ----The group that was deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@field group_name string ----The group id that was deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@field id uint ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@field name defines.events ----The player doing the deletion. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted) ----@field tick uint - ----@alias on_permission_group_edited EventData.on_permission_group_edited ----Called directly after a permission group is edited in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@class EventData.on_permission_group_edited : EventData ----The action when the `type` is "add-permission" or "remove-permission". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field action defines.input_action ----The group being edited. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field group LuaPermissionGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field name defines.events ----The new group name when the `type` is "rename". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field new_name string ----The old group name when the `type` is "rename". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field old_name string ----The other player when the `type` is "add-player" or "remove-player". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field other_player_index uint ----The player that did the editing. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field tick uint ----The edit type: "add-permission", "remove-permission", "enable-all", "disable-all", "add-player", "remove-player", "rename". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited) ----@field type string - ----@alias on_permission_string_imported EventData.on_permission_string_imported ----Called directly after a permission string is imported. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported) ----@class EventData.on_permission_string_imported : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported) ----@field name defines.events ----The player that imported the string. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported) ----@field tick uint - ----@alias on_picked_up_item EventData.on_picked_up_item ----Called when a player picks up an item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item) ----@class EventData.on_picked_up_item : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item) ----@field item_stack SimpleItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item) ----@field tick uint - ----@alias on_player_alt_reverse_selected_area EventData.on_player_alt_reverse_selected_area ----Called after a player alt-reverse-selects an area with a selection-tool item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@class EventData.on_player_alt_reverse_selected_area : EventData ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field area BoundingBox ----The entities selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field entities LuaEntity[] ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field item string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field tick uint ----The tiles selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area) ----@field tiles LuaTile[] - ----@alias on_player_alt_selected_area EventData.on_player_alt_selected_area ----Called after a player alt-selects an area with a selection-tool item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@class EventData.on_player_alt_selected_area : EventData ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field area BoundingBox ----The entities selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field entities LuaEntity[] ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field item string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field tick uint ----The tiles selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area) ----@field tiles LuaTile[] - ----@alias on_player_ammo_inventory_changed EventData.on_player_ammo_inventory_changed ----Called after a players ammo inventory changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed) ----@class EventData.on_player_ammo_inventory_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed) ----@field tick uint - ----@alias on_player_armor_inventory_changed EventData.on_player_armor_inventory_changed ----Called after a players armor inventory changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed) ----@class EventData.on_player_armor_inventory_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed) ----@field tick uint - ----@alias on_player_banned EventData.on_player_banned ----Called when a player is banned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@class EventData.on_player_banned : EventData ----The player that did the banning if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field by_player? uint ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field name defines.events ----The player banned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field player_index? uint ----The banned player name. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field player_name string ----The reason given if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field reason? string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned) ----@field tick uint - ----@alias on_player_built_tile EventData.on_player_built_tile ----Called after a player builds tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@class EventData.on_player_built_tile : EventData ----The item type used to build the tiles ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field item? LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field player_index uint ----The stack used to build the tiles (may be empty if all of the items where used to build the tiles). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field stack? LuaItemStack ----The surface the tile(s) were built on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field tick uint ----The tile prototype that was placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field tile LuaTilePrototype ----The position data. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile) ----@field tiles OldTileAndPosition[] - ----@alias on_player_cancelled_crafting EventData.on_player_cancelled_crafting ----Called when a player cancels crafting. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@class EventData.on_player_cancelled_crafting : EventData ----The number of crafts that have been cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field cancel_count uint ----The crafting items returned to the player's inventory. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field items LuaInventory ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field name defines.events ----The player that did the crafting. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field player_index uint ----The recipe that has been cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field recipe LuaRecipe ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting) ----@field tick uint - ----@alias on_player_changed_force EventData.on_player_changed_force ----Called after a player changes forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force) ----@class EventData.on_player_changed_force : EventData ----The old force. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force) ----@field name defines.events ----The player who changed forces. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force) ----@field tick uint - ----@alias on_player_changed_position EventData.on_player_changed_position ----Called when the tile position a player is located at changes. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position) ----@class EventData.on_player_changed_position : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position) ----@field tick uint - ----@alias on_player_changed_surface EventData.on_player_changed_surface ----Called after a player changes surfaces. ---- ----**Note:** In the instance a player is moved off a surface due to it being deleted this is not called. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface) ----@class EventData.on_player_changed_surface : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface) ----@field name defines.events ----The player who changed surfaces. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface) ----@field player_index uint ----The surface index the player was on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface) ----@field tick uint - ----@alias on_player_cheat_mode_disabled EventData.on_player_cheat_mode_disabled ----Called when cheat mode is disabled on a player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled) ----@class EventData.on_player_cheat_mode_disabled : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled) ----@field tick uint - ----@alias on_player_cheat_mode_enabled EventData.on_player_cheat_mode_enabled ----Called when cheat mode is enabled on a player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled) ----@class EventData.on_player_cheat_mode_enabled : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled) ----@field tick uint - ----@alias on_player_clicked_gps_tag EventData.on_player_clicked_gps_tag ----Called when a player clicks a gps tag ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@class EventData.on_player_clicked_gps_tag : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@field name defines.events ----Index of the player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@field player_index uint ----Map position contained in gps tag ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@field position MapPosition ----Surface name contained in gps tag, even when such surface does not exists ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@field surface string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag) ----@field tick uint - ----@alias on_player_configured_blueprint EventData.on_player_configured_blueprint ----Called when a player clicks the "confirm" button in the configure Blueprint GUI. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint) ----@class EventData.on_player_configured_blueprint : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint) ----@field tick uint - ----@alias on_player_configured_spider_remote EventData.on_player_configured_spider_remote ----Called when a player configures spidertron remote to be connected with a given spidertron ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote) ----@class EventData.on_player_configured_spider_remote : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote) ----@field name defines.events ----The player that configured the remote. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote) ----@field tick uint ----Spider vehicle to which remote was connected to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote) ----@field vehicle LuaEntity - ----@alias on_player_crafted_item EventData.on_player_crafted_item ----Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see [on_pre_player_crafted_item](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@class EventData.on_player_crafted_item : EventData ----The item that has been crafted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@field item_stack LuaItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@field name defines.events ----The player doing the crafting. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@field player_index uint ----The recipe used to craft this item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@field recipe LuaRecipe ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item) ----@field tick uint - ----@alias on_player_created EventData.on_player_created ----Called after the player was created. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created) ----@class EventData.on_player_created : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created) ----@field tick uint - ----@alias on_player_cursor_stack_changed EventData.on_player_cursor_stack_changed ----Called after a players cursorstack changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed) ----@class EventData.on_player_cursor_stack_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed) ----@field tick uint - ----@alias on_player_deconstructed_area EventData.on_player_deconstructed_area ----Called when a player selects an area with a deconstruction planner. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@class EventData.on_player_deconstructed_area : EventData ----If normal selection or alt selection was used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field alt boolean ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field area BoundingBox ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field item string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area) ----@field tick uint - ----@alias on_player_demoted EventData.on_player_demoted ----Called when a player is demoted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted) ----@class EventData.on_player_demoted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted) ----@field tick uint - ----@alias on_player_died EventData.on_player_died ----Called after a player dies. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died) ----@class EventData.on_player_died : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died) ----@field cause? LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died) ----@field tick uint - ----@alias on_player_display_resolution_changed EventData.on_player_display_resolution_changed ----Called when the display resolution changes for a given player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) ----@class EventData.on_player_display_resolution_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) ----@field name defines.events ----The old display resolution ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) ----@field old_resolution DisplayResolution ----The player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed) ----@field tick uint - ----@alias on_player_display_scale_changed EventData.on_player_display_scale_changed ----Called when the display scale changes for a given player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) ----@class EventData.on_player_display_scale_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) ----@field name defines.events ----The old display scale ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) ----@field old_scale double ----The player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed) ----@field tick uint - ----@alias on_player_driving_changed_state EventData.on_player_driving_changed_state ----Called when the player's driving state has changed, meaning a player has either entered or left a vehicle. ---- ----**Note:** This event is not raised when the player is ejected from a vehicle due to it being destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) ----@class EventData.on_player_driving_changed_state : EventData ----The vehicle if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) ----@field entity? LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state) ----@field tick uint - ----@alias on_player_dropped_item EventData.on_player_dropped_item ----Called when a player drops an item on the ground. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item) ----@class EventData.on_player_dropped_item : EventData ----The item-on-ground entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item) ----@field tick uint - ----@alias on_player_fast_transferred EventData.on_player_fast_transferred ----Called when a player fast-transfers something to or from an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred) ----@class EventData.on_player_fast_transferred : EventData ----The entity transferred from or to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_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/events.html#on_player_fast_transferred) ----@field from_player boolean ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred) ----@field name defines.events ----The player transferred from or to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred) ----@field tick uint - ----@alias on_player_flushed_fluid EventData.on_player_flushed_fluid ----Called after player flushed fluid ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@class EventData.on_player_flushed_fluid : EventData ----Amount of fluid that was removed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field amount double ----Entity from which flush was performed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field entity LuaEntity ----Name of a fluid that was flushed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field fluid string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field name defines.events ----True if flush was requested only on this entity ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field only_this_entity boolean ----Index of the player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid) ----@field tick uint - ----@alias on_player_gun_inventory_changed EventData.on_player_gun_inventory_changed ----Called after a players gun inventory changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed) ----@class EventData.on_player_gun_inventory_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed) ----@field tick uint - ----@alias on_player_joined_game EventData.on_player_joined_game ----Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game) ----@class EventData.on_player_joined_game : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game) ----@field tick uint - ----@alias on_player_kicked EventData.on_player_kicked ----Called when a player is kicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@class EventData.on_player_kicked : EventData ----The player that did the kicking if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@field by_player? uint ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@field name defines.events ----The player kicked. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@field player_index uint ----The reason given if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@field reason? string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked) ----@field tick uint - ----@alias on_player_left_game EventData.on_player_left_game ----Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game) ----@class EventData.on_player_left_game : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game) ----@field player_index uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game) ----@field reason defines.disconnect_reason ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game) ----@field tick uint - ----@alias on_player_main_inventory_changed EventData.on_player_main_inventory_changed ----Called after a players main inventory changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) ----@class EventData.on_player_main_inventory_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed) ----@field tick uint - ----@alias on_player_mined_entity EventData.on_player_mined_entity ----Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered using [LuaPlayerMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter). ---- ----**Note:** The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@class EventData.on_player_mined_entity : EventData ----The temporary inventory that holds the result of mining the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@field buffer LuaInventory ----The entity that has been mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@field name defines.events ----The index of the player doing the mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity) ----@field tick uint - ----@alias on_player_mined_item EventData.on_player_mined_item ----Called when the player mines something. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) ----@class EventData.on_player_mined_item : EventData ----The item given to the player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) ----@field item_stack SimpleItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item) ----@field tick uint - ----@alias on_player_mined_tile EventData.on_player_mined_tile ----Called after a player mines tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@class EventData.on_player_mined_tile : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@field player_index uint ----The surface the tile(s) were mined from. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@field tick uint ----The position data. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile) ----@field tiles OldTileAndPosition[] - ----@alias on_player_muted EventData.on_player_muted ----Called when a player is muted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted) ----@class EventData.on_player_muted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted) ----@field tick uint - ----@alias on_player_pipette EventData.on_player_pipette ----Called when a player invokes the "smart pipette" over an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@class EventData.on_player_pipette : EventData ----The item put in the cursor ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@field name defines.events ----The player ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@field tick uint ----If cheat mode was used to give a free stack of the item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette) ----@field used_cheat_mode boolean - ----@alias on_player_placed_equipment EventData.on_player_placed_equipment ----Called after the player puts equipment in an equipment grid ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@class EventData.on_player_placed_equipment : EventData ----The equipment put in the equipment grid. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@field equipment LuaEquipment ----The equipment grid the equipment was put in. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@field grid LuaEquipmentGrid ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment) ----@field tick uint - ----@alias on_player_promoted EventData.on_player_promoted ----Called when a player is promoted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted) ----@class EventData.on_player_promoted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted) ----@field tick uint - ----@alias on_player_removed EventData.on_player_removed ----Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed) ----@class EventData.on_player_removed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed) ----@field name defines.events ----The player index that was removed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed) ----@field tick uint - ----@alias on_player_removed_equipment EventData.on_player_removed_equipment ----Called after the player removes equipment from an equipment grid ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@class EventData.on_player_removed_equipment : EventData ----The count of equipment removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field count uint ----The equipment removed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field equipment string ----The equipment grid removed from. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field grid LuaEquipmentGrid ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment) ----@field tick uint - ----@alias on_player_repaired_entity EventData.on_player_repaired_entity ----Called when a player repairs an entity. Can be filtered using [LuaPlayerRepairedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity) ----@class EventData.on_player_repaired_entity : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity) ----@field tick uint - ----@alias on_player_respawned EventData.on_player_respawned ----Called after a player respawns. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned) ----@class EventData.on_player_respawned : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned) ----@field player_index uint ----The player port used to respawn if one was used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned) ----@field player_port? LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned) ----@field tick uint - ----@alias on_player_reverse_selected_area EventData.on_player_reverse_selected_area ----Called after a player reverse-selects an area with a selection-tool item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@class EventData.on_player_reverse_selected_area : EventData ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field area BoundingBox ----The entities selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field entities LuaEntity[] ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field item string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field tick uint ----The tiles selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area) ----@field tiles LuaTile[] - ----@alias on_player_rotated_entity EventData.on_player_rotated_entity ----Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@class EventData.on_player_rotated_entity : EventData ----The rotated entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@field player_index uint ----The previous direction ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@field previous_direction defines.direction ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity) ----@field tick uint - ----@alias on_player_selected_area EventData.on_player_selected_area ----Called after a player selects an area with a selection-tool item. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@class EventData.on_player_selected_area : EventData ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field area BoundingBox ----The entities selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field entities LuaEntity[] ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field item string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field tick uint ----The tiles selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area) ----@field tiles LuaTile[] - ----@alias on_player_set_quick_bar_slot EventData.on_player_set_quick_bar_slot ----Called when a player sets a quickbar slot to anything (new value, or set to empty). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot) ----@class EventData.on_player_set_quick_bar_slot : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot) ----@field tick uint - ----@alias on_player_setup_blueprint EventData.on_player_setup_blueprint ----Called when a player selects an area with a blueprint. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@class EventData.on_player_setup_blueprint : EventData ----If normal selection or alt selection was used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field alt boolean ----The area selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field area BoundingBox ----The item used to select the area. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field item string ----The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field mapping LuaLazyLoadedValue<{[uint]: LuaEntity}> ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field name defines.events ----The player doing the selection. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field player_index uint ----The surface selected. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field surface LuaSurface ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint) ----@field tick uint - ----@alias on_player_toggled_alt_mode EventData.on_player_toggled_alt_mode ----Called when a player toggles alt mode, also known as "show entity info". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode) ----@class EventData.on_player_toggled_alt_mode : EventData ----The new alt mode value. This value is a shortcut for accessing [GameViewSettings::show_entity_info](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_entity_info) on the player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode) ----@field alt_mode boolean ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode) ----@field tick uint - ----@alias on_player_toggled_map_editor EventData.on_player_toggled_map_editor ----Called when a player toggles the map editor on or off. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor) ----@class EventData.on_player_toggled_map_editor : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor) ----@field tick uint - ----@alias on_player_trash_inventory_changed EventData.on_player_trash_inventory_changed ----Called after a players trash inventory changed in some way. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed) ----@class EventData.on_player_trash_inventory_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed) ----@field tick uint - ----@alias on_player_unbanned EventData.on_player_unbanned ----Called when a player is un-banned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@class EventData.on_player_unbanned : EventData ----The player that did the un-banning if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field by_player? uint ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field name defines.events ----The player un-banned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field player_index? uint ----The player name un-banned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field player_name string ----The reason the player was banned if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field reason? string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned) ----@field tick uint - ----@alias on_player_unmuted EventData.on_player_unmuted ----Called when a player is unmuted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted) ----@class EventData.on_player_unmuted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted) ----@field tick uint - ----@alias on_player_used_capsule EventData.on_player_used_capsule ----Called when a player uses a capsule that results in some game action. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@class EventData.on_player_used_capsule : EventData ----The capsule item used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@field name defines.events ----The player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@field player_index uint ----The position the capsule was used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@field position MapPosition ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule) ----@field tick uint - ----@alias on_player_used_spider_remote EventData.on_player_used_spider_remote ----Called when a player uses spidertron remote to send a spidertron to a given position ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@class EventData.on_player_used_spider_remote : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field name defines.events ----The player that used the remote. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field player_index uint ----Goal position to which spidertron was sent to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field position MapPosition ----If the use was successful. It may fail when spidertron has different driver or when player is on different surface. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field success boolean ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field tick uint ----Spider vehicle which was requested to move. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote) ----@field vehicle LuaEntity - ----@alias on_post_entity_died EventData.on_post_entity_died ----Called after an entity dies. Can be filtered using [LuaPostEntityDiedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@class EventData.on_post_entity_died : EventData ----The corpses created by the entity dying if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field corpses LuaEntity[] ----The damage type if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field damage_type? LuaDamagePrototype ----The force that did the killing if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field force? LuaForce ----The ghost created by the entity dying if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field ghost? LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field name defines.events ----Position where the entity died. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field position MapPosition ----The entity prototype of the entity that died. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field prototype LuaEntityPrototype ----The surface the entity was on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field tick uint ----The unit number the entity had if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died) ----@field unit_number? uint - ----@alias on_pre_build EventData.on_pre_build ----Called when players uses an item to build something. Called before [on_built_entity](https://lua-api.factorio.com/latest/events.html#on_built_entity). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@class EventData.on_pre_build : EventData ----Item was placed while moving. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field created_by_moving boolean ----The direction the item was facing when placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field direction defines.direction ----If building this blueprint was flipped horizontally. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field flip_horizontal boolean ----If building this blueprint was flipped vertically. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field flip_vertical boolean ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field name defines.events ----The player who did the placing. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field player_index uint ----Where the item was placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field position MapPosition ----Item was placed using shift building. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field shift_build boolean ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build) ----@field tick uint - ----@alias on_pre_chunk_deleted EventData.on_pre_chunk_deleted ----Called before one or more chunks are deleted using [LuaSurface::delete_chunk](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) ----@class EventData.on_pre_chunk_deleted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) ----@field name defines.events ----The chunks to be deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) ----@field positions ChunkPosition[] ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted) ----@field tick uint - ----@alias on_pre_entity_settings_pasted EventData.on_pre_entity_settings_pasted ----Called before entity copy-paste is done. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@class EventData.on_pre_entity_settings_pasted : EventData ----The destination entity settings will be copied to. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@field destination LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@field player_index uint ----The source entity settings will be copied from. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@field source LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted) ----@field tick uint - ----@alias on_pre_ghost_deconstructed EventData.on_pre_ghost_deconstructed ----Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using [LuaPreGhostDeconstructedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed) ----@class EventData.on_pre_ghost_deconstructed : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed) ----@field ghost LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed) ----@field name defines.events ----The player that did the deconstruction if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed) ----@field tick uint - ----@alias on_pre_ghost_upgraded EventData.on_pre_ghost_upgraded ----Called before a ghost entity is upgraded. Can be filtered using [LuaPreGhostUpgradedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@class EventData.on_pre_ghost_upgraded : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@field ghost LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@field name defines.events ----The player that did the upgrade if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@field target LuaEntityPrototype ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded) ----@field tick uint - ----@alias on_pre_permission_group_deleted EventData.on_pre_permission_group_deleted ----Called directly before a permission group is deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted) ----@class EventData.on_pre_permission_group_deleted : EventData ----The group to be deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted) ----@field group LuaPermissionGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted) ----@field name defines.events ----The player doing the deletion. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted) ----@field tick uint - ----@alias on_pre_permission_string_imported EventData.on_pre_permission_string_imported ----Called directly before a permission string is imported. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported) ----@class EventData.on_pre_permission_string_imported : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported) ----@field name defines.events ----The player importing the string. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported) ----@field tick uint - ----@alias on_pre_player_crafted_item EventData.on_pre_player_crafted_item ----Called when a player queues something to be crafted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@class EventData.on_pre_player_crafted_item : EventData ----The items removed from the players inventory to do the crafting. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field items LuaInventory ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field name defines.events ----The player doing the crafting. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field player_index uint ----The number of times the recipe is being queued. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field queued_count uint ----The recipe being queued. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field recipe LuaRecipe ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item) ----@field tick uint - ----@alias on_pre_player_died EventData.on_pre_player_died ----Called before a players dies. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died) ----@class EventData.on_pre_player_died : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died) ----@field cause? LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died) ----@field tick uint - ----@alias on_pre_player_left_game EventData.on_pre_player_left_game ----Called before a player leaves the game. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game) ----@class EventData.on_pre_player_left_game : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game) ----@field player_index uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game) ----@field reason defines.disconnect_reason ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game) ----@field tick uint - ----@alias on_pre_player_mined_item EventData.on_pre_player_mined_item ----Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed. Can be filtered using [LuaPrePlayerMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) ----@class EventData.on_pre_player_mined_item : EventData ----The entity being mined ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item) ----@field tick uint - ----@alias on_pre_player_removed EventData.on_pre_player_removed ----Called before a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed) ----@class EventData.on_pre_player_removed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed) ----@field name defines.events ----The player index that will be removed ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed) ----@field tick uint - ----@alias on_pre_player_toggled_map_editor EventData.on_pre_player_toggled_map_editor ----Called before a player toggles the map editor on or off. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor) ----@class EventData.on_pre_player_toggled_map_editor : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor) ----@field tick uint - ----@alias on_pre_robot_exploded_cliff EventData.on_pre_robot_exploded_cliff ----Called directly before a robot explodes cliffs. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@class EventData.on_pre_robot_exploded_cliff : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@field cliff LuaEntity ----The cliff explosive used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff) ----@field tick uint - ----@alias on_pre_script_inventory_resized EventData.on_pre_script_inventory_resized ----Called just before a script inventory is resized. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@class EventData.on_pre_script_inventory_resized : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field inventory LuaInventory ----The mod that did the resizing. This will be `"core"` if done by console command or scenario script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field mod string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field name defines.events ----The new inventory size. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field new_size uint ----The old inventory size. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field old_size uint ----If done by console command; the player who ran the command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized) ----@field tick uint - ----@alias on_pre_surface_cleared EventData.on_pre_surface_cleared ----Called just before a surface is cleared (all entities removed and all chunks deleted). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared) ----@class EventData.on_pre_surface_cleared : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared) ----@field tick uint - ----@alias on_pre_surface_deleted EventData.on_pre_surface_deleted ----Called just before a surface is deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted) ----@class EventData.on_pre_surface_deleted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted) ----@field tick uint - ----@alias on_research_cancelled EventData.on_research_cancelled ----Called when research is cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled) ----@class EventData.on_research_cancelled : EventData ----The force whose research was cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled) ----@field name defines.events ----A mapping of technology name to how many times it was cancelled. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled) ----@field research {[string]: uint} ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled) ----@field tick uint - ----@alias on_research_finished EventData.on_research_finished ----Called when a research finishes. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished) ----@class EventData.on_research_finished : EventData ----If the technology was researched by script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished) ----@field by_script boolean ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished) ----@field name defines.events ----The researched technology ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished) ----@field research LuaTechnology ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished) ----@field tick uint - ----@alias on_research_reversed EventData.on_research_reversed ----Called when a research is reversed (unresearched). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed) ----@class EventData.on_research_reversed : EventData ----If the technology was un-researched by script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed) ----@field by_script boolean ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed) ----@field name defines.events ----The technology un-researched ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed) ----@field research LuaTechnology ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed) ----@field tick uint - ----@alias on_research_started EventData.on_research_started ----Called when a technology research starts. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started) ----@class EventData.on_research_started : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started) ----@field last_research? LuaTechnology ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started) ----@field name defines.events ----The technology being researched ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started) ----@field research LuaTechnology ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started) ----@field tick uint - ----@alias on_resource_depleted EventData.on_resource_depleted ----Called when a resource entity reaches 0 or its minimum yield for infinite resources. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted) ----@class EventData.on_resource_depleted : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted) ----@field tick uint - ----@alias on_robot_built_entity EventData.on_robot_built_entity ----Called when a construction robot builds an entity. Can be filtered using [LuaRobotBuiltEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@class EventData.on_robot_built_entity : EventData ----The entity built. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field created_entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field name defines.events ----The robot that did the building. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field robot LuaEntity ----The item used to do the building. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field stack LuaItemStack ----The tags associated with this entity if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field tags? Tags ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity) ----@field tick uint - ----@alias on_robot_built_tile EventData.on_robot_built_tile ----Called after a robot builds tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@class EventData.on_robot_built_tile : EventData ----The item type used to build the tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field name defines.events ----The robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field robot LuaEntity ----The stack used to build the tiles (may be empty if all of the items where used to build the tiles). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field stack LuaItemStack ----The surface the tile(s) are build on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field tick uint ----The tile prototype that was placed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field tile LuaTilePrototype ----The position data. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile) ----@field tiles OldTileAndPosition[] - ----@alias on_robot_exploded_cliff EventData.on_robot_exploded_cliff ----Called directly after a robot explodes cliffs. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff) ----@class EventData.on_robot_exploded_cliff : EventData ----The cliff explosive used. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff) ----@field item LuaItemPrototype ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff) ----@field tick uint - ----@alias on_robot_mined EventData.on_robot_mined ----Called when a robot mines an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined) ----@class EventData.on_robot_mined : EventData ----The entity the robot just picked up. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined) ----@field item_stack SimpleItemStack ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined) ----@field name defines.events ----The robot that did the mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined) ----@field tick uint - ----@alias on_robot_mined_entity EventData.on_robot_mined_entity ----Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered using [LuaRobotMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter). ---- ----**Note:** The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@class EventData.on_robot_mined_entity : EventData ----The temporary inventory that holds the result of mining the entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@field buffer LuaInventory ----The entity that has been mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@field name defines.events ----The robot doing the mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity) ----@field tick uint - ----@alias on_robot_mined_tile EventData.on_robot_mined_tile ----Called after a robot mines tiles. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@class EventData.on_robot_mined_tile : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@field name defines.events ----The robot. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@field robot LuaEntity ----The surface the tile(s) were mined on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@field tick uint ----The position data. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile) ----@field tiles OldTileAndPosition[] - ----@alias on_robot_pre_mined EventData.on_robot_pre_mined ----Called before a robot mines an entity. Can be filtered using [LuaPreRobotMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined) ----@class EventData.on_robot_pre_mined : EventData ----The entity which is about to be mined. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined) ----@field name defines.events ----The robot that's about to do the mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined) ----@field tick uint - ----@alias on_rocket_launch_ordered EventData.on_rocket_launch_ordered ----Called when a rocket silo is ordered to be launched. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@class EventData.on_rocket_launch_ordered : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@field name defines.events ----The player that is riding the rocket, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@field rocket LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@field rocket_silo LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered) ----@field tick uint - ----@alias on_rocket_launched EventData.on_rocket_launched ----Called when the rocket is launched. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@class EventData.on_rocket_launched : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@field name defines.events ----The player that is riding the rocket, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@field player_index? uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@field rocket LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@field rocket_silo? LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched) ----@field tick uint - ----@alias on_runtime_mod_setting_changed EventData.on_runtime_mod_setting_changed ----Called when a runtime mod setting is changed by a player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@class EventData.on_runtime_mod_setting_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@field name defines.events ----If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@field player_index? uint ----The prototype name of the setting that was changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@field setting string ----Either "runtime-per-user" or "runtime-global". ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@field setting_type string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed) ----@field tick uint - ----@alias on_script_inventory_resized EventData.on_script_inventory_resized ----Called just after a script inventory is resized. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@class EventData.on_script_inventory_resized : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field inventory LuaInventory ----The mod that did the resizing. This will be `"core"` if done by console command or scenario script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field mod string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field name defines.events ----The new inventory size. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field new_size uint ----The old inventory size. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field old_size uint ----Any items which didn't fit into the new inventory size. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field overflow_inventory LuaInventory ----If done by console command; the player who ran the command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized) ----@field tick uint - ----@alias on_script_path_request_finished EventData.on_script_path_request_finished ----Called when a [LuaSurface::request_path](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) call completes. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@class EventData.on_script_path_request_finished : EventData ----Handle to associate the callback with a particular call to [LuaSurface::request_path](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@field id uint ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@field name defines.events ----The actual path that the pathfinder has determined. `nil` if pathfinding failed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@field path? PathfinderWaypoint[] ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@field tick uint ----Indicates that the pathfinder failed because it is too busy, and that you can retry later. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished) ----@field try_again_later boolean - ----@alias on_script_trigger_effect EventData.on_script_trigger_effect ----Called when a script trigger effect is triggered. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@class EventData.on_script_trigger_effect : EventData ----The effect_id specified in the trigger effect. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field effect_id string ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field source_entity? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field source_position? MapPosition ----The surface the effect happened on. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field surface_index uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field target_entity? LuaEntity ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field target_position? MapPosition ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect) ----@field tick uint - ----@alias on_sector_scanned EventData.on_sector_scanned ----Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using [LuaSectorScannedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@class EventData.on_sector_scanned : EventData ----Area of the scanned chunk. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@field area BoundingBox ----The chunk scanned. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@field chunk_position ChunkPosition ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@field name defines.events ----The radar that did the scanning. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@field radar LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned) ----@field tick uint - ----@alias on_selected_entity_changed EventData.on_selected_entity_changed ----Called after the selected entity changes for a given player. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) ----@class EventData.on_selected_entity_changed : EventData ----The last selected entity if it still exists and there was one. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) ----@field last_entity? LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) ----@field name defines.events ----The player whose selected entity changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) ----@field player_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed) ----@field tick uint - ----@alias on_spider_command_completed EventData.on_spider_command_completed ----Called when a spider finishes moving to its autopilot position. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed) ----@class EventData.on_spider_command_completed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed) ----@field tick uint ----Spider vehicle which was requested to move. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed) ----@field vehicle LuaEntity - ----@alias on_string_translated EventData.on_string_translated ----Called when a translation request generated through [LuaPlayer::request_translation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation) is translated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@class EventData.on_string_translated : EventData ----The localised string being translated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field localised_string LocalisedString ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field name defines.events ----The player whose locale was used for the translation. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field player_index uint ----The translated `localised_string`. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field result string ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field tick uint ----Whether the requested localised string was valid and could be translated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated) ----@field translated boolean - ----@alias on_surface_cleared EventData.on_surface_cleared ----Called just after a surface is cleared (all entities removed and all chunks deleted). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared) ----@class EventData.on_surface_cleared : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared) ----@field tick uint - ----@alias on_surface_created EventData.on_surface_created ----Called when a surface is created. ---- ----**Note:** This is not called when the default surface is created as it will always exist. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created) ----@class EventData.on_surface_created : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created) ----@field tick uint - ----@alias on_surface_deleted EventData.on_surface_deleted ----Called after a surface is deleted. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted) ----@class EventData.on_surface_deleted : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted) ----@field tick uint - ----@alias on_surface_imported EventData.on_surface_imported ----Called after a surface is imported. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported) ----@class EventData.on_surface_imported : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported) ----@field name defines.events ----The original surface name. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported) ----@field original_name string ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported) ----@field tick uint - ----@alias on_surface_renamed EventData.on_surface_renamed ----Called when a surface is renamed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@class EventData.on_surface_renamed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@field new_name string ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@field old_name string ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed) ----@field tick uint - ----@alias on_technology_effects_reset EventData.on_technology_effects_reset ----Called when [LuaForce::reset_technology_effects](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects) is finished. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset) ----@class EventData.on_technology_effects_reset : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset) ----@field force LuaForce ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset) ----@field tick uint - ----@alias on_tick EventData.on_tick ----It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick) ----@class EventData.on_tick : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick) ----@field tick uint - ----@alias on_train_changed_state EventData.on_train_changed_state ----Called when a train changes state (started to stopped and vice versa) ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state) ----@class EventData.on_train_changed_state : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state) ----@field old_state defines.train_state ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state) ----@field train LuaTrain - ----@alias on_train_created EventData.on_train_created ----Called when a new train is created either through disconnecting/connecting an existing one or building a new one. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@class EventData.on_train_created : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@field name defines.events ----The first old train id when splitting/merging trains. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@field old_train_id_1? uint ----The second old train id when splitting/merging trains. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@field old_train_id_2? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created) ----@field train LuaTrain - ----@alias on_train_schedule_changed EventData.on_train_schedule_changed ----Called when a trains schedule is changed either by the player or through script. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed) ----@class EventData.on_train_schedule_changed : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed) ----@field name defines.events ----The player who made the change if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed) ----@field player_index? uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed) ----@field train LuaTrain - ----@alias on_trigger_created_entity EventData.on_trigger_created_entity ----Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity="true"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity) ----@class EventData.on_trigger_created_entity : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity) ----@field source? LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity) ----@field tick uint - ----@alias on_trigger_fired_artillery EventData.on_trigger_fired_artillery ----Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery="true"`. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery) ----@class EventData.on_trigger_fired_artillery : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery) ----@field source? LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery) ----@field tick uint - ----@alias on_unit_added_to_group EventData.on_unit_added_to_group ----Called when a unit is added to a unit group. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group) ----@class EventData.on_unit_added_to_group : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group) ----@field group LuaUnitGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group) ----@field unit LuaEntity - ----@alias on_unit_group_created EventData.on_unit_group_created ----Called when a new unit group is created, before any members are added to it. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created) ----@class EventData.on_unit_group_created : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created) ----@field group LuaUnitGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created) ----@field tick uint - ----@alias on_unit_group_finished_gathering EventData.on_unit_group_finished_gathering ----Called when a unit group finishes gathering and starts executing its command. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering) ----@class EventData.on_unit_group_finished_gathering : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering) ----@field group LuaUnitGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering) ----@field tick uint - ----@alias on_unit_removed_from_group EventData.on_unit_removed_from_group ----Called when a unit is removed from a unit group. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group) ----@class EventData.on_unit_removed_from_group : EventData ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group) ----@field group LuaUnitGroup ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group) ----@field tick uint ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group) ----@field unit LuaEntity - ----@alias on_worker_robot_expired EventData.on_worker_robot_expired ----Called when a worker (construction or logistic) robot expires through a lack of energy. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired) ----@class EventData.on_worker_robot_expired : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired) ----@field name defines.events ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired) ----@field robot LuaEntity ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired) ----@field tick uint - ----@alias script_raised_built EventData.script_raised_built ----A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_built](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built), or when `raise_built` is passed to [LuaSurface::create_entity](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity). Can be filtered using [LuaScriptRaisedBuiltEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built) ----@class EventData.script_raised_built : EventData ----The entity that has been built. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built) ----@field tick uint - ----@alias script_raised_destroy EventData.script_raised_destroy ----A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_destroy](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy), or when `raise_destroy` is passed to [LuaEntity::destroy](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy). Can be filtered using [LuaScriptRaisedDestroyEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) ----@class EventData.script_raised_destroy : EventData ----The entity that was destroyed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) ----@field name defines.events ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy) ----@field tick uint - ----@alias script_raised_revive EventData.script_raised_revive ----A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_revive](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive), or when `raise_revive` is passed to [LuaEntity::revive](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive). Can be filtered using [LuaScriptRaisedReviveEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive) ----@class EventData.script_raised_revive : EventData ----The entity that was revived. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive) ----@field entity LuaEntity ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive) ----@field name defines.events ----The tags associated with this entity, if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive) ----@field tags? Tags ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive) ----@field tick uint - ----@alias script_raised_set_tiles EventData.script_raised_set_tiles ----A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_set_tiles](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles), or when `raise_event` is passed to [LuaSurface::set_tiles](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_tiles). ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) ----@class EventData.script_raised_set_tiles : EventData ----Identifier of the event ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) ----@field name defines.events ----The surface whose tiles were changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) ----@field surface_index uint ----Tick the event was generated. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) ----@field tick uint ----The tiles that were changed. ---- ----[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles) ----@field tiles Tile[] - - diff --git a/.vscode/factorio/runtime-api-global_functions.lua b/.vscode/factorio/runtime-api-global_functions.lua deleted file mode 100644 index 9979baf..0000000 --- a/.vscode/factorio/runtime-api-global_functions.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section global_functions --- This file is automatically generated. Edits will be overwritten. - ----`localised_print()` allows printing [LocalisedString](https://lua-api.factorio.com/latest/Concepts.html#LocalisedString) to stdout without polluting the Factorio [log file](https://wiki.factorio.com/Log_file). This is primarily useful when communicating with external tools that launch Factorio as a child process. ----@param string LocalisedString -localised_print=function(string)end ----`log()` can print [LocalisedStrings](https://lua-api.factorio.com/latest/Concepts.html#LocalisedString) to the Factorio [log file](https://wiki.factorio.com/Log_file). This, in combination with the serpent library, makes debugging in the data stage easier because it allows the inspection of entire prototype tables. For example, printing all properties of the sulfur item prototype can be done like so: `log(serpent.block(data.raw["item"]["sulfur"]))` ----@param string LocalisedString -log=function(string)end ----Factorio provides the `table_size()` function as a simple way to determine the size of tables with non-continuous keys, as the standard `#` operator does not work correctly for these. The function is a C++ implementation of the following Lua code, which is faster than doing the same in Lua: ---- ----``` ----local function size(t) ---- local count = 0 ---- for k,v in pairs(t) do ---- count = count + 1 ---- end ---- return count ----end ----``` ---- ----Note that `table_size()` does not work correctly for [LuaCustomTable](https://lua-api.factorio.com/latest/LuaCustomTable.html), their size has to be determined with [LuaCustomTable::length_operator](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.length_operator) instead. ----@param table table ----@return uint -table_size=function(table)end - diff --git a/.vscode/factorio/runtime-api-table_types.lua b/.vscode/factorio/runtime-api-table_types.lua deleted file mode 100644 index 62a0e15..0000000 --- a/.vscode/factorio/runtime-api-table_types.lua +++ /dev/null @@ -1,431 +0,0 @@ ----@meta ----@diagnostic disable - ---$Factorio 1.1.72 ---$Overlay 5 ---$Section table_types --- This file is automatically generated. Edits will be overwritten. - ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@class LuaBootstrap.level ----Is this level a simulation? (The main menu and 'Tips and tricks' use simulations) ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@field is_simulation? boolean ----Is this level a tutorial? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@field is_tutorial? boolean ----The campaign name if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@field campaign_name? string ----The level name. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@field level_name string ----The mod name if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.level) ----@field mod_name? string - ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@class LuaBurnerPrototype.light_flicker ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field minimum_intensity float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field maximum_intensity float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field derivation_change_frequency float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field derivation_change_deviation float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field border_fix_speed float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field minimum_light_size float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field light_intensity_to_size_coefficient float ----[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.light_flicker) ----@field color Color - ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mining_state) ----@class LuaControl.mining_state ----Whether the player is mining at all ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mining_state) ----@field mining boolean ----What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor). ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mining_state) ----@field position? MapPosition - ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.repair_state) ----@class LuaControl.repair_state ----The current state ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.repair_state) ----@field repairing boolean ----The position being repaired ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.repair_state) ----@field position MapPosition - ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.shooting_state) ----@class LuaControl.shooting_state ----The current state ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.shooting_state) ----@field state defines.shooting ----The position being shot at ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.shooting_state) ----@field position MapPosition - ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.walking_state) ----@class LuaControl.walking_state ----If `false`, the player is currently not walking; otherwise it's going somewhere ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.walking_state) ----@field walking boolean ----Direction where the player is walking ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.walking_state) ----@field direction defines.direction - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.circuit_connected_entities) ----@class LuaEntity.circuit_connected_entities ----Entities connected via the red wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.circuit_connected_entities) ----@field red LuaEntity[] ----Entities connected via the green wire. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.circuit_connected_entities) ----@field green LuaEntity[] - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@class LuaEntityPrototype.created_smoke ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field smoke_name string ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field offsets Vector[] ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field offset_deviation BoundingBox ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field initial_height float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field max_radius? float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field speed Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field speed_multiplier float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field speed_multiplier_deviation float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field starting_frame float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field starting_frame_deviation float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field starting_frame_speed float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field starting_frame_speed_deviation float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field speed_from_center float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.created_smoke) ----@field speed_from_center_deviation float - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@class LuaEntityPrototype.logistic_parameters ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field spawn_and_station_height float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field spawn_and_station_shadow_height_offset float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charge_approach_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field logistic_radius float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field construction_radius float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charging_station_count uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charging_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charging_station_shift Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charging_energy double ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field charging_threshold_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field robot_vertical_acceleration float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field stationing_offset Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field robot_limit uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field logistics_connection_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters) ----@field robots_shrink_when_entering_and_exiting boolean - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@class LuaEntityPrototype.mineable_properties ----Is this entity mineable at all? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field minable boolean ----Energy required to mine an entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field mining_time double ----Prototype name of the particle produced when mining this entity. Will only be present if this entity produces any particle during mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field mining_particle? string ----Products obtained by mining this entity. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field products? Product[] ----The required fluid amount if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field fluid_amount? double ----The prototype name of the required fluid if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field required_fluid? string ----The mining trigger if any. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.mineable_properties) ----@field mining_trigger? TriggerItem[] - ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawn_cooldown) ----@class LuaEntityPrototype.spawn_cooldown ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawn_cooldown) ----@field min double ----[View documentation](https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.spawn_cooldown) ----@field max double - ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shape) ----@class LuaEquipment.shape ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shape) ----@field width uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shape) ----@field height uint - ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@class LuaEquipmentPrototype.logistic_parameters ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field spawn_and_station_height float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field spawn_and_station_shadow_height_offset float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charge_approach_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field logistic_radius float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field construction_radius float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charging_station_count uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charging_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charging_station_shift Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charging_energy double ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field charging_threshold_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field robot_vertical_acceleration float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field stationing_offset Vector ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field robot_limit uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field logistics_connection_distance float ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters) ----@field robots_shrink_when_entering_and_exiting boolean - ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shape) ----@class LuaEquipmentPrototype.shape ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shape) ----@field width uint ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shape) ----@field height uint ----Only set when the shape is "manual" ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.shape) ----@field points? EquipmentPoint[] - ----[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) ----@class LuaTilePrototype.mineable_properties ----Is this tile mineable at all? ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) ----@field minable boolean ----Energy required to mine a tile. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) ----@field mining_time double ----Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) ----@field mining_particle? string ----Products obtained by mining this tile. ---- ----[View documentation](https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.mineable_properties) ----@field products Product[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@class BlueprintEntity.inventory ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field bar? number ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BlueprintEntity) ----@field filters? InventoryFilter[] - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@class BoundingBox.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field left_top MapPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field right_bottom MapPosition ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field orientation? RealOrientation - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@class BoundingBox.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field [1] MapPosition left_top ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field [2] MapPosition right_bottom ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#BoundingBox) ----@field [3]? RealOrientation orientation - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@class ChunkPosition.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@field x int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@field y int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@class ChunkPosition.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@field [1] int x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ChunkPosition) ----@field [2] int y - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@class Color.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field r? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field g? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field b? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field a? float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@class Color.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field [1]? float r ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field [2]? float g ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field [3]? float b ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Color) ----@field [4]? float a - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@class ColorModifier.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field r? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field g? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field b? float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field a? float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@class ColorModifier.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field [1]? float r ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field [2]? float g ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field [3]? float b ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ColorModifier) ----@field [4]? float a - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@class EquipmentPosition.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@field x int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@field y int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@class EquipmentPosition.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@field [1] int x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EquipmentPosition) ----@field [2] int y - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@class GuiLocation.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@field x int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@field y int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@class GuiLocation.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@field [1] int x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#GuiLocation) ----@field [2] int y - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@class MapPosition.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@field x double ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@field y double - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@class MapPosition.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@field [1] double x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#MapPosition) ----@field [2] double y - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@class TilePosition.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@field x int ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@field y int - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@class TilePosition.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@field [1] int x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#TilePosition) ----@field [2] int y - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@class Vector.0 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@field x float ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@field y float - ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@class Vector.1 ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@field [1] float x ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#Vector) ----@field [2] float y - -