-- screen functions
function newpage(rstat,cstat)
term.setCursorPos(1,1)
term.clearLine()
term.setCursorPos(1,1)
print("-------------------------------------------------")
term.setCursorPos(1,2)
term.clearLine()
print("- Welcome to NukeOS -")
term.setCursorPos(1,3)
term.clearLine()
print("- Ver. 1.0 -")
term.setCursorPos(1,4)
term.clearLine()
print("-------------------------------------------------")
term.setCursorPos(1,5)
term.clearLine()
term.setCursorPos(1,6)
term.clearLine()
term.setCursorPos(1,7)
term.clearLine()
term.setCursorPos(1,8)
term.clearLine()
term.setCursorPos(1,9)
term.clearLine()
term.setCursorPos(1,10)
term.clearLine()
term.setCursorPos(1,11)
term.clearLine()
term.setCursorPos(1,12)
term.clearLine()
term.setCursorPos(1,13)
term.clearLine()
term.setCursorPos(1,14)
term.clearLine()
term.setCursorPos(1,15)
term.clearLine()
term.setCursorPos(1,16)
print("Coolant Status:")
term.setCursorPos(1,17)
print("Reactor Status:")
term.setCursorPos(1,5)
end
-- end screen functions
-- action functions -- I thought that all of these functions would command it to
function rcon() -- turn the outputs on/off when ever they are called to later in the code.
rs.setBundledOutput("back",colors.red) -- But so far, the cables have not been outputting ANY signal!
end -- Did I do something wrong?
function rcoff()
rs.setBundledOutput("back", colors.subtract(colors.red))
end
function coolon()
rs.setBundledOutput("back",colors.blue)
end
function cooloff()
rs.setBundledOutput("back",colors.subtract(colors.red))
end
-- end action functions
-- var
-- end vars
newpage()
print(" Please enter Password ")
term.setCursorPos(1,11)
write("PASSWORD:")
while true do
correctpass = "redvsblue"
password = io.read()
if password == (correctpass) then
while true do
newpage()
print("Please Select Function:")
print("1. Start Reactor")
print("2. Shutdown Reactor")
print("3. Logoff")
term.setCursorPos(1,10)
write("Selection:")
local menuinput = io.read()
if menuinput == "1" then
print("Reactor Starting...")
sleep(2)
print("Starting Coolant System...")
coolon()
sleep(2)
term.setCursorPos(1,16)
term.clearLine()
print("Coolant Status: On ")
term.setCursorPos(1,13)
print("Initiating Nuclear Reaction...")
rcon()
sleep(2)
term.setCursorPos(1,17)
term.clearLine()
print("Reactor Status: On ")
term.setCursorPos(1,14)
term.clearLine()
print("Reactor is now Online")
sleep(2)
elseif menuinput == "2" then
print("Reactor Shutting Off")
sleep(2)
print("Halting Nuclear Reaction...")
rcoff()
term.setCursorPos(1,17)
term.clearLine()
print("Reactor Status: Off")
term.setCursorPos(1,13)
sleep(2)
print("Shutting Down Coolant Flow...")
cooloff()
sleep(2)
term.setCursorPos(1,16)
term.clearLine()
print("Coolant Status: Off")
term.setCursorPos(1,14)
print("Reactor is now Off")
sleep(2)
elseif menuinput == "3" then
print("Thank you for using NukeOS")
print("The Reactor will now shut down")
print("Goodbye")
sleep(2)
os.reboot()
else
print("Incorrect command. Try Again.")
sleep(2)
end
end
else
print("INCORRECT PASSWORD")
print("Please try again.")
sleep(1)
term.setCursorPos(10,11)
end
end
Tagged is where I think the problem lies, be even after setting the first line of the code to set the bundled output to white just to test, the white cable did bupkiss. I am at a total loss as to what I did wrong.