mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#SET - include checking functional filters in all sub-classes
This commit is contained in:
parent
97f11c93bb
commit
2c192fba30
@ -4072,6 +4072,11 @@ do -- SET_STATIC
|
||||
MStaticInclude = MStaticInclude and MStaticZone
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MStaticInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MStatic)
|
||||
MStaticInclude = MStaticInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MStaticInclude )
|
||||
return MStaticInclude
|
||||
end
|
||||
@ -4508,7 +4513,7 @@ do -- SET_CLIENT
|
||||
self:UnHandleEvent(EVENTS.Dead)
|
||||
self:UnHandleEvent(EVENTS.Crash)
|
||||
--self:UnHandleEvent(EVENTS.PlayerEnterUnit)
|
||||
--self:UnHandleEvent(EVENTS.PlayerLeaveUnit)
|
||||
self:UnHandleEvent(EVENTS.PlayerLeaveUnit)
|
||||
|
||||
if self.Filter.Zones and self.ZoneTimer and self.ZoneTimer:IsRunning() then
|
||||
self.ZoneTimer:Stop()
|
||||
@ -4528,7 +4533,7 @@ do -- SET_CLIENT
|
||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventPlayerEnterUnit)
|
||||
--self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventPlayerLeaveUnit)
|
||||
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventPlayerLeaveUnit)
|
||||
--self:SetEventPriority(1)
|
||||
if self.Filter.Zones then
|
||||
self.ZoneTimer = TIMER:New(self._ContinousZoneFilter,self)
|
||||
@ -4567,7 +4572,7 @@ do -- SET_CLIENT
|
||||
function SET_CLIENT:_EventPlayerLeaveUnit(Event)
|
||||
--self:I( "_EventPlayerLeaveUnit" )
|
||||
if Event.IniDCSUnit then
|
||||
if Event.IniObjectCategory == Object.Category.UNIT and Event.IniGroup and Event.IniGroup:IsGround() then
|
||||
if Event.IniObjectCategory == Object.Category.UNIT and Event.IniGroup then --and Event.IniGroup:IsGround() then
|
||||
-- CA Slot left
|
||||
local ObjectName, Object = self:FindInDatabase( Event )
|
||||
if ObjectName then
|
||||
@ -5115,6 +5120,7 @@ do -- SET_PLAYER
|
||||
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnDeadOrCrash )
|
||||
end
|
||||
|
||||
return self
|
||||
@ -5300,6 +5306,11 @@ do -- SET_PLAYER
|
||||
MClientInclude = MClientInclude and MClientZone
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MClientInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MClient)
|
||||
MClientInclude = MClientInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MClientInclude )
|
||||
return MClientInclude
|
||||
end
|
||||
@ -5643,6 +5654,11 @@ do -- SET_AIRBASE
|
||||
MAirbaseInclude = MAirbaseInclude and MAirbaseCategory
|
||||
end
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MAirbaseInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MAirbase)
|
||||
MAirbaseInclude = MAirbaseInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MAirbaseInclude )
|
||||
return MAirbaseInclude
|
||||
@ -6032,6 +6048,11 @@ do -- SET_CARGO
|
||||
MCargoInclude = MCargoInclude and MCargoPrefix
|
||||
end
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MCargoInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MCargo)
|
||||
MCargoInclude = MCargoInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MCargoInclude )
|
||||
return MCargoInclude
|
||||
@ -6386,6 +6407,11 @@ do -- SET_ZONE
|
||||
MZoneInclude = MZoneInclude and MZonePrefix
|
||||
end
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MZoneInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||
MZoneInclude = MZoneInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MZoneInclude )
|
||||
return MZoneInclude
|
||||
@ -6879,6 +6905,11 @@ do -- SET_ZONE_GOAL
|
||||
MZoneInclude = MZoneInclude and MZonePrefix
|
||||
end
|
||||
end
|
||||
|
||||
if self.Filter.Functions and MZoneInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||
MZoneInclude = MZoneInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MZoneInclude )
|
||||
return MZoneInclude
|
||||
@ -7287,7 +7318,12 @@ do -- SET_OPSZONE
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
if self.Filter.Functions and MZoneInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||
MZoneInclude = MZoneInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MZoneInclude )
|
||||
return MZoneInclude
|
||||
end
|
||||
@ -8050,7 +8086,12 @@ do -- SET_OPSGROUP
|
||||
|
||||
MGroupInclude = MGroupInclude and MGroupPrefix
|
||||
end
|
||||
|
||||
|
||||
if self.Filter.Functions and MGroupInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MGroup)
|
||||
MGroupInclude = MGroupInclude and MClientFunc
|
||||
end
|
||||
|
||||
return MGroupInclude
|
||||
end
|
||||
|
||||
@ -8405,7 +8446,12 @@ do -- SET_SCENERY
|
||||
MSceneryInclude = MSceneryInclude and MSceneryRole
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if self.Filter.Functions and MSceneryInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(MScenery)
|
||||
MSceneryInclude = MSceneryInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T(2( MSceneryInclude )
|
||||
return MSceneryInclude
|
||||
end
|
||||
@ -8657,6 +8703,11 @@ do -- SET_DYNAMICCARGO
|
||||
DCargoInclude = DCargoInclude and DCargoZone
|
||||
end
|
||||
|
||||
if self.Filter.Functions and DCargoInclude then
|
||||
local MClientFunc = self:_EvalFilterFunctions(DCargo)
|
||||
DCargoInclude = DCargoInclude and MClientFunc
|
||||
end
|
||||
|
||||
--self:T2( DCargoInclude )
|
||||
return DCargoInclude
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user