Merge branch 'FF/Ops' into FF/OpsDev

This commit is contained in:
Frank 2023-09-17 16:26:23 +02:00
commit d5aa9eaf0f
11 changed files with 63 additions and 67 deletions

View File

@ -34,6 +34,7 @@ local _TraceClassMethod = {}
local _ClassID = 0
---
-- @type BASE
-- @field ClassName The name of the class.
-- @field ClassID The ID number of the class.

View File

@ -31,7 +31,7 @@
-- @module Core.Database
-- @image Core_Database.JPG
---
-- @type DATABASE
-- @field #string ClassName Name of the class.
-- @field #table Templates Templates: Units, Groups, Statics, ClientsByName, ClientsByID.

View File

@ -860,8 +860,10 @@ do -- SET_BASE
self:F3( Object )
local outcome = false
local name = Object:GetName()
--self:I("SET_BASE: Objectname = "..name)
self:ForEach(
function(object)
--self:I("SET_BASE: In set objectname = "..object:GetName())
if object:GetName() == name then
outcome = true
end
@ -4028,8 +4030,8 @@ do -- SET_CLIENT
Countries = nil,
ClientPrefixes = nil,
Zones = nil,
Playernames = nil,
Callsigns = nil,
Playernames = nil,
Callsigns = nil,
},
FilterMeta = {
Coalitions = {
@ -4330,7 +4332,6 @@ do -- SET_CLIENT
function SET_CLIENT:FilterStart()
if _DATABASE then
self:_FilterStart()
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
@ -4339,6 +4340,7 @@ do -- SET_CLIENT
local timing = self.ZoneTimerInterval or 30
self.ZoneTimer:Start(timing,timing)
end
self:_FilterStart()
end
return self
@ -4546,45 +4548,45 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientPrefix
end
if self.Filter.Zones then
local MClientZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do
self:T3( "Zone:", ZoneName )
local unit = MClient:GetClientGroupUnit()
if unit and unit:IsInZone(Zone) then
MClientZone = true
end
end
MClientInclude = MClientInclude and MClientZone
end
if self.Filter.Playernames then
local MClientPlayername = false
local playername = MClient:GetPlayerName() or "Unknown"
--self:T(playername)
for _,_Playername in pairs(self.Filter.Playernames) do
if playername and string.find(playername,_Playername) then
MClientPlayername = true
end
end
self:T( { "Evaluated Playername", MClientPlayername } )
MClientInclude = MClientInclude and MClientPlayername
end
if self.Filter.Callsigns then
local MClientCallsigns = false
local callsign = MClient:GetCallsign()
--self:T(callsign)
for _,_Callsign in pairs(self.Filter.Callsigns) do
if callsign and string.find(callsign,_Callsign) then
MClientCallsigns = true
end
end
self:T( { "Evaluated Callsign", MClientCallsigns } )
MClientInclude = MClientInclude and MClientCallsigns
end
end
if self.Filter.Zones then
local MClientZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do
self:T3( "Zone:", ZoneName )
local unit = MClient:GetClientGroupUnit()
if unit and unit:IsInZone(Zone) then
MClientZone = true
end
end
MClientInclude = MClientInclude and MClientZone
end
if self.Filter.Playernames then
local MClientPlayername = false
local playername = MClient:GetPlayerName() or "Unknown"
--self:T(playername)
for _,_Playername in pairs(self.Filter.Playernames) do
if playername and string.find(playername,_Playername) then
MClientPlayername = true
end
end
self:T( { "Evaluated Playername", MClientPlayername } )
MClientInclude = MClientInclude and MClientPlayername
end
if self.Filter.Callsigns then
local MClientCallsigns = false
local callsign = MClient:GetCallsign()
--self:I(callsign)
for _,_Callsign in pairs(self.Filter.Callsigns) do
if callsign and string.find(callsign,_Callsign,1,true) then
MClientCallsigns = true
end
end
self:T( { "Evaluated Callsign", MClientCallsigns } )
MClientInclude = MClientInclude and MClientCallsigns
end
end
self:T2( MClientInclude )
return MClientInclude
end

View File

@ -286,6 +286,7 @@ SPAWN.Takeoff = {
Cold = 4,
}
---
-- @type SPAWN.SpawnZoneTable
-- @list <Core.Zone#ZONE_BASE> SpawnZone

View File

@ -108,7 +108,7 @@
-- @image Escorting.JPG
---
-- @type ESCORT
-- @extends Core.Base#BASE
-- @field Wrapper.Client#CLIENT EscortClient

View File

@ -67,7 +67,7 @@
-- @module Functional.MissileTrainer
-- @image Missile_Trainer.JPG
---
-- @type MISSILETRAINER
-- @field Core.Set#SET_CLIENT DBClients
-- @extends Core.Base#BASE

View File

@ -10,6 +10,7 @@
-- @module Functional.Movement
-- @image MOOSE.JPG
---
-- @type MOVEMENT
-- @extends Core.Base#BASE

View File

@ -98,7 +98,7 @@ PLAYERTASK = {
--- PLAYERTASK class version.
-- @field #string version
PLAYERTASK.version="0.1.19"
PLAYERTASK.version="0.1.20"
--- Generic task condition.
-- @type PLAYERTASK.Condition
@ -2195,7 +2195,8 @@ function PLAYERTASKCONTROLLER:_EventHandler(EventData)
end
elseif EventData.id == EVENTS.PlayerEnterAircraft and EventData.IniCoalition == self.Coalition then
if EventData.IniPlayerName and EventData.IniGroup then
if self.IsClientSet and self.ClientSet:IsNotInSet(CLIENT:FindByName(EventData.IniUnitName)) then
--if self.IsClientSet and self.ClientSet:IsNotInSet(CLIENT:FindByName(EventData.IniUnitName)) then
if self.IsClientSet and (not self.ClientSet:IsIncludeObject(CLIENT:FindByName(EventData.IniUnitName))) then
self:T(self.lid.."Client not in SET: "..EventData.IniPlayerName)
return self
end
@ -4063,7 +4064,8 @@ function PLAYERTASKCONTROLLER:onafterStart(From, Event, To)
self:HandleEvent(EVENTS.Ejection, self._EventHandler)
self:HandleEvent(EVENTS.Crash, self._EventHandler)
self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
self:SetEventPriority(5)
return self
end

View File

@ -26,6 +26,10 @@
-- @field #ENUMS
ENUMS = {}
--- Suppress the error box
env.setErrorMessageBoxEnabled( false )
--- Rules of Engagement.
-- @type ENUMS.ROE
-- @field #number WeaponFree [AIR] AI will engage any enemy group it detects. Target prioritization is based based on the threat of the target.

View File

@ -12,7 +12,7 @@
-- @module Utilities.Utils
-- @image MOOSE.JPG
---
-- @type SMOKECOLOR
-- @field Green
-- @field Red
@ -22,6 +22,7 @@
SMOKECOLOR = trigger.smokeColor -- #SMOKECOLOR
---
-- @type FLARECOLOR
-- @field Green
-- @field Red

View File

@ -1790,24 +1790,8 @@ end
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskEngageGroup( AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit )
-- EngageControllable = {
-- id = 'EngageControllable ',
-- params = {
-- groupId = Group.ID,
-- weaponType = number,
-- expend = enum AI.Task.WeaponExpend,
-- attackQty = number,
-- directionEnabled = boolean,
-- direction = Azimuth,
-- altitudeEnabled = boolean,
-- altitude = Distance,
-- attackQtyLimit = boolean,
-- priority = number,
-- }
-- }
local DCSTask = {
id = 'EngageControllable',
id = 'EngageGroup',
params = {
groupId = AttackGroup:GetID(),
weaponType = WeaponType,
@ -1923,7 +1907,7 @@ end
function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponType, Designation, Datalink, Frequency, Modulation, CallsignID, CallsignNumber )
local DCSTask = {
id = 'FAC_EngageControllable',
id = 'FAC_EngageGroup',
params = {
groupId = AttackGroup:GetID(),
weaponType = WeaponType or "Auto",