mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#TIRESIAS - Fixed a problem when a script wants to add exceptions pre-start.
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
-- @module Functional.Tiresias
|
-- @module Functional.Tiresias
|
||||||
-- @image Functional.Tiresias.jpg
|
-- @image Functional.Tiresias.jpg
|
||||||
|
|
||||||
--- Last Update: July 2025
|
--- Last Update: Oct 2025
|
||||||
|
|
||||||
--- **TIRESIAS** class, extends Core.Base#BASE
|
--- **TIRESIAS** class, extends Core.Base#BASE
|
||||||
-- @type TIRESIAS
|
-- @type TIRESIAS
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
-- @field #TIRESIAS
|
-- @field #TIRESIAS
|
||||||
TIRESIAS = {
|
TIRESIAS = {
|
||||||
ClassName = "TIRESIAS",
|
ClassName = "TIRESIAS",
|
||||||
debug = true,
|
debug = false,
|
||||||
version = " 0.0.7a-OPT" ,
|
version = " 0.0.8" ,
|
||||||
Interval = 20,
|
Interval = 20,
|
||||||
GroundSet = nil,
|
GroundSet = nil,
|
||||||
VehicleSet = nil,
|
VehicleSet = nil,
|
||||||
@@ -140,7 +140,7 @@ function TIRESIAS:New()
|
|||||||
self:AddTransition("*", "Status", "*") -- TIRESIAS status update.
|
self:AddTransition("*", "Status", "*") -- TIRESIAS status update.
|
||||||
self:AddTransition("*", "Stop", "Stopped") -- Stop FSM.
|
self:AddTransition("*", "Stop", "Stopped") -- Stop FSM.
|
||||||
|
|
||||||
self.ExceptionSet = nil --SET_GROUP:New():Clear(false)
|
self.ExceptionSet = SET_GROUP:New() --:Clear(false)
|
||||||
self._cached_zones = {} -- Initialize zone cache
|
self._cached_zones = {} -- Initialize zone cache
|
||||||
|
|
||||||
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
|
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
|
||||||
@@ -224,10 +224,10 @@ function TIRESIAS:AddExceptionSet(Set)
|
|||||||
|
|
||||||
Set:ForEachGroupAlive(
|
Set:ForEachGroupAlive(
|
||||||
function(grp)
|
function(grp)
|
||||||
local inAAASet = self.AAASet:IsIncludeObject(grp)
|
--local inAAASet = self.AAASet:IsIncludeObject(grp)
|
||||||
local inVehSet = self.VehicleSet:IsIncludeObject(grp)
|
--local inVehSet = self.VehicleSet:IsIncludeObject(grp)
|
||||||
local inSAMSet = self.SAMSet:IsIncludeObject(grp)
|
--local inSAMSet = self.SAMSet:IsIncludeObject(grp)
|
||||||
if grp:IsGround() and (not grp.Tiresias) and (not inAAASet) and (not inVehSet) and (not inSAMSet) then
|
if grp:IsGround() and (not grp.Tiresias) then --and (not inAAASet) and (not inVehSet) and (not inSAMSet) then
|
||||||
grp.Tiresias = exception_data
|
grp.Tiresias = exception_data
|
||||||
exceptions:AddGroup(grp, true)
|
exceptions:AddGroup(grp, true)
|
||||||
BASE:T(" TIRESIAS: Added exception group: " .. grp:GetName())
|
BASE:T(" TIRESIAS: Added exception group: " .. grp:GetName())
|
||||||
|
|||||||
Reference in New Issue
Block a user