added controll room alarm

This commit is contained in:
2025-06-15 18:36:47 -04:00
parent 1403a45fa2
commit 1a6f7fe882
4 changed files with 71 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
kernel = require("kernel")
--local reactor = peripheral.find("fissionReactorLogicAdapter")
speakerDriver = kernel.addDriver("speaker_driver")
local modem = peripheral.find("modem")
local monitor = peripheral.wrap("top")
controlRoomSpeakers = peripheral.find("speaker")
function setNewLine()
local x,y = monitor.getCursorPos()
@@ -9,9 +10,15 @@ function setNewLine()
monitor.clearLine()
end
local function startup()
speakerDriver.startup()
speakerDriver.playControlRoomAlarm(controlRoomSpeakers)
end
local function run()
monitor.setTextScale(0.5)
monitor.setCursorPos(1,0)
startup()
while true do
setNewLine()
monitor.write("Checking for reactor status...")