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
|
MStaticInclude = MStaticInclude and MStaticZone
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MStaticInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MStatic)
|
||||||
|
MStaticInclude = MStaticInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MStaticInclude )
|
--self:T(2( MStaticInclude )
|
||||||
return MStaticInclude
|
return MStaticInclude
|
||||||
end
|
end
|
||||||
@ -4508,7 +4513,7 @@ do -- SET_CLIENT
|
|||||||
self:UnHandleEvent(EVENTS.Dead)
|
self:UnHandleEvent(EVENTS.Dead)
|
||||||
self:UnHandleEvent(EVENTS.Crash)
|
self:UnHandleEvent(EVENTS.Crash)
|
||||||
--self:UnHandleEvent(EVENTS.PlayerEnterUnit)
|
--self:UnHandleEvent(EVENTS.PlayerEnterUnit)
|
||||||
--self:UnHandleEvent(EVENTS.PlayerLeaveUnit)
|
self:UnHandleEvent(EVENTS.PlayerLeaveUnit)
|
||||||
|
|
||||||
if self.Filter.Zones and self.ZoneTimer and self.ZoneTimer:IsRunning() then
|
if self.Filter.Zones and self.ZoneTimer and self.ZoneTimer:IsRunning() then
|
||||||
self.ZoneTimer:Stop()
|
self.ZoneTimer:Stop()
|
||||||
@ -4528,7 +4533,7 @@ do -- SET_CLIENT
|
|||||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||||
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventPlayerEnterUnit)
|
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventPlayerEnterUnit)
|
||||||
--self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventPlayerLeaveUnit)
|
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventPlayerLeaveUnit)
|
||||||
--self:SetEventPriority(1)
|
--self:SetEventPriority(1)
|
||||||
if self.Filter.Zones then
|
if self.Filter.Zones then
|
||||||
self.ZoneTimer = TIMER:New(self._ContinousZoneFilter,self)
|
self.ZoneTimer = TIMER:New(self._ContinousZoneFilter,self)
|
||||||
@ -4567,7 +4572,7 @@ do -- SET_CLIENT
|
|||||||
function SET_CLIENT:_EventPlayerLeaveUnit(Event)
|
function SET_CLIENT:_EventPlayerLeaveUnit(Event)
|
||||||
--self:I( "_EventPlayerLeaveUnit" )
|
--self:I( "_EventPlayerLeaveUnit" )
|
||||||
if Event.IniDCSUnit then
|
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
|
-- CA Slot left
|
||||||
local ObjectName, Object = self:FindInDatabase( Event )
|
local ObjectName, Object = self:FindInDatabase( Event )
|
||||||
if ObjectName then
|
if ObjectName then
|
||||||
@ -5115,6 +5120,7 @@ do -- SET_PLAYER
|
|||||||
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
||||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||||
|
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnDeadOrCrash )
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -5300,6 +5306,11 @@ do -- SET_PLAYER
|
|||||||
MClientInclude = MClientInclude and MClientZone
|
MClientInclude = MClientInclude and MClientZone
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MClientInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MClient)
|
||||||
|
MClientInclude = MClientInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MClientInclude )
|
--self:T(2( MClientInclude )
|
||||||
return MClientInclude
|
return MClientInclude
|
||||||
end
|
end
|
||||||
@ -5643,6 +5654,11 @@ do -- SET_AIRBASE
|
|||||||
MAirbaseInclude = MAirbaseInclude and MAirbaseCategory
|
MAirbaseInclude = MAirbaseInclude and MAirbaseCategory
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MAirbaseInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MAirbase)
|
||||||
|
MAirbaseInclude = MAirbaseInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MAirbaseInclude )
|
--self:T(2( MAirbaseInclude )
|
||||||
return MAirbaseInclude
|
return MAirbaseInclude
|
||||||
@ -6032,6 +6048,11 @@ do -- SET_CARGO
|
|||||||
MCargoInclude = MCargoInclude and MCargoPrefix
|
MCargoInclude = MCargoInclude and MCargoPrefix
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MCargoInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MCargo)
|
||||||
|
MCargoInclude = MCargoInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MCargoInclude )
|
--self:T(2( MCargoInclude )
|
||||||
return MCargoInclude
|
return MCargoInclude
|
||||||
@ -6386,6 +6407,11 @@ do -- SET_ZONE
|
|||||||
MZoneInclude = MZoneInclude and MZonePrefix
|
MZoneInclude = MZoneInclude and MZonePrefix
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MZoneInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||||
|
MZoneInclude = MZoneInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MZoneInclude )
|
--self:T(2( MZoneInclude )
|
||||||
return MZoneInclude
|
return MZoneInclude
|
||||||
@ -6879,6 +6905,11 @@ do -- SET_ZONE_GOAL
|
|||||||
MZoneInclude = MZoneInclude and MZonePrefix
|
MZoneInclude = MZoneInclude and MZonePrefix
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MZoneInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||||
|
MZoneInclude = MZoneInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MZoneInclude )
|
--self:T(2( MZoneInclude )
|
||||||
return MZoneInclude
|
return MZoneInclude
|
||||||
@ -7287,7 +7318,12 @@ do -- SET_OPSZONE
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MZoneInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MZone)
|
||||||
|
MZoneInclude = MZoneInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MZoneInclude )
|
--self:T(2( MZoneInclude )
|
||||||
return MZoneInclude
|
return MZoneInclude
|
||||||
end
|
end
|
||||||
@ -8050,7 +8086,12 @@ do -- SET_OPSGROUP
|
|||||||
|
|
||||||
MGroupInclude = MGroupInclude and MGroupPrefix
|
MGroupInclude = MGroupInclude and MGroupPrefix
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MGroupInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MGroup)
|
||||||
|
MGroupInclude = MGroupInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
return MGroupInclude
|
return MGroupInclude
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -8405,7 +8446,12 @@ do -- SET_SCENERY
|
|||||||
MSceneryInclude = MSceneryInclude and MSceneryRole
|
MSceneryInclude = MSceneryInclude and MSceneryRole
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and MSceneryInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(MScenery)
|
||||||
|
MSceneryInclude = MSceneryInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T(2( MSceneryInclude )
|
--self:T(2( MSceneryInclude )
|
||||||
return MSceneryInclude
|
return MSceneryInclude
|
||||||
end
|
end
|
||||||
@ -8657,6 +8703,11 @@ do -- SET_DYNAMICCARGO
|
|||||||
DCargoInclude = DCargoInclude and DCargoZone
|
DCargoInclude = DCargoInclude and DCargoZone
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.Filter.Functions and DCargoInclude then
|
||||||
|
local MClientFunc = self:_EvalFilterFunctions(DCargo)
|
||||||
|
DCargoInclude = DCargoInclude and MClientFunc
|
||||||
|
end
|
||||||
|
|
||||||
--self:T2( DCargoInclude )
|
--self:T2( DCargoInclude )
|
||||||
return DCargoInclude
|
return DCargoInclude
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user