393
edits
No edit summary |
No edit summary |
||
Line 47: | Line 47: | ||
end | end | ||
local skillNodes = p. | local skillNodes = p.getSkillTree(skillName) | ||
if not skillNodes then | if not skillNodes then | ||
Line 53: | Line 53: | ||
end | end | ||
local html = mw.html.create('div'):addClass('skill-tree') | local html = mw.html.create('div'):addClass('skill-tree-container') | ||
for _, node in ipairs(skillNodes) do | for _, node in ipairs(skillNodes) do | ||
Line 59: | Line 59: | ||
:addClass('skill-tree-node') | :addClass('skill-tree-node') | ||
:tag('h4'):wikitext(node.name):done() | :tag('h4'):wikitext(node.name):done() | ||
:tag('p'):wikitext('Points: ' .. node.costs | :tag('p'):wikitext('Points: ' .. node.costs):done() | ||
if node.modifiers then | if node.modifiers then | ||
local | local modifierText = "" | ||
for | for _, data in pairs(node.modifiers) do | ||
modifierText = modifierText .. (data.skillID or "") .. ": " .. (data.value or "") .. "<br>" | |||
end | end | ||
nodeDiv:tag('p'):wikitext(modifierText):done() | |||
end | end | ||
Line 84: | Line 74: | ||
return tostring(html) | return tostring(html) | ||
end | end | ||
return p | return p |
edits