mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'FF/Ops' into FF/OpsDev
This commit is contained in:
@@ -1368,7 +1368,7 @@ function DATABASE:_EventOnBirth( Event )
|
||||
if PlayerName then
|
||||
|
||||
-- Debug info.
|
||||
self:I(string.format("Player '%s' joint unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
|
||||
self:I(string.format("Player '%s' joined unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
|
||||
|
||||
-- Add client in case it does not exist already.
|
||||
if not client then
|
||||
|
||||
@@ -744,7 +744,7 @@ do -- SETTINGS
|
||||
|
||||
self.PlayerMenu = PlayerMenu
|
||||
|
||||
self:I( string.format( "Setting menu for player %s", tostring( PlayerName ) ) )
|
||||
self:T( string.format( "Setting menu for player %s", tostring( PlayerName ) ) )
|
||||
|
||||
local submenu = MENU_GROUP:New( PlayerGroup, "LL Accuracy", PlayerMenu )
|
||||
MENU_GROUP_COMMAND:New( PlayerGroup, "LL 0 Decimals", submenu, self.MenuGroupLL_DDM_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 0 )
|
||||
@@ -989,7 +989,7 @@ do -- SETTINGS
|
||||
do
|
||||
--- @param #SETTINGS self
|
||||
function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem )
|
||||
BASE:E( { self, PlayerUnit:GetName(), A2GSystem } )
|
||||
--BASE:E( {PlayerUnit:GetName(), A2GSystem } )
|
||||
self.A2GSystem = A2GSystem
|
||||
MESSAGE:New( string.format( "Settings: A2G format set to %s for player %s.", A2GSystem, PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||
if _SETTINGS.MenuStatic == false then
|
||||
|
||||
@@ -328,6 +328,8 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.SpawnInitModu = nil -- No special modulation.
|
||||
self.SpawnInitRadio = nil -- No radio comms setting.
|
||||
self.SpawnInitModex = nil
|
||||
self.SpawnInitModexPrefix = nil
|
||||
self.SpawnInitModexPostfix = nil
|
||||
self.SpawnInitAirbase = nil
|
||||
self.TweakedTemplate = false -- Check if the user is using self made template.
|
||||
|
||||
@@ -382,6 +384,8 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.SpawnInitModu = nil -- No special modulation.
|
||||
self.SpawnInitRadio = nil -- No radio communication setting.
|
||||
self.SpawnInitModex = nil
|
||||
self.SpawnInitModexPrefix = nil
|
||||
self.SpawnInitModexPostfix = nil
|
||||
self.SpawnInitAirbase = nil
|
||||
self.TweakedTemplate = false -- Check if the user is using self made template.
|
||||
|
||||
@@ -541,6 +545,8 @@ function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPr
|
||||
self.SpawnInitModu = nil -- No special modulation.
|
||||
self.SpawnInitRadio = nil -- No radio communication setting.
|
||||
self.SpawnInitModex = nil
|
||||
self.SpawnInitModexPrefix = nil
|
||||
self.SpawnInitModexPostfix = nil
|
||||
self.SpawnInitAirbase = nil
|
||||
self.TweakedTemplate = true -- Check if the user is using self made template.
|
||||
self.MooseNameing = true
|
||||
@@ -812,12 +818,17 @@ end
|
||||
--- Sets the modex of the first unit of the group. If more units are in the group, the number is increased by one with every unit.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number modex Modex of the first unit.
|
||||
-- @param #string prefix (optional) String to prefix to modex, e.g. for French AdA Modex, eg. -L-102 then "-L-" would be the prefix.
|
||||
-- @param #string postfix (optional) String to postfix to modex, example tbd.
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:InitModex( modex )
|
||||
function SPAWN:InitModex( modex, prefix, postfix )
|
||||
|
||||
if modex then
|
||||
self.SpawnInitModex = tonumber( modex )
|
||||
end
|
||||
|
||||
self.SpawnInitModexPrefix = prefix
|
||||
self.SpawnInitModexPostfix = postfix
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -1571,7 +1582,10 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth )
|
||||
-- Set tail number.
|
||||
if self.SpawnInitModex then
|
||||
for UnitID = 1, #SpawnTemplate.units do
|
||||
SpawnTemplate.units[UnitID].onboard_num = string.format( "%03d", self.SpawnInitModex + (UnitID - 1) )
|
||||
local modexnumber = string.format( "%03d", self.SpawnInitModex + (UnitID - 1) )
|
||||
if self.SpawnInitModexPrefix then modexnumber = self.SpawnInitModexPrefix..modexnumber end
|
||||
if self.SpawnInitModexPostfix then modexnumber = modexnumber..self.SpawnInitModexPostfix end
|
||||
SpawnTemplate.units[UnitID].onboard_num = modexnumber
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2178,14 +2192,18 @@ end
|
||||
-- @param #table Spots Table of parking spot IDs. Note that these in general are different from the numbering in the mission editor!
|
||||
-- @param #SPAWN.Takeoff Takeoff (Optional) Takeoff type, i.e. either SPAWN.Takeoff.Cold or SPAWN.Takeoff.Hot. Default is Hot.
|
||||
-- @return Wrapper.Group#GROUP The group that was spawned or nil when nothing was spawned.
|
||||
function SPAWN:SpawnAtParkingSpot( Airbase, Spots, Takeoff ) -- R2.5
|
||||
function SPAWN:SpawnAtParkingSpot( Airbase, Spots, Takeoff )
|
||||
self:F( { Airbase = Airbase, Spots = Spots, Takeoff = Takeoff } )
|
||||
|
||||
|
||||
-- Ensure that Spots parameter is a table.
|
||||
if type( Spots ) ~= "table" then
|
||||
Spots = { Spots }
|
||||
end
|
||||
|
||||
|
||||
if type(Airbase) == "string" then
|
||||
Airbase = AIRBASE:FindByName(Airbase)
|
||||
end
|
||||
|
||||
-- Get template group.
|
||||
local group = GROUP:FindByName( self.SpawnTemplatePrefix )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user