Advertisement
Guest User

Untitled

a guest
Jul 6th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.45 KB | None | 0 0
  1. local component = require("component")
  2. local adaptor1  = component.get("07e57877")
  3. local adaptor2  = component.get("f9bf229f")
  4. local adaptor3  = component.get("44e361a0")
  5. local adaptor4  = component.get("13ec796d")
  6.  
  7. local adaptor5  = component.get("a5f06e0e")
  8. local adaptor6  = component.get("aa446ca3")
  9. local adaptor7  = component.get("e0d952ea")
  10. local adaptor8  = component.get("e19f8768")
  11.  
  12. local adaptor9  = component.get("5f531a57")
  13. local adaptor10 = component.get("42886b33")
  14. local adaptor11 = component.get("8428eef9")
  15. local adaptor12 = component.get("b34daf2e")
  16.  
  17. local adaptor13 = component.get("3d73ba80")
  18. local adaptor14 = component.get("959cbd84")
  19. local adaptor15 = component.get("2f73b573")
  20. local adaptor16 = component.get("5904f935")
  21.  
  22. --A = north/side 2, B = south/side 3
  23. local machine1a = component.get("0b3e0ec1")
  24. local machine1b = component.get("dc4d58dd")
  25. local machine2a = component.get("56e74aca")
  26. local machine2b = component.get("832c1208")
  27. local machine3a = component.get("0fc09fee")
  28. local machine3b = component.get("06e0ce26")
  29. local machine4a = component.get("c53f1ee0")
  30. local machine4b = component.get("7c820cd7")
  31.  
  32. local machine5a = component.get("ebee096d")
  33. local machine5b = component.get("24c43dd6")
  34. local machine6a = component.get("0282a76a")
  35. local machine6b = component.get("02141c62")
  36. local machine7a = component.get("b124ee3e")
  37. local machine7b = component.get("b52688df")
  38. local machine8a = component.get("5f547ee3")
  39. local machine8b = component.get("035831ec")
  40.  
  41. local machine9a  = component.get("e706b4d4")
  42. local machine9b  = component.get("38d98119")
  43. local machine10a = component.get("f35f3d27")
  44. local machine10b = component.get("f71563a3")
  45. local machine11a = component.get("6b6825d2")
  46. local machine11b = component.get("a55f99f8")
  47. local machine12a = component.get("265b5332")
  48. local machine12b = component.get("8c4e5b41")
  49.  
  50. local machine13a = component.get("2aff57e4")
  51. local machine13b = component.get("9b6b56c6")
  52. local machine14a = component.get("492d1740")
  53. local machine14b = component.get("039094b1")
  54. local machine15a = component.get("f5160e96")
  55. local machine15b = component.get("63c4244f")
  56. local machine16a = component.get("c9c34a05")
  57. local machine16b = component.get("565b8c84")
  58.  
  59. component.gpu.fill(0, 0, 160, 50, " ")
  60.  
  61. function getName(string)
  62.     if (string == "gt.metaitem.01.7810.name") then
  63.         return "Centrifuged Redstone"
  64.     end
  65.     return string
  66. end
  67.  
  68. while true do
  69.     for i = 1, 16 do
  70.         adaptorPrime = nil
  71.         machineNorth = nil
  72.         machineSouth = nil
  73.  
  74.         if i == 1 then
  75.             adaptorPrime = adaptor1
  76.             machineNorth = machine1a
  77.             machineSouth = machine1b
  78.         end
  79.  
  80.         if i == 2 then
  81.             adaptorPrime = adaptor2
  82.             machineNorth = machine2a
  83.             machineSouth = machine2b
  84.         end
  85.  
  86.         if i == 3 then
  87.             adaptorPrime = adaptor3
  88.             machineNorth = machine3a
  89.             machineSouth = machine3b
  90.         end
  91.  
  92.         if i == 4 then
  93.             adaptorPrime = adaptor4
  94.             machineNorth = machine4a
  95.             machineSouth = machine4b
  96.         end
  97.  
  98.         if i == 5 then
  99.             adaptorPrime = adaptor5
  100.             machineNorth = machine5a
  101.             machineSouth = machine5b
  102.         end
  103.  
  104.         if i == 6 then
  105.             adaptorPrime = adaptor6
  106.             machineNorth = machine6a
  107.             machineSouth = machine6b
  108.         end
  109.  
  110.         if i == 7 then
  111.             adaptorPrime = adaptor7
  112.             machineNorth = machine7a
  113.             machineSouth = machine7b
  114.         end
  115.  
  116.         if i == 8 then
  117.             adaptorPrime = adaptor8
  118.             machineNorth = machine8a
  119.             machineSouth = machine8b
  120.         end
  121.  
  122.         if i == 9 then
  123.             adaptorPrime = adaptor9
  124.             machineNorth = machine9a
  125.             machineSouth = machine9b
  126.         end
  127.  
  128.         if i == 10 then
  129.             adaptorPrime = adaptor10
  130.             machineNorth = machine10a
  131.             machineSouth = machine10b
  132.         end
  133.  
  134.         if i == 11 then
  135.             adaptorPrime = adaptor11
  136.             machineNorth = machine11a
  137.             machineSouth = machine11b
  138.         end
  139.  
  140.         if i == 12 then
  141.             adaptorPrime = adaptor12
  142.             machineNorth = machine12a
  143.             machineSouth = machine12b
  144.         end
  145.  
  146.         if i == 13 then
  147.             adaptorPrime = adaptor13
  148.             machineNorth = machine13a
  149.             machineSouth = machine13b
  150.         end
  151.  
  152.         if i == 14 then
  153.             adaptorPrime = adaptor14
  154.             machineNorth = machine14a
  155.             machineSouth = machine14b
  156.         end
  157.  
  158.         if i == 15 then
  159.             adaptorPrime = adaptor15
  160.             machineNorth = machine15a
  161.             machineSouth = machine15b
  162.         end
  163.  
  164.         if i == 16 then
  165.             adaptorPrime = adaptor16
  166.             machineNorth = machine16a
  167.             machineSouth = machine16b
  168.         end
  169.  
  170.         inputNorth   = component.invoke(adaptorPrime, "getStackInSlot", 2, 5)
  171.         output1North = component.invoke(adaptorPrime, "getStackInSlot", 2, 6)
  172.         output2North = component.invoke(adaptorPrime, "getStackInSlot", 2, 7)
  173.         output3North = component.invoke(adaptorPrime, "getStackInSlot", 2, 8)
  174.  
  175.         inputSouth   = component.invoke(adaptorPrime, "getStackInSlot", 3, 5)
  176.         output1South = component.invoke(adaptorPrime, "getStackInSlot", 3, 6)
  177.         output2South = component.invoke(adaptorPrime, "getStackInSlot", 3, 7)
  178.         output3South = component.invoke(adaptorPrime, "getStackInSlot", 3, 8)
  179.  
  180.         strItemNorth = "Item: None"
  181.         strItemSouth = "Item: None"
  182.  
  183.         strQtyNorth = "Quantity: -"
  184.         strQtySouth = "Quantity: -"
  185.  
  186.         strPowerNorth = "Power: " .. component.invoke(machineNorth, "getStoredEU") .. "/" .. component.invoke(machineNorth, "getEUCapacity")
  187.         strPowerSouth = "Power: " ..component.invoke(machineSouth, "getStoredEU") .. "/" .. component.invoke(machineSouth, "getEUCapacity")
  188.  
  189.         strProgressNorth = "Progress: " .. component.invoke(machineNorth, "getWorkProgress") .. "/" .. component.invoke(machineNorth, "getWorkMaxProgress")
  190.         strProgressSouth = "Progress: " .. component.invoke(machineSouth, "getWorkProgress") .. "/" .. component.invoke(machineSouth, "getWorkMaxProgress")
  191.  
  192.         if inputNorth ~= nil then
  193.             strItemNorth = "Item: " .. getName(inputNorth["label"])
  194.             strQtyNorth  = "Quantity: " .. inputNorth["size"]
  195.         end
  196.         if inputSouth ~= nil then
  197.             strItemSouth = "Item: " .. getName(inputSouth["label"])
  198.             strQtySouth  = "Quantity: " .. inputSouth["size"]
  199.         end
  200.  
  201.         component.gpu.fill(0, i*2-1, 160, 1, " ")
  202.         component.gpu.fill(0, i*2, 160, 1, " ")
  203.  
  204.         component.gpu.set(2, i*2-1, "GT Universal Pulverizer " .. i*2-1)
  205.         component.gpu.set(2, i*2, "GT Universal Pulverizer " .. i*2)
  206.  
  207.  
  208.         component.gpu.set(30, i*2-1, strItemNorth)
  209.         component.gpu.set(30, i*2, strItemSouth)
  210.  
  211.         component.gpu.set(64, i*2-1, strQtyNorth)
  212.         component.gpu.set(64, i*2, strQtySouth)
  213.  
  214.         component.gpu.set(80, i*2-1, strPowerNorth)
  215.         component.gpu.set(80, i*2, strPowerSouth)
  216.  
  217.         component.gpu.set(104, i*2-1, strProgressNorth)
  218.         component.gpu.set(104, i*2, strProgressSouth)
  219.     end
  220. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement