This commit is contained in:
Applevangelist
2025-11-28 08:47:37 +01:00
parent 01425dac70
commit 9e81e5606a
+19 -18
View File
@@ -4222,25 +4222,27 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
local function PopulateStorage(Name,liquids,equip,airframes) local function PopulateStorage(Name,liquids,equip,airframes)
local newWH = STORAGE:New(Name) local newWH = STORAGE:New(Name)
if liquids and liquids > 0 then if newWH then
-- Storage fill-up if liquids and liquids > 0 then
newWH:SetLiquid(STORAGE.Liquid.DIESEL,liquids) -- kgs to tons -- Storage fill-up
newWH:SetLiquid(STORAGE.Liquid.GASOLINE,liquids) newWH:SetLiquid(STORAGE.Liquid.DIESEL,liquids) -- kgs to tons
newWH:SetLiquid(STORAGE.Liquid.JETFUEL,liquids) newWH:SetLiquid(STORAGE.Liquid.GASOLINE,liquids)
newWH:SetLiquid(STORAGE.Liquid.MW50,liquids) newWH:SetLiquid(STORAGE.Liquid.JETFUEL,liquids)
end newWH:SetLiquid(STORAGE.Liquid.MW50,liquids)
end
if equip and equip > 0 then if equip and equip > 0 then
for cat,nitem in pairs(ENUMS.Storage.weapons) do for cat,nitem in pairs(ENUMS.Storage.weapons) do
for name,item in pairs(nitem) do for name,item in pairs(nitem) do
newWH:SetItem(item,equip) newWH:SetItem(item,equip)
end
end end
end end
end
if airframes and airframes > 0 then if airframes and airframes > 0 then
for typename in pairs (CSAR.AircraftType) do for typename in pairs (CSAR.AircraftType) do
newWH:SetItem(typename,airframes) newWH:SetItem(typename,airframes)
end
end end
end end
end end
@@ -4319,8 +4321,6 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
} }
-- Create BIRTH event. -- Create BIRTH event.
world.onEvent(Event) world.onEvent(Event)
PopulateStorage(Name.."-1",liquids,equip,airframes)
else else
-- Spawn FARP -- Spawn FARP
local newfarp = SPAWNSTATIC:NewFromType(STypeName,"Heliports",Country) -- "Invisible FARP" "FARP" local newfarp = SPAWNSTATIC:NewFromType(STypeName,"Heliports",Country) -- "Invisible FARP" "FARP"
@@ -4329,9 +4329,10 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
local spawnedfarp = newfarp:SpawnFromCoordinate(farplocation,0,Name) local spawnedfarp = newfarp:SpawnFromCoordinate(farplocation,0,Name)
table.insert(ReturnObjects,spawnedfarp) table.insert(ReturnObjects,spawnedfarp)
PopulateStorage(Name,liquids,equip,airframes)
end end
PopulateStorage(Name,liquids,equip,airframes)
-- Spawn Objects -- Spawn Objects
local FARPStaticObjectsNato = { local FARPStaticObjectsNato = {
["FUEL"] = { TypeName = "FARP Fuel Depot", ShapeName = "GSM Rus", Category = "Fortifications"}, ["FUEL"] = { TypeName = "FARP Fuel Depot", ShapeName = "GSM Rus", Category = "Fortifications"},