minor logging additions

This commit is contained in:
2025-05-10 14:37:43 +02:00
parent 8e107ca7c2
commit 64b6d20bdd
3 changed files with 9 additions and 4 deletions
Binary file not shown.
@@ -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
+1 -1
View File
@@ -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_")