diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 815eef099..8bbb35782 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -241,6 +241,20 @@ function SPAWNSTATIC:InitShape(StaticShape) return self end +--- Initialize parameters for spawning FARPs. +-- @param #SPAWNSTATIC self +-- @param #number CallsignID Callsign ID. Default 1 (="London"). +-- @param #number Frequency Frequency in MHz. Default 127.5 MHz. +-- @param #number Modulation Modulation 0=AM, 1=FM. +-- @return #SPAWNSTATIC self +function SPAWNSTATIC:InitFARP(CallsignID, Frequency, Modulation) + self.InitFarp=true + self.InitFarpCallsignID=CallsignID or 1 + self.InitFarpFreq=Frequency or 127.5 + self.InitFarpModu=Modulation or 0 + return self +end + --- Initialize cargo mass. -- @param #SPAWNSTATIC self -- @param #number Mass Mass of the cargo in kg. @@ -420,22 +434,49 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID) Template.offsets.angle=self.InitOffsetAngle and math.rad(self.InitOffsetAngle) or 0 end + if self.InitFarp then + Template.heliport_callsign_id = self.InitFarpCallsignID + Template.heliport_frequency = self.InitFarpFreq + Template.heliport_modulation = self.InitFarpModu + Template.unitId=nil + end + -- Increase spawn index counter. self.SpawnIndex = self.SpawnIndex + 1 -- Name of the spawned static. Template.name = self.InitStaticName or string.format("%s#%05d", self.SpawnTemplatePrefix, self.SpawnIndex) - -- Register the new static. - --_DATABASE:_RegisterStaticTemplate(Template, self.CoalitionID, self.CategoryID, CountryID) - _DATABASE:AddStatic(Template.name) + -- Add and register the new static. + local mystatic=_DATABASE:AddStatic(Template.name) -- Debug output. self:T(Template) -- Add static to the game. - local Static=coalition.addStaticObject(CountryID, Template) - + local Static=nil + + if self.InitFARP then - return _DATABASE:FindStatic(Static:getName()) + 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 + + return mystatic end diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 2032bf46f..07ee32445 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -27,12 +27,16 @@ -- **Supported Carriers:** -- -- * [USS John C. Stennis](https://en.wikipedia.org/wiki/USS_John_C._Stennis) (CVN-74) +-- * [USS Theodore Roosevelt](https://en.wikipedia.org/wiki/USS_Theodore_Roosevelt_(CVN-71)) (CVN-71) [Super Carrier Module] +-- * [USS Abraham Lincoln](https://en.wikipedia.org/wiki/USS_Abraham_Lincoln_(CVN-72)) (CVN-72) [Super Carrier Module] +-- * [USS George Washington](https://en.wikipedia.org/wiki/USS_George_Washington_(CVN-73)) (CVN-73) [Super Carrier Module] +-- * [USS Harry S. Truman](https://en.wikipedia.org/wiki/USS_Harry_S._Truman) (CVN-75) [Super Carrier Module] -- * [USS Tarawa](https://en.wikipedia.org/wiki/USS_Tarawa_(LHA-1)) (LHA-1) [**WIP**] -- -- **Supported Aircraft:** -- -- * [F/A-18C Hornet Lot 20](https://forums.eagle.ru/forumdisplay.php?f=557) (Player & AI) --- * [F-14B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) +-- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) -- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI) -- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**] -- * F/A-18C Hornet (AI) @@ -47,7 +51,9 @@ -- the no other fixed wing aircraft (human or AI controlled) are supposed to land on the Tarawa. Currently only Case I is supported. Case II/III take slightly steps from the CVN carrier. -- However, the two Case II/III pattern are very similar so this is not a big drawback. -- --- Heatblur's mighty F-14B Tomcat has been added (March 13th 2019) as well. +-- Heatblur's mighty F-14B Tomcat has been added (March 13th 2019) as well. Same goes for the A version. +-- +-- The [DCS Supercarriers](https://forums.eagle.ru/forum/151-dcs-supercarrier/) are also supported. -- -- ## Discussion -- diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index e0eb873da..182537ce6 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -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.