mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Improvement of the C-130 and C-17A
This commit is contained in:
parent
f5a68db7ef
commit
f8e1c21a13
@ -143,6 +143,7 @@ function AI_CARGO:New( Carrier, CargoSet )
|
||||
-- @param #string To
|
||||
|
||||
for _, CarrierUnit in pairs( Carrier:GetUnits() ) do
|
||||
local CarrierUnit = CarrierUnit -- Wrapper.Unit#UNIT
|
||||
CarrierUnit:SetCargoBayWeightLimit()
|
||||
end
|
||||
|
||||
|
||||
@ -1022,8 +1022,9 @@ do -- Cargo
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #number WeightLimit
|
||||
function POSITIONABLE:SetCargoBayWeightLimit( WeightLimit )
|
||||
|
||||
if WeightLimit then
|
||||
self.__.CargoBayWeightLimit = WeightLimit
|
||||
self.__.CargoBayWeightLimit = self.__.CargoBayWeightLimit or WeightLimit
|
||||
else
|
||||
-- If weightlimit is not provided, we will calculate it depending on the type of unit.
|
||||
|
||||
@ -1031,7 +1032,13 @@ do -- Cargo
|
||||
if self:IsAir() then
|
||||
local Desc = self:GetDesc()
|
||||
self:F({Desc=Desc})
|
||||
self.__.CargoBayWeightLimit = Desc.massMax - ( Desc.massEmpty + Desc.fuelMassMax )
|
||||
|
||||
local Weights = {
|
||||
["C-17A"] = 35000, --77519 cannot be used, because it loads way too much apcs and infantry.,
|
||||
["C-130"] = 22000 --The real value cannot be used, because it loads way too much apcs and infantry.,
|
||||
}
|
||||
|
||||
self.__.CargoBayWeightLimit = Weights[Desc.typeName] or ( Desc.massMax - ( Desc.massEmpty + Desc.fuelMassMax ) )
|
||||
else
|
||||
local Desc = self:GetDesc()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user