• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 275: Line 275:  
         mw.log(tostring(x) .. " : " .. type(x))
 
         mw.log(tostring(x) .. " : " .. type(x))
 
     end
 
     end
 +
end
 +
 +
function Utils.show(x, i)
 +
    i = i or 0
 +
    local r = ""
 +
    if type(x) == "table" then
 +
        r = string.rep("  ", i) .. "{\n"
 +
        for k, v in pairs(x) do
 +
            if type(v) == "table" then
 +
                r = r .. string.rep("  ", i + 1) .. tostring(k) .. ": " .. Utils.show(v, i + 1) .. "\n"
 +
            else
 +
                r = r .. string.rep("  ", i + 1) .. tostring(k) .. ": " .. tostring(v) .. "\n"
 +
            end
 +
        end
 +
        r = r .. string.rep("  ", i) .. "}\n"
 +
    else
 +
        return tostring(x)
 +
    end
 +
    return r
 
end
 
end
  
cssedit, gkautomate
7,064

edits

Navigation menu