Module:HeroData: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m postfix and non-localized keys have proper spacing for hero comparison
Sur (talk | contribs)
m stat infobox max width 300px
Line 256: Line 256:
-- Use expandTemplate to evaluate the Infobox_hero template
-- Use expandTemplate to evaluate the Infobox_hero template
     local template_title = mw.title.new("Template:Infobox_stat") --name of the template
     local template_title = mw.title.new("Template:Infobox_stat") --name of the template
     local template_calls = '<div style="display: flex; flex-direction: column;">' --all template calls concatenated
     local template_calls = '<div style="display: flex; flex-direction: column; max-width:calc(100% - 300px)">' --all template calls concatenated
     local template_call --current template call
     local template_call --current template call
local template_args = {} --current template arguments
local template_args = {} --current template arguments
Line 285: Line 285:
for _, stat_name in ipairs(attribute_orders[category]["attribute_order"]) do
for _, stat_name in ipairs(attribute_orders[category]["attribute_order"]) do
stat_data = stats[stat_name]
stat_data = stats[stat_name]
-- gets the stat's value if it has that stat, default to 0 if not
-- gets the stat's value if it has that stat, default to 0 if not