Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local e = peripheral.find("BigReactors-Reactor")
- local cube = peripheral.find("draconic_rf_storage")
- mon = peripheral.wrap("back")
- function Check()
- if e == nil then
- print("Big Reactor non detecter")
- sleep(5)
- end
- if cube == nil then
- print("Draconic Evolution Storage non detecter")
- sleep(5)
- end
- if e ~= nil and cube ~= nil then
- print("Tout est detecter, alimentation des ecrans !")
- end
- end
- function clear()
- mon.clear()
- mon.setTextScale(1)
- end
- function lastFuel() --Fuel Utiliser
- local ye = e.getFuelConsumedLastTick()
- mon.setCursorPos(1,1)
- textColor("white")
- mon.write("Mb/t :")
- mon.setCursorPos(1,2)
- textColor("yellow")
- mon.write(ye)
- end
- function lastProduced() --Energy Produit
- local en = e.getEnergyProducedLastTick()
- mon.setCursorPos(1,3)
- textColor("white")
- mon.write("RF/t :")
- textColor("orange")
- mon.setCursorPos(1,4)
- mon.write(en)
- end
- function energyStock() --Energy Stocker
- local s = cube.getEnergyStored("unknown")
- mon.setCursorPos(1,5)
- textColor("white")
- mon.write("Energie Stocker :")
- textColor("cyan")
- mon.setCursorPos(1,6)
- mon.write(s)
- end
- function energyPercent()
- local p = cube.getEnergyStored("unknown")/cube.getMaxEnergyStored("unknown")*100
- mon.setCursorPos(1,7)
- textColor("white")
- mon.write("Pourcentage de Stockage :")
- textColor("cyan")
- mon.setCursorPos(1,8)
- mon.write(p.." %")
- sleep(5)
- end
- function textColor(w)
- if w == "white" then
- mon.setTextColor(colors.white)
- end
- if w == "yellow" then
- mon.setTextColor(colors.yellow)
- end
- if w == "orange" then
- mon.setTextColor(colors.orange)
- end
- if w == "cyan" then
- mon.setTextColor(colors.cyan)
- end
- end
- function Credit()
- textColor("orange")
- mon.setCursorPos(1,9)
- mon.write("Code par : ")
- mon.setCursorPos(1,10)
- mon.setTextScale(0,7)
- mon.write("Iirothelegend / AristoTvStream")
- end
- Check()
- while true do
- clear()
- Credit()
- lastFuel()
- lastProduced()
- energyStock()
- energyPercent()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement