This commit is contained in:
2026-08-30 14:12:43 +02:00
parent 27548d69bb
commit 51bed10822
16 changed files with 214 additions and 49 deletions
+10 -9
View File
@@ -13,7 +13,7 @@ do
---@field unitsStates table<string, UnitState>
---@field random_missions table<string, MissionState>
---@field deliveredKilos table<string, number>
---@field activeStage integer|nil
---@field activeStageInStageLane table<string, number>
---@class UnitState
---@field isDead boolean
@@ -33,7 +33,7 @@ do
unitsStates = {},
random_missions = {},
deliveredKilos = {},
activeStage = nil
activeStageInStageLane = {}
}
local logger = {}
@@ -230,9 +230,11 @@ do
end
---Sets the stage in the persistence table
---@param stageLane string?
---@param stageNumber number
Persistence.SetActiveStage = function(stageNumber)
tables.activeStage = stageNumber
Persistence.SetActiveStage = function(stageLane, stageNumber)
stageLane = stageLane or "nil"
tables.activeStageInStageLane[stageLane] = stageNumber
Persistence._updateRequired = true
end
@@ -256,12 +258,11 @@ do
end
---Get the active stage as in the persistance file
---@param stageLane string?
---@return integer|nil
Persistence.GetActiveStage = function()
if tables.activeStage then
return tables.activeStage
end
return nil
Persistence.GetActiveStage = function(stageLane)
stageLane = stageLane or "nil"
return tables.activeStageInStageLane[stageLane]
end
---comment