Module:Item Navbox: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 29: | Line 29: | ||
end | end | ||
-- Directly fetches and formats | -- Directly fetches and formats Item text for the navbox (Icons removed) | ||
local function | local function get_item_text(slot, min_souls, max_souls, filter_mode) | ||
if slot ~= 'Weapon' and slot ~= 'Armor' and slot ~= 'Tech' then return '' end | if slot ~= 'Weapon' and slot ~= 'Armor' and slot ~= 'Tech' then return '' end | ||
| Line 57: | Line 57: | ||
local item_template | local item_template | ||
-- Output as a standard wikilink instead of an icon template | |||
if lang_code == "en" then | if lang_code == "en" then | ||
item_template = " | item_template = "[[" .. item_name_english .. "]]" | ||
else | else | ||
item_template = " | item_template = "[[" .. item_name_english .. "|" .. item_name_local .. "]]" | ||
end | end | ||
| Line 130: | Line 131: | ||
table.insert(wikitext, ' | group' .. j .. ' = ' .. tier.label) | table.insert(wikitext, ' | group' .. j .. ' = ' .. tier.label) | ||
local items_string = | local items_string = get_item_text(cat.slot, tier.min, tier.max, nil) | ||
-- Wrap the items in our flex container for layout | -- Wrap the items in our flex container for layout | ||
table.insert(wikitext, ' | list' .. j .. ' = <div class="itemnav-cost-type-container">' .. items_string .. '</div>') | table.insert(wikitext, ' | list' .. j .. ' = <div class="itemnav-cost-type-container">' .. items_string .. '</div>') | ||