Resolved first comments and made StageDrawings explicit classes that now also follow lane identifiers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user