Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function comma_value(amount)
- local formatted = amount
- while true do
- formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
- if (k==0) then
- break
- end
- end
- return formatted
- end
- function sleep(_nTime)
- local timer = os.startTimer(_nTime)
- repeat
- local sEvent, param = os.pullEvent("timer")
- until param == timer
- end
- x = peripheral.wrap("bottom")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.red)
- term.clear()
- while true do
- data = x.getHeatedCoolant()
- data2 = x.getHeatedCoolantCapacity()
- term.setCursorPos(1, 1)
- print(math.floor((data.amount/data2)*100).."% Capacity.", comma_value(data.amount).."mb", data.name)
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement