Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function tankmonitor()
- local boiler=peripheral.wrap("back")
- local tank=boiler.getTankInfo("UNKNOWN")
- local waterCap=tank[1].capacity
- local steamCap=tank[2].capacity
- local steamlvl=0
- for i,k in pairs(tank[2]) do
- if type(k)=="table"then
- for j,l in pairs(k) do
- if j == "amount"then
- steamLvl=l
- end
- end
- else
- steamLvl=0
- end
- end
- end
- while true do
- tankmonitor()
- print(steamLvl)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement