Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- R=peripheral.wrap("back")
- rednet.open("top")
- --B=peripheral.wrap("top")
- C=peripheral.wrap("tile_enderio_blockcapacitorbank_name_0")
- mon=peripheral.wrap("right")
- function getStorage()
- RFcur=(C.getEnergyStored("top")+R.getEnergyStored())
- RFmax=(C.getMaxEnergyStored("top")+10000000)
- end
- mon.clear()
- while true do
- getStorage()
- mon.setCursorPos(1,1)
- mon.setTextScale(1.25)
- mon.write("Current storage:")
- mon.setCursorPos(1,2)
- mon.write(math.floor(RFcur/1000)
- .."kRF/"
- ..math.floor(RFmax/1000)
- .."kRF\t\t\t\t\t")
- sleep(1)
- getStorage()
- RF1=RFcur
- sleep(2)
- getStorage()
- RF2=RFcur
- RFT=math.floor((RF1-RF2)/40)
- mon.setCursorPos(1,4)
- mon.write(RFT.."RF/t \t\t\t\t")
- mon.setCursorPos(1,5)
- tLeft= RFcur/RFT/20/60
- if tLeft > 0 then
- mon.write("Power for "..math.floor(tLeft).."M")
- else
- mon.write("Fill in"..floor(RFmax/-RFT/20/60))
- end
- if RFcur/RFmax < .5 then
- R.setActive(true)
- end
- if RFcur/RFmax > .95 then
- R.setActive(false)
- end
- mon.setCursorPos(1,7)
- mon.write(math.floor(RFcur/RFmax*100)
- .."% full.")
- mon.setCursorPos(1,8)
- if R.getActive()==false then
- mon.write("Reactor off.")
- end
- if R.getActive()==true then
- mon.write("Reactor on. ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment