Finish Cargo/AI_Cargo_APC

This commit is contained in:
FlightControl_Master 2018-05-08 06:43:15 +02:00
parent dd636939bb
commit 0600c96282

View File

@ -511,10 +511,12 @@ function AI_CARGO_APC:onbeforeUnloaded( APC, From, Event, To, Cargo )
for _, APCUnit in pairs( APC:GetUnits() ) do for _, APCUnit in pairs( APC:GetUnits() ) do
local APCUnit = APCUnit -- Wrapper.Unit#UNIT local APCUnit = APCUnit -- Wrapper.Unit#UNIT
local CargoCheck = self.APC_Cargo[APCUnit] local CargoCheck = self.APC_Cargo[APCUnit]
self:F( { CargoCheck:GetName(), IsUnLoaded = CargoCheck:IsUnLoaded() } ) if CargoCheck then
if CargoCheck:IsUnLoaded() == false then self:F( { CargoCheck:GetName(), IsUnLoaded = CargoCheck:IsUnLoaded() } )
AllUnloaded = false if CargoCheck:IsUnLoaded() == false then
break AllUnloaded = false
break
end
end end
end end