SPAWNSTATIC

- Added new way to spawn FARPs
- Added FARP callsign enum.
This commit is contained in:
Frank 2020-12-14 12:36:02 +01:00
parent 47c461e504
commit 6c9dce70e7
2 changed files with 30 additions and 2 deletions

View File

@ -457,8 +457,23 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
local Static=nil
if self.InitFARP then
env.info("Spawning FARP")
Static=coalition.addGroup(CountryID, -1, Template)
local TemplateGroup={}
TemplateGroup.units={}
TemplateGroup.units[1]=Template
TemplateGroup.visible=true
TemplateGroup.hidden=false
TemplateGroup.x=Template.x
TemplateGroup.y=Template.y
TemplateGroup.name=Template.name
self:T("Spawning FARP")
self:T({Template=Template})
self:T({TemplateGroup=TemplateGroup})
-- ED's dirty way to spawn FARPS.
Static=coalition.addGroup(CountryID, -1, TemplateGroup)
else
Static=coalition.addStaticObject(CountryID, Template)
end

View File

@ -115,6 +115,19 @@ CALLSIGN={
Mantis=18,
Badger=19,
},
-- FARP
FARP={
London=1,
Dallas=2,
Paris=3,
Moscow=4,
Berlin=5,
Rome=6,
Madrid=7,
Warsaw=8,
Dublin=9,
Perth=10,
},
} --#CALLSIGN
--- Utilities static class.