Module:Abilities: Difference between revisionsGive feedback
Gammaton32 (talk | contribs) fixed not returning value for non-table upgrades |
mNo edit summary Tag: Undo |
||
| (2 intermediate revisions by 2 users not shown) | |||
| 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 upgrade is not a table, return value. If it is, check for segments | ||
if type(element) ~= "table" then | if type(element) ~= "table" then | ||
return element or "" | return element or "" | ||
end | end | ||
element = element[segment] | element = element[segment] | ||