mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/Develop
This commit is contained in:
commit
ea767650ae
@ -213,8 +213,8 @@ function AI_CARGO:onbeforeLoad( Carrier, From, Event, To, PickupZone )
|
||||
|
||||
local Boarding = false
|
||||
|
||||
local LoadInterval = 5
|
||||
local LoadDelay = 0
|
||||
local LoadInterval = 2
|
||||
local LoadDelay = 1
|
||||
local Carrier_List = {}
|
||||
local Carrier_Weight = {}
|
||||
|
||||
@ -264,6 +264,8 @@ function AI_CARGO:onbeforeLoad( Carrier, From, Event, To, PickupZone )
|
||||
Cargo:__Board( -LoadDelay, CarrierUnit )
|
||||
self:__Board( LoadDelay, Cargo, CarrierUnit, PickupZone )
|
||||
|
||||
LoadDelay = LoadDelay + Cargo:GetCount() * LoadInterval
|
||||
|
||||
-- So now this CarrierUnit has Cargo that is being loaded.
|
||||
-- This will be used further in the logic to follow and to check cargo status.
|
||||
self.Carrier_Cargo[Cargo] = CarrierUnit
|
||||
@ -278,8 +280,6 @@ function AI_CARGO:onbeforeLoad( Carrier, From, Event, To, PickupZone )
|
||||
end
|
||||
|
||||
end
|
||||
LoadDelay = LoadDelay + Cargo:GetCount() * LoadInterval
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -894,8 +894,12 @@ end
|
||||
-- @param #AI_CARGO_DISPATCHER self
|
||||
function AI_CARGO_DISPATCHER:onafterMonitor()
|
||||
|
||||
self:F("Carriers")
|
||||
self.SetCarrier:Flush()
|
||||
|
||||
for CarrierGroupName, Carrier in pairs( self.SetCarrier:GetSet() ) do
|
||||
local Carrier = Carrier -- Wrapper.Group#GROUP
|
||||
if Carrier:IsAlive() == true then
|
||||
local AI_Cargo = self.AI_Cargo[Carrier]
|
||||
if not AI_Cargo then
|
||||
|
||||
@ -1108,7 +1112,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
|
||||
local PickupCargo = nil
|
||||
local PickupZone = nil
|
||||
|
||||
--self.SetCargo:Flush()
|
||||
self.SetCargo:Flush()
|
||||
for CargoName, Cargo in UTILS.spairs( self.SetCargo:GetSet(), function( t, a, b ) return t[a]:GetWeight() < t[b]:GetWeight() end ) do
|
||||
local Cargo = Cargo -- Cargo.Cargo#CARGO
|
||||
self:F( { Cargo = Cargo:GetName(), UnLoaded = Cargo:IsUnLoaded(), Deployed = Cargo:IsDeployed(), PickupCargo = self.PickupCargo[Carrier] ~= nil } )
|
||||
@ -1168,6 +1172,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:__Monitor( self.MonitorTimeInterval )
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user