EphemeralKap

Untitled

Apr 26th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. os.loadAPI("ba")
  2. local c
  3. m = peripheral.wrap("left")
  4. m.clear()
  5.  
  6. function fillTable()
  7. ba.setTable("Lava", lava, 3,13,7,9)
  8. ba.setTable("Water", water, 15,25,7,9)
  9. --ba.setTable("Fuel", fuel, 27,37,7,9)
  10. --ba.setTable("Empty1", empty ,15,25,15,17)
  11. --ba.setTable("Empty2", emptyy ,27,37,15,17)
  12. --ba.setTable("Empty3", emptyyy ,3,13,19,21)
  13. --ba.setTable("Empty4", emptyyyy ,15,25,19,21)
  14. --ba.setTable("Empty5", emptyyyyy ,27,37,19,21)
  15.  
  16. ba.screen()
  17. end
  18.  
  19. function getClick()
  20. event,side,x,y = os.pullEvent("monitor_touch")
  21. ba.checkxy(x,y)
  22. end
  23.  
  24. local function addcol(col, side)
  25. rs.setBundledOutput(side, colors.combine(rs.getBundledOutput(side),col))
  26. end
  27.  
  28. local function remcol(col, side)
  29. rs.setBundledOutput(side, colors.subtract(rs.getBundledOutput(side),col))
  30. end
  31.  
  32. function putTank(put, place)
  33. addcol('back', put)
  34. sleep(1)
  35. addcol('back', place)
  36. sleep(0.5)
  37. remcol('back', put)
  38. remcol('back', place)
  39. end
  40.  
  41. function getTank()
  42. addcol('back', colors.white)
  43. sleep(1)
  44. addcol('back', colors.pink)
  45. sleep(0.5)
  46. remcol('back', colors.white)
  47. remcol('back', colors.pink)
  48. end
  49.  
  50. function lava()
  51. ba.flash("Lava")
  52. addcol('back', colors.yellow)
  53. sleep(1)
  54. addcol('back', colors.black)
  55. sleep(0.5)
  56. remcol('back', colors.black)
  57. remcol('back', colors.yellow)
  58. getTank()
  59. end
  60.  
  61. function water()
  62. ba.flash("Water")
  63. end
  64.  
  65.  
  66. fillTable()
  67. ba.heading("Free liquid!")
  68.  
  69. while true do
  70. getClick()
  71. end
Advertisement
Add Comment
Please, Sign In to add comment