Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local event = require("event")
- local keyboard = require("keyboard")
- local gpu = component.gpu
- local endProgram = false
- gpu.setResolution(146, 32)
- gpu.setBackground(0x111111)
- gpu.fill(0, 0, 160, 50, " ")
- while endProgram == false do
- i = 1
- for k,v in pairs(component.list("tank_controller")) do
- for j = 0, 5 do
- tank = component.invoke(k, "getFluidInTank", j)
- if (tank[1] ~= nil) then
- name = tank[1].label
- if (name == "Water")
- gpu.set(1, i, "Tank " .. i .. " Fluid: " .. name)
- gpu.set(35, i, "Amount: " .. tank[1].amount .. "/" .. tank[1].capacity)
- i = i+1
- end
- end
- end
- end
- i = i+1
- gpu.set(1, i, "ME NETWORK FLUIDS:")
- i = i+1
- for k,v in pairs(component.list("me_controller")) do
- fluids = component.invoke(k, "getFluidsInNetwork")
- for a,b in pairs(fluids) do
- if (tonumber(a) ~= nil) then
- if (fluids[a] ~= nil) then
- gpu.set(1, i, "Fluid: " .. fluids[a].label)
- gpu.set(35, i, "Amount: " .. fluids[a].amount)
- i = i+1
- end
- end
- end
- end
- if select(4, event.pull(0, "key_down")) == keyboard.keys.enter then endProgram = true end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement