Changes

m
no edit summary
Line 10: Line 10:  
     link = function(ship) return Formatting:format_link(ship:link()) end,
 
     link = function(ship) return Formatting:format_link(ship:link()) 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
    
function format_value(key)
 
function format_value(key)
Line 18: Line 26:  
         local lua = ship[key]
 
         local lua = ship[key]
 
         if type(lua) == "function" then
 
         if type(lua) == "function" then
             return tostring(lua(ship))
+
             return format_lua(lua(ship))
        elseif type(lua) == "table" then
  −
            return tostring(table.concat(lua, args.concat_value or ", "))
   
         else
 
         else
             return tostring(lua)
+
             return format_lua(lua)
 
         end
 
         end
 
     end
 
     end
cssedit, gkautomate
6,926

edits