Advertisement
Guest User

airlock

a guest
Oct 6th, 2015
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. term.setTextColor(colors.red)
  2. print("Airlock v1 Starting...")
  3. d0 = false
  4. d1 = false
  5. ready = true
  6.  
  7. m0 = peripheral.wrap("monitor_0")
  8. m1 = peripheral.wrap("monitor_1")
  9. m = peripheral.wrap("back")
  10. m0.clear()
  11. m1.clear()
  12. m.clear()
  13.  
  14. m.setTextColor(colors.white)
  15. m.setCursorPos(1,1)
  16. for i=1,18 do m.write("#") end
  17. m.setCursorPos(1,12)
  18. for i=1,18 do m.write("#") end
  19. for i=1,12 do m.setCursorPos(1,i) m.write("#") end
  20. for i=1,12 do m.setCursorPos(18,i) m.write("#") end
  21.  
  22. m.setTextColor(colors.gray)
  23. m.setCursorPos(3,2)
  24. m.write("Airlock Status")
  25.  
  26. while true do
  27.   if (d1) or (d2) then
  28.     m.setCursorPos(7,3)
  29.     m.setTextColor(colors.red)
  30.     m.write("!OPEN!")  
  31.   else
  32.     m.setCursorPos(7,3)
  33.     m.setTextColor(colors.lime)
  34.     m.write("Ready")
  35.   end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement