Module:HeroData: Difference between revisions

Sur (talk | contribs)
m orders now come from Data:StatBoxAttrs.json
Sur (talk | contribs)
m infobox values actually passed to infobox correctly
Line 101: Line 101:
     local shouldDisplay
     local shouldDisplay
     local template_args = {}
     local template_args = {}
    local stat_values = {Weapon = "", Vitality = ""}
      
      
     -- Iterate attribute categories
     -- Iterate attribute categories
Line 130: Line 131:
end
end
template_args[stat_name] = stat_value .. postfix
-- First add localized stat name for left column
stat_values[category] = stat_values[category] .. "," .. label
-- Then add stat value for right column
stat_values[category] = stat_values[category] .. "," .. stat_value .. postfix
end
end
-- Add the stat values in the category to i.e weapon_values and vitality_values parameters
template_args[string.lower(category) .. "_values"] = stat_values[category]
end
end