Compare commits

..

No commits in common. "437b8f1a91156b11f1d704b0f274a1e06e2a42ed" and "128798cf221a1ae2f2675dce4ed46c248576e46c" have entirely different histories.

3 changed files with 10 additions and 3 deletions

View File

@ -72,6 +72,10 @@ if run then
else
local sFile = tArgs[1] or getFilename(url) or url
local sPath = shell.resolve(sFile)
if fs.exists(sPath) then
print("File already exists")
return
end
local res = get(url)
if not res then return end

View File

@ -6,5 +6,5 @@ for key, monitor in pairs(monitors) do
monitor.setCursorPos(1, 1)
end
local wo = colony.getWorkOrders()
term.redirect(monitors[1])
printTable(wo)
local s = printTable(wo)
monitors[1].write(s)

View File

@ -1,13 +1,16 @@
local result = ""
local function _printTable(table, tabs)
for key, value in pairs(table) do
if type(value) == "table" then
_printTable(value, tabs + 1)
else
print(string.rep(" ", tabs) .. key .. ": " .. value)
result = result .. "\n" .. string.rep(" ", tabs) .. key .. ": " .. value
end
end
end
function printTable(table)
_printTable(table, 0)
return result
end