• 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
m
no edit summary
Line 34: Line 34:  
function debugString()
 
function debugString()
 
     return #debug > 0 and args.debug and ([[<pre class="calc-debug" style="text-align:left;background:transparent;display:none"><code>]] .. table.concat(debug, "\n") .. [[</code></pre>]]) or ""
 
     return #debug > 0 and args.debug and ([[<pre class="calc-debug" style="text-align:left;background:transparent;display:none"><code>]] .. table.concat(debug, "\n") .. [[</code></pre>]]) or ""
 +
end
 +
 +
function format_lua(lua)
 +
    if type(lua) == "table" then
 +
        return tostring(table.concat(lua, args.concat_value or ", "))
 +
    else
 +
        return tostring(lua)
 +
    end
 
end
 
end
   Line 92: Line 100:     
     slots = function(ship)
 
     slots = function(ship)
         return U.imap(ship._equipment, function (e) return e.size end)
+
         return format_lua(U.imap(ship._equipment or {}, function (e) return e and e.size or '?' end))
 
     end,
 
     end,
   Line 215: Line 223:  
     local data = require("Module:Calc/Plugins/" .. name)
 
     local data = require("Module:Calc/Plugins/" .. name)
 
     addFormattingFunctions(name, data)
 
     addFormattingFunctions(name, data)
end
  −
  −
function format_lua(lua)
  −
    if type(lua) == "table" then
  −
        return tostring(table.concat(lua, args.concat_value or ", "))
  −
    else
  −
        return tostring(lua)
  −
    end
   
end
 
end
  
cssedit, gkautomate
6,928

edits

Navigation menu