1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2026-01-10 00:12:28 -05:00

services: Add missing returns

This commit is contained in:
Amanda Cameron 2025-09-08 12:38:20 +00:00
parent 1c647c76fe
commit 3ba84ca3b7
5 changed files with 31 additions and 17 deletions

View File

@ -15,3 +15,4 @@ function start()
end end
end) end)
end end
return {start=start}

View File

@ -21,5 +21,6 @@ function start()
state = false state = false
end end
end end
end,"screenblank") end, "screenblank")
end end
return {start=start}

View File

@ -16,7 +16,10 @@ end
for addr in component.list("tape_drive") do for addr in component.list("tape_drive") do
addNode(addr) addNode(addr)
end end
while true do
function start()
return os.spawn(function()
while true do
local tE = {coroutine.yield()} local tE = {coroutine.yield()}
if tE[1] == "component_added" and tE[3] == "tape_drive" then if tE[1] == "component_added" and tE[3] == "tape_drive" then
addNode(tE[2]) addNode(tE[2])
@ -25,4 +28,7 @@ while true do
fs.remove("/dev/tape"..tostring(td[tE[2]])) fs.remove("/dev/tape"..tostring(td[tE[2]]))
end end
end end
end
end, "tape-devfs")
end end
return {start=start}

View File

@ -61,3 +61,4 @@ function start()
end end
end,"termsrv") end,"termsrv")
end end
return {start=start}

View File

@ -6,8 +6,10 @@ for modem in component.list("modem") do
component.invoke(modem,"setWakeMessage",message) component.invoke(modem,"setWakeMessage",message)
end end
local ltime = computer.uptime() function start()
while true do return os.spawn(function()
local ltime = computer.uptime()
while true do
if computer.uptime() > ltime+delay then if computer.uptime() > ltime+delay then
for modem in component.list("modem") do for modem in component.list("modem") do
component.invoke(modem,"broadcast",port,message) component.invoke(modem,"broadcast",port,message)
@ -15,4 +17,7 @@ while true do
ltime=computer.uptime() ltime=computer.uptime()
end end
coroutine.yield() coroutine.yield()
end
end, "WoLBeacon")
end end
return {start=start}