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 06:32, 13 June 2021
306 bytes added
,
3 years ago
no edit summary
Line 460:
Line 460:
return frame:preprocess(format{string.sub(arg, 3), this = env[this] or ""})
return frame:preprocess(format{string.sub(arg, 3), this = env[this] or ""})
else
else
−
return format_arg(format_value(string.sub(arg, 2), ship, target))
+
if args.filter then
+
local kv = U.split(args.filter, " = ")
+
if tostring(ship[kv[1]](ship)) == kv[2] then
+
return format_arg(format_value(string.sub(arg, 2), ship, target))
+
else
+
return nil
+
end
+
else
+
return format_arg(format_value(string.sub(arg, 2), ship, target))
+
end
end
end
else
else
Line 493:
Line 502:
until not sequence or sequence_position > #sequence
until not sequence or sequence_position > #sequence
debugLog("#values", #values)
debugLog("#values", #values)
−
return table.concat(values, args.concat or "") .. debugString()
+
return table.concat(values, args.concat or "
,
") .. debugString()
end
end
Line 551:
Line 560:
mw.log(
mw.log(
Calc.format(nil, {
Calc.format(nil, {
−
type = "1",
+
"@
all_names
",
−
"@
equipmentByType
",
"!@",
"!@",
"?link",
"?link",
+
filter = "hp_mod_married = 0"
})
})
)
)
がか
cssedit, gkautomate
7,064
edits