From d2bb9e252350118101f14fc96a546cb4af27a1d5 Mon Sep 17 00:00:00 2001 From: Monica Moniot Date: Fri, 28 Oct 2022 14:40:49 -0400 Subject: [PATCH] api update --- .../factorio/runtime-api-LuaAISettings.lua | 2 +- ...time-api-LuaAccumulatorControlBehavior.lua | 2 +- .../runtime-api-LuaAchievementPrototype.lua | 2 +- .../runtime-api-LuaAmmoCategoryPrototype.lua | 2 +- ...LuaArithmeticCombinatorControlBehavior.lua | 2 +- ...ntime-api-LuaAutoplaceControlPrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaBootstrap.lua | 2 +- .vscode/factorio/runtime-api-LuaBurner.lua | 2 +- .../runtime-api-LuaBurnerPrototype.lua | 5 +- .../factorio/runtime-api-LuaChunkIterator.lua | 2 +- .../runtime-api-LuaCircuitNetwork.lua | 2 +- ...ntime-api-LuaCombinatorControlBehavior.lua | 2 +- .../runtime-api-LuaCommandProcessor.lua | 2 +- ...i-LuaConstantCombinatorControlBehavior.lua | 2 +- ...untime-api-LuaContainerControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaControl.lua | 12 +- .../runtime-api-LuaControlBehavior.lua | 2 +- .../runtime-api-LuaCustomChartTag.lua | 2 +- .../runtime-api-LuaCustomInputPrototype.lua | 2 +- .../factorio/runtime-api-LuaCustomTable.lua | 2 +- .../runtime-api-LuaDamagePrototype.lua | 2 +- ...pi-LuaDeciderCombinatorControlBehavior.lua | 2 +- .../runtime-api-LuaDecorativePrototype.lua | 2 +- ...e-api-LuaElectricEnergySourcePrototype.lua | 5 +- .vscode/factorio/runtime-api-LuaEntity.lua | 24 ++-- .../runtime-api-LuaEntityPrototype.lua | 55 +++++++- .vscode/factorio/runtime-api-LuaEquipment.lua | 2 +- ...time-api-LuaEquipmentCategoryPrototype.lua | 2 +- .../factorio/runtime-api-LuaEquipmentGrid.lua | 2 +- .../runtime-api-LuaEquipmentGridPrototype.lua | 2 +- .../runtime-api-LuaEquipmentPrototype.lua | 10 +- .../runtime-api-LuaFlowStatistics.lua | 2 +- .vscode/factorio/runtime-api-LuaFluidBox.lua | 6 +- .../runtime-api-LuaFluidBoxPrototype.lua | 2 +- ...time-api-LuaFluidEnergySourcePrototype.lua | 5 +- .../runtime-api-LuaFluidPrototype.lua | 2 +- .../factorio/runtime-api-LuaFontPrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaForce.lua | 8 +- .../runtime-api-LuaFuelCategoryPrototype.lua | 2 +- .../factorio/runtime-api-LuaGameScript.lua | 22 ++-- ...ime-api-LuaGenericOnOffControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaGroup.lua | 14 +-- .vscode/factorio/runtime-api-LuaGui.lua | 2 +- .../factorio/runtime-api-LuaGuiElement.lua | 52 ++++++-- .../runtime-api-LuaHeatBufferPrototype.lua | 2 +- ...ntime-api-LuaHeatEnergySourcePrototype.lua | 5 +- ...runtime-api-LuaInserterControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaInventory.lua | 2 +- .../factorio/runtime-api-LuaItemPrototype.lua | 4 +- .vscode/factorio/runtime-api-LuaItemStack.lua | 2 +- .../runtime-api-LuaLampControlBehavior.lua | 2 +- .../runtime-api-LuaLazyLoadedValue.lua | 2 +- .../factorio/runtime-api-LuaLogisticCell.lua | 2 +- ...pi-LuaLogisticContainerControlBehavior.lua | 2 +- .../runtime-api-LuaLogisticNetwork.lua | 2 +- .../factorio/runtime-api-LuaLogisticPoint.lua | 2 +- ...time-api-LuaMiningDrillControlBehavior.lua | 2 +- .../runtime-api-LuaModSettingPrototype.lua | 2 +- ...runtime-api-LuaModuleCategoryPrototype.lua | 2 +- .../runtime-api-LuaNamedNoiseExpression.lua | 2 +- .../runtime-api-LuaNoiseLayerPrototype.lua | 2 +- .../runtime-api-LuaParticlePrototype.lua | 2 +- .../runtime-api-LuaPermissionGroup.lua | 2 +- .../runtime-api-LuaPermissionGroups.lua | 2 +- .vscode/factorio/runtime-api-LuaPlayer.lua | 10 +- .vscode/factorio/runtime-api-LuaProfiler.lua | 2 +- ...-LuaProgrammableSpeakerControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaRCON.lua | 2 +- ...-api-LuaRailChainSignalControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaRailPath.lua | 2 +- ...ntime-api-LuaRailSignalControlBehavior.lua | 2 +- .../runtime-api-LuaRandomGenerator.lua | 2 +- .vscode/factorio/runtime-api-LuaRecipe.lua | 2 +- ...runtime-api-LuaRecipeCategoryPrototype.lua | 2 +- .../runtime-api-LuaRecipePrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaRemote.lua | 14 +-- .vscode/factorio/runtime-api-LuaRendering.lua | 2 +- ...ntime-api-LuaResourceCategoryPrototype.lua | 2 +- ...runtime-api-LuaRoboportControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaSettings.lua | 2 +- .../runtime-api-LuaShortcutPrototype.lua | 2 +- ...time-api-LuaStorageTankControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-LuaStyle.lua | 2 +- .vscode/factorio/runtime-api-LuaSurface.lua | 49 +++++--- .../factorio/runtime-api-LuaTechnology.lua | 2 +- .../runtime-api-LuaTechnologyPrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaTile.lua | 2 +- .../factorio/runtime-api-LuaTilePrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaTrain.lua | 2 +- ...untime-api-LuaTrainStopControlBehavior.lua | 2 +- ...me-api-LuaTransportBeltControlBehavior.lua | 2 +- .../factorio/runtime-api-LuaTransportLine.lua | 2 +- .../runtime-api-LuaTrivialSmokePrototype.lua | 2 +- .vscode/factorio/runtime-api-LuaUnitGroup.lua | 2 +- .../runtime-api-LuaVirtualSignalPrototype.lua | 4 +- ...ntime-api-LuaVoidEnergySourcePrototype.lua | 5 +- .../runtime-api-LuaWallControlBehavior.lua | 2 +- .vscode/factorio/runtime-api-builtin.lua | 2 +- .vscode/factorio/runtime-api-concepts.lua | 119 ++++++++++++++---- .vscode/factorio/runtime-api-custom.lua | 2 +- .vscode/factorio/runtime-api-defines.lua | 2 +- .vscode/factorio/runtime-api-events.lua | 8 +- .../factorio/runtime-api-global_functions.lua | 4 +- .vscode/factorio/runtime-api-table_types.lua | 2 +- cybersyn/control.lua | 1 + cybersyn/graphics/icons/area-of-effect.png | Bin 0 -> 1364 bytes cybersyn/graphics/icons/lost-train.png | Bin 2532 -> 1184 bytes cybersyn/prototypes/entity.lua | 5 +- cybersyn/prototypes/item.lua | 2 +- cybersyn/scripts/controller.lua | 7 +- cybersyn/scripts/global.lua | 2 +- cybersyn/scripts/layout.lua | 4 +- cybersyn/scripts/main.lua | 29 +++-- 113 files changed, 432 insertions(+), 222 deletions(-) create mode 100644 cybersyn/graphics/icons/area-of-effect.png diff --git a/.vscode/factorio/runtime-api-LuaAISettings.lua b/.vscode/factorio/runtime-api-LuaAISettings.lua index 158e690..224babe 100644 --- a/.vscode/factorio/runtime-api-LuaAISettings.lua +++ b/.vscode/factorio/runtime-api-LuaAISettings.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaAISettings -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua index de0db1c..3f82cf4 100644 --- a/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaAccumulatorControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaAccumulatorControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua b/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua index 4874bc5..90fa333 100644 --- a/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaAchievementPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaAchievementPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua index de1c73b..812d6ce 100644 --- a/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaAmmoCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaAmmoCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua index 45f6211..8087806 100644 --- a/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaArithmeticCombinatorControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaArithmeticCombinatorControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua b/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua index b034b51..97a65fe 100644 --- a/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaAutoplaceControlPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaAutoplaceControlPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaBootstrap.lua b/.vscode/factorio/runtime-api-LuaBootstrap.lua index c8e512d..e279aa0 100644 --- a/.vscode/factorio/runtime-api-LuaBootstrap.lua +++ b/.vscode/factorio/runtime-api-LuaBootstrap.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaBootstrap -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaBurner.lua b/.vscode/factorio/runtime-api-LuaBurner.lua index 215d594..32992ff 100644 --- a/.vscode/factorio/runtime-api-LuaBurner.lua +++ b/.vscode/factorio/runtime-api-LuaBurner.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaBurner -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua b/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua index 4533341..b5e2a36 100644 --- a/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaBurnerPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaBurnerPrototype -- This file is automatically generated. Edits will be overwritten. @@ -18,7 +18,8 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.effectivity) ---@field effectivity double ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaChunkIterator.lua b/.vscode/factorio/runtime-api-LuaChunkIterator.lua index d36436b..ada1853 100644 --- a/.vscode/factorio/runtime-api-LuaChunkIterator.lua +++ b/.vscode/factorio/runtime-api-LuaChunkIterator.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaChunkIterator -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua b/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua index 65316d0..76216ad 100644 --- a/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua +++ b/.vscode/factorio/runtime-api-LuaCircuitNetwork.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCircuitNetwork -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua index 3fad135..d6e569f 100644 --- a/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaCombinatorControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCombinatorControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCommandProcessor.lua b/.vscode/factorio/runtime-api-LuaCommandProcessor.lua index 36fbf9c..c9039d6 100644 --- a/.vscode/factorio/runtime-api-LuaCommandProcessor.lua +++ b/.vscode/factorio/runtime-api-LuaCommandProcessor.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCommandProcessor -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua index 1c8b4e8..3d3802c 100644 --- a/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaConstantCombinatorControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaConstantCombinatorControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua index 36a7b48..7383a3d 100644 --- a/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaContainerControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaContainerControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaControl.lua b/.vscode/factorio/runtime-api-LuaControl.lua index beb9bcf..91291b3 100644 --- a/.vscode/factorio/runtime-api-LuaControl.lua +++ b/.vscode/factorio/runtime-api-LuaControl.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaControl -- This file is automatically generated. Edits will be overwritten. @@ -206,14 +206,14 @@ --- ---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` or `nil`. +---**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|defines.gui_type +---@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) @@ -244,7 +244,7 @@ ---[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 the vehicle this player is riding in. +---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 @@ -426,13 +426,13 @@ get_item_count=function(item)end, ---[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. Only used on `spider-vehicle`. +---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. +---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. diff --git a/.vscode/factorio/runtime-api-LuaControlBehavior.lua b/.vscode/factorio/runtime-api-LuaControlBehavior.lua index 0ceaad3..4fc360f 100644 --- a/.vscode/factorio/runtime-api-LuaControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCustomChartTag.lua b/.vscode/factorio/runtime-api-LuaCustomChartTag.lua index 665b0be..f9dc650 100644 --- a/.vscode/factorio/runtime-api-LuaCustomChartTag.lua +++ b/.vscode/factorio/runtime-api-LuaCustomChartTag.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCustomChartTag -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua b/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua index f5219b3..baccea3 100644 --- a/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaCustomInputPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCustomInputPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaCustomTable.lua b/.vscode/factorio/runtime-api-LuaCustomTable.lua index c59d5f0..1fd3b7e 100644 --- a/.vscode/factorio/runtime-api-LuaCustomTable.lua +++ b/.vscode/factorio/runtime-api-LuaCustomTable.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaCustomTable -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaDamagePrototype.lua b/.vscode/factorio/runtime-api-LuaDamagePrototype.lua index 9b998e6..d5732d9 100644 --- a/.vscode/factorio/runtime-api-LuaDamagePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaDamagePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaDamagePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua b/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua index 5595943..f604812 100644 --- a/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaDeciderCombinatorControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaDeciderCombinatorControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua b/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua index cbb7a40..f653295 100644 --- a/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaDecorativePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaDecorativePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua index 0728ff7..a029a3c 100644 --- a/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaElectricEnergySourcePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaElectricEnergySourcePrototype -- This file is automatically generated. Edits will be overwritten. @@ -18,7 +18,8 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.drain) ---@field drain double ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaEntity.lua b/.vscode/factorio/runtime-api-LuaEntity.lua index 21bc446..601cb15 100644 --- a/.vscode/factorio/runtime-api-LuaEntity.lua +++ b/.vscode/factorio/runtime-api-LuaEntity.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEntity -- This file is automatically generated. Edits will be overwritten. @@ -282,6 +282,8 @@ ---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. @@ -884,7 +886,7 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index) --- ----_Can only be used if this is Character or Car_ +---_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. @@ -892,7 +894,7 @@ ---[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. +---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 @@ -1513,7 +1515,7 @@ get_heat_setting=function()end, ---_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. +---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) --- @@ -1521,7 +1523,7 @@ get_inbound_signals=function()end, ---@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. +---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) --- @@ -1598,7 +1600,7 @@ get_parent_signals=function()end, --- ---[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger) --- ----_Can only be used if this is Vehicle_ +---_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. @@ -2065,7 +2067,7 @@ set_driver=function(driver)end, --- ---[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@Prototype name of the item to filter. +---@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. --- @@ -2080,14 +2082,14 @@ set_heat_setting=function(filter)end, --- ---_Can only be used if this is InfinityContainer_ ---@param index uint@The index to set. ----@param filter InfinityInventoryFilter@The new filter or `nil` to clear the filter. +---@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@The new filter or `nil` to clear the filter. +---@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. --- @@ -2098,7 +2100,7 @@ set_infinity_pipe_filter=function(filter)end, --- ---[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger) --- ----_Can only be used if this is Vehicle_ +---_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. @@ -2153,7 +2155,7 @@ spawn_decorations=function()end, --- ---[View documentation](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.start_fading_out) start_fading_out=function()end, ----Stops the given SpiderVehicle. +---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) --- diff --git a/.vscode/factorio/runtime-api-LuaEntityPrototype.lua b/.vscode/factorio/runtime-api-LuaEntityPrototype.lua index c47f776..7760292 100644 --- a/.vscode/factorio/runtime-api-LuaEntityPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaEntityPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEntityPrototype -- This file is automatically generated. Edits will be overwritten. @@ -129,6 +129,13 @@ ---_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) @@ -742,7 +749,51 @@ --- ---_Can only be used if this is ProgrammableSpeaker_ ---@field instruments? ProgrammableSpeakerInstrument[] ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaEquipment.lua b/.vscode/factorio/runtime-api-LuaEquipment.lua index 43069fc..000daf7 100644 --- a/.vscode/factorio/runtime-api-LuaEquipment.lua +++ b/.vscode/factorio/runtime-api-LuaEquipment.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEquipment -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua index 1cb40cb..6217a36 100644 --- a/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaEquipmentCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEquipmentCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua b/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua index a5cc637..06df396 100644 --- a/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua +++ b/.vscode/factorio/runtime-api-LuaEquipmentGrid.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEquipmentGrid -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua index fd5a1f9..ad6c918 100644 --- a/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaEquipmentGridPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEquipmentGridPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua b/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua index d8b45ba..d82cb27 100644 --- a/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaEquipmentPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaEquipmentPrototype -- This file is automatically generated. Edits will be overwritten. @@ -75,13 +75,15 @@ ---**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) ----@field logistic_parameters 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 MovementBonusEquipmentPrototype_ ----@field movement_bonus float +---_Can only be used if this is MovementBonusEquipment_ +---@field movement_bonus? float ---[R] ---Name of this prototype. --- diff --git a/.vscode/factorio/runtime-api-LuaFlowStatistics.lua b/.vscode/factorio/runtime-api-LuaFlowStatistics.lua index bc80d5a..85384b5 100644 --- a/.vscode/factorio/runtime-api-LuaFlowStatistics.lua +++ b/.vscode/factorio/runtime-api-LuaFlowStatistics.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFlowStatistics -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaFluidBox.lua b/.vscode/factorio/runtime-api-LuaFluidBox.lua index 319905f..64e64f9 100644 --- a/.vscode/factorio/runtime-api-LuaFluidBox.lua +++ b/.vscode/factorio/runtime-api-LuaFluidBox.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFluidBox -- This file is automatically generated. Edits will be overwritten. @@ -41,7 +41,7 @@ ---[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::index](https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.index)). New fluidboxes may not be added or removed using this operator. +---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. --- @@ -110,7 +110,7 @@ help=function()end, --- ---[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?@The filter to set. Setting `nil` clears the filter. +---@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 index 3ca4b7b..d20585b 100644 --- a/.vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaFluidBoxPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFluidBoxPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua index f3a2360..96f33c4 100644 --- a/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaFluidEnergySourcePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFluidEnergySourcePrototype -- This file is automatically generated. Edits will be overwritten. @@ -22,7 +22,8 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.effectivity) ---@field effectivity double ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaFluidPrototype.lua b/.vscode/factorio/runtime-api-LuaFluidPrototype.lua index 2168209..323e73d 100644 --- a/.vscode/factorio/runtime-api-LuaFluidPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaFluidPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFluidPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaFontPrototype.lua b/.vscode/factorio/runtime-api-LuaFontPrototype.lua index fe44f7f..20ea356 100644 --- a/.vscode/factorio/runtime-api-LuaFontPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaFontPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFontPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaForce.lua b/.vscode/factorio/runtime-api-LuaForce.lua index 1da4f3d..b2f383e 100644 --- a/.vscode/factorio/runtime-api-LuaForce.lua +++ b/.vscode/factorio/runtime-api-LuaForce.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaForce -- This file is automatically generated. Edits will be overwritten. @@ -502,8 +502,12 @@ get_saved_technology_progress=function(technology)end, 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 @@ -515,7 +519,7 @@ get_spawn_position=function(surface)end, ---@return LuaEntity[] get_train_stops=function(param)end, ---[View documentation](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_trains) ----@param surface SurfaceIdentification?@If given only trains on the surface are returned. +---@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) diff --git a/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua index 1de1b8e..eba1945 100644 --- a/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaFuelCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaFuelCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaGameScript.lua b/.vscode/factorio/runtime-api-LuaGameScript.lua index efadaa3..77d71bb 100644 --- a/.vscode/factorio/runtime-api-LuaGameScript.lua +++ b/.vscode/factorio/runtime-api-LuaGameScript.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaGameScript -- This file is automatically generated. Edits will be overwritten. @@ -500,7 +500,7 @@ force_crc=function()end, ---**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 give, only the entities active on this surface are counted. +---@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) @@ -656,10 +656,16 @@ get_script_inventories=function(mod)end, 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 @@ -841,18 +847,18 @@ 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 +---@field game_finished? boolean ---[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field player_won boolean +---@field player_won? boolean ---[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field next_level string +---@field next_level? string ---[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field can_continue boolean +---@field can_continue? boolean ---[View documentation](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state) ----@field victorious_force ForceIdentification +---@field victorious_force? ForceIdentification ----Set scenario state. +---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 diff --git a/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua b/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua index 2ae43b6..129d26b 100644 --- a/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaGenericOnOffControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaGenericOnOffControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaGroup.lua b/.vscode/factorio/runtime-api-LuaGroup.lua index c7800bd..4be90e8 100644 --- a/.vscode/factorio/runtime-api-LuaGroup.lua +++ b/.vscode/factorio/runtime-api-LuaGroup.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaGroup -- This file is automatically generated. Edits will be overwritten. @@ -35,19 +35,15 @@ ---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order) ---@field order string ---[R] ----The additional order value used in recipe ordering. ---- ----**Note:** Can only be used on groups, not on subgroups. +---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 +---@field order_in_recipe? string ---[R] ----Subgroups of this group. ---- ----**Note:** Can only be used on groups, not on subgroups. +---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[] +---@field subgroups? LuaGroup[] ---[R] --- ---[View documentation](https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.type) diff --git a/.vscode/factorio/runtime-api-LuaGui.lua b/.vscode/factorio/runtime-api-LuaGui.lua index 064aa97..4335ce0 100644 --- a/.vscode/factorio/runtime-api-LuaGui.lua +++ b/.vscode/factorio/runtime-api-LuaGui.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaGui -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaGuiElement.lua b/.vscode/factorio/runtime-api-LuaGuiElement.lua index 6f4c090..5ffd124 100644 --- a/.vscode/factorio/runtime-api-LuaGuiElement.lua +++ b/.vscode/factorio/runtime-api-LuaGuiElement.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaGuiElement -- This file is automatically generated. Edits will be overwritten. @@ -127,9 +127,11 @@ ---_Can only be used if this is textfield or text-box_ ---@field clear_and_focus_on_right_click boolean ---[RW] ----The image to display on this sprite-button when it is clicked. +---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. @@ -236,11 +238,15 @@ ---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. @@ -255,7 +261,7 @@ ---_Can only be used if this is scroll-pane_ ---@field horizontal_scroll_policy string ---[RW] ----The image to display on this sprite-button when it is hovered. +---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) --- @@ -282,6 +288,8 @@ ---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. @@ -327,6 +335,8 @@ ---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. @@ -342,6 +352,8 @@ ---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. @@ -369,6 +381,8 @@ ---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`. @@ -378,9 +392,11 @@ ---_Can only be used if this is text-box_ ---@field read_only boolean ---[RW] ----Whether the image widget should resize according to the sprite in it. Defaults to `true`. +---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. @@ -407,6 +423,8 @@ ---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. @@ -419,6 +437,8 @@ ---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. @@ -428,16 +448,18 @@ ---_Can only be used if this is slider_ ---@field slider_value double ---[RW] ----The image to display on this sprite-button or sprite in the default state. +---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_ +---_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. @@ -448,6 +470,8 @@ ---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. @@ -462,6 +486,8 @@ ---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. @@ -526,6 +552,8 @@ ---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. @@ -563,7 +591,7 @@ local LuaGuiElement={ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add) ---@field ignored_by_interaction? boolean ----Style of the child element. +---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 @@ -905,6 +933,8 @@ 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, @@ -934,6 +964,8 @@ 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, ---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. --- @@ -969,6 +1001,8 @@ 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, @@ -1012,6 +1046,8 @@ 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. @@ -1094,6 +1130,8 @@ 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, diff --git a/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua b/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua index fc149da..ec8a954 100644 --- a/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaHeatBufferPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaHeatBufferPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua index 22a4851..65a02e2 100644 --- a/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaHeatEnergySourcePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaHeatEnergySourcePrototype -- This file is automatically generated. Edits will be overwritten. @@ -18,7 +18,8 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.default_temperature) ---@field default_temperature double ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua b/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua index 957e15f..27f994c 100644 --- a/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaInserterControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaInserterControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaInventory.lua b/.vscode/factorio/runtime-api-LuaInventory.lua index cf4ddc3..365ae70 100644 --- a/.vscode/factorio/runtime-api-LuaInventory.lua +++ b/.vscode/factorio/runtime-api-LuaInventory.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaInventory -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaItemPrototype.lua b/.vscode/factorio/runtime-api-LuaItemPrototype.lua index 8f6ea14..409f552 100644 --- a/.vscode/factorio/runtime-api-LuaItemPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaItemPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaItemPrototype -- This file is automatically generated. Edits will be overwritten. @@ -543,7 +543,7 @@ local LuaItemPrototype={ ---[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?@"default", "player", "turret", or "vehicle" +---@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? diff --git a/.vscode/factorio/runtime-api-LuaItemStack.lua b/.vscode/factorio/runtime-api-LuaItemStack.lua index 6e337b5..e25608e 100644 --- a/.vscode/factorio/runtime-api-LuaItemStack.lua +++ b/.vscode/factorio/runtime-api-LuaItemStack.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaItemStack -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua b/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua index 1f789ca..4f70705 100644 --- a/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaLampControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLampControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua b/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua index efbf2c7..ec11d80 100644 --- a/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua +++ b/.vscode/factorio/runtime-api-LuaLazyLoadedValue.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLazyLoadedValue -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLogisticCell.lua b/.vscode/factorio/runtime-api-LuaLogisticCell.lua index 719fa6b..965356c 100644 --- a/.vscode/factorio/runtime-api-LuaLogisticCell.lua +++ b/.vscode/factorio/runtime-api-LuaLogisticCell.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLogisticCell -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua index 4b956a5..e27e3a3 100644 --- a/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaLogisticContainerControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLogisticContainerControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua b/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua index dce0f8d..db9e572 100644 --- a/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua +++ b/.vscode/factorio/runtime-api-LuaLogisticNetwork.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLogisticNetwork -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaLogisticPoint.lua b/.vscode/factorio/runtime-api-LuaLogisticPoint.lua index 736ca77..9fd0c05 100644 --- a/.vscode/factorio/runtime-api-LuaLogisticPoint.lua +++ b/.vscode/factorio/runtime-api-LuaLogisticPoint.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaLogisticPoint -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua b/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua index 27c3412..a485d03 100644 --- a/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaMiningDrillControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaMiningDrillControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua b/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua index 4c4978c..373ec83 100644 --- a/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaModSettingPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaModSettingPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua index 130f506..647925b 100644 --- a/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaModuleCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaModuleCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua b/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua index f6c245e..16fd4b0 100644 --- a/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua +++ b/.vscode/factorio/runtime-api-LuaNamedNoiseExpression.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaNamedNoiseExpression -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua b/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua index af9bc11..1b7ff53 100644 --- a/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaNoiseLayerPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaNoiseLayerPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaParticlePrototype.lua b/.vscode/factorio/runtime-api-LuaParticlePrototype.lua index b3f3b99..541cb68 100644 --- a/.vscode/factorio/runtime-api-LuaParticlePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaParticlePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaParticlePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaPermissionGroup.lua b/.vscode/factorio/runtime-api-LuaPermissionGroup.lua index 018792a..ed3b159 100644 --- a/.vscode/factorio/runtime-api-LuaPermissionGroup.lua +++ b/.vscode/factorio/runtime-api-LuaPermissionGroup.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaPermissionGroup -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaPermissionGroups.lua b/.vscode/factorio/runtime-api-LuaPermissionGroups.lua index c840a91..9c296b1 100644 --- a/.vscode/factorio/runtime-api-LuaPermissionGroups.lua +++ b/.vscode/factorio/runtime-api-LuaPermissionGroups.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaPermissionGroups -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaPlayer.lua b/.vscode/factorio/runtime-api-LuaPlayer.lua index 1458612..0e135f7 100644 --- a/.vscode/factorio/runtime-api-LuaPlayer.lua +++ b/.vscode/factorio/runtime-api-LuaPlayer.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaPlayer -- This file is automatically generated. Edits will be overwritten. @@ -314,15 +314,15 @@ build_from_cursor=function(param)end, 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 +---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 +---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 +---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 @@ -744,7 +744,7 @@ set_goal_description=function(text,only_update)end, --- ---_Can only be used if this is InfinityContainer_ ---@param index uint@The index to set. ----@param filter InfinityInventoryFilter@The new filter or `nil` to clear the filter. +---@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. --- diff --git a/.vscode/factorio/runtime-api-LuaProfiler.lua b/.vscode/factorio/runtime-api-LuaProfiler.lua index 4945cfb..5f5843e 100644 --- a/.vscode/factorio/runtime-api-LuaProfiler.lua +++ b/.vscode/factorio/runtime-api-LuaProfiler.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaProfiler -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua b/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua index 00562ad..3781580 100644 --- a/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaProgrammableSpeakerControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaProgrammableSpeakerControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRCON.lua b/.vscode/factorio/runtime-api-LuaRCON.lua index 65238f1..88275f4 100644 --- a/.vscode/factorio/runtime-api-LuaRCON.lua +++ b/.vscode/factorio/runtime-api-LuaRCON.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRCON -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua index efe2d1c..49c1e73 100644 --- a/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaRailChainSignalControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRailChainSignalControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRailPath.lua b/.vscode/factorio/runtime-api-LuaRailPath.lua index 6271f2c..cb8198a 100644 --- a/.vscode/factorio/runtime-api-LuaRailPath.lua +++ b/.vscode/factorio/runtime-api-LuaRailPath.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRailPath -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua index 8f9663c..5f0db48 100644 --- a/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaRailSignalControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRailSignalControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRandomGenerator.lua b/.vscode/factorio/runtime-api-LuaRandomGenerator.lua index 86a8425..fff18ad 100644 --- a/.vscode/factorio/runtime-api-LuaRandomGenerator.lua +++ b/.vscode/factorio/runtime-api-LuaRandomGenerator.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRandomGenerator -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRecipe.lua b/.vscode/factorio/runtime-api-LuaRecipe.lua index fd8435e..d0e7380 100644 --- a/.vscode/factorio/runtime-api-LuaRecipe.lua +++ b/.vscode/factorio/runtime-api-LuaRecipe.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRecipe -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua index 8abf989..f5ee746 100644 --- a/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaRecipeCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRecipeCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRecipePrototype.lua b/.vscode/factorio/runtime-api-LuaRecipePrototype.lua index 4ce6e79..d816896 100644 --- a/.vscode/factorio/runtime-api-LuaRecipePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaRecipePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRecipePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRemote.lua b/.vscode/factorio/runtime-api-LuaRemote.lua index e29ff44..48a90c0 100644 --- a/.vscode/factorio/runtime-api-LuaRemote.lua +++ b/.vscode/factorio/runtime-api-LuaRemote.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRemote -- This file is automatically generated. Edits will be overwritten. @@ -26,7 +26,7 @@ ---``` ---@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 the value `true`. +---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) --- @@ -36,7 +36,7 @@ ---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]: boolean}} +---@field interfaces {[string]: {[string]: true}} ---[R] ---This object's name. --- @@ -45,20 +45,18 @@ remote={ ---Add a remote interface. --- ----**Note:** It is an error if the given interface `name` is already registered. ---- ---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface) ----@param name string@Name of the 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 `interface`. +---@param function_ string@Function name that belongs to the `interface`. ---@vararg Any --- ----**vararg**: Arguments to pass to the called function. +---**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. diff --git a/.vscode/factorio/runtime-api-LuaRendering.lua b/.vscode/factorio/runtime-api-LuaRendering.lua index 6d18e2e..e3b0a3a 100644 --- a/.vscode/factorio/runtime-api-LuaRendering.lua +++ b/.vscode/factorio/runtime-api-LuaRendering.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRendering -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua b/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua index 3fdc6e3..0301113 100644 --- a/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaResourceCategoryPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaResourceCategoryPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua b/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua index 6c4e01f..056f586 100644 --- a/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaRoboportControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaRoboportControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaSettings.lua b/.vscode/factorio/runtime-api-LuaSettings.lua index e6f8ed7..f0776eb 100644 --- a/.vscode/factorio/runtime-api-LuaSettings.lua +++ b/.vscode/factorio/runtime-api-LuaSettings.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaSettings -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua b/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua index 42d864c..feaa779 100644 --- a/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaShortcutPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaShortcutPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua b/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua index d6cc3d5..e7bc55c 100644 --- a/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaStorageTankControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaStorageTankControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaStyle.lua b/.vscode/factorio/runtime-api-LuaStyle.lua index 6725367..2ac0080 100644 --- a/.vscode/factorio/runtime-api-LuaStyle.lua +++ b/.vscode/factorio/runtime-api-LuaStyle.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaStyle -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaSurface.lua b/.vscode/factorio/runtime-api-LuaSurface.lua index 3eb0e45..38aeb20 100644 --- a/.vscode/factorio/runtime-api-LuaSurface.lua +++ b/.vscode/factorio/runtime-api-LuaSurface.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaSurface -- This file is automatically generated. Edits will be overwritten. @@ -175,19 +175,19 @@ build_enemy_base=function(position,unit_count,force)end, 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 +---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 +---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 +---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. If not specified, the enemy force is assumed. +---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 @@ -209,19 +209,19 @@ can_fast_replace=function(param)end, --- ---[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.can_place_entity) ---@field position MapPosition ----Direction of the placed entity. +---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. If not specified, the enemy force is assumed. +---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. +---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`. +---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 @@ -630,11 +630,17 @@ create_decoratives=function(param)end, ---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) @@ -650,6 +656,9 @@ create_decoratives=function(param)end, ---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) @@ -761,12 +770,16 @@ create_decoratives=function(param)end, ---@field frame_speed float ---Applies to **"projectile"**: (required) --- ----[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field speed double ----Applies to **"projectile"**: (required) +---Applies to **"artillery-projectile"**: (required) --- ---[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity) ----@field max_range double +---@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) @@ -1435,9 +1448,9 @@ get_script_positions=function(name)end, ---[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. +---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:** The input position params can also be a single tile position. +---**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 @@ -1451,8 +1464,12 @@ get_tile=function(x,y)end, 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 @@ -1464,7 +1481,7 @@ get_total_pollution=function()end, ---@return LuaEntity[] get_train_stops=function(param)end, ---[View documentation](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_trains) ----@param force ForceIdentification?@If given only trains matching this force are returned. +---@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. diff --git a/.vscode/factorio/runtime-api-LuaTechnology.lua b/.vscode/factorio/runtime-api-LuaTechnology.lua index 7f55426..4d07562 100644 --- a/.vscode/factorio/runtime-api-LuaTechnology.lua +++ b/.vscode/factorio/runtime-api-LuaTechnology.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTechnology -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua b/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua index 864919a..fea2918 100644 --- a/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaTechnologyPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTechnologyPrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTile.lua b/.vscode/factorio/runtime-api-LuaTile.lua index 74938ff..e62c300 100644 --- a/.vscode/factorio/runtime-api-LuaTile.lua +++ b/.vscode/factorio/runtime-api-LuaTile.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTile -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTilePrototype.lua b/.vscode/factorio/runtime-api-LuaTilePrototype.lua index 5af5116..276b0b7 100644 --- a/.vscode/factorio/runtime-api-LuaTilePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaTilePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTilePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTrain.lua b/.vscode/factorio/runtime-api-LuaTrain.lua index 7f596be..777e639 100644 --- a/.vscode/factorio/runtime-api-LuaTrain.lua +++ b/.vscode/factorio/runtime-api-LuaTrain.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTrain -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua b/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua index 17c178f..690438c 100644 --- a/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaTrainStopControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTrainStopControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua b/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua index c9ec661..2e9932d 100644 --- a/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaTransportBeltControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTransportBeltControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTransportLine.lua b/.vscode/factorio/runtime-api-LuaTransportLine.lua index a0896f0..47a342d 100644 --- a/.vscode/factorio/runtime-api-LuaTransportLine.lua +++ b/.vscode/factorio/runtime-api-LuaTransportLine.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTransportLine -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua b/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua index e5b8bea..9e49f79 100644 --- a/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaTrivialSmokePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaTrivialSmokePrototype -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaUnitGroup.lua b/.vscode/factorio/runtime-api-LuaUnitGroup.lua index a695161..9f08d91 100644 --- a/.vscode/factorio/runtime-api-LuaUnitGroup.lua +++ b/.vscode/factorio/runtime-api-LuaUnitGroup.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaUnitGroup -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua b/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua index 5ec9f2f..307cdab 100644 --- a/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua +++ b/.vscode/factorio/runtime-api-LuaVirtualSignalPrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaVirtualSignalPrototype -- This file is automatically generated. Edits will be overwritten. @@ -34,7 +34,7 @@ ---[View documentation](https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.order) ---@field order string ---[R] ----If this is a special signal +---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 diff --git a/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua b/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua index 3b3a2f9..59feb92 100644 --- a/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua +++ b/.vscode/factorio/runtime-api-LuaVoidEnergySourcePrototype.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaVoidEnergySourcePrototype -- This file is automatically generated. Edits will be overwritten. @@ -10,7 +10,8 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html) ---@class LuaVoidEnergySourcePrototype:LuaObject ----[R] +---[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 diff --git a/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua b/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua index 840c3df..122b046 100644 --- a/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua +++ b/.vscode/factorio/runtime-api-LuaWallControlBehavior.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section LuaWallControlBehavior -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-builtin.lua b/.vscode/factorio/runtime-api-builtin.lua index f3e280a..3476613 100644 --- a/.vscode/factorio/runtime-api-builtin.lua +++ b/.vscode/factorio/runtime-api-builtin.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section builtin -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-concepts.lua b/.vscode/factorio/runtime-api-concepts.lua index b533422..5bf19b6 100644 --- a/.vscode/factorio/runtime-api-concepts.lua +++ b/.vscode/factorio/runtime-api-concepts.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section concepts -- This file is automatically generated. Edits will be overwritten. @@ -515,20 +515,41 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ---@class CapsuleAction ----One of `"throw"`, `"equipment-remote"`, `"use-on-self"`. +---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 ----Only present when `type` is `"throw"` or `"use-on-self"`. +---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 attack_parameters? AttackParameters ----Only present when `type` is `"equipment-remote"`. It is the equipment prototype name. ---- ----[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CapsuleAction) ----@field equipment? string ----[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 @@ -662,7 +683,7 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#CliffPlacementSettings) ---@field richness MapGenSize ----A set of flags. Set flags are in the dictionary as `true`, while unset flags aren't present at all. +---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} @@ -1163,7 +1184,7 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFilter) ---@field crafting_category string ----A set of flags. Set flags are in the dictionary as `true`, while unset flags aren't present at all. +---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. --- @@ -1794,7 +1815,7 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFilter) ---@field value uint ----A set of flags. Set flags are in the dictionary as `true`, while unset flags aren't present at all. +---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. --- @@ -2886,7 +2907,7 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#ModuleEffects) ---@field pollution? ModuleEffectValue ----A set of flags. Set flags are in the dictionary as `true`, while unset flags aren't present at all. +---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`. --- @@ -3144,7 +3165,7 @@ ---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 aeging double +---@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) @@ -3405,50 +3426,98 @@ ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#SelectedPrototypeData) ---@field name string ----A set of flags. Set flags are in the dictionary as `true`, while unset flags aren't present at all. +---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 ----Entities that can be selected for blueprint. +---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 ----Entities that can be marked for deconstruction. +---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 ----Entities that can be marked for deconstruction cancelling. +---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 ----@field ["item"] 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 ----Buildable entities. +---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 ----Only select an area. +---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 ----Entities that can be placed using an item. +---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 ----Entities with the same force as the selector. +---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 @@ -4004,11 +4073,11 @@ --- ---[View documentation](https://lua-api.factorio.com/latest/Concepts.html#WaitCondition) ---@field compare_type string ----Number of ticks to wait or of inactivity. Only present when `type` is `"time"` or `"inactivity"`. +---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"`. +---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 diff --git a/.vscode/factorio/runtime-api-custom.lua b/.vscode/factorio/runtime-api-custom.lua index 40fd0b9..6f45bae 100644 --- a/.vscode/factorio/runtime-api-custom.lua +++ b/.vscode/factorio/runtime-api-custom.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section custom -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-defines.lua b/.vscode/factorio/runtime-api-defines.lua index b32a6fd..a01278a 100644 --- a/.vscode/factorio/runtime-api-defines.lua +++ b/.vscode/factorio/runtime-api-defines.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section defines -- This file is automatically generated. Edits will be overwritten. diff --git a/.vscode/factorio/runtime-api-events.lua b/.vscode/factorio/runtime-api-events.lua index 1ff3c62..b30991f 100644 --- a/.vscode/factorio/runtime-api-events.lua +++ b/.vscode/factorio/runtime-api-events.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section events -- This file is automatically generated. Edits will be overwritten. @@ -2059,7 +2059,9 @@ ---@field tick uint ---@alias on_player_driving_changed_state EventData.on_player_driving_changed_state ----Called when the player's driving state has changed, this means a player has either entered or left a vehicle. +---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 @@ -3083,7 +3085,7 @@ ---@field tick uint ---@alias on_pre_player_mined_item EventData.on_pre_player_mined_item ----Called when the player finishes mining an entity, before the entity is removed from map. Can be filtered using [LuaPrePlayerMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter). +---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 diff --git a/.vscode/factorio/runtime-api-global_functions.lua b/.vscode/factorio/runtime-api-global_functions.lua index 3e56ded..00d5115 100644 --- a/.vscode/factorio/runtime-api-global_functions.lua +++ b/.vscode/factorio/runtime-api-global_functions.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section global_functions -- This file is automatically generated. Edits will be overwritten. @@ -24,7 +24,7 @@ log=function(string)end ---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](https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.length) instead. +---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 index b0ca203..2ccef3e 100644 --- a/.vscode/factorio/runtime-api-table_types.lua +++ b/.vscode/factorio/runtime-api-table_types.lua @@ -1,7 +1,7 @@ ---@meta ---@diagnostic disable ---$Factorio 1.1.69 +--$Factorio 1.1.70 --$Overlay 5 --$Section table_types -- This file is automatically generated. Edits will be overwritten. diff --git a/cybersyn/control.lua b/cybersyn/control.lua index ed1cfee..2e2c4d4 100644 --- a/cybersyn/control.lua +++ b/cybersyn/control.lua @@ -5,4 +5,5 @@ require("scripts.global") require("scripts.controller") require("scripts.layout") require("scripts.gui") +require("scripts.alerts") require("scripts.main") diff --git a/cybersyn/graphics/icons/area-of-effect.png b/cybersyn/graphics/icons/area-of-effect.png new file mode 100644 index 0000000000000000000000000000000000000000..4815fb790c493dd8e079571f2f252f3958d26b4f GIT binary patch literal 1364 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEV0u&)5>XPASgue|l%JNFld4cs zS&*ubT9KK?z)*4P?exH+I|@8)_bpxf8&p~zSR^DYGk@{%cXQZqgx^?y;eSH;b?!FLfYUd7 zYy0&#y#C94TRz}#MtNC|eWvv-{XD)@w=|Pmenr+oc5k=**86-@<71-LZ@KN7w<2x7 zH#_z$`@r72gS#`{-%k1Dp2$;M9-o|KFhOO3?xc@APV>JOPcPAD*%Rge>u2)qr+UX< zzA#(+W69-hllNWAU-@N*;78G!^2SCxoocS-Z!vMRPY-u0nV|j7^X{@uQ4$e~%h#M& z>UtQqC3kAiq?(WHD@=X1TE$;Hc_g4LV1ZjJ+t*O}5{07&=JJ|;KDa5zv&UGzNXcR0 z!Dj~+dNR#se!`NruV|sD`S}WtX#zV1-HZ-O>TcpcYAd}j%FaS6S+7`WzTVmi;^)7% znyBskc|?O@;YQP|OZ9hd{&fC2i?+fF?`JKXV)6dsp)dDsODPmv&*yyj-lddW>jsyO zwH|FOEHx^DT~B&%b}UF{n%{ILk||t3q4X4QWRXB;L-XB+8$XU^^rk+&-1C@KA!L!n zg@nZnVH{FQ-=Yr*Y5BP}uW~c>owe1aQ!%UO;v<{oU7f7K-D%TwqCF=$T@snRbV`xd z%*_uZf~O~Mn^SadsX_)P>prey;u2cnD;H+vya~kvM=N#>FA2%q={?zE5Z6d?C z?r56s);nIy`<7mDzAm@>>y=`C=Iq=P9M0}CW|vMZj=5rXwg1YzlYi$)Xv#e(yyQmurJa$mXo6I0);-6+0$YFERH_dLdgen2_cU$j_ zFDefB?!WV+c2VA<-{Md1xO{hbXS`kfN>t?WwK@*P;!eSHCN#ZmcWf1|`|$cn_SVn! zFCV;pfeiN-sW8{ur2Mh|D*Sfe#G4nCw`4IeFt%noI|q0=JHt{tFpbZtooMTE*g@uK zeDu;FttK&%mlGDgN^%T261XaYg?s7R3#*z>E{(siMA5UbP$Y(%uTCdSHfBy~X@Mxq zL4E;ub#+&9&5!k-3tfBIkN>SGe_!~W?}M3^kKryg23OOsAvS6$#jBhCi!!!c>^J1; zI&(qj3VsV*~r%&CZ3 z&MjnL6kGJ8xA0c6ze|9@;&WpT%eA-nT#+vg7rr!D%E`8vQ`pd7|#4MS9 zZENg)y-n>c<8Nx&Z@*^eC*QzRy0wN`Muusz z>#4Z%%5wko{QvVZzkX-lmQ{4<(G8|oz*2}U$=lrpNCUx7=iT){inG8YvKUxkT?b)C zCym(^Ktc8rPhVH|XIwHu>YBHc|E~iIC3(6yh5$>b3yh2m3@pqBU*6Z)-cVXId5PTY nD!&E>MkW>x0R;yN7%>|{typT-*61VxZDa6s^>bP0l+XkKbn8-! literal 0 HcmV?d00001 diff --git a/cybersyn/graphics/icons/lost-train.png b/cybersyn/graphics/icons/lost-train.png index 3f4233236012a0c3d07b99909145f407a013676f..efa415f9399ea4af89c44b88ced1cf6b810b2feb 100644 GIT binary patch delta 1165 zcmV;81akZ26QBu@BYyw{XF*Lt006O%3;baP000D6Nkl(}oGD|GD4o0&In+!=lFfn^Wg@B3kQW`FNJTgzw}#(xhuZ_7ZckncqBaYl0q zpNhOk;2+-8Yt2Ex0R$wduzL8u2r%etWdSt`1k_kHd@ceC$+cQ|2Xa$|0D7;(N&*TH zP|0|!gm)p2Gzg&2xU3*x4gwmPWA^Y~1Gm89xBMk z6Al=c8xJWdDIv+tPJkCjBcvphna@9L^2T4Ltet$~ve}E!NnmT+U@>!{X-rd?W1$6I{tfohx zxf7dGz<+uKlro@SB2z$CW|G=QX?;_LPeba}6q`4w9aF&YoCLK3>Zq2c5U@w8D4t%R zV3hvs%eg?EF`B#Pcp^WZO0*Xcd=2JVdcZP`DyCOwPDE>FR5BVT+(o0)h6iyL) zSGYwBpsc<>1*}CtBxg57D;BVQu}8E3VohWCj>r$u6FxZ5ipYPXYD{oW0y?x!h(shbS#c>Dnu9;NkA6z6M<$1WzK566J(POq`nyhuMcL; fwzZ6wVfzh;W@+mgBaJu!0000EX>4Tx04R}tkv&MmKpe$iQ>9ue3U&}t z$WUFhAS&W0RV;#q(pG5I!Q|2}Xws0RxHt-~1qVMCs}3&Cx;nTDg5U>;qmz@OinMK^}g2Y)}tBxdTde@wh=3B!1+&?D8Auyu$*| z3>vA#JaLd%%(t-I!mMDZ#M8tfMb#)@NV}|X-r}s5Dy(r&{=z_3TS;=A<`AM-LJV<; zkWoPqC0Gd4s(+DUB0>9+HvU1!A19Ygt|AyY7Ep!?$?=2#!S8O(+|;C-6o>$wFSh+L z0{C`;deyeSk8Qht0(hT+E3N4-*MQki(yL7^bOiKn0~gm#P2K}8cYuK>T{0v`^3oJ? zIpF<_z9|Fr-va(Mx3|VVP9K02b+vp092^3pdCFdI^MCHH*53X-)9CL9n#Xdt_ueSd z00006VoOIv0RI600RN!9r;`8x010qNS#tmY4c7nw4c7reD4Tcy000McNliru<_R4T z3oLG+sZ;;}2jEFWK~#9!?OS_nQ`Z^)o#T6b<7XZu#4#ZcnnHPYYX@W96B?>0*(RZO zY8jg*(SJeJYGcyYMtgLTwIVi}YD_|tx`4C|M(NabUB@F53k5XPg{a!bibz62L*m4C z$iqqezSq9r{s<&-Y!W+QLvX%7zw7Uw@Ao_Bdz^ER8E%Tx={i8bP5=^8C|;i*$KG$m znAZnU6hW$rr>iSbTvUiONr(XrMMaj~0Kfsj;eT*ELcsS@4ITh4UAc-r*9~~QJ`B4@ z;2s^rhaX)+8bu=D`+a?VD<%j~6r~@)Sjwpn$>_Y^6Qg(Z-@veYB%LIT%Cf#60N5=} zZ-4)zoah-wOiaay*X@qHcTSz&>h<~a<2@GyA+-5(>rZ}u{ii!piJTZI5yswGT3GnM zD1QP{DLZRzUuQ%|0GKDWECP@(S_c(iKX0hF{SpAB!?#ouz+R}Wt0iK4Z-v`U^$=s~ zwlL>inh3oIV9hkMitQ%=y%xPv zFaplL*09fZAyowMRJ>Fm{4^RoixAi=2kUL$i~}A3sG;7rmsI*Hz}!>xIZ$bTDpvqc z(YhL(rja>QXD#-E$lC$(Oj8feKLYf4oq%&wCRj(r-+!UDZp-aVUi`6bStLSd0e_TC zQTK2SdvV?o&|tIqnSs?X;Dc!-9N+bFUCs30KmVhjl|~|HiU!Z@KxFfqzp`DQw`Fjb z&8BBQI!?gmDMN-p>eCHx{Nm&-@ER_j1*kk4e0Wns{hn*{y$_g?ga}10-%IdwBH+xK z^G^|@?c-UVX%cEbiMYq_uLy@Drhkcn8B+lkAyOw=Z_b%)((A8kG@4M74Q>QL8yFp_ z+_b4FWdt;RaBeq%-=wRBo=dAwgdc2q@+$}KIsr{hO^d*VUI1CRzaC~OONfAfaL{W-MMW(!1UQ}jbp*2A$MJpF@&pKVR;y*t1OZNG|H}lbMKG3mSD{$he@60+|bG5fyE090jk0)9h zV|pxoZ8W?YX1mj_O^uHc~1x^ z80eiDJP{TT^u^WJoIZ@2(}(BeXu+TZj0iNt;Z5NU``slV7z{!TjqeIIoI?@?eCEIB z5X{n}cge#s^TH!xtZr{X;lQ{ffslO1SG^bjouq~3Mh~{VyMG^7R&0Q(neH~BxUU0` zT{;f{2q|GiRCNNwoCuHt9t0eA1Zf#j6o-IeB9Z9IV>e4+90tK{)Q3V0FH8IwzbtN;0TFq;3TWsC@`E*ww13NTg0y0hVGiSp8qRYoYlzwyy01z3O;9`7lIrcHwH;UzS)@6z`aB6yAuM7a+9(d z9P>_uK-AV)n}v~rVi2F4ccH+3HDj6{K@K9nuXCXjj3!0H6S|ATiHx2=FsXkv$Qsri zVLW_iA;1JrAXu7=O@OFh)^Kk^N%9Xu$-;+`1p+cy*nhtd9!)F+JYJ~1uH@K#xC{{P zaK9A}L+!Yp+_=RSz?4|YW)7!oAqQl183gdj?H;<_?xhh`6%|>DyQ^ai(262NQ4E;P zW@kDb9~&DhQWQleD+=OmSr`DVRs`o<$<58RCv$c&ArM) zn{Mh=x|sIt4YUA2jyb+>W|I+&F@V^`Ip+Y*=l}q9iDfYiI$iVtMk9(A=L3KbP!Fa( zd2t*BgWs|^A7-N=dgG?kVTr{801+b0cyE{;_VcIvp5eYDr0HWAW0Gd$Oal+j~~nd%CNLi2DKo1cM<+k`@NN9t?oRYCZSRvWoxA zLcp7|mciknVRZL&!S9>AYHKo?QC40CvpM^oX7SOnQFM28!Q+|ytC3!BKxugy@^bSM zs#F5AO5UP8mL0S6h(#{k|Bs%NK)e09+PU*v|0&T l?frR&S`@Vq#pLgM{vU2B8OJ@$G7SI#002ovPDHLkV1hGPqLlyu diff --git a/cybersyn/prototypes/entity.lua b/cybersyn/prototypes/entity.lua index e9d08e4..1a48818 100644 --- a/cybersyn/prototypes/entity.lua +++ b/cybersyn/prototypes/entity.lua @@ -1,6 +1,6 @@ --By Mami combinator_entity = flib.copy_prototype(data.raw["arithmetic-combinator"]["arithmetic-combinator"], COMBINATOR_NAME) -combinator_entity.icon = "__cybersyn__/graphics/icons/combinator.png" +combinator_entity.icon = "__cybersyn__/graphics/icons/area-of-effect.png" combinator_entity.radius_visualisation_specification = { sprite = { filename = "__cybersyn__/graphics/icons/combinator.png", @@ -10,6 +10,9 @@ combinator_entity.radius_visualisation_specification = { }, distance = 1, } +combinator_entity.active_energy_usage = "10KW" +combinator_entity.allow_copy_paste = false + combinator_out_entity = flib.copy_prototype(data.raw["constant-combinator"]["constant-combinator"], COMBINATOR_OUT_NAME) combinator_out_entity.icon = nil diff --git a/cybersyn/prototypes/item.lua b/cybersyn/prototypes/item.lua index 428db83..a2c20b0 100644 --- a/cybersyn/prototypes/item.lua +++ b/cybersyn/prototypes/item.lua @@ -3,4 +3,4 @@ combinator_item = flib.copy_prototype(data.raw["item"]["arithmetic-combinator"], combinator_item.icon = "__cybersyn__/graphics/icons/combinator.png" combinator_item.icon_size = 64 combinator_item.icon_mipmaps = 4 -combinator_item.order = combinator_item.order.."-c" +combinator_item.order = data.raw["item"]["decider-combinator"].order.."-b" diff --git a/cybersyn/scripts/controller.lua b/cybersyn/scripts/controller.lua index e277e6d..653e61e 100644 --- a/cybersyn/scripts/controller.lua +++ b/cybersyn/scripts/controller.lua @@ -236,7 +236,7 @@ local function send_train_between(map_data, r_station_id, p_station_id, train, p local item_type = v.signal.type if item_name and item_type and item_type ~= "virtual" then local effective_item_count = item_count + (p_station.deliveries[item_name] or 0) - local r_threshold, p_threshold = get_thresholds(map_data, r_station, v.signal) + local r_threshold, p_threshold = get_thresholds(map_data, p_station, v.signal) if effective_item_count >= p_threshold then local r = requests[item_name] if r then @@ -332,6 +332,7 @@ end function tick(map_data, mod_settings) local total_ticks = map_data.total_ticks local stations = map_data.stations + ---@type Economy local economy = { r_stations_all = {}, p_stations_all = {}, @@ -442,7 +443,7 @@ function tick(map_data, mod_settings) if best_train then send_train_between(map_data, r_station_id, p_stations[best], best_train, item_name, economy) elseif could_have_been_serviced then - send_missing_train_alert_for_stops(stations[r_station_id].entity_stop, p_stations[best].entity_stop) + send_missing_train_alert_for_stops(stations[r_station_id].entity_stop, stations[p_stations[best]].entity_stop) end until #r_stations == 0 else @@ -475,7 +476,7 @@ function tick(map_data, mod_settings) if best_train then send_train_between(map_data, r_stations[best], p_station_id, best_train, item_name, economy) elseif could_have_been_serviced then - send_missing_train_alert_for_stops(stations[best].entity_stop, p_stations[p_station_id].entity_stop) + send_missing_train_alert_for_stops(stations[r_stations[best]].entity_stop, stations[p_station_id].entity_stop) end until #p_stations == 0 end diff --git a/cybersyn/scripts/global.lua b/cybersyn/scripts/global.lua index 569b43b..22b77f0 100644 --- a/cybersyn/scripts/global.lua +++ b/cybersyn/scripts/global.lua @@ -68,5 +68,5 @@ global.layouts = {} global.layout_train_count = {} global.layout_top_id = 1 global.train_classes = { - [TRAIN_CLASS_ALL] = {}, + --[TRAIN_CLASS_ALL.name] = {}, } diff --git a/cybersyn/scripts/layout.lua b/cybersyn/scripts/layout.lua index 6831692..0111f79 100644 --- a/cybersyn/scripts/layout.lua +++ b/cybersyn/scripts/layout.lua @@ -15,7 +15,7 @@ function remove_train(map_data, train, train_id) for station_id, station in pairs(map_data.stations) do station.accepted_layouts[layout_id] = nil end - map_data.train_classes[TRAIN_CLASS_ALL][layout_id] = nil + --map_data.train_classes[TRAIN_CLASS_ALL][layout_id] = nil else map_data.layout_train_count[layout_id] = count - 1 end @@ -64,7 +64,7 @@ function update_train_layout(map_data, train) station.accepted_layouts[layout_id] = true end end - map_data.train_classes[TRAIN_CLASS_ALL][layout_id] = true + --map_data.train_classes[TRAIN_CLASS_ALL][layout_id] = true else map_data.layout_train_count[layout_id] = map_data.layout_train_count[layout_id] + 1 end diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index 4baf7f6..5590e82 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -214,7 +214,7 @@ local function on_combinator_broken(map_data, comb) station.entity_comb1 = comb1 else on_station_broken(map_data, stop.unit_number, station) - map_data.depots[stop.unit_number] = search_for_station_combinator(map_data, stop, OPERATION_DEPOT, nil) + map_data.depots[stop.unit_number] = search_for_station_combinator(map_data, stop, OPERATION_DEPOT, comb) end elseif station.entity_comb2 == comb then station.entity_comb2 = search_for_station_combinator(map_data, stop, OPERATION_SECONDARY_IO, comb) @@ -290,7 +290,7 @@ local function on_stop_broken(map_data, stop) } local entities = stop.surface.find_entities(search_area) for _, entity in pairs(entities) do - if map_data.to_stop[entity.unit_number] == stop then + if entity.valid and map_data.to_stop[entity.unit_number] == stop then map_data.to_stop[entity.unit_number] = nil end end @@ -307,7 +307,7 @@ local function on_station_rename(map_data, stop) --search for trains coming to the renamed station local station_id = stop.unit_number local station = map_data.stations[station_id] - if station.deliveries_total > 0 then + if station and station.deliveries_total > 0 then for train_id, train in pairs(map_data.trains) do local is_p = train.p_station_id == station_id local is_r = train.r_station_id == station_id @@ -397,8 +397,9 @@ end ---@param stop LuaEntity ---@param train Train local function on_train_arrives_buffer(map_data, stop, train) - local station_id = stop.unit_number if train.manifest then + ---@type uint + local station_id = stop.unit_number if train.status == STATUS_D_TO_P then if train.p_station_id == station_id then train.status = STATUS_P @@ -408,7 +409,7 @@ local function on_train_arrives_buffer(map_data, stop, train) for i, item in ipairs(train.manifest) do signals[i] = {index = i, signal = {type = item.type, name = item.name}, count = item.count} end - set_combinator_output(map_data, station.comb1, signals) + set_combinator_output(map_data, station.entity_comb1, signals) if station.wagon_combs then for i, entity in ipairs(station.wagon_combs) do @@ -424,7 +425,7 @@ local function on_train_arrives_buffer(map_data, stop, train) for i, item in ipairs(train.manifest) do signals[i] = {index = i, signal = {type = item.type, name = item.name}, count = -1} end - set_combinator_output(map_data, station.comb1, signals) + set_combinator_output(map_data, station.entity_comb1, signals) end else on_failed_delivery(map_data, train) @@ -547,7 +548,7 @@ local function on_train_changed(event) local train = global.trains[train_e.id] if train_e.state == defines.train_state.wait_station then local stop = train_e.station - if stop and stop.name == "train-stop" then + if stop and stop.valid and stop.name == "train-stop" then if global.stations[stop.unit_number] then on_train_arrives_buffer(global, stop, train) elseif global.depots[stop.unit_number] then @@ -573,6 +574,15 @@ local function on_surface_removed(event) end end +local function on_paste(event) + local entity = event.destination + if not entity or not entity.valid then return end + + if entity.name == COMBINATOR_NAME then + on_combinator_updated(global, entity) + end +end + local filter_built = { {filter = "type", type = "train-stop"}, @@ -589,6 +599,9 @@ local filter_broken = { {filter = "type", type = "straight-rail"}, {filter = "rolling-stock"}, } +local filter_comb = { + {filter = "type", type = "arithmetic-combinator"}, +} local function register_events() --NOTE: I have no idea if this correctly registers all events once in all situations flib_event.register(defines.events.on_built_entity, on_built, filter_built) @@ -602,6 +615,8 @@ local function register_events() flib_event.register({defines.events.on_pre_surface_deleted, defines.events.on_pre_surface_cleared}, on_surface_removed) + flib_event.register(defines.events.on_entity_settings_pasted, on_paste) + local nth_tick = math.ceil(60/mod_settings.tps); flib_event.on_nth_tick(nth_tick, on_tick)