Skip to content

Commit

Permalink
Merge pull request #51 from jackbrown1993/defence_defense
Browse files Browse the repository at this point in the history
Allow spelling as skill to be 'defence' or 'defense'
  • Loading branch information
Coffee-fueled-deadlines committed Nov 12, 2023
2 parents 0763ef6 + 202b053 commit 3a1b457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OSRSBytes/Hiscores.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __parseSkills(self):

self.__skills = [
'attack',
'defense',
'defence',
'strength',
'hitpoints',
'ranged',
Expand Down Expand Up @@ -387,6 +387,8 @@ def skill(self, skill, stype: str = 'level'):
"""
try:
# Add support for both British and American spellings of 'defence'
if skill == 'defense': skill = 'defence'
if stype.lower() not in ['rank','level','experience','exp_to_next_level']:
raise SkillError("stype must be 'rank','level', or 'experience'")
else:
Expand Down

0 comments on commit 3a1b457

Please sign in to comment.