Advertisement
mcfeuersturm

Tank

Jun 19th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.21 KB | None | 0 0
  1. local valve, monitor
  2. local serverID = nil
  3. local clients = {}
  4. local args = {...}
  5. --local redlimit, redside, on
  6. local sides = {"left", "right", "top", "bottom", "front", "back"};
  7.  
  8. local liquidColors = {{"Water", colors.blue },
  9.                                         {"tile.oilStill", colors.gray, "Oil"},
  10.                                         {"Creosote Oil", colors.brown},
  11.                                         {"Essence", colors.lime},
  12.                                         {"Steam", colors.lightGray},
  13.                                         {"Honey", colors.yellow},
  14.                                         {"Ethanol", colors.orange},
  15.                                         {"Lava", colors.red},
  16.                                         {"item.fuel", colors.yellow, "Fuel"},
  17.                                         {"Biomass", colors.green},
  18.                                         {"Fortron", colors.lightBlue},
  19.                                         {"Sludge", colors.black},
  20.                                         {"Liquid DNA", colors.magenta},
  21.                                         {"Fruit Juice", colors.green},
  22.                                         {"Seed Oil", colors.yellow},
  23.                                         {"Liquid Force", colors.yellow},
  24.                                         {"Oil", colors.gray, "Oil"},
  25.                                         {"Fuel", colors.yellow, "Fuel"},
  26.                                         {"uumatter", colors.purple, "UUMatter"},
  27.                                         {"vegetable", colors.magenta, "Veg"},
  28.                                         {"deuterium", colors.lightBlue, "Deuterium"}
  29. }
  30.  
  31. local function getLiquidColor(liquid)
  32.   for c, color in pairs (liquidColors) do
  33.         if (liquid == color[1]) then
  34.                 return color[2],color[3] or liquid
  35.         end
  36.   end
  37.   return colors.white, liquid;
  38. end
  39.  
  40. local function getDeviceSide(deviceType)
  41.         for i,side in pairs(sides) do
  42.                 if (peripheral.isPresent(side)) then
  43.                         if (peripheral.getType(side)) == string.lower(deviceType) then
  44.                                 return side;
  45.                         end
  46.                 end
  47.         end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement