Editing Module:StreetBrawlAbilitiesGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 20: | Line 20: | ||
if type(card) == "table" and hero and hero.Name and hero.IsDisabled ~= true then | if type(card) == "table" and hero and hero.Name and hero.IsDisabled ~= true then | ||
for slot = 1, 8 do | for slot = 1, 8 do | ||
local ability = card[tostring(slot)] | |||
local ability = | |||
if type(ability) == "table" and ability.Key then | if type(ability) == "table" and ability.Key then | ||
map[ability.Key] = { hero = hero.Name, slot = slot, name = ability.Name } | map[ability.Key] = { hero = hero.Name, slot = slot, name = ability.Name } | ||
| Line 47: | Line 46: | ||
local na, nb = tonumber(a), tonumber(b) | local na, nb = tonumber(a), tonumber(b) | ||
if na and nb then return na < nb end | if na and nb then return na < nb end | ||
return a < b | |||
return | |||
end) | end) | ||
return keys | return keys | ||
| Line 57: | Line 55: | ||
for _, key in ipairs(sorted_keys(node, top)) do | for _, key in ipairs(sorted_keys(node, top)) do | ||
local value = node[key] | local value = node[key] | ||
local path = prefix and (prefix .. "." .. key) or | local path = prefix and (prefix .. "." .. key) or key | ||
if type(value) == "table" then | if type(value) == "table" then | ||
flatten(value, path, out, false) | flatten(value, path, out, false) | ||