v0.2.0 - Added startup apps and an event handler process (unfinished)

This commit is contained in:
TheWahlolly
2025-04-03 21:19:50 +03:00
parent 4adc959549
commit 7b8e237abe
10 changed files with 742 additions and 690 deletions
+17
View File
@@ -0,0 +1,17 @@
_G.evmgr = {}
_G.evmgr.eventQueue = {}
local maxEventQueueLength = 10 -- increase if events start getting dropped
while true do
local args
repeat
args = computer.pullSignal(0)
if args then
table.insert(evmgr.eventQueue, table.pack(computer.uptime(), args))
while #evmgr.eventQueue > maxEventQueueLength do
table.remove(evmgr.eventQueue, 1)
end
end
until not args
coroutine.yield()
end