ElEditors, Interface administrators, Administrators
70,867
edits
No edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
local image = image_name_table[i]; | local image = image_name_table[i]; | ||
local name = skill_name_table[i]; | local name = skill_name_table[i]; | ||
local lock = '' | |||
-- Locked skills | |||
if (string.find(name, ' Locked-')) then | |||
local lock_arg = name:gsub('.*%sLocked%-', ''); | |||
name = name:gsub('%sLocked%-.*', ''); | |||
lock = frame:expandTemplate{ | |||
title = 'Locked Skill', | |||
args = {lock_arg} | |||
} | |||
end | |||
-- Check if the user wants to render a header or not. | -- Check if the user wants to render a header or not. | ||
Line 64: | Line 75: | ||
local skill_wrap = name_cell:tag('div'):addClass('skill-wrap'); | local skill_wrap = name_cell:tag('div'):addClass('skill-wrap'); | ||
skill_wrap:wikitext('[[' .. name .. '|.]]'); | skill_wrap:wikitext('[[' .. name .. '|.]]'); | ||
skill_wrap:tag('div'):addClass('skill-wrap-text'):wikitext('[[' .. name .. ']]'); | skill_wrap:tag('div'):addClass('skill-wrap-text'):wikitext('[[' .. name .. ']] ' .. lock); | ||
-- If a header is detected, it will not interrupt chunking. | -- If a header is detected, it will not interrupt chunking. | ||
i = i + 1 | i = i + 1 |