minor logging additions
This commit is contained in:
Binary file not shown.
@@ -43,7 +43,7 @@ local function ParseZoneName(input)
|
|||||||
|
|
||||||
if parsedType == "nil" then
|
if parsedType == "nil" then
|
||||||
Spearhead.AddMissionEditorWarning("Mission with zonename '" ..
|
Spearhead.AddMissionEditorWarning("Mission with zonename '" ..
|
||||||
input .. "' has an unsupported type '" .. (type or "nil"))
|
input .. "' has an unsupported type '" .. (type or "nil"))
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local name = split_name[3]
|
local name = split_name[3]
|
||||||
@@ -115,6 +115,8 @@ function ZoneMission.new(zoneName, priority, database, logger, parentStage)
|
|||||||
self._completeAtIndex = completeAtIndex
|
self._completeAtIndex = completeAtIndex
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self._logger:debug("Complete at index " .. self.zoneName .. ": " .. self._completeAtIndex)
|
||||||
|
|
||||||
local SpearheadGroup = Spearhead.classes.stageClasses.Groups.SpearheadGroup
|
local SpearheadGroup = Spearhead.classes.stageClasses.Groups.SpearheadGroup
|
||||||
local groupNames = database:getGroupsForMissionZone(zoneName)
|
local groupNames = database:getGroupsForMissionZone(zoneName)
|
||||||
for _, groupName in pairs(groupNames) do
|
for _, groupName in pairs(groupNames) do
|
||||||
@@ -264,8 +266,9 @@ function ZoneMission:UpdateState(checkHealth, messageIfDone)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local deadRatio = (total-alive) / total
|
local deadRatio = (total - alive) / total
|
||||||
if deadRatio >= self._completeAtIndex then
|
if deadRatio >= self._completeAtIndex then
|
||||||
|
self._logger:debug("Dead ratio " .. self.zoneName .. deadRatio .. " >= " .. self._completeAtIndex)
|
||||||
self._state = "COMPLETED"
|
self._state = "COMPLETED"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -281,8 +284,10 @@ function ZoneMission:UpdateState(checkHealth, messageIfDone)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local deadRatio = (total-alive) / total
|
local deadRatio = (total - alive) / total
|
||||||
if deadRatio >= self._completeAtIndex then
|
if deadRatio >= self._completeAtIndex then
|
||||||
|
self._logger:debug("Dead ratio " .. self.zoneName .. deadRatio .. " >= " .. self._completeAtIndex)
|
||||||
|
|
||||||
self._state = "COMPLETED"
|
self._state = "COMPLETED"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
SpearheadConfig = {
|
SpearheadConfig = {
|
||||||
|
|
||||||
debugEnabled = false,
|
debugEnabled = true,
|
||||||
CapConfig = {
|
CapConfig = {
|
||||||
--quickly enable of disable the entire CAP Logic
|
--quickly enable of disable the entire CAP Logic
|
||||||
--(you can also just rename all units to not be named "CAP_")
|
--(you can also just rename all units to not be named "CAP_")
|
||||||
|
|||||||
Reference in New Issue
Block a user