Compare commits
No commits in common. "437b8f1a91156b11f1d704b0f274a1e06e2a42ed" and "128798cf221a1ae2f2675dce4ed46c248576e46c" have entirely different histories.
437b8f1a91
...
128798cf22
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user