Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rsBridge = peripheral.wrap("right")
- term.clear()
- term.setCursorPos(1,1)
- local file = fs.open("disks", "w")
- local disks = rsBridge.getAllDisks()
- file.writeLine("")
- file.writeLine("Disks:")
- for i,d in ipairs(disks) do
- file.writeLine("Disk #"..i)
- for k,v in pairs(d) do
- if(type(v) == "table") then
- if (#v > 0) then
- if(d.diskType == "items") then
- file.writeLine("Items:")
- else
- file.writeLine("Fluids:")
- end
- local contents = d.items
- if (d.diskType == "fluid") then
- contents = d.fluids
- end
- for j,iv in ipairs(contents) do
- for h,f in pairs(iv) do
- file.writeLine("::"..j..":: "..h.." => "..f)
- end
- end
- end
- else
- file.writeLine(k.." => "..v)
- end
- end
- file.writeLine("")
- end
- file.close()
Add Comment
Please, Sign In to add comment