Module:Abilities: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) No edit summary |
Gammaton32 (talk | contribs) fixed not returning value for non-table upgrades |
||
| Line 150: | Line 150: | ||
if prop and prop ~= "" then | if prop and prop ~= "" then | ||
for segment in string.gmatch(prop, "[^%.]+") do | for segment in string.gmatch(prop, "[^%.]+") do | ||
-- If upgrade is a table, check for segments. If not, return value | |||
if type(element) ~= "table" then | if type(element) ~= "table" then | ||
return "" -- Can't traverse further | return element or "" -- Can't traverse further | ||
end | end | ||
element = element[segment] | element = element[segment] | ||