diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 1ae8604ca..ff631d18a 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -22,7 +22,7 @@ -- @module Functional.Mantis -- @image Functional.Mantis.jpg -- --- Last Update: Sept 2023 +-- Last Update: Oct 2023 ------------------------------------------------------------------------- --- **MANTIS** class, extends Core.Base#BASE @@ -103,6 +103,7 @@ -- * Roland -- * Silkworm (though strictly speaking this is a surface to ship missile) -- * SA-2, SA-3, SA-5, SA-6, SA-7, SA-8, SA-9, SA-10, SA-11, SA-13, SA-15, SA-19 +-- * From IDF mod: STUNNER IDFA, TAMIR IDFA (Note all caps!) -- * From HDS (see note on HDS below): SA-2, SA-3, SA-10B, SA-10C, SA-12, SA-17, SA-20A, SA-20B, SA-23, HQ-2 -- -- * From SMA: RBS98M, RBS70, RBS90, RBS90M, RBS103A, RBS103B, RBS103AM, RBS103BM, Lvkv9040M @@ -373,7 +374,9 @@ MANTIS.SamData = { ["SA-20A"] = { Range=150, Blindspot=5, Height=27, Type="Long" , Radar="S-300PMU1"}, ["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"}, ["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" }, - ["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" } + ["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" }, + ["TAMIR IDFA"] = { Range=20, Blindspot=0.6, Height=12.3, Type="Short", Radar="IRON_DOME_LN" }, + ["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" }, } --- SAM data HDS @@ -628,7 +631,7 @@ do -- TODO Version -- @field #string version - self.version="0.8.14" + self.version="0.8.15" self:I(string.format("***** Starting MANTIS Version %s *****", self.version)) --- FSM Functions --- diff --git a/Moose Development/Moose/Functional/Range.lua b/Moose Development/Moose/Functional/Range.lua index 18630e30b..e9005ace0 100644 --- a/Moose Development/Moose/Functional/Range.lua +++ b/Moose Development/Moose/Functional/Range.lua @@ -105,6 +105,7 @@ -- @field Sound.SRS#MSRSQUEUE controlsrsQ SRS queue for range controller. -- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor. -- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor. +-- @field #number Coalition Coalition side for the menu, if any. -- @extends Core.Fsm#FSM --- *Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine.* - Ludwig van Beethoven @@ -355,7 +356,8 @@ RANGE = { targetsheet = nil, targetpath = nil, targetprefix = nil, -} + Coalition = nil, + } --- Default range parameters. -- @type RANGE.Defaults @@ -591,7 +593,7 @@ RANGE.MenuF10Root = nil --- Range script version. -- @field #string version -RANGE.version = "2.7.1" +RANGE.version = "2.7.3" -- TODO list: -- TODO: Verbosity level for messages. @@ -613,8 +615,9 @@ RANGE.version = "2.7.1" --- RANGE contructor. Creates a new RANGE object. -- @param #RANGE self -- @param #string RangeName Name of the range. Has to be unique. Will we used to create F10 menu items etc. +-- @param #number Coalition (optional) Coalition of the range, if any, e.g. coalition.side.BLUE. -- @return #RANGE RANGE object. -function RANGE:New( RangeName ) +function RANGE:New( RangeName, Coalition ) -- Inherit BASE. local self = BASE:Inherit( self, FSM:New() ) -- #RANGE @@ -622,7 +625,9 @@ function RANGE:New( RangeName ) -- Get range name. -- TODO: make sure that the range name is not given twice. This would lead to problems in the F10 radio menu. self.rangename = RangeName or "Practice Range" - + + self.Coalition = Coalition + -- Log id. self.lid = string.format( "RANGE %s | ", self.rangename ) @@ -1745,10 +1750,16 @@ function RANGE:OnEventBirth( EventData ) -- Reset current strafe status. self.strafeStatus[_uid] = nil - - -- Add Menu commands after a delay of 0.1 seconds. - self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName ) - + + if self.Coalition then + if EventData.IniCoalition == self.Coalition then + self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName ) + end + else + -- Add Menu commands after a delay of 0.1 seconds. + self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName ) + end + -- By default, some bomb impact points and do not flare each hit on target. self.PlayerSettings[_playername] = {} -- #RANGE.PlayerData self.PlayerSettings[_playername].smokebombimpact = self.defaultsmokebomb diff --git a/Moose Development/Moose/Sound/SRS.lua b/Moose Development/Moose/Sound/SRS.lua index 856595d0b..4ffa93ca4 100644 --- a/Moose Development/Moose/Sound/SRS.lua +++ b/Moose Development/Moose/Sound/SRS.lua @@ -1119,7 +1119,7 @@ function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, sp end -- Debug output. - self:I("MSRS command="..command) + self:T("MSRS command="..command) return command end