Advertisement
AnonGaming

mon

Mar 2nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1.  
  2. sideOut = "right"
  3. sideIn = "left"
  4.  
  5.  
  6. mon = peripheral.wrap("top")
  7.  
  8.  
  9. local inputs = {}
  10.  
  11. inputs[colors.white] = "bay1"
  12.  
  13.  
  14. local outputs = {}
  15.  
  16. outputs["bay1"] = colors.white
  17.  
  18.  
  19.  
  20. function enable(side,col)
  21.     redstone.setBundledOutput(side,colors.combine(redstone.getBundledInput(side),col))
  22. end
  23.  
  24. function disable(side,col)
  25.     redstone.setBundledOutput(side,colors.subtract(redstone.getBundledInput(side),col))
  26. end
  27.  
  28.  
  29.  
  30. while true do
  31.    
  32.    
  33.     local imp = redstone.getBundledInput(sideIn)
  34.     mon.clear()
  35.     local cursorY = 10
  36.     mon.write("Engine Interface")
  37.    
  38.    
  39.     for i,val in pairs(inputs) do
  40.         mon.setCursorPos(3,cursorY)
  41.         print(cursorY)
  42.         if colors.test(imp,i) then
  43.             --Enable/Display mon
  44.             enable(sideOut,outputs[val])
  45.             mon.write(val..": Enabled")
  46.         else
  47.             --Disable/Display Mon
  48.             disable(sideOut,outputs[val])
  49.             mon.write(val..": Disabled")
  50.         end
  51.         cursorY = cursorY + 5
  52.     end
  53.    
  54.  
  55.  
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement