Resolved first comments and made StageDrawings explicit classes that now also follow lane identifiers

This commit is contained in:
2026-09-01 09:02:56 +02:00
parent c10c743fe8
commit 4de9e91efd
6 changed files with 151 additions and 57 deletions
+16 -7
View File
@@ -33,6 +33,7 @@ do
unitsStates = {},
random_missions = {},
deliveredKilos = {},
activeStage = nil, -- Backwards compatibility for previous version without lanes
activeStageInStageLane = {}
}
@@ -238,6 +239,21 @@ do
Persistence._updateRequired = true
end
---Get the active stage as in the persistance file
---@param stageLane string?
---@return integer|nil
Persistence.GetActiveStage = function(stageLane)
stageLane = stageLane or "nil"
-- backwards compatibility for previous versions without stage lanes
if stageLane == "nil" and tables.activeStageInStageLane[stageLane] == nil then
tables.activeStageInStageLane[stageLane] = tables.activeStage
tables.activeStage = nil -- Clear the old activeStage so it's not used or confused later
end
return tables.activeStageInStageLane[stageLane]
end
---comment
---@param missionName string
---@param pickedZone string
@@ -257,13 +273,6 @@ do
return tables.random_missions[string.lower(missionName)]
end
---Get the active stage as in the persistance file
---@param stageLane string?
---@return integer|nil
Persistence.GetActiveStage = function(stageLane)
stageLane = stageLane or "nil"
return tables.activeStageInStageLane[stageLane]
end
---comment
---@param zoneName string