Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Calc
(view source)
Revision as of 20:25, 3 February 2017
68 bytes added
,
7 years ago
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