mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xx
This commit is contained in:
parent
1f3df107bf
commit
e0e4ba7db3
@ -183,7 +183,7 @@ end
|
||||
-- @param #DYNAMICCARGO self
|
||||
-- @return DCS static object
|
||||
function DYNAMICCARGO:GetDCSObject()
|
||||
local DCSStatic = Unit.getByName( self.StaticName )
|
||||
local DCSStatic = StaticObject.getByName( self.StaticName ) or Unit.getByName( self.StaticName )
|
||||
if DCSStatic then
|
||||
return DCSStatic
|
||||
end
|
||||
|
||||
@ -226,7 +226,7 @@ function STORAGE:NewFromStaticCargo(StaticCargoName)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create a new STORAGE object from an DCS static cargo object.
|
||||
--- Create a new STORAGE object from a Wrapper.DynamicCargo#DYNAMICCARGO object.
|
||||
-- @param #STORAGE self
|
||||
-- @param #string DynamicCargoName Unit name of the dynamic cargo.
|
||||
-- @return #STORAGE self
|
||||
@ -235,7 +235,7 @@ function STORAGE:NewFromDynamicCargo(DynamicCargoName)
|
||||
-- Inherit everything from BASE class.
|
||||
local self=BASE:Inherit(self, BASE:New()) -- #STORAGE
|
||||
|
||||
self.airbase=Unit.getByName(DynamicCargoName)
|
||||
self.airbase=Unit.getByName(DynamicCargoName) or StaticObject.getByName(DynamicCargoName)
|
||||
|
||||
if Airbase.getWarehouse then
|
||||
self.warehouse=Warehouse.getCargoAsWarehouse(self.airbase)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user