Module:Sandbox/One Bar: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 33: | Line 33: | ||
hero_row:tag('td'):wikitext(hero_icon):done() | hero_row:tag('td'):wikitext(hero_icon):done() | ||
stats_text = "" | stats_text = "" | ||
if (spirit_scaling | if (spirit_scaling ~= nil) then | ||
for k, v in pairs(spirit_scaling) do | for k, v in pairs(spirit_scaling) do | ||
stats_text = stats_text .. k ..": ".. hero[k] .. "+" .. v .. "\n" | stats_text = stats_text .. k ..": ".. hero[k] .. "+" .. v .. "\n" | ||
| Line 48: | Line 48: | ||
-- probably too much nil check but I want the table to print for now | -- probably too much nil check but I want the table to print for now | ||
if (ability["Info1"] ~= nil and ability["Info1"]["Main"] ~= nil | if (ability["Info1"] ~= nil and ability["Info1"]["Main"] ~= nil | ||
and ability["Info1"]["Main"]["Props"] | and ability["Info1"]["Main"]["Props"] ~= nil) then | ||
for _, prop in ipairs(ability["Info1"]["Main"]["Props"]) do | for _, prop in ipairs(ability["Info1"]["Main"]["Props"]) do | ||
if (prop["Scale"] ~= nil and next(prop["Scale"]) ~= nil) then | if (prop["Scale"] ~= nil and next(prop["Scale"]) ~= nil) then | ||