This commit is contained in:
Applevangelist
2023-12-31 17:25:56 +01:00
parent 0835022c5c
commit 5d510807c9

View File

@@ -1986,7 +1986,7 @@ do
MGroupInclude = MGroupInclude and MGroupActive MGroupInclude = MGroupInclude and MGroupActive
end end
if self.Filter.Coalitions then if self.Filter.Coalitions and MGroupInclude then
local MGroupCoalition = false local MGroupCoalition = false
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
self:T3( { "Coalition:", MGroup:GetCoalition(), self.FilterMeta.Coalitions[CoalitionName], CoalitionName } ) self:T3( { "Coalition:", MGroup:GetCoalition(), self.FilterMeta.Coalitions[CoalitionName], CoalitionName } )
@@ -1997,7 +1997,7 @@ do
MGroupInclude = MGroupInclude and MGroupCoalition MGroupInclude = MGroupInclude and MGroupCoalition
end end
if self.Filter.Categories then if self.Filter.Categories and MGroupInclude then
local MGroupCategory = false local MGroupCategory = false
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
self:T3( { "Category:", MGroup:GetCategory(), self.FilterMeta.Categories[CategoryName], CategoryName } ) self:T3( { "Category:", MGroup:GetCategory(), self.FilterMeta.Categories[CategoryName], CategoryName } )
@@ -2008,7 +2008,7 @@ do
MGroupInclude = MGroupInclude and MGroupCategory MGroupInclude = MGroupInclude and MGroupCategory
end end
if self.Filter.Countries then if self.Filter.Countries and MGroupInclude then
local MGroupCountry = false local MGroupCountry = false
for CountryID, CountryName in pairs( self.Filter.Countries ) do for CountryID, CountryName in pairs( self.Filter.Countries ) do
self:T3( { "Country:", MGroup:GetCountry(), CountryName } ) self:T3( { "Country:", MGroup:GetCountry(), CountryName } )
@@ -2019,7 +2019,7 @@ do
MGroupInclude = MGroupInclude and MGroupCountry MGroupInclude = MGroupInclude and MGroupCountry
end end
if self.Filter.GroupPrefixes then if self.Filter.GroupPrefixes and MGroupInclude then
local MGroupPrefix = false local MGroupPrefix = false
for GroupPrefixId, GroupPrefix in pairs( self.Filter.GroupPrefixes ) do for GroupPrefixId, GroupPrefix in pairs( self.Filter.GroupPrefixes ) do
self:T3( { "Prefix:", string.find( MGroup:GetName(), GroupPrefix, 1 ), GroupPrefix } ) self:T3( { "Prefix:", string.find( MGroup:GetName(), GroupPrefix, 1 ), GroupPrefix } )
@@ -2030,7 +2030,7 @@ do
MGroupInclude = MGroupInclude and MGroupPrefix MGroupInclude = MGroupInclude and MGroupPrefix
end end
if self.Filter.Zones then if self.Filter.Zones and MGroupInclude then
local MGroupZone = false local MGroupZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do for ZoneName, Zone in pairs( self.Filter.Zones ) do
--self:T( "Zone:", ZoneName ) --self:T( "Zone:", ZoneName )
@@ -2041,7 +2041,7 @@ do
MGroupInclude = MGroupInclude and MGroupZone MGroupInclude = MGroupInclude and MGroupZone
end end
if self.Filter.Functions then if self.Filter.Functions and MGroupInclude then
local MGroupFunc = false local MGroupFunc = false
MGroupFunc = self:_EvalFilterFunctions(MGroup) MGroupFunc = self:_EvalFilterFunctions(MGroup)
MGroupInclude = MGroupInclude and MGroupFunc MGroupInclude = MGroupInclude and MGroupFunc
@@ -3192,7 +3192,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitActive MUnitInclude = MUnitInclude and MUnitActive
end end
if self.Filter.Coalitions then if self.Filter.Coalitions and MUnitInclude then
local MUnitCoalition = false local MUnitCoalition = false
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
self:F( { "Coalition:", MUnit:GetCoalition(), self.FilterMeta.Coalitions[CoalitionName], CoalitionName } ) self:F( { "Coalition:", MUnit:GetCoalition(), self.FilterMeta.Coalitions[CoalitionName], CoalitionName } )
@@ -3203,7 +3203,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitCoalition MUnitInclude = MUnitInclude and MUnitCoalition
end end
if self.Filter.Categories then if self.Filter.Categories and MUnitInclude then
local MUnitCategory = false local MUnitCategory = false
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
self:T3( { "Category:", MUnit:GetDesc().category, self.FilterMeta.Categories[CategoryName], CategoryName } ) self:T3( { "Category:", MUnit:GetDesc().category, self.FilterMeta.Categories[CategoryName], CategoryName } )
@@ -3214,7 +3214,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitCategory MUnitInclude = MUnitInclude and MUnitCategory
end end
if self.Filter.Types then if self.Filter.Types and MUnitInclude then
local MUnitType = false local MUnitType = false
for TypeID, TypeName in pairs( self.Filter.Types ) do for TypeID, TypeName in pairs( self.Filter.Types ) do
self:T3( { "Type:", MUnit:GetTypeName(), TypeName } ) self:T3( { "Type:", MUnit:GetTypeName(), TypeName } )
@@ -3225,7 +3225,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitType MUnitInclude = MUnitInclude and MUnitType
end end
if self.Filter.Countries then if self.Filter.Countries and MUnitInclude then
local MUnitCountry = false local MUnitCountry = false
for CountryID, CountryName in pairs( self.Filter.Countries ) do for CountryID, CountryName in pairs( self.Filter.Countries ) do
self:T3( { "Country:", MUnit:GetCountry(), CountryName } ) self:T3( { "Country:", MUnit:GetCountry(), CountryName } )
@@ -3236,7 +3236,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitCountry MUnitInclude = MUnitInclude and MUnitCountry
end end
if self.Filter.UnitPrefixes then if self.Filter.UnitPrefixes and MUnitInclude then
local MUnitPrefix = false local MUnitPrefix = false
for UnitPrefixId, UnitPrefix in pairs( self.Filter.UnitPrefixes ) do for UnitPrefixId, UnitPrefix in pairs( self.Filter.UnitPrefixes ) do
self:T3( { "Prefix:", string.find( MUnit:GetName(), UnitPrefix, 1 ), UnitPrefix } ) self:T3( { "Prefix:", string.find( MUnit:GetName(), UnitPrefix, 1 ), UnitPrefix } )
@@ -3247,7 +3247,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitPrefix MUnitInclude = MUnitInclude and MUnitPrefix
end end
if self.Filter.RadarTypes then if self.Filter.RadarTypes and MUnitInclude then
local MUnitRadar = false local MUnitRadar = false
for RadarTypeID, RadarType in pairs( self.Filter.RadarTypes ) do for RadarTypeID, RadarType in pairs( self.Filter.RadarTypes ) do
self:T3( { "Radar:", RadarType } ) self:T3( { "Radar:", RadarType } )
@@ -3261,7 +3261,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MUnitRadar MUnitInclude = MUnitInclude and MUnitRadar
end end
if self.Filter.SEAD then if self.Filter.SEAD and MUnitInclude then
local MUnitSEAD = false local MUnitSEAD = false
if MUnit:HasSEAD() == true then if MUnit:HasSEAD() == true then
self:T3( "SEAD Found" ) self:T3( "SEAD Found" )
@@ -3271,7 +3271,7 @@ do -- SET_UNIT
end end
end end
if self.Filter.Zones then if self.Filter.Zones and MUnitInclude then
local MGroupZone = false local MGroupZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do for ZoneName, Zone in pairs( self.Filter.Zones ) do
self:T3( "Zone:", ZoneName ) self:T3( "Zone:", ZoneName )
@@ -3282,7 +3282,7 @@ do -- SET_UNIT
MUnitInclude = MUnitInclude and MGroupZone MUnitInclude = MUnitInclude and MGroupZone
end end
if self.Filter.Functions then if self.Filter.Functions and MUnitInclude then
local MUnitFunc = self:_EvalFilterFunctions(MUnit) local MUnitFunc = self:_EvalFilterFunctions(MUnit)
MUnitInclude = MUnitInclude and MUnitFunc MUnitInclude = MUnitInclude and MUnitFunc
end end
@@ -4689,7 +4689,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientActive MClientInclude = MClientInclude and MClientActive
end end
if self.Filter.Coalitions then if self.Filter.Coalitions and MClientInclude then
local MClientCoalition = false local MClientCoalition = false
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
local ClientCoalitionID = _DATABASE:GetCoalitionFromClientTemplate( MClientName ) local ClientCoalitionID = _DATABASE:GetCoalitionFromClientTemplate( MClientName )
@@ -4702,7 +4702,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientCoalition MClientInclude = MClientInclude and MClientCoalition
end end
if self.Filter.Categories then if self.Filter.Categories and MClientInclude then
local MClientCategory = false local MClientCategory = false
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
local ClientCategoryID = _DATABASE:GetCategoryFromClientTemplate( MClientName ) local ClientCategoryID = _DATABASE:GetCategoryFromClientTemplate( MClientName )
@@ -4715,7 +4715,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientCategory MClientInclude = MClientInclude and MClientCategory
end end
if self.Filter.Types then if self.Filter.Types and MClientInclude then
local MClientType = false local MClientType = false
for TypeID, TypeName in pairs( self.Filter.Types ) do for TypeID, TypeName in pairs( self.Filter.Types ) do
self:T3( { "Type:", MClient:GetTypeName(), TypeName } ) self:T3( { "Type:", MClient:GetTypeName(), TypeName } )
@@ -4727,7 +4727,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientType MClientInclude = MClientInclude and MClientType
end end
if self.Filter.Countries then if self.Filter.Countries and MClientInclude then
local MClientCountry = false local MClientCountry = false
for CountryID, CountryName in pairs( self.Filter.Countries ) do for CountryID, CountryName in pairs( self.Filter.Countries ) do
local ClientCountryID = _DATABASE:GetCountryFromClientTemplate( MClientName ) local ClientCountryID = _DATABASE:GetCountryFromClientTemplate( MClientName )
@@ -4740,7 +4740,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientCountry MClientInclude = MClientInclude and MClientCountry
end end
if self.Filter.ClientPrefixes then if self.Filter.ClientPrefixes and MClientInclude then
local MClientPrefix = false local MClientPrefix = false
for ClientPrefixId, ClientPrefix in pairs( self.Filter.ClientPrefixes ) do for ClientPrefixId, ClientPrefix in pairs( self.Filter.ClientPrefixes ) do
self:T3( { "Prefix:", string.find( MClient.UnitName, ClientPrefix, 1 ), ClientPrefix } ) self:T3( { "Prefix:", string.find( MClient.UnitName, ClientPrefix, 1 ), ClientPrefix } )
@@ -4752,7 +4752,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientPrefix MClientInclude = MClientInclude and MClientPrefix
end end
if self.Filter.Zones then if self.Filter.Zones and MClientInclude then
local MClientZone = false local MClientZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do for ZoneName, Zone in pairs( self.Filter.Zones ) do
self:T3( "Zone:", ZoneName ) self:T3( "Zone:", ZoneName )
@@ -4764,7 +4764,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientZone MClientInclude = MClientInclude and MClientZone
end end
if self.Filter.Playernames then if self.Filter.Playernames and MClientInclude then
local MClientPlayername = false local MClientPlayername = false
local playername = MClient:GetPlayerName() or "Unknown" local playername = MClient:GetPlayerName() or "Unknown"
--self:T(playername) --self:T(playername)
@@ -4777,7 +4777,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientPlayername MClientInclude = MClientInclude and MClientPlayername
end end
if self.Filter.Callsigns then if self.Filter.Callsigns and MClientInclude then
local MClientCallsigns = false local MClientCallsigns = false
local callsign = MClient:GetCallsign() local callsign = MClient:GetCallsign()
--self:I(callsign) --self:I(callsign)
@@ -4790,7 +4790,7 @@ do -- SET_CLIENT
MClientInclude = MClientInclude and MClientCallsigns MClientInclude = MClientInclude and MClientCallsigns
end end
if self.Filter.Functions then if self.Filter.Functions and MClientInclude then
local MClientFunc = self:_EvalFilterFunctions(MClient) local MClientFunc = self:_EvalFilterFunctions(MClient)
MClientInclude = MClientInclude and MClientFunc MClientInclude = MClientInclude and MClientFunc
end end
@@ -5554,7 +5554,7 @@ do -- SET_AIRBASE
MAirbaseInclude = MAirbaseInclude and MAirbaseCoalition MAirbaseInclude = MAirbaseInclude and MAirbaseCoalition
end end
if self.Filter.Categories then if self.Filter.Categories and MAirbaseInclude then
local MAirbaseCategory = false local MAirbaseCategory = false
for CategoryID, CategoryName in pairs( self.Filter.Categories ) do for CategoryID, CategoryName in pairs( self.Filter.Categories ) do
local AirbaseCategoryID = _DATABASE:GetCategoryFromAirbase( MAirbaseName ) local AirbaseCategoryID = _DATABASE:GetCategoryFromAirbase( MAirbaseName )
@@ -7900,7 +7900,7 @@ do -- SET_OPSGROUP
end end
-- Filter coalitions. -- Filter coalitions.
if self.Filter.Coalitions then if self.Filter.Coalitions and MGroupInclude then
local MGroupCoalition = false local MGroupCoalition = false
@@ -7914,7 +7914,7 @@ do -- SET_OPSGROUP
end end
-- Filter categories. -- Filter categories.
if self.Filter.Categories then if self.Filter.Categories and MGroupInclude then
local MGroupCategory = false local MGroupCategory = false
@@ -7928,7 +7928,7 @@ do -- SET_OPSGROUP
end end
-- Filter countries. -- Filter countries.
if self.Filter.Countries then if self.Filter.Countries and MGroupInclude then
local MGroupCountry = false local MGroupCountry = false
for CountryID, CountryName in pairs( self.Filter.Countries ) do for CountryID, CountryName in pairs( self.Filter.Countries ) do
if country.id[CountryName] == MGroup:GetCountry() then if country.id[CountryName] == MGroup:GetCountry() then
@@ -7939,7 +7939,7 @@ do -- SET_OPSGROUP
end end
-- Filter "prefixes". -- Filter "prefixes".
if self.Filter.GroupPrefixes then if self.Filter.GroupPrefixes and MGroupInclude then
local MGroupPrefix = false local MGroupPrefix = false