Module:Abilities: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary Tags: Mobile edit Mobile web edit |
m Optimised search by ability name |
||
| Line 24: | Line 24: | ||
end | end | ||
-- If not found by key, | -- If not found by key, search for key by ability name | ||
local resource_lookup = mw.loadJsonData("Data:ResourceLookup.json") | |||
local ability_resource = resource_lookup[identifier] | |||
if (ability_resource) then | |||
return raw_ability_data[ability_resource.key] | |||
end | end | ||
-- If not found by either method, return nil | -- If not found by either method, return nil | ||
return nil | return nil | ||