Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("monitor_7")
- m2 = peripheral.wrap("monitor_8")
- m3 = peripheral.wrap("monitor_9")
- m4 = peripheral.wrap("monitor_10")
- m5 = peripheral.wrap("monitor_11")
- cap1 = peripheral.wrap("mfsu_2")
- cap2 = peripheral.wrap("mfsu_3")
- cap3 = peripheral.wrap("mfsu_4")
- cap4 = peripheral.wrap("mfsu_5")
- cap5 = peripheral.wrap("mfsu_6")
- cap6 = peripheral.wrap("mfsu_7")
- r1 = peripheral.wrap("nuclear_reactor_12")
- r2 = peripheral.wrap("nuclear_reactor_13")
- r3 = peripheral.wrap("nuclear_reactor_14")
- r4 = peripheral.wrap("nuclear_reactor_15")
- r5 = peripheral.wrap("nuclear_reactor_16")
- r6 = peripheral.wrap("nuclear_reactor_17")
- tableColors = {
- [1] = "White",
- [2] = "Orange",
- [4] = "Magenta",
- [8] = "LightBlue",
- [16] = "Yellow",
- [32] = "Lime",
- [64] = "Pink",
- [128] = "Gray",
- [256] = "LightGrey",
- [512] = "Cyan",
- [1024] = "Purple",
- [2048] = "Blue",
- [4096] = "Brown",
- [8192] = "Green",
- [16384] = "Red",
- [32768] = "Black"
- }
- tableColorsFull = {}
- colorString = "Kein weiterer String gesetzt"
- function TestColorTable()
- for bits = 1, #tableColors do
- bitter = (bit.band(rs.getBundledInput("right"), bit.blshift(1, bits)) ~=0)
- tableColorsFull[bits] = bitter
- end
- for colors = 1, #tableColors do
- if tableColorsFull[colors] == true then
- colorString = (" ,"..tableColors[colors])
- end
- end
- end
- function getSide()
- shell.run("clear")
- print("Before we begin:\n")
- print("on which side is the bundled Cable?")
- print("(top, bottom, left, right, back, front)\n")
- sideCheck = tostring(string.lower(read()))
- if sideCheck == "top" or sideCheck == "bottom" or sideCheck == "left" or sideCheck == "right" or sideCheck == "back" or sideCheck == "front" then
- print("\nYou specified \""..sideCheck.."\" as bundled Cable side")
- print("Is that correct? [Y/N]")
- print("")
- entryCheck = read()
- if entryCheck == "Y" or entryCheck == "y" then
- side = sideCheck
- term.setTextColor(colors.green)
- print("\nSuccessfully set \""..side.."\" as the active side!")
- term.setTextColor(colors.white)
- sleep(5)
- elseif entryCheck == "N" or entryCheck == "n" then
- term.setTextColor(colors.red)
- print("\nSide was not set!")
- term.setTextColor(colors.white)
- print("")
- print("PC is restarting in 5")
- sleep(1)
- print("PC is restarting in 4")
- sleep(1)
- print("PC is restarting in 3")
- sleep(1)
- print("PC is restarting in 2")
- sleep(1)
- print("PC is restarting in 1")
- sleep(1)
- print("PC is restarting in 0")
- sleep(1)
- os.reboot()
- else
- term.setTextColor(colors.red)
- print("\nEntry was wrong!")
- term.setTextColor(colors.white)
- print("")
- print("PC is restarting in 10 Seconds")
- sleep(5)
- print("PC is restarting in 5")
- sleep(1)
- print("PC is restarting in 4")
- sleep(1)
- print("PC is restarting in 3")
- sleep(1)
- print("PC is restarting in 2")
- sleep(1)
- print("PC is restarting in 1")
- sleep(1)
- print("PC is restarting in 0")
- sleep(1)
- os.reboot()
- end
- else
- term.setTextColor(colors.red)
- print("\nThe computer says NO to \""..sideCheck.."\"")
- print("because \""..sideCheck.."\" it is not a valid side")
- term.setTextColor(colors.white)
- print("\nPC is restarting in 10 Seconds")
- sleep(5)
- print("PC is restarting in 5")
- sleep(1)
- print("PC is restarting in 4")
- sleep(1)
- print("PC is restarting in 3")
- sleep(1)
- print("PC is restarting in 2")
- sleep(1)
- print("PC is restarting in 1")
- sleep(1)
- print("PC is restarting in 0")
- sleep(1)
- os.reboot()
- end
- end
- --[[function ExitDoor()
- --Exit Inner Door: 8
- --Exit Outer Door: 4
- --Entry Inner Door: 2
- --Entry Outer Door: 1
- if rs.getBundledInput(side) == 4 or rs.getBundledInput("left") == 8 then
- m.setCursorPos(1,3)
- m.write("Exit DoubleDoorSystem Control:")
- m.setCursorPos(1,4)
- m.setTextColor(colors.red)
- m.write("DoubleDoorSystem active!")
- m.setTextColor(colors.white)
- if rs.getBundledInput(side) == 8 then
- m.setCursorPos(1,6)
- m.setTextColor(colors.red)
- m.write("Inner Door Open!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,7)
- m.setTextColor(colors.green)
- m.write("Outer Door Closed!")
- m.setTextColor(colors.white)
- elseif rs.getBundledInput(side) == 4 then
- m.setCursorPos(1,7)
- m.setTextColor(colors.red)
- m.write("Outer Door Open!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,6)
- m.setTextColor(colors.green)
- m.write("Inner Door Closed!")
- m.setTextColor(colors.white)
- end
- else
- m.setCursorPos(1,3)
- m.write("Exit DoubleDoorSystem Control:")
- m.setCursorPos(1,4)
- m.setTextColor(colors.green)
- m.write("DoubleDoorSystem inactive!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,6)
- m.setTextColor(colors.green)
- m.write("Inner Door Closed!")
- m.setCursorPos(1,7)
- m.write("Outer Door Closed!")
- m.setTextColor(colors.white)
- end
- end
- function EntryDoor()
- if rs.getBundledInput(side) == 1 or rs.getBundledInput("left") == 2 then
- m.setCursorPos(1,9)
- m.write("Entry DoubleDoorSystem Control:")
- m.setCursorPos(1,10)
- m.setTextColor(colors.red)
- m.write("DoubleDoorSystem active!")
- m.setTextColor(colors.white)
- if rs.getBundledInput(side) == 2 then
- m.setCursorPos(1,12)
- m.setTextColor(colors.red)
- m.write("Inner Door Open!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,13)
- m.setTextColor(colors.green)
- m.write("Outer Door Closed!")
- m.setTextColor(colors.white)
- elseif rs.getBundledInput(side) == 1 then
- m.setCursorPos(1,13)
- m.setTextColor(colors.red)
- m.write("Outer Door Open!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,12)
- m.setTextColor(colors.green)
- m.write("Inner Door Closed!")
- m.setTextColor(colors.white)
- end
- else
- m.setCursorPos(1,9)
- m.write("Entry DoubleDoorSystem Control:")
- m.setCursorPos(1,10)
- m.setTextColor(colors.green)
- m.write("DoubleDoorSystem inactive!")
- m.setTextColor(colors.white)
- m.setCursorPos(1,12)
- m.setTextColor(colors.green)
- m.write("Inner Door Closed!")
- m.setCursorPos(1,13)
- m.write("Outer Door Closed!")
- m.setTextColor(colors.white)
- end
- end
- ]]
- function getHeatData()
- r1Temp = tonumber(r1.getHeat())
- r2Temp = tonumber(r2.getHeat())
- r3Temp = tonumber(r3.getHeat())
- r4Temp = tonumber(r4.getHeat())
- r5Temp = tonumber(r5.getHeat())
- r6Temp = tonumber(r6.getHeat())
- end
- function getEnergyData()
- r1EU = tonumber(r1.getEUOutput())
- r2EU = tonumber(r2.getEUOutput())
- r3EU = tonumber(r3.getEUOutput())
- r4EU = tonumber(r4.getEUOutput())
- r5EU = tonumber(r5.getEUOutput())
- r6EU = tonumber(r6.getEUOutput())
- end
- function getActivityData()
- r1Act = (r1EU > 0)
- r2Act = (r2EU > 0)
- r3Act = (r3EU > 0)
- r4Act = (r4EU > 0)
- r5Act = (r5EU > 0)
- r6Act = (r6EU > 0)
- end
- function printActivityData()
- if r1Act then
- m.setCursorPos(1,4)
- m.write("Reactor 1 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,5)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,4)
- m.write("Reactor 1 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,5)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- if r2Act then
- m.setCursorPos(1,7)
- m.write("Reactor 2 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,8)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,7)
- m.write("Reactor 2 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,8)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- if r3Act then
- m.setCursorPos(1,10)
- m.write("Reactor 3 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,11)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,10)
- m.write("Reactor 3 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,11)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- if r4Act then
- m.setCursorPos(1,13)
- m.write("Reactor 4 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,14)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,13)
- m.write("Reactor 4 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,14)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- if r5Act then
- m.setCursorPos(1,16)
- m.write("Reactor 5 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,17)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,16)
- m.write("Reactor 5 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,17)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- if r6Act then
- m.setCursorPos(1,19)
- m.write("Reactor 6 :")
- m.setTextColor(colors.red)
- m.setCursorPos(1,20)
- m.write("Active")
- m.setTextColor(colors.white)
- else
- m.setCursorPos(1,19)
- m.write("Reactor 6 :")
- m.setTextColor(colors.green)
- m.setCursorPos(1,20)
- m.write("Inactive")
- m.setTextColor(colors.white)
- end
- end
- function makeReactorEnergyColor()
- if r1EU > 0 then
- r1color = colors.red
- else
- r1color = colors.green
- end
- if r2EU > 0 then
- r2color = colors.red
- else
- r2color = colors.green
- end
- if r3EU > 0 then
- r3color = colors.red
- else
- r3color = colors.green
- end
- if r4EU > 0 then
- r4color = colors.red
- else
- r4color = colors.green
- end
- if r5EU > 0 then
- r5color = colors.red
- else
- r5color = colors.green
- end
- if r6EU > 0 then
- r6color = colors.red
- else
- r6color = colors.green
- end
- end
- function makeReactorHeatColor()
- if r1Temp >= 0 and r1Temp <= 3000 then
- r1TempColor = tonumber(8192)
- elseif r1Temp > 3000 and r1Temp <= 5000 then
- r1TempColor = tonumber(32)
- elseif r1Temp > 5000 and r1Temp <= 7000 then
- r1TempColor = tonumber(16)
- elseif r1Temp > 7000 and r1Temp <= 9000 then
- r1TempColor = tonumber(2)
- else
- r1TempColor = tonumber(16384)
- end
- if r2Temp >= 0 and r2Temp <= 3000 then
- r2TempColor = tonumber(8192)
- elseif r2Temp > 3000 and r2Temp <= 5000 then
- r2TempColor = tonumber(32)
- elseif r2Temp > 5000 and r2Temp <= 7000 then
- r2TempColor = tonumber(16)
- elseif r2Temp > 7000 and r2Temp <= 9000 then
- r2TempColor = tonumber(2)
- else
- r2TempColor = tonumber(16384)
- end
- if r3Temp >= 0 and r3Temp <= 3000 then
- r3TempColor = tonumber(8192)
- elseif r3Temp > 3000 and r3Temp <= 5000 then
- r3TempColor = tonumber(32)
- elseif r3Temp > 5000 and r3Temp <= 7000 then
- r3TempColor = tonumber(16)
- elseif r3Temp > 7000 and r3Temp <= 9000 then
- r3TempColor = tonumber(2)
- else
- r3TempColor = tonumber(16384)
- end
- if r4Temp >= 0 and r4Temp <= 3000 then
- r4TempColor = tonumber(8192)
- elseif r1Temp > 3000 and r4Temp <= 5000 then
- r4TempColor = tonumber(32)
- elseif r1Temp > 5000 and r4Temp <= 7000 then
- r4TempColor = tonumber(16)
- elseif r1Temp > 7000 and r4Temp <= 9000 then
- r4TempColor = tonumber(2)
- else
- r4TempColor = tonumber(16384)
- end
- if r5Temp >= 0 and r5Temp <= 3000 then
- r5TempColor = tonumber(8192)
- elseif r1Temp > 3000 and r5Temp <= 5000 then
- r5TempColor = tonumber(32)
- elseif r1Temp > 5000 and r5Temp <= 7000 then
- r5TempColor = tonumber(16)
- elseif r1Temp > 7000 and r5Temp <= 9000 then
- r5TempColor = tonumber(2)
- else
- r5TempColor = tonumber(16384)
- end
- if r6Temp >= 0 and r6Temp <= 3000 then
- r6TempColor = tonumber(8192)
- elseif r1Temp > 3000 and r6Temp <= 5000 then
- r6TempColor = tonumber(32)
- elseif r1Temp > 5000 and r6Temp <= 7000 then
- r6TempColor = tonumber(16)
- elseif r1Temp > 7000 and r6Temp <= 9000 then
- r6TempColor = tonumber(2)
- else
- r6TempColor = tonumber(16384)
- end
- end
- function printEnergyData()
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,4)
- m2.write("Reactor 1 Energy:")
- m2.setCursorPos(1,5)
- m2.setTextColor(r1color)
- m2.write((r1EU*5).." EU/t")
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,7)
- m2.write("Reactor 2 Energy:")
- m2.setCursorPos(1,8)
- m2.setTextColor(r2color)
- m2.write((r2EU*5).." EU/t")
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,10)
- m2.write("Reactor 3 Energy:")
- m2.setCursorPos(1,11)
- m2.setTextColor(r3color)
- m2.write((r3EU*5).." EU/t")
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,13)
- m2.write("Reactor 4 Energy:")
- m2.setCursorPos(1,14)
- m2.setTextColor(r4color)
- m2.write((r4EU*5).." EU/t")
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,16)
- m2.write("Reactor 5 Energy:")
- m2.setCursorPos(1,17)
- m2.setTextColor(r5color)
- m2.write((r5EU*5).." EU/t")
- m2.setTextColor(colors.white)
- m2.setCursorPos(1,19)
- m2.write("Reactor 6 Energy:")
- m2.setCursorPos(1,20)
- m2.setTextColor(r6color)
- m2.write((r6EU*5).." EU/t")
- m2.setTextColor(colors.white)
- end
- function printHeatData()
- m4.setCursorPos(1,4)
- m4.write("Temperature Reactor 1: ")
- m4.setTextColor(r1TempColor)
- m4.setCursorPos(1,5)
- m4.write(r1Temp.." Deg.")
- m4.setTextColor(colors.white)
- m4.setCursorPos(1,7)
- m4.write("Temperature Reactor 2: ")
- m4.setTextColor(r2TempColor)
- m4.setCursorPos(1,8)
- m4.write(r2Temp.." Deg.")
- m4.setTextColor(colors.white)
- m4.setCursorPos(1,10)
- m4.write("Temperature Reactor 3: ")
- m4.setTextColor(r3TempColor)
- m4.setCursorPos(1,11)
- m4.write(r3Temp.." Deg.")
- m4.setTextColor(colors.white)
- m4.setCursorPos(1,13)
- m4.write("Temperature Reactor 4: ")
- m4.setTextColor(r4TempColor)
- m4.setCursorPos(1,14)
- m4.write(r4Temp.." Deg.")
- m4.setTextColor(colors.white)
- m4.setCursorPos(1,16)
- m4.write("Temperature Reactor 5: ")
- m4.setTextColor(r5TempColor)
- m4.setCursorPos(1,17)
- m4.write(r5Temp.." Deg.")
- m4.setTextColor(colors.white)
- m4.setCursorPos(1,19)
- m4.write("Temperature Reactor 6: ")
- m4.setTextColor(r6TempColor)
- m4.setCursorPos(1,20)
- m4.write(r6Temp.." Deg.")
- m4.setTextColor(colors.white)
- end
- function getCapacitorData()
- MaxEU1 = tonumber(cap1.getEUCapacity())
- MaxEU2 = tonumber(cap2.getEUCapacity())
- MaxEU3 = tonumber(cap1.getEUCapacity())
- MaxEU4 = tonumber(cap2.getEUCapacity())
- MaxEU5 = tonumber(cap1.getEUCapacity())
- MaxEU6 = tonumber(cap2.getEUCapacity())
- EU1 = tonumber(cap1.getEUStored())
- EU2 = tonumber(cap2.getEUStored())
- EU3 = tonumber(cap1.getEUStored())
- EU4 = tonumber(cap2.getEUStored())
- EU5 = tonumber(cap1.getEUStored())
- EU6 = tonumber(cap2.getEUStored())
- end
- function format_thousand(v)
- local s = string.format("%d", math.floor(v))
- local pos = string.len(s) % 3
- if pos == 0 then pos = 3 end
- return string.sub(s, 1, pos)
- .. string.gsub(string.sub(s, pos+1), "(...)", ",%1")
- .. string.sub(string.format("%.2f", v - math.floor(v)), 2)
- end
- function makeMFSUColor()
- if EU1 >= 0 and EU1 <= 10000000 then
- MFSU1Color = colors.green
- elseif EU1 > 10000000 and EU1 <= 25000000 then
- MFSU1Color = colors.lime
- elseif EU1 > 25000000 and EU1 <= 35000000 then
- MFSU1Color = colors.yellow
- elseif EU1 > 35000000 and EU1 < 40000000 then
- MFSU1Color = colors.orange
- else
- MFSU1Color = colors.red
- end
- if EU2 >= 0 and EU2 <= 10000000 then
- MFSU2Color = colors.green
- elseif EU2 > 10000000 and EU2 <= 25000000 then
- MFSU2Color = colors.lime
- elseif EU2 > 25000000 and EU2 <= 35000000 then
- MFSU2Color = colors.yellow
- elseif EU2 > 35000000 and EU2 < 40000000 then
- MFSU2Color = colors.orange
- else
- MFSU2Color = colors.red
- end
- if EU3 >= 0 and EU3 <= 10000000 then
- MFSU3Color = colors.green
- elseif EU3 > 10000000 and EU3 <= 25000000 then
- MFSU3Color = colors.lime
- elseif EU3 > 25000000 and EU3 <= 35000000 then
- MFSU3Color = colors.yellow
- elseif EU3 > 35000000 and EU3 < 40000000 then
- MFSU3Color = colors.orange
- else
- MFSU3Color = colors.red
- end
- if EU4 >= 0 and EU4 <= 10000000 then
- MFSU4Color = colors.green
- elseif EU4 > 10000000 and EU4 <= 25000000 then
- MFSU4Color = colors.lime
- elseif EU4 > 25000000 and EU4 <= 35000000 then
- MFSU4Color = colors.yellow
- elseif EU4 > 35000000 and EU4 < 40000000 then
- MFSU4Color = colors.orange
- else
- MFSU4Color = colors.red
- end
- if EU5 >= 0 and EU5 <= 10000000 then
- MFSU5Color = colors.green
- elseif EU5 > 10000000 and EU5 <= 25000000 then
- MFSU5Color = colors.lime
- elseif EU5 > 25000000 and EU5 <= 35000000 then
- MFSU5Color = colors.yellow
- elseif EU5 > 35000000 and EU5 < 40000000 then
- MFSU5Color = colors.orange
- else
- MFSU5Color = colors.red
- end
- if EU6 >= 0 and EU6 <= 10000000 then
- MFSU6Color = colors.green
- elseif EU6 > 10000000 and EU6 <= 25000000 then
- MFSU6Color = colors.lime
- elseif EU6 > 25000000 and EU6 <= 35000000 then
- MFSU6Color = colors.yellow
- elseif EU6 > 35000000 and EU6 < 40000000 then
- MFSU6Color = colors.orange
- else
- MFSU6Color = colors.red
- end
- end
- function printCapacitorData()
- m3.setCursorPos(1,4)
- m3.setTextColor(colors.white)
- m3.write("MFSU 1:")
- m3.setCursorPos(1,5)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU1).."/"..format_thousand(MaxEU1))
- m3.setCursorPos(1,7)
- m3.setTextColor(colors.white)
- m3.write("MFSU 2:")
- m3.setCursorPos(1,8)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU2).."/"..format_thousand(MaxEU2))
- m3.setCursorPos(1,10)
- m3.setTextColor(colors.white)
- m3.write("MFSU 3:")
- m3.setCursorPos(1,11)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU3).."/"..format_thousand(MaxEU3))
- m3.setCursorPos(1,13)
- m3.setTextColor(colors.white)
- m3.write("MFSU 4:")
- m3.setCursorPos(1,14)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU4).."/"..format_thousand(MaxEU4))
- m3.setCursorPos(1,16)
- m3.setTextColor(colors.white)
- m3.write("MFSU 5:")
- m3.setCursorPos(1,17)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU5).."/"..format_thousand(MaxEU5))
- m3.setCursorPos(1,19)
- m3.setTextColor(colors.white)
- m3.write("MFSU 6:")
- m3.setCursorPos(1,20)
- m3.setTextColor(MFSU1Color)
- m3.write(format_thousand(EU6).."/"..format_thousand(MaxEU6))
- end
- function emergencyStop()
- if r1Temp > 8000 or r2Temp > 8000 or r3Temp > 8000 or r4Temp > 8000 or r5Temp > 8000 or r6Temp > 8000 then
- rs.setBundledOutput(side, colors.red)
- end
- end
- function getEmergencyStopStatus()
- getTime = os.time()
- time = textutils.formatTime(getTime, false)
- if rs.getBundledInput(side) == colors.black then
- emergencyStopStatus = "STOPPED"
- statusColor = colors.red
- ok = false
- elseif rs.getBundledInput(side) == colors.green then
- emergencyStopStatus = "OK"
- statusColor = colors.green
- ok = true
- elseif rs.getBundledInput(side) == colors.red then
- rs.setBundledOutput(side, 0)
- ok = false
- else
- print("Something went wrong!")
- end
- return ok
- end
- function printEmergencyStop()
- m.setCursorPos(1,22)
- m2.setCursorPos(1,22)
- m3.setCursorPos(1,22)
- m4.setCursorPos(1,22)
- m5.setCursorPos(1,22)
- m.write(time..": Status, ")
- m.setTextColor(statusColor)
- m.write(emergencyStopStatus)
- m.setTextColor(colors.white)
- m2.write(time..": Status, ")
- m2.setTextColor(statusColor)
- m2.write(emergencyStopStatus)
- m2.setTextColor(colors.white)
- m3.write(time..": Status, ")
- m3.setTextColor(statusColor)
- m3.write(emergencyStopStatus)
- m3.setTextColor(colors.white)
- m4.write(time..": Status, ")
- m4.setTextColor(statusColor)
- m4.write(emergencyStopStatus)
- m4.setTextColor(colors.white)
- m5.write(time..": Status, ")
- m5.setTextColor(statusColor)
- m5.write(emergencyStopStatus)
- m5.setTextColor(colors.white)
- end
- function getData()
- getHeatData()
- getEnergyData()
- getActivityData()
- getCapacitorData()
- end
- function printData()
- --ExitDoor()
- --EntryDoor()
- printHeatData()
- printEnergyData()
- printActivityData()
- printCapacitorData()
- end
- function color()
- makeReactorEnergyColor()
- makeReactorHeatColor()
- makeMFSUColor()
- end
- function testEmergencyStop()
- r1Temp = r1Temp + 200
- end
- getSide()
- --r1Temp = 0
- while true do
- getData()
- emergencyStop()
- getEmergencyStopStatus()
- if ok == true then
- m.clear()
- m2.clear()
- m3.clear()
- m4.clear()
- m5.clear()
- m.setTextScale(1.5)
- m2.setTextScale(1.5)
- m3.setTextScale(1.5)
- m4.setTextScale(1.5)
- m5.setTextScale(1.5)
- m.setCursorPos(1,1)
- m2.setCursorPos(1,1)
- m3.setCursorPos(1,1)
- m4.setCursorPos(1,1)
- m5.setCursorPos(1,1)
- m.setTextColor(colors.white)
- m2.setTextColor(colors.white)
- m3.setTextColor(colors.white)
- m4.setTextColor(colors.white)
- m5.setTextColor(colors.white)
- m.write("Nuclear Control:")
- m2.write("Energy Overview Reactors:")
- m3.write("Energy Overview MFSU:")
- m4.write("Temperature Overview:")
- m5.write("Door Control:")
- m5.setCursorPos(1,4)
- m5.write("Not yet implemented")
- m5.setCursorPos(1,5)
- m5.write("Coming soon!")
- getData()
- --testEmergencyStop()
- color()
- printEmergencyStop()
- printData()
- sleep(0.2)
- shell.run("clear")
- print("Emergencystop Status: "..emergencyStopStatus)
- print("It is "..time)
- print("Redstone side is: "..side)
- TestColorTable()
- print(colorString)
- else
- getEmergencyStopStatus()
- printEmergencyStop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement