fixed stage switcher

This commit is contained in:
2024-10-23 13:33:09 +02:00
parent 2447092d05
commit e2b90b4ba1
4 changed files with 25 additions and 9 deletions
+4 -3
View File
@@ -6,12 +6,13 @@ local StagesByIndex = {}
GlobalStageManager = {}
function GlobalStageManager:NewAndStart(database, stageConfig)
local logger = Spearhead.LoggerTemplate:new("StageManager", stageConfig.logLevel)
local o = {}
setmetatable(o, { __index = self })
o.onStageCompleted = function(stage)
o.logger = logger
o.onStageCompleted = function(self, stage)
local stageNumber = tostring(stage.stageNumber)
local anyActive = false
for _, stage in pairs(StagesByIndex[stageNumber] or {}) do
@@ -24,7 +25,7 @@ function GlobalStageManager:NewAndStart(database, stageConfig)
end
local logger = Spearhead.LoggerTemplate:new("StageManager", stageConfig.logLevel)
for _, stageName in pairs(database:getStagezoneNames()) do