Module:ItemData/nav: Difference between revisions

Active Items table: use var(--color-subtle) for diminished notes (with help from vergir-bot LLM)
Vergir (talk | contribs)
Render the v2 navbox item cards in low-graphics mode: ramped wear, no icon mask, single paper texture (with help from vergir-bot LLM)
Line 1: Line 1:


local p = {}
local p = {}
Line 11: Line 12:
     ["Spirit Lifesteal"] = "Spirit Lifesteal (item)"
     ["Spirit Lifesteal"] = "Spirit Lifesteal (item)"
}
}
-- The card navboxes put every item on a single page, so their cards opt into
-- the cheaper ItemBox layers: a gradient instead of the masked wear tint, no
-- icon mask, and one shared paper instead of one picked per item. Each of those
-- is a render pass or a backdrop read the GPU would otherwise repeat per card.
-- See the parameters on [[Template:ItemBox]]. Only the ItemBox branch of
-- write_wrapped_item_list uses this; the ItemIcon lists are unaffected.
local LOW_GRAPHICS = "|wearMask=ramp|iconMask=no|texture=3"


-- Cached items grouped by slot to prevent redundant full-table evaluations
-- Cached items grouped by slot to prevent redundant full-table evaluations
Line 94: Line 103:
                     if lang_code == "en" then
                     if lang_code == "en" then
                         if is_street_brawl then
                         if is_street_brawl then
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. item_link .. "|overrideTier=5}}"
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. item_link .. "|overrideTier=5" .. LOW_GRAPHICS .. "}}"
                         else
                         else
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. item_link .. "}}"
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. item_link .. LOW_GRAPHICS .. "}}"
                         end
                         end
                     else
                     else
                         local link_local = item_link .. "/" .. lang_code
                         local link_local = item_link .. "/" .. lang_code
                         if is_street_brawl then
                         if is_street_brawl then
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. link_local .. "|item_price={{#invoke:Lang|get_string|Citadel_ItemDraft_Legendary}}}}"
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. link_local .. "|item_price={{#invoke:Lang|get_string|Citadel_ItemDraft_Legendary}}" .. LOW_GRAPHICS .. "}}"
                         else
                         else
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. link_local .. "}}"
                             item_template = "{{ItemBox|itemName=" .. item_name_english .. "|overrideLinkClick=" .. link_local .. LOW_GRAPHICS .. "}}"
                         end
                         end
                     end
                     end