mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-18 05:05:56 +00:00
xx
This commit is contained in:
@@ -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
|
|
||||||
for cat,nitem in pairs(ENUMS.Storage.weapons) do
|
if equip and equip > 0 then
|
||||||
for name,item in pairs(nitem) do
|
for cat,nitem in pairs(ENUMS.Storage.weapons) do
|
||||||
newWH:SetItem(item,equip)
|
for name,item in pairs(nitem) do
|
||||||
|
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"
|
||||||
@@ -4328,10 +4328,11 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
|
|||||||
newfarp:InitFARP(callsign,freq,mod,DynamicSpawns,HotStart)
|
newfarp:InitFARP(callsign,freq,mod,DynamicSpawns,HotStart)
|
||||||
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"},
|
||||||
|
|||||||
Reference in New Issue
Block a user