Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 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(1)
  17. monitor.setBackgroundColor(colors.black)
  18.  
  19. monitor.clear()
  20. monitor.setCursorPos(1,1)
  21. monitor.setTextColor(colors.white)
  22. monitor.write('Shield System Monitor')
  23.  
  24. if redstone.testBundledInput("back", colors.yellow) then
  25. monitor.setTextColor(colors.green)
  26. monitor.setCursorPos(1,3)
  27. monitor.write('Shield Power Active')
  28. redstone.setBundledOutput(sSide,colors.combine(redstone.getBundledOutput(sSide),colors.white))
  29. else
  30. monitor.setTextColor(colors.red)
  31. monitor.setCursorPos(1,3)
  32. monitor.write('Shield Power Inactive')
  33. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))
  34. end
  35.  
  36. if redstone.testBundledInput("back", colors.green) then
  37. monitor.setTextColor(colors.green)
  38. monitor.setCursorPos(1,5)
  39. monitor.write('Shield Active')
  40. redstone.setBundledOutput(sSide,colors.combine(redstone.getBundledOutput(sSide),colors.orange))
  41. else
  42. monitor.setTextColor(colors.red)
  43. monitor.setCursorPos(1,5)
  44. monitor.write('Shield Inactive')
  45. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.orange))
  46. end
  47.  
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement