diff --git a/_miz/SPEARHEADDEV.miz b/_miz/SPEARHEADDEV.miz index 44c82ed..093f1d7 100644 Binary files a/_miz/SPEARHEADDEV.miz and b/_miz/SPEARHEADDEV.miz differ diff --git a/classes/stageClasses/missions/ZoneMission.lua b/classes/stageClasses/missions/ZoneMission.lua index 4c3bbe3..e2e79a7 100644 --- a/classes/stageClasses/missions/ZoneMission.lua +++ b/classes/stageClasses/missions/ZoneMission.lua @@ -43,7 +43,7 @@ local function ParseZoneName(input) if parsedType == "nil" then Spearhead.AddMissionEditorWarning("Mission with zonename '" .. - input .. "' has an unsupported type '" .. (type or "nil")) + input .. "' has an unsupported type '" .. (type or "nil")) return nil end local name = split_name[3] @@ -115,6 +115,8 @@ function ZoneMission.new(zoneName, priority, database, logger, parentStage) self._completeAtIndex = completeAtIndex end + self._logger:debug("Complete at index " .. self.zoneName .. ": " .. self._completeAtIndex) + local SpearheadGroup = Spearhead.classes.stageClasses.Groups.SpearheadGroup local groupNames = database:getGroupsForMissionZone(zoneName) for _, groupName in pairs(groupNames) do @@ -264,8 +266,9 @@ function ZoneMission:UpdateState(checkHealth, messageIfDone) end end - local deadRatio = (total-alive) / total + local deadRatio = (total - alive) / total if deadRatio >= self._completeAtIndex then + self._logger:debug("Dead ratio " .. self.zoneName .. deadRatio .. " >= " .. self._completeAtIndex) self._state = "COMPLETED" end else @@ -281,8 +284,10 @@ function ZoneMission:UpdateState(checkHealth, messageIfDone) end end - local deadRatio = (total-alive) / total + local deadRatio = (total - alive) / total if deadRatio >= self._completeAtIndex then + self._logger:debug("Dead ratio " .. self.zoneName .. deadRatio .. " >= " .. self._completeAtIndex) + self._state = "COMPLETED" end end diff --git a/dev/dev_config.lua b/dev/dev_config.lua index 669a975..ca5287f 100644 --- a/dev/dev_config.lua +++ b/dev/dev_config.lua @@ -1,7 +1,7 @@ SpearheadConfig = { - debugEnabled = false, + debugEnabled = true, CapConfig = { --quickly enable of disable the entire CAP Logic --(you can also just rename all units to not be named "CAP_")