- Added check for cargo in zone
This commit is contained in:
Frank
2026-02-16 22:25:59 +01:00
parent 1ac0249fe5
commit 09fd4d25b7
2 changed files with 44 additions and 0 deletions
+22
View File
@@ -4227,6 +4227,28 @@ function AUFTRAG:IsReadyToGo()
if not startme then
return false
end
if self.type==AUFTRAG.Type.FREIGHTTRANSPORT then
local cargoset=self.DCStask.params.cargo --Core.Set#SET_STATIC
for _,_opsgroup in pairs(self:GetOpsGroups()) do
local opsgroup=_opsgroup --Ops.OpsGroup#OPSGROUP
local vec2=opsgroup.group:GetFirstUnitAlive():GetVec2()
local zone=ZONE_RADIUS:New("Bla", vec2, 40, true)
local inzone=cargoset:IsInZone(zone)
if not inzone then
printf("FF cargo is not inside zone")
return false
end
end
end
-- We're good to go!