Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function periUptd()
- tanks = {}
- tanks[1] = peripheral.wrap("thermalexpansion_tank_3")
- tanks[2] = peripheral.wrap("thermalexpansion_tank_4")
- tanks[3] = peripheral.wrap("thermalexpansion_tank_5")
- tanks[4] = peripheral.wrap("thermalexpansion_tank_6")
- tanks[5] = peripheral.wrap("thermalexpansion_tank_7")
- end
- periUptd()
- glass = peripheral.wrap("left")
- Xpos = 5
- Ypos = 5
- color = 0xff8800
- function tankInfo()
- num = 1
- tankNum = 0
- while true do
- if tanks[num] == nil then
- break
- end
- num = num+1
- tankNum = tankNum+1
- end
- tanksInfo = {}
- for num = 1, tankNum do
- tanksInfo[num] = tanks[num].getTankInfo()
- end
- end
- function clear()
- term.setCursorPos(1, 1)
- term.clear()
- end
- tankInfo()
- function tanksCap()
- capacity = 0
- for num = 1, tankNum do
- capacity = capacity + tanksInfo[num][1].capacity
- end
- capacity = capacity / 1000
- end
- function tanksAmo()
- amount = 0
- for num = 1, tankNum do
- if tanksInfo[num][1].contents then
- amount = amount + tanksInfo[num][1].contents.amount
- end
- end
- amount = amount / 1000
- end
- while true do
- periUptd()
- tankInfo()
- tanksCap()
- tanksAmo()
- clear()
- print(tankNum)
- print(amount .. "/" .. capacity)
- glass.clear()
- glass.addText(Xpos, Ypos, amount .. "/" .. capacity, color)
- glass.sync()
- sleep(0.25)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement