Module:HeroData: Difference between revisionsGive feedback
m get_hero_scalar_str slightly reworked |
m arg1 for ss/ls call renamed to 1 |
||
| Line 39: | Line 39: | ||
--If the hero scales with the stat, it returns {{Ss|value}} or {{Ls|value}}, else blank string | --If the hero scales with the stat, it returns {{Ss|value}} or {{Ls|value}}, else blank string | ||
--{{#invoke:HeroData| | --{{#invoke:HeroData|get_hero_scalar_str_invoke|HERO_NAME|SPIRIT_OR_LEVEL|STAT_NAME}}-- | ||
p.get_hero_scalar_str_invoke = function(frame) | p.get_hero_scalar_str_invoke = function(frame) | ||
local hero_name = frame.args[1] | local hero_name = frame.args[1] | ||
| Line 74: | Line 74: | ||
local template_args = {} | local template_args = {} | ||
template_args[" | template_args["1"] = hero_scalar | ||
local template_call = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args } | local template_call = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args } | ||