local monitor = peripheral.wrap


SUBMITTED BY: janki

DATE: Dec. 20, 2017, 6:08 p.m.

FORMAT: Text only

SIZE: 688 Bytes

HITS: 3589

  1. local monitor = peripheral.wrap("monitor_0")
  2. local reactor=peripheral.wrap("bottom")
  3. local turbine=peripheral.wrap("BigReactors-Turbine_0")
  4. monitor.setTextScale(2)
  5. monitor.setCursorPos(2,1)
  6. monitor.write("AN")
  7. monitor.setCursorPos(2,4)
  8. monitor.write("AUS")
  9. monitor.clear()
  10. while true do
  11. event, side, x, y=os.pullEvent("monitor_touch")
  12. monitor.setCursorPos(2,7)
  13. monitor.write(turbine.getEnergyProducedLastTick())
  14. monitor.setCursorPos(2,10)
  15. monitor.write(turbine.getRotorSpeed())
  16. if x>1 and y==1 then
  17. reactor.setActive(true)
  18. elseif x>1 and y==4 then
  19. reactor.setActive(false)
  20. end
  21. end

comments powered by Disqus