- Introduced pcall to getName() of detected objects. Found a problem with an object of ID 5,000,031
This commit is contained in:
Frank
2021-10-06 22:03:02 +02:00
parent 653dfe82fa
commit f6dce02203
5 changed files with 40 additions and 57 deletions

View File

@@ -1396,7 +1396,7 @@ function CHIEF:CheckTargetQueue()
else
text=text..string.format(", NO mission yet")
end
self:I(self.lid..text)
self:T2(self.lid..text)
-- Check that target is alive and not already a mission has been assigned.
if isAlive and isThreat and isImportant and not target.mission then
@@ -1485,14 +1485,14 @@ function CHIEF:CheckTargetQueue()
local mp=_mp --#CHIEF.MissionPerformance
-- Debug info.
self:I(self.lid..string.format("Recruiting assets for mission type %s [performance=%d] of target %s", mp.MissionType, mp.Performance, target:GetName()))
self:T2(self.lid..string.format("Recruiting assets for mission type %s [performance=%d] of target %s", mp.MissionType, mp.Performance, target:GetName()))
-- Recruit assets.
local recruited, assets, legions=self:RecruitAssetsForTarget(target, mp.MissionType, NassetsMin, NassetsMax)
if recruited then
self:I(self.lid..string.format("Recruited %d assets for mission type %s [performance=%d] of target %s", #assets, mp.MissionType, mp.Performance, target:GetName()))
self:T(self.lid..string.format("Recruited %d assets for mission type %s [performance=%d] of target %s", #assets, mp.MissionType, mp.Performance, target:GetName()))
-- Create a mission.
mission=AUFTRAG:NewFromTarget(target, mp.MissionType)
@@ -1509,7 +1509,7 @@ function CHIEF:CheckTargetQueue()
break
end
else
self:I(self.lid..string.format("Could NOT recruit assets for mission type %s [performance=%d] of target %s", mp.MissionType, mp.Performance, target:GetName()))
self:T(self.lid..string.format("Could NOT recruit assets for mission type %s [performance=%d] of target %s", mp.MissionType, mp.Performance, target:GetName()))
end
end
end