Advertisement
An93l0fD3ath

loader computer

Jul 19th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. local GERTi = require("GERTiClient")
  2. local socket = GERTi.openSocket(0.3, true, 1)
  3.  
  4. --incoming end Loading computer
  5. serTable = socket:read()
  6. table = serialize.unserialize(serTable)
  7. print(table)
  8.  
  9. --i need to make the incoming data the new verbales
  10. --table["amount"] =="256000" and table["type"] == "Sewage"
  11. --^^^^example
  12.  
  13. local function cartRelease()
  14. myTable = loaderInfo.getFluidInTank(sides.down)
  15. rs.setBundledOutput(sides.east, colors.blue, 253)
  16. os.sleep(1)
  17. rs.setBundledOutput(sides.east, colors.blue, 0)
  18.  
  19. rs.setBundledOutput(sides.east, colors.blue, 253)
  20. os.sleep(1)
  21. rs.setBundledOutput(sides.east, colors.blue, 0)
  22.  
  23. -- Changed loaderInfo.getFluidInTank to transposers[fluid]
  24. print(myTable[1]["amount"],"cartRelease")
  25. end
  26.  
  27. local function loaderCheck()
  28. myTable = loaderInfo.getFluidInTank(sides.down)
  29. --myTable = transposers[fluid].getFluidInTank(sides.south)
  30. while myTable[1]["amount"] > 0 do
  31. print(myTable[1]["amount"],"loaderCheck1")
  32. cartRelease()
  33. os.sleep(70)
  34. end
  35. end
  36.  
  37. local function getRemainder()
  38. if myTable[1]["amount"] <= 32000 then
  39. print(myTable[1]["amount"],"getRemainder")
  40. end
  41. end
  42. -- Changing MilkTrans to fluid
  43. transposers[fluid].transferFluid(sides.north, sides.south, order)
  44. os.sleep(5)
  45. --cartRelease()
  46. loaderCheck()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement