Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --CONFIG--
- side = "bottom"
- local OP = 0
- --FUNCTIONS--
- function Clear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- function saveState2()
- file = fs.open("state", "w")
- file.writeLine((colors.test(rs.getBundledOutput(side), colors.white)))
- file.writeLine((colors.test(rs.getBundledOutput(side), colors.orange)))
- file.writeLine((colors.test(rs.getBundledOutput(side), colors.magenta)))
- file.writeLine((colors.test(rs.getBundledOutput(side), colors.lightBlue)))
- file.close()
- end
- function loadState2()
- file = fs.open("state", "r")
- shell.run("redset", side, "white", file.readLine())
- shell.run("redset", side, "orange", file.readLine())
- shell.run("redset", side, "magenta", file.readLine())
- shell.run("redset", side, "lightBlue", file.readLine())
- file.close()
- end
- function saveState()
- file = fs.open("state", "w")
- end
- --CODE--
- Clear()
- print("N1ghtK1n9's Computer")
- term.setCursorPos(1, 3)
- write"> "
- input = read()
- if input == "engines" then
- Clear()
- outE = rs.getBundledOutput(side, colors.white)
- if outE == true then
- print("Turning Engines Off.")
- rs.setBundledOutput(side, colors.subtract(OP, colors.white))
- elseif outE == false then
- print("Turning Engines On")
- rs.setBundeldOutput(side, colors.combine(OP, colors.white))
- end
- elseif input == ("refineries") then
- Clear()
- outR = rs.getBundledOutput(side, colors.orange)
- if outR == true then
- print("Turning Refineries Off")
- rs.setBundeldOutput(side, colors.subtract(OP, colors.orange))
- elseif outE == false then
- print("Turning Engines On")
- rs.setBundledOutput(side, colors.combine(OP, colors.orange))
- end
- elseif input == "geothermal" then
- Clear()
- outG = rs.getBundledOutput(side, colors.magenta)
- if outG == true then
- print("Turning Geothermal Generators Off")
- rs.setBundledOutput(side, colors.subtract(OP, colors.magenta))
- elseif outG == false then
- print("Turning Engines On")
- rs.setBundledOutput(side, colors.combine(OP, colors.magenta))
- end
- elseif input == "enginecoolant" then
- Clear()
- outEC = rs.getBundledOutput(side, colors.lightBlue)
- if outEC == true then
- print("Turning Engine Coolant Off")
- rs.setBundledOutput(side,colors.subtract(OP, colors.lightBlue))
- elseif outEC == false then
- print("Turning Engine Coolant On")
- rs.setBundeldedOutput(side, colors.combine(OP, colors.lightBlue))
- end
- elseif input == "reboot" then
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment