diff --git a/tapeget.lua b/tapeget.lua index 1ba739b..d8193fb 100644 --- a/tapeget.lua +++ b/tapeget.lua @@ -31,10 +31,24 @@ local function textProgress(p, c1, c2, fmt, ...) term.setBackgroundColor(bg) end -local tape = peripheral.find("tape_drive") -if not tape then +local tape = { peripheral.find("tape_drive") } +if #tape == 0 then print("tape where") return +elseif #tape ~= 1 then + print("More than one drive found:") + for i = 1, #tape do + print(tape[i]) + end + print("Input drive name:") + io.write("> ") + tape = peripheral.wrap(read()) + if not tape then + printError("wrong name") + return + end +else + tape = tape[1] end if not http then