Skip to content

Commit

Permalink
Update sort-scrolls.lic
Browse files Browse the repository at this point in the history
Fixed rubocop issues and also added a default value of 1 for `unleash_harnesses` to prevent errors.
  • Loading branch information
BinuDR authored Jan 7, 2025
1 parent aa678c8 commit 72f6479
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sort-scrolls.lic
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ScrollSorter
@scroll_nouns = get_data('items').scroll_nouns + @custom_nouns
@unleash_mana = @settings.scroll_sorter['unleash_mana']
@unleash_harnesses = @settings.scroll_sorter['unleash_harnesses']
@unleash_harnesses ||= 1

arg_definitions =
[
Expand All @@ -33,7 +34,7 @@ class ScrollSorter
{ name: 'spell', regex: /\w+/i, optional: false, description: 'Name of spell to find. Use full name, enclose in double quotes if more than one word.' }
],
[
{ name: 'unleash', regex: /unleash/i, description: 'Unleash the specified spell scroll in your stackers.'},
{ name: 'unleash', regex: /unleash/i, description: 'Unleash the specified spell scroll in your stackers.' },
{ name: 'spell', regex: /\w+/i, optional: false, description: 'Name of spell to unleash. Use full name, enclose in double quotes if more than one word.' }
]
]
Expand Down Expand Up @@ -92,7 +93,7 @@ class ScrollSorter
end

def find_full_spell_name(abbrev)
return @all_spells.select { |s, g, a| a.casecmp(abbrev) == 0 }.flatten[0]
return @all_spells.select { |_s, _g, a| a.casecmp(abbrev) == 0 }.flatten[0]
end

def check_scroll(scroll)
Expand Down

0 comments on commit 72f6479

Please sign in to comment.