mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
First prototype of the scheduler dispatcher is ready... It works, but the code was very difficult...
So, when the Scheduler that is passed to the AddScheduler is nillified, the internal arrays that keep the Scheduler reference are also nillified. And it does what i need for further utilization in MOOSE classes. When the Scheduler is nillified, but, a schedule was planned for that Scheduler, once the scheduler fires off, it will ignore that call... cool. Sven
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
--- The EVENT class models an efficient event handling process between other classes and its units, weapons.
|
||||
--- This module contains the EVENT class.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Takes care of EVENT dispatching between DCS events and event handling functions defined in MOOSE classes.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The above menus classes **are derived** from 2 main **abstract** classes defined within the MOOSE framework (so don't use these):
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Contributions: -
|
||||
-- ### Authors: FlightControl : Design & Programming
|
||||
--
|
||||
-- @module Event
|
||||
-- @author FlightControl
|
||||
|
||||
--- The EVENT structure
|
||||
-- @type EVENT
|
||||
@@ -93,7 +106,7 @@ function EVENT:Init( EventID, EventClass )
|
||||
end
|
||||
|
||||
if not self.Events[EventID][EventClass] then
|
||||
self.Events[EventID][EventClass] = setmetatable( {}, { __mode = "v" } )
|
||||
self.Events[EventID][EventClass] = setmetatable( {}, { __mode = "k" } )
|
||||
end
|
||||
return self.Events[EventID][EventClass]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user