Advertisement
krakaen

enderchests

Jan 8th, 2016
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. local monitors = {peripheral.find("monitor")}
  2. local mon = monitors[1]
  3. mon.setBackgroundColor(colors.black)
  4. mon.clear()
  5. mon.setTextColor(colors.white)
  6. mon.setTextScale(1)
  7.  
  8.  
  9. term.redirect(mon)
  10. mon.setBackgroundColor(colors.black)
  11. mon.clear()
  12.  
  13.  
  14. local w, h = mon.getSize()
  15.  
  16. local chests = {}
  17.  
  18.  
  19.  
  20.  
  21. function addChests(color1, color2, color3, name, priority)
  22. chests[priority] = {}
  23. chests[priority]["color1"] = color1
  24. chests[priority]["color2"] = color2
  25. chests[priority]["color3"] = color3
  26. chests[priority]["name"] = name
  27. chests[priority]["priority"] = priority
  28.  
  29. end
  30.  
  31. function draw()
  32. local curPosX, curPosY = 3,2
  33. for key,value in pairs(chests) do
  34. if value["priority"] == 10 then
  35. curPosX = 28
  36. curPosY = 2
  37. end
  38. mon.setTextColor(colors.white)
  39. mon.setTextScale(1)
  40.  
  41. paintutils.drawFilledBox(curPosX , curPosY, curPosX+1, curPosY, value["color1"])
  42. curPosX = curPosX+3
  43. paintutils.drawFilledBox(curPosX , curPosY, curPosX+1, curPosY, value["color2"])
  44. curPosX = curPosX+3
  45. paintutils.drawFilledBox(curPosX , curPosY, curPosX+1, curPosY, value["color3"])
  46. mon.setTextScale(1)
  47.  
  48. mon.setBackgroundColor(colors.black)
  49. mon.setCursorPos(curPosX+4, curPosY)
  50. mon.write(value["name"])
  51. curPosX = curPosX-6
  52. curPosY = curPosY+2
  53. end
  54. end
  55.  
  56.  
  57.  
  58. function starting()
  59.  
  60. mon.setTextScale(1)
  61.  
  62.  
  63.  
  64. addChests(colors.white, colors.white, colors.white, "STORAGE", 1)
  65. addChests(colors.white, colors.white, colors.blue, "INSCRIBERS", 2)
  66. addChests(colors.white, colors.white, colors.red, "CHAMBER", 3)
  67. addChests(colors.white, colors.white, colors.green, "CHARGERS", 4)
  68.  
  69. addChests(colors.black, colors.black, colors.black, " ", 5)
  70.  
  71. addChests(colors.lightGray, colors.lightGray, colors.red, "SMELTER", 6)
  72. addChests(colors.lightGray, colors.lightGray, colors.white, "PULVERIZER", 7)
  73. addChests(colors.lightGray, colors.lightGray, colors.orange, "INDUCTIONS", 8)
  74. addChests(colors.lightGray, colors.lightGray, colors.lightBlue, "FLUIDS", 9)
  75.  
  76.  
  77.  
  78. addChests(colors.cyan, colors.cyan, colors.brown, "SAG MILL", 10)
  79. addChests(colors.cyan, colors.cyan, colors.red, "ALLOY SMELTR", 11)
  80. addChests(colors.cyan, colors.cyan, colors.green, "THE VAT", 12)
  81. addChests(colors.cyan, colors.cyan, colors.gray, "SLICE/SPLICE", 13)
  82.  
  83. addChests(colors.black, colors.black, colors.black, " ", 14)
  84.  
  85. addChests(colors.purple, colors.purple, colors.blue, "QUARRYNESS", 15)
  86. addChests(colors.purple, colors.pink, colors.purple, "TO COME", 16)
  87. addChests(colors.purple, colors.pink, colors.purple, "TO COME", 17)
  88. addChests(colors.purple, colors.pink, colors.purple, "TO COME", 18)
  89.  
  90. draw()
  91.  
  92. end
  93.  
  94. starting()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement