mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-28 17:45:27 +00:00
Merge branch 'develop' into FF/Develop
This commit is contained in:
@@ -188,7 +188,10 @@ function DATABASE:AddStatic( DCSStaticName )
|
||||
|
||||
if not self.STATICS[DCSStaticName] then
|
||||
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
|
||||
return self.STATICS[DCSStaticName]
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1
|
||||
|
||||
self.SpawnIndex = self.SpawnIndex + 1
|
||||
|
||||
return Static
|
||||
return _DATABASE:AddStatic(Static:getName())
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -214,7 +214,7 @@ function SPAWNSTATIC:ReSpawn(countryid)
|
||||
|
||||
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
||||
|
||||
return Static
|
||||
return _DATABASE:AddStatic(Static:getName())
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -245,7 +245,7 @@ function SPAWNSTATIC:ReSpawnAt( Coordinate, Heading )
|
||||
|
||||
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
||||
|
||||
return Static
|
||||
return _DATABASE:AddStatic(Static:getName())
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -263,6 +263,6 @@ function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1
|
||||
|
||||
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
||||
|
||||
return Static
|
||||
return _DATABASE:AddStatic(Static:getName())
|
||||
end
|
||||
|
||||
|
||||
@@ -936,17 +936,12 @@ do -- DESIGNATE
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets the Designate Menu.
|
||||
|
||||
--- Sets the Designate Menu for one attack groups.
|
||||
-- @param #DESIGNATE self
|
||||
-- @return #DESIGNATE
|
||||
function DESIGNATE:SetDesignateMenu()
|
||||
function DESIGNATE:SetMenu( AttackGroup )
|
||||
|
||||
self.AttackSet:Flush( self )
|
||||
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
self.MenuDesignate = self.MenuDesignate or {}
|
||||
|
||||
local MissionMenu = nil
|
||||
@@ -978,6 +973,8 @@ do -- DESIGNATE
|
||||
MENU_GROUP_COMMAND_DELAYED:New( AttackGroup, "Flash Status Report On", StatusMenu, self.MenuFlashStatus, self, AttackGroup, true ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
||||
end
|
||||
|
||||
local DesignateCount = 0
|
||||
|
||||
for DesignateIndex, Designating in pairs( self.Designating ) do
|
||||
|
||||
local DetectedItem = self.Detection:GetDetectedItemByIndex( DesignateIndex )
|
||||
@@ -1016,10 +1013,35 @@ do -- DESIGNATE
|
||||
MENU_GROUP_COMMAND_DELAYED:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, DesignateIndex ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
||||
end
|
||||
end
|
||||
|
||||
DesignateCount = DesignateCount + 1
|
||||
if DesignateCount > 10 then
|
||||
break
|
||||
end
|
||||
end
|
||||
MenuDesignate:Remove( MenuTime, self.DesignateName )
|
||||
MenuDesignate:Set()
|
||||
end
|
||||
|
||||
|
||||
--- Sets the Designate Menu for all the attack groups.
|
||||
-- @param #DESIGNATE self
|
||||
-- @return #DESIGNATE
|
||||
function DESIGNATE:SetDesignateMenu()
|
||||
|
||||
self.AttackSet:Flush( self )
|
||||
|
||||
local Delay = 1
|
||||
|
||||
self.AttackSet:ForEachGroupAlive(
|
||||
|
||||
--- @param Wrapper.Group#GROUP GroupReport
|
||||
function( AttackGroup )
|
||||
|
||||
self:ScheduleOnce( Delay, self.SetMenu, self, AttackGroup )
|
||||
Delay = Delay + 1
|
||||
end
|
||||
|
||||
)
|
||||
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user