Module:Abilities/utils: Difference between revisionsGive feedback
Tag: Undo |
mNo edit summary Tag: Manual revert |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 29: | Line 29: | ||
return "Missing Ability Name" | return "Missing Ability Name" | ||
end | end | ||
-- Normalize input for case-insensitive comparison | |||
local normalized_input = string.lower(ability_name) | |||
-- Iterate through all heroes in the data | -- Iterate through all heroes in the data | ||
| Line 35: | Line 38: | ||
for ability_num, ability in pairs(ui_data) do | for ability_num, ability in pairs(ui_data) do | ||
local current_name = lang.get_string(ability.Key) | local current_name = lang.get_string(ability.Key) | ||
if current_name == | if string.lower(current_name) == normalized_input then | ||
return hero_key | return hero_key | ||
end | end | ||