Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------------
- -- Version 0.1.1 --
- ------------------------------------------------------------------
- ------------------------Reaktoren---------------------------------
- local reaktor0 = peripheral.wrap("BigReactors-Reactor_0")
- ------------------------Monitore----------------------------------
- local mon1 = peripheral.wrap("monitor_0") --4:3 Monitor
- -- local mon2 = peripheral.wrap("monitor_4")
- ------------------------Capacitor----------------------------------
- local cap1 = peripheral.wrap("tile_blockcapacitorbank_name_0")
- --local cap2 = peripheral.wrap("tile_blockcapacitorbank_name_1")
- while true do
- ------------------------Reaktoren---------------------------------
- local reaktor0_energy = reaktor0.getEnergyStored()
- local reaktor0_status = reaktor0.getActive()
- ------------------------Capacitor----------------------------------
- local cap1_energy = cap1.getEnergyStored()
- local cap2_energy = 0
- -----------------------AN - AUS - Automatik------------------------
- if reaktor0_energy >= 9800000 then
- reaktor0.setActive(false)
- elseif reaktor0_energy <= 5000 then
- reaktor0.setActive(true)
- end
- ------------------------Anzeige1-----------------------------------
- -------------------------------------------------------------------
- mon1.clear()
- mon1.setBackgroundColor(colors.black)
- mon1.setCursorPos(1,1)
- mon1.setTextColor(colors.orange)
- mon1.write("Reaktor 1")
- -----------------------Status--------------------------------------
- mon1.setCursorPos(1,2)
- mon1.setTextColor(colors.yellow)
- mon1.write("Status: ")
- if reaktor0_status == true then
- mon1.setTextColor(colors.lime)
- elseif reaktor0_status == false then
- mon1.setTextColor(colors.red)
- end
- mon1.write(reaktor0_status)
- -----------------------Energie-------------------------------------
- mon1.setCursorPos(1,3)
- mon1.setTextColor(colors.blue)
- mon1.write("Energie: ")
- mon1.write(math.floor(reaktor0_energy / 100000))
- mon1.write(" MioRF / 100MioRF")
- -----------------------Capacitor-----------------------------------
- mon1.setCursorPos(1,6)
- mon1.setTextColor(colors.purple)
- mon1.write("Capacitor 1")
- mon1.setCursorPos(1,7)
- mon1.setTextColor(colors.green)
- mon1.write("Speicher: ")
- mon1.write(math.floor(cap1_energy / 100000))
- mon1.write(" MioRF / 10MioRF")
- mon1.setCursorPos(1,9)
- mon1.setTextColor(colors.purple)
- mon1.write("Capacitor 2")
- mon1.setCursorPos(1,10)
- mon1.setTextColor(colors.green)
- mon1.write("Speicher: ")
- mon1.write(math.floor(cap2_energy / 100000))
- mon1.write(" MioRF")
- ------------------------Anzeige2-----------------------------------
- -------------------------------------------------------------------
- --[[ mon2.clear()
- mon2.setCursorPos(1,1)
- mon2.setTextColor(colors.white)
- mon2.write("Reaktor 1")
- -----------------------Status--------------------------------------
- mon2.setCursorPos(1,2)
- mon2.setTextColor(colors.yellow)
- mon2.write("Status: ")
- if reaktor0_status == true then
- mon2.setTextColor(colors.lime)
- elseif reaktor0_status == false then
- mon2.setTextColor(colors.red)
- end mon2.write(reaktor0_status)
- -----------------------Energie-------------------------------------
- mon2.setCursorPos(1,3)
- mon2.setTextColor(colors.blue)
- mon2.write("Energie: ")
- mon2.write(math.floor(reaktor0_energy / 100000))
- mon2.write(" MioRF")
- ]]--
- sleep(0.010) -- 10 Millisekunden Pause
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement