mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-23 02:08:17 +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
|
if not self.STATICS[DCSStaticName] then
|
||||||
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
|
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
|
||||||
|
return self.STATICS[DCSStaticName]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1
|
|||||||
|
|
||||||
self.SpawnIndex = self.SpawnIndex + 1
|
self.SpawnIndex = self.SpawnIndex + 1
|
||||||
|
|
||||||
return Static
|
return _DATABASE:AddStatic(Static:getName())
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -214,7 +214,7 @@ function SPAWNSTATIC:ReSpawn(countryid)
|
|||||||
|
|
||||||
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
||||||
|
|
||||||
return Static
|
return _DATABASE:AddStatic(Static:getName())
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -245,7 +245,7 @@ function SPAWNSTATIC:ReSpawnAt( Coordinate, Heading )
|
|||||||
|
|
||||||
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
local Static = coalition.addStaticObject( CountryID, StaticTemplate )
|
||||||
|
|
||||||
return Static
|
return _DATABASE:AddStatic(Static:getName())
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@@ -263,6 +263,6 @@ function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1
|
|||||||
|
|
||||||
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
||||||
|
|
||||||
return Static
|
return _DATABASE:AddStatic(Static:getName())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -936,17 +936,12 @@ do -- DESIGNATE
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Sets the Designate Menu.
|
|
||||||
|
--- Sets the Designate Menu for one attack groups.
|
||||||
-- @param #DESIGNATE self
|
-- @param #DESIGNATE self
|
||||||
-- @return #DESIGNATE
|
-- @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 {}
|
self.MenuDesignate = self.MenuDesignate or {}
|
||||||
|
|
||||||
local MissionMenu = nil
|
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 )
|
MENU_GROUP_COMMAND_DELAYED:New( AttackGroup, "Flash Status Report On", StatusMenu, self.MenuFlashStatus, self, AttackGroup, true ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local DesignateCount = 0
|
||||||
|
|
||||||
for DesignateIndex, Designating in pairs( self.Designating ) do
|
for DesignateIndex, Designating in pairs( self.Designating ) do
|
||||||
|
|
||||||
local DetectedItem = self.Detection:GetDetectedItemByIndex( DesignateIndex )
|
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 )
|
MENU_GROUP_COMMAND_DELAYED:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, DesignateIndex ):SetTime( MenuTime ):SetTag( self.DesignateName )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
DesignateCount = DesignateCount + 1
|
||||||
|
if DesignateCount > 10 then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
MenuDesignate:Remove( MenuTime, self.DesignateName )
|
MenuDesignate:Remove( MenuTime, self.DesignateName )
|
||||||
MenuDesignate:Set()
|
MenuDesignate:Set()
|
||||||
end
|
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
|
return self
|
||||||
|
|||||||
Reference in New Issue
Block a user