Module:InfoboxHero: Difference between revisions

Vergir (talk | contribs)
Drop the deprecated no_summary and no_icon parameters in favour of show_hero_tags and show_icon (with help from vergir-bot LLM)
Vergir (talk | contribs)
mNo edit summary
Line 17: Line 17:
-- and [[Template:Infobox hero/themes.css]].
-- and [[Template:Infobox hero/themes.css]].
--
--
-- Layout is entirely described by the CONFIG block below. Adding, reordering or
-- relabelling a stat should not require touching any code beneath it.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


Line 31: Line 29:
local hero_module = require('Module:HeroData')
local hero_module = require('Module:HeroData')


-- Defined below the CONFIG block; declared here so config closures can see them.
local get_stat, has_stat, has_override_or_stat, stat_number
local get_stat, has_stat, has_override_or_stat, stat_number


Line 42: Line 39:
local FALLBACK_CARD    = 'Dummy card.png'
local FALLBACK_CARD    = 'Dummy card.png'


-- Each section is a collapsible dropdown. Rows inherit the section's icon color.
--
-- Row fields (all optional except a label):
-- Row fields (all optional except a label):
--  stat        Key in Data:HeroData.json. Resolved top-level, then .Weapon,
--  stat        Key in Data:HeroData.json. Resolved top-level, then .Weapon,