Advertisement
PrinceOfCookies

Untitled

Feb 6th, 2023 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. -- pushItem
  2. -- getChannelInformation
  3. -- getEnergy
  4. -- getCraftingCPUs
  5. -- getChannelEnergyDemand
  6. -- getEnergyCapacity
  7. -- getCraftableFluids
  8. -- tanks
  9. -- getPatternsFor
  10. -- items
  11. -- getAverageEnergyDemand
  12. -- getAverageEnergyIncome
  13. -- pullFluid
  14. -- pushFluid
  15. -- pullItem
  16. local monitor = peripheral.wrap("left")
  17. local AE2 = peripheral.wrap("bottom")
  18.  
  19. local MSCP = monitor.setCursorPos
  20. local MW = monitor.write
  21. local MC = monitor.clear
  22. local MCL = monitor.clearLine
  23. local MSTC = monitor.setTextColor
  24.  
  25. local white = colors.white
  26. local black = colors.black
  27. local red = colors.red
  28. local green = colors.green
  29. local yellow = colors.yellow
  30. local grey = colors.gray
  31. local cyan = colors.cyan
  32. monitor.setTextScale(0.5)
  33.  
  34. local x, y = monitor.getSize()
  35.  
  36. local function Barrier(x)
  37. for i = 1, y do
  38. MSCP(x, i)
  39. MW("|")
  40. end
  41. end
  42.  
  43. while true do
  44. sleep(5)
  45. local UselessItems = {}
  46. MC()
  47. MSCP(1, 1)
  48. MW("Energy Usage")
  49. MSCP(14, 1)
  50. MW("Energy Income")
  51. MSCP(28, 1)
  52. MW("Non-Stackable")
  53.  
  54. for i = 1, x do
  55. MSCP(x, 2)
  56. MW("-")
  57. end
  58.  
  59. MSCP(14, 3)
  60. MW(math.floor(AE2.getAverageEnergyIncome()) .. " AE/T")
  61. MSCP(1, 3)
  62. MW(math.floor(AE2.getAverageEnergyDemand()) .. " AE/T")
  63.  
  64. local y2 = 2
  65.  
  66. for _, items in pairs(AE2.items()) do
  67. for Type, Value in pairs(items) do
  68. if Type == "count" then
  69. if Value == 1 then
  70. print("Value is 1")
  71. print("inserting " .. items["name"])
  72. table.insert(UselessItems, items["name"])
  73. end
  74. end
  75. end
  76. end
  77.  
  78. for f = 1, y do
  79. for k, v in pairs(UselessItems) do
  80. MSCP(28, y2 + f)
  81. MW(v)
  82. end
  83. end
  84.  
  85.  
  86. Barrier(13)
  87. Barrier(27)
  88. Barrier(41)
  89.  
  90. end
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement