mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 17:07:54 +00:00
Merge remote-tracking branch 'origin/Apple/Develop' into branch
This commit is contained in:
@@ -140,6 +140,9 @@ CTLD_CARGO = {
|
|||||||
self.DontShowInMenu = DontShowInMenu or false
|
self.DontShowInMenu = DontShowInMenu or false
|
||||||
self.ResourceMap = nil
|
self.ResourceMap = nil
|
||||||
self.StaticType = "container_cargo" -- "container_cargo"
|
self.StaticType = "container_cargo" -- "container_cargo"
|
||||||
|
if self:IsStatic() then
|
||||||
|
self.StaticType = self.Templates
|
||||||
|
end
|
||||||
self.StaticShape = nil
|
self.StaticShape = nil
|
||||||
self.TypeNames = nil
|
self.TypeNames = nil
|
||||||
self.StaticCategory = "Cargos"
|
self.StaticCategory = "Cargos"
|
||||||
@@ -7760,7 +7763,7 @@ end
|
|||||||
for _, _cgo in pairs(loadedcargo) do
|
for _, _cgo in pairs(loadedcargo) do
|
||||||
local cargo = _cgo
|
local cargo = _cgo
|
||||||
local type = cargo.CargoType
|
local type = cargo.CargoType
|
||||||
local gname = cargo.Name
|
local gname = cargo:GetName()
|
||||||
local gcargo = self:_FindCratesCargoObject(gname) or self:_FindTroopsCargoObject(gname)
|
local gcargo = self:_FindCratesCargoObject(gname) or self:_FindTroopsCargoObject(gname)
|
||||||
self:T("Looking at " .. gname .. " in the helo - type = "..tostring(type))
|
self:T("Looking at " .. gname .. " in the helo - type = "..tostring(type))
|
||||||
if (type == CTLD_CARGO.Enum.TROOPS or type == CTLD_CARGO.Enum.ENGINEERS or type == CTLD_CARGO.Enum.VEHICLE or type == CTLD_CARGO.Enum.FOB) then
|
if (type == CTLD_CARGO.Enum.TROOPS or type == CTLD_CARGO.Enum.ENGINEERS or type == CTLD_CARGO.Enum.VEHICLE or type == CTLD_CARGO.Enum.FOB) then
|
||||||
@@ -9235,8 +9238,12 @@ end
|
|||||||
elseif cargotype == CTLD_CARGO.Enum.STATIC or cargotype == CTLD_CARGO.Enum.REPAIR then
|
elseif cargotype == CTLD_CARGO.Enum.STATIC or cargotype == CTLD_CARGO.Enum.REPAIR then
|
||||||
injectstatic = CTLD_CARGO:New(nil,cargoname,cargotemplates,cargotype,true,true,size,nil,true,mass)
|
injectstatic = CTLD_CARGO:New(nil,cargoname,cargotemplates,cargotype,true,true,size,nil,true,mass)
|
||||||
injectstatic:SetStaticTypeAndShape(StaticCategory,StaticType,StaticShape)
|
injectstatic:SetStaticTypeAndShape(StaticCategory,StaticType,StaticShape)
|
||||||
local map=cargotype:GetStaticResourceMap()
|
local unittemplate = _DATABASE:GetStaticUnitTemplate(cargoname)
|
||||||
injectstatic:SetStaticResourceMap(map)
|
local ResourceMap = nil
|
||||||
|
if unittemplate and unittemplate.resourcePayload then
|
||||||
|
ResourceMap = UTILS.DeepCopy(unittemplate.resourcePayload)
|
||||||
|
end
|
||||||
|
injectstatic:SetStaticResourceMap(ResourceMap)
|
||||||
end
|
end
|
||||||
if injectstatic then
|
if injectstatic then
|
||||||
self:InjectStatics(dropzone,injectstatic,false,true)
|
self:InjectStatics(dropzone,injectstatic,false,true)
|
||||||
|
|||||||
Reference in New Issue
Block a user