Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local reactor1 = peripheral.wrap("BigReactors-Reactor_0")
- local monitors = {
- peripheral.wrap("monitor_0"),
- peripheral.wrap("monitor_1"),
- }
- -- Funktionen fΓΌr mehrere Monitore
- local function clear()
- for _,mon in pairs(monitors) do
- mon.clear()
- end
- end
- local function textScale()
- for _,mon in pairs(monitors) do
- mon.setTextScale(2)
- end
- end
- local function cursorPos(left, top)
- for _,mon in pairs(monitors) do
- mon.setCursorPos(left, top)
- end
- end
- local function textColor(color)
- for _,mon in pairs(monitors) do
- mon.setTextColor(color)
- end
- end
- local function print_on_screen(text)
- for _,mon in pairs(monitors) do
- mon.write(text)
- end
- end
- -- Begin Reactor 1
- clear()
- textScale()
- cursorPos(1,1)
- textColor(colors.white)
- print_on_screen("Reaktor aktiv: ")
- if reactor1.getActive() == true then
- textColor(colors.lime)
- print_on_screen("Ja")
- else
- textColor(colors.red)
- print_on_screen("Nein")
- end
- cursorPos(1,4)
- textColor(colors.white)
- print_on_screen("Temperatur: ")
- textColor(colors.lime)
- print_on_screen(math.floor(reactor1.getTemperature()))
- print_on_screen(" C")
- cursorPos(1,5)
- textColor(colors.white)
- print_on_screen("Control-Rods: ")
- textColor(colors.lime)
- print_on_screen(math.floor(reactor1.getNumberOfControlRods()))
- cursorPos(1,6)
- textColor(colors.white)
- print_on_screen("Gespeicherte Energie: ")
- if math.floor(reactor1.getEnergyStored()) < 10000 then
- textColor(colors.red)
- else
- textColor(colors.lime)
- end
- print_on_screen(math.floor(reactor1.getEnergyStored()))
- cursorPos(1,7)
- textColor(colors.white)
- print_on_screen("Verschwendung in mB: ")
- if math.floor(reactor1.getWasteAmount()) > 100 then
- textColor(colors.red)
- else
- textColor(colors.lime)
- end
- print_on_screen(math.floor(reactor1.getWasteAmount()))
- cursorPos(1,8)
- if math.floor(reactor1.getEnergyStored()) < 8000000 then
- reactor1.setAllControlRodLevels(0)
- textColor(colors.white)
- print_on_screen("Control-Rods Level: ")
- textColor(colors.red)
- print_on_screen("0")
- else
- reactor1.setAllControlRodLevels(90)
- textColor(colors.white)
- print_on_screen("Control-Rods Level: ")
- textColor(colors.lime)
- print_on_screen("90")
- end
- -- End Reactor 1
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment