Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("left")
- m.setTextScale(1)
- m.clear()
- while true do
- local connectors = peripheral.getNames()
- local cell, energy, max, pc = {}, {}, {}, {}
- for k,v in pairs(connectors) do
- if peripheral.getType(v) == "cofh_thermalexpansion_energycell" then
- local acell = peripheral.wrap(v)
- energy[k] = acell.getEnergyStored(v)
- max[k] = acell.getMaxEnergyStored(v)
- pc[k] = tonumber(energy[k])*10/max[k].."%"
- m.setCursorPos(2,2)
- end
- end
- local u = 0
- for k,v in pairs(energy) do
- if u == 0 then
- m.setCursorPos(2,2)
- m.write(tonumber(energy[k]).."/".." Rf")
- u = u+1
- elseif u == 1 then
- u = u+1
- elseif u == 2 then
- print("hhhhhhhhhhhhh")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement