mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OK. fixed
This commit is contained in:
parent
af230d9874
commit
1283caf80b
@ -357,6 +357,7 @@ function CARGO:IsInZone( Zone )
|
|||||||
if self:IsLoaded() then
|
if self:IsLoaded() then
|
||||||
return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() )
|
return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() )
|
||||||
else
|
else
|
||||||
|
self:F( { Size = self.CargoObject:GetSize(), Units = self.CargoObject:GetUnits() } )
|
||||||
if self.CargoObject:GetSize() ~= 0 then
|
if self.CargoObject:GetSize() ~= 0 then
|
||||||
return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() )
|
return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() )
|
||||||
else
|
else
|
||||||
|
|||||||
@ -914,22 +914,26 @@ do -- TASK_CARGO_TRANSPORT
|
|||||||
|
|
||||||
local DeployZones = self:GetDeployZones()
|
local DeployZones = self:GetDeployZones()
|
||||||
|
|
||||||
local CargoDeployed = true
|
local CargoDeployed = false
|
||||||
|
|
||||||
-- Loop the CargoSet (so evaluate each Cargo in the SET_CARGO ).
|
-- Loop the CargoSet (so evaluate each Cargo in the SET_CARGO ).
|
||||||
for CargoID, CargoData in pairs( Set ) do
|
for CargoID, CargoData in pairs( Set ) do
|
||||||
local Cargo = CargoData -- Core.Cargo#CARGO
|
local Cargo = CargoData -- Core.Cargo#CARGO
|
||||||
|
|
||||||
|
local CargoInDeployZone = false
|
||||||
|
|
||||||
-- Loop the DeployZones set for the TASK_CARGO_TRANSPORT.
|
-- Loop the DeployZones set for the TASK_CARGO_TRANSPORT.
|
||||||
for DeployZoneID, DeployZone in pairs( DeployZones ) do
|
for DeployZoneID, DeployZone in pairs( DeployZones ) do
|
||||||
|
|
||||||
-- If there is a Cargo not in one of DeployZones, then not all Cargo is deployed.
|
-- If there is a Cargo not in one of DeployZones, then not all Cargo is deployed.
|
||||||
self:T( { Cargo.CargoObject } )
|
self:T( { Cargo.CargoObject } )
|
||||||
if Cargo:IsInZone( DeployZone ) then
|
if Cargo:IsInZone( DeployZone ) then
|
||||||
else
|
CargoInDeployZone = true
|
||||||
CargoDeployed = false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
CargoDeployed = CargoDeployed or CargoInDeployZone
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return CargoDeployed
|
return CargoDeployed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user