nate90909

Untitled

Apr 24th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. --Locals
  2.  
  3. local powersys
  4. local shield
  5.  
  6. -- orange powers shield
  7. -- white powers power
  8. -- green activates shield
  9. -- yellow acivates power
  10.  
  11.  
  12.  
  13.  
  14. monitor = peripheral.wrap("monitor_1")
  15.  
  16. monitor.setTextScale(0.5)
  17. monitor.setBackgroundColor(colors.black)
  18.  
  19. while true do
  20.  
  21. monitor.clear()
  22. monitor.setCursorPos(1,1)
  23. monitor.setTextColor(colors.white)
  24. monitor.write('Shield System Monitor')
  25.  
  26. if redstone.testBundledInput("back", colors.yellow) then
  27. monitor.setTextColor(colors.green)
  28. monitor.setCursorPos(1,3)
  29. monitor.write('Shield Power Active')
  30. redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput(sSide),colors.white))
  31. else
  32. monitor.setTextColor(colors.red)
  33. monitor.setCursorPos(1,3)
  34. monitor.write('Shield Power Inactive')
  35. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))
  36. end
  37.  
  38. if redstone.testBundledInput("back", colors.green) then
  39. monitor.setTextColor(colors.green)
  40. monitor.setCursorPos(1,5)
  41. monitor.write('Shield Active')
  42. redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput(sSide),colors.orange))
  43. else
  44. monitor.setTextColor(colors.red)
  45. monitor.setCursorPos(1,5)
  46. monitor.write('Shield Inactive')
  47. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.orange))
  48. end
  49. sleep(1)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment