From 66322c48a912885272af294181d3504309ae9250 Mon Sep 17 00:00:00 2001 From: Jack Brown Date: Fri, 10 Nov 2023 17:33:19 +0000 Subject: [PATCH 1/2] Add ability to use either spelling of defence / defense --- OSRSBytes/Hiscores.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OSRSBytes/Hiscores.py b/OSRSBytes/Hiscores.py index 36ff0e5..dadb131 100644 --- a/OSRSBytes/Hiscores.py +++ b/OSRSBytes/Hiscores.py @@ -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: From 202b0535b5893dcae3e3dce758a4b85d0e0d4158 Mon Sep 17 00:00:00 2001 From: Jack Brown Date: Fri, 10 Nov 2023 17:44:01 +0000 Subject: [PATCH 2/2] Update skill list to match in-game spelling. Fixes bug. --- OSRSBytes/Hiscores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSRSBytes/Hiscores.py b/OSRSBytes/Hiscores.py index dadb131..854ad3c 100644 --- a/OSRSBytes/Hiscores.py +++ b/OSRSBytes/Hiscores.py @@ -183,7 +183,7 @@ def __parseSkills(self): self.__skills = [ 'attack', - 'defense', + 'defence', 'strength', 'hitpoints', 'ranged',