Advertisement
nicx321

quarry

Apr 30th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. local quarry = peripheral.wrap("bottom")
  2. local glass = peripheral.wrap("left")
  3.  
  4. while true do
  5.   local working = quarry.hasWork()
  6.  
  7. function addBox()
  8.   glass.addBox(1,1,150,10,0xFFFFFF, 0.2)
  9. end
  10.  
  11. function quarryWork()
  12.  
  13.   if(working) then
  14.   glass.addText(5,2,"Quarry is working: " ..tostring(working), 0x00FF00)
  15.   end
  16.  
  17.   if(working==false) then
  18.   glass.addText(5,2,"Quarry is working: " ..tostring(working), 0xFF0000)
  19.   end
  20.  
  21. end
  22.  
  23.  
  24.     glass.clear()
  25.     addBox()
  26.     quarryWork()
  27.     glass.sync()
  28.     sleep(0.1)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement