Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- comp = require("component")
- tank = comp.deepresonance_tank
- rs = comp.redstone
- sides = require("sides")
- term = require("term")
- gpu = comp.gpu
- -- Local vars
- Local SignalSide = sides.north
- local purity = tank.getPurity()
- local efficiency = tank.getEfficiency()
- local strength = tank.getStrength()
- -- End of local vars
- -- Functions
- local function GetLevels()
- if tank.getEfficiency() > 0.65 and tank.getStrength() > 0.65 and tank.getFluidAmount() < 6000 then
- rs.setOutput(SignalSide , 0)
- elseif tank.getEfficiency() < 0.65 and tank.getStrength() < 0.65 and tank.getFluidAmount() > 6000 then
- rs.setOutput(SignalSide , 15)
- end
- end
- -- End of Functions
- -- Screen Fix
- os.sleep(10)
- gpu.setResolution(23,10)
- -- End of Screen Fix
- -- Main Loop
- while true do
- term.clear()
- GetLevels()
- print("Fluid Amount: ".. tank.getFluidAmount().."mB")
- print("Efficiency..: ".. tonumber(string.format("%.1f", (100*efficiency))).."%")
- print("Strength....: ".. tonumber(string.format("%.1f", (100*strength))).."%")
- print("Purity......: ".. tonumber(string.format("%.1f", (100*purity))).."%")
- os.sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement