mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-22 06:45:20 +00:00
xx
This commit is contained in:
@@ -4222,6 +4222,7 @@ 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 newWH then
|
||||||
if liquids and liquids > 0 then
|
if liquids and liquids > 0 then
|
||||||
-- Storage fill-up
|
-- Storage fill-up
|
||||||
newWH:SetLiquid(STORAGE.Liquid.DIESEL,liquids) -- kgs to tons
|
newWH:SetLiquid(STORAGE.Liquid.DIESEL,liquids) -- kgs to tons
|
||||||
@@ -4244,6 +4245,7 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Set Defaults
|
-- Set Defaults
|
||||||
local farplocation = Coordinate
|
local farplocation = Coordinate
|
||||||
@@ -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"},
|
||||||
|
|||||||
Reference in New Issue
Block a user