From 3cd787fb1e18ce924a91b980c2cff009a0ac5064 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Mon, 3 Jul 2017 08:46:17 +0200 Subject: [PATCH] Fix issue with deployment --- Moose Development/Moose/Tasking/Task_CARGO.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Moose Development/Moose/Tasking/Task_CARGO.lua b/Moose Development/Moose/Tasking/Task_CARGO.lua index 368bf9d26..16c7815ca 100644 --- a/Moose Development/Moose/Tasking/Task_CARGO.lua +++ b/Moose Development/Moose/Tasking/Task_CARGO.lua @@ -922,13 +922,16 @@ do -- TASK_CARGO_TRANSPORT local CargoInDeployZone = false - -- Loop the DeployZones set for the TASK_CARGO_TRANSPORT. - for DeployZoneID, DeployZone in pairs( DeployZones ) do + if Cargo:IsUnLoaded() then - -- If there is a Cargo not in one of DeployZones, then not all Cargo is deployed. - self:T( { Cargo.CargoObject } ) - if Cargo:IsInZone( DeployZone ) then - CargoInDeployZone = true + -- Loop the DeployZones set for the TASK_CARGO_TRANSPORT. + for DeployZoneID, DeployZone in pairs( DeployZones ) do + + -- If there is a Cargo not in one of DeployZones, then not all Cargo is deployed. + self:T( { Cargo.CargoObject } ) + if Cargo:IsInZone( DeployZone ) then + CargoInDeployZone = true + end end end