mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
f453619c78
@ -105,6 +105,7 @@
|
|||||||
-- @field Sound.SRS#MSRSQUEUE controlsrsQ SRS queue for range controller.
|
-- @field Sound.SRS#MSRSQUEUE controlsrsQ SRS queue for range controller.
|
||||||
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
|
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
|
||||||
-- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue 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
|
-- @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
|
--- *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,6 +356,7 @@ RANGE = {
|
|||||||
targetsheet = nil,
|
targetsheet = nil,
|
||||||
targetpath = nil,
|
targetpath = nil,
|
||||||
targetprefix = nil,
|
targetprefix = nil,
|
||||||
|
Coalition = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Default range parameters.
|
--- Default range parameters.
|
||||||
@ -591,7 +593,7 @@ RANGE.MenuF10Root = nil
|
|||||||
|
|
||||||
--- Range script version.
|
--- Range script version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
RANGE.version = "2.7.1"
|
RANGE.version = "2.7.3"
|
||||||
|
|
||||||
-- TODO list:
|
-- TODO list:
|
||||||
-- TODO: Verbosity level for messages.
|
-- TODO: Verbosity level for messages.
|
||||||
@ -613,8 +615,9 @@ RANGE.version = "2.7.1"
|
|||||||
--- RANGE contructor. Creates a new RANGE object.
|
--- RANGE contructor. Creates a new RANGE object.
|
||||||
-- @param #RANGE self
|
-- @param #RANGE self
|
||||||
-- @param #string RangeName Name of the range. Has to be unique. Will we used to create F10 menu items etc.
|
-- @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.
|
-- @return #RANGE RANGE object.
|
||||||
function RANGE:New( RangeName )
|
function RANGE:New( RangeName, Coalition )
|
||||||
|
|
||||||
-- Inherit BASE.
|
-- Inherit BASE.
|
||||||
local self = BASE:Inherit( self, FSM:New() ) -- #RANGE
|
local self = BASE:Inherit( self, FSM:New() ) -- #RANGE
|
||||||
@ -623,6 +626,8 @@ function RANGE:New( RangeName )
|
|||||||
-- TODO: make sure that the range name is not given twice. This would lead to problems in the F10 radio menu.
|
-- 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.rangename = RangeName or "Practice Range"
|
||||||
|
|
||||||
|
self.Coalition = Coalition
|
||||||
|
|
||||||
-- Log id.
|
-- Log id.
|
||||||
self.lid = string.format( "RANGE %s | ", self.rangename )
|
self.lid = string.format( "RANGE %s | ", self.rangename )
|
||||||
|
|
||||||
@ -1746,8 +1751,14 @@ function RANGE:OnEventBirth( EventData )
|
|||||||
-- Reset current strafe status.
|
-- Reset current strafe status.
|
||||||
self.strafeStatus[_uid] = nil
|
self.strafeStatus[_uid] = nil
|
||||||
|
|
||||||
|
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.
|
-- Add Menu commands after a delay of 0.1 seconds.
|
||||||
self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName )
|
self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName )
|
||||||
|
end
|
||||||
|
|
||||||
-- By default, some bomb impact points and do not flare each hit on target.
|
-- By default, some bomb impact points and do not flare each hit on target.
|
||||||
self.PlayerSettings[_playername] = {} -- #RANGE.PlayerData
|
self.PlayerSettings[_playername] = {} -- #RANGE.PlayerData
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user