Tape fixes
This commit is contained in:
parent
9e44c53e42
commit
135b606686
11
tape-rip.lua
11
tape-rip.lua
|
@ -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()
|
||||
|
|
|
@ -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("> ")
|
||||
|
|
Loading…
Reference in New Issue