Module:Infobox item: Difference between revisionsGive feedback
Gammaton32 (talk | contribs) process "nocat" variable |
append_label: prefer per-stat StatLinks target over generic attribute-type link (fixes e.g. Debuff Resist → Ability Duration) (with help from vergir-bot LLM) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 236: | Line 236: | ||
if label == "" then return val_str end | if label == "" then return val_str end | ||
-- Resolve link priority: Override > Attribute Map | -- Resolve link priority: Override > JSON Stat Link > Attribute Map Link | ||
local link_target = link_override | local link_target = link_override | ||
if not link_target or link_target == "" then | if not link_target or link_target == "" then | ||
link_target = | link_target = stat_links[prop_key] | ||
end | end | ||
if not link_target or link_target == "" then | if not link_target or link_target == "" then | ||
link_target = | link_target = attr_link | ||
end | end | ||
| Line 538: | Line 538: | ||
if item.StreetBrawl == true then | if item.StreetBrawl == true then | ||
insert(lines, "| street_brawl = true") | insert(lines, "| street_brawl = true") | ||
end | |||
-- Pass through nocat arg to the Infobox item template if provided | |||
local nocat = frame.args.nocat | |||
if nocat and nocat ~= "" then | |||
insert(lines, "| nocat = " .. nocat) | |||
end | end | ||
| Line 751: | Line 757: | ||
if index and value ~= "" then | if index and value ~= "" then | ||
insert(lines, format("| sound%s = %s", index, value)) | insert(lines, format("| sound%s = %s", index, value)) | ||
end | end | ||
end | end | ||