Jodo32

FTB - Full cell List

Jul 19th, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.36 KB | None | 0 0
  1. --[[ This program ti to represent how much MJ there is stored
  2.     in individual Redstone Cells through BuildCraft gates
  3.     (set to Full energy = Redstone Signal) and then output
  4.     the number onto a monitor ]]
  5.  
  6. -- Statements
  7. local mon = peripheral.wrap("right")
  8. os.loadAPI ("bundleAPI")
  9. mon.setTextScale(2)
  10.  
  11. function update()
  12.  
  13. mon.clear()
  14.  
  15. -- Back Colored Wires
  16.     -- White
  17.         local bWhite = 0
  18.         if bundleAPI.getInput("back", "white") == true then
  19.         bWhite = 1
  20.         else bWhite = 0
  21.     end
  22.     -- Orange
  23.         local bOrange = 0
  24.         if bundleAPI.getInput("back", "orange") == true then
  25.         bOrange = 1
  26.         else bOrange = 0
  27.     end
  28.     -- Blue
  29.         local bBlue = 0
  30.         if bundleAPI.getInput("back", "blue") == true then
  31.         bBlue = 1
  32.         else bBlue = 0
  33.     end
  34.     -- Light Blue
  35.         local bLightBlue = 0
  36.         if bundleAPI.getInput("back", "lightblue") == true then
  37.         bLightBlue = 1
  38.         else bLightBlue = 0
  39.     end
  40.     -- Yellow
  41.         local bYellow = 0
  42.         if bundleAPI.getInput("back", "yellow") == true then
  43.         bYellow = 1
  44.         else bYellow = 0
  45.     end
  46.     -- Lime
  47.         local bLime = 0
  48.         if bundleAPI.getInput("back", "lime") == true then
  49.         bLime = 1
  50.         else bLime = 0
  51.     end
  52. -- Left Colored Wires
  53.     -- White
  54.         local lWhite = 0
  55.         if bundleAPI.getInput("left", "white") == true then
  56.         lWhite = 1
  57.         else lWhite = 0
  58.     end
  59.     -- Orange
  60.         local lOrange = 0
  61.         if bundleAPI.getInput("left", "orange") == true then
  62.         lOrange = 1
  63.         else lOrange = 0
  64.     end
  65.     -- Blue
  66.         local lBlue = 0
  67.         if bundleAPI.getInput("left", "blue") == true then
  68.         lBlue = 1
  69.         else lBlue = 0
  70.     end
  71.     -- Light Blue
  72.         local lLightBlue = 0
  73.         if bundleAPI.getInput("left", "lightblue") == true then
  74.         lLightBlue = 1
  75.         else lLightBlue = 0
  76.     end
  77.     -- Yellow
  78.         local lYellow = 0
  79.         if bundleAPI.getInput("left", "yellow") == true then
  80.         lYellow = 1
  81.         else lYellow = 0
  82.     end
  83.     -- Lime
  84.         local lLime = 0
  85.         if bundleAPI.getInput("left", "lime") == true then
  86.         lLime = 1
  87.         else lLime = 0
  88.     end
  89.        
  90. bTotal = bWhite + bOrange + bBlue + bLightBlue + bYellow + bLime
  91. lTotal = lWhite + lOrange + lBlue + lLightBlue + lYellow + lLime
  92. MJTotal = bTotal + lTotal
  93. MJTotal = MJTotal*600000
  94. local MJTotalPrint = tostring(MJTotal)
  95. mon.setCursorPos(2,6)
  96. mon.setTextColor(colors.lime)
  97. mon.write("There is currently ")
  98. mon.setTextColor(colors.blue)
  99. mon.write(MJTotalPrint)
  100. mon.setTextColor(colors.lime)
  101. mon.write(" MJ Stored.")
  102. end
  103.  
  104.  
  105. while true do
  106. update()
  107. sleep(0.2)
  108. end
Advertisement
Add Comment
Please, Sign In to add comment