1
0
Fork 0

Tape fixes

This commit is contained in:
Casey 2023-10-18 00:54:19 +03:00
parent 9e44c53e42
commit 135b606686
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
2 changed files with 10 additions and 3 deletions

View File

@ -73,12 +73,19 @@ if seekToStart then
end
local _, y = term.getCursorPos()
local i = 0
while not src.isEnd() do
dst.write(src.read(6000 * 10))
local pos, sz = src.getPosition(), src.getSize()
term.setCursorPos(1, y)
term.clearLine()
textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz)
os.sleep(0.01)
if (i % 10) == 0 then
textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz)
os.sleep(0.01)
end
i = i + 1
end
local pos, sz = src.getPosition(), src.getSize()
textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz)
print()

View File

@ -38,7 +38,7 @@ if #tape == 0 then
elseif #tape ~= 1 then
print("More than one drive found:")
for i = 1, #tape do
print(tape[i])
print(peripheral.getName(tape[i]))
end
print("Input drive name:")
io.write("> ")