Skip to content

Commit

Permalink
Fixed 2h detection (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisoro authored Jun 13, 2024
1 parent e03589e commit bd154a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.5.5"
__version__ = "5.5.6"
3 changes: 1 addition & 2 deletions src/item/descr/item_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ def _find_item_power_and_type(item: Item, concatenated_str: str) -> Item:
last_char_idx = tmp_idx
max_length = len(item_type.value)
# common mistake is that "Armor" is on a seperate line and can not be detected properly
# TODO: Language specific
if item.item_type is None and ("chest" in concatenated_str or "armor" in concatenated_str):
item.item_type = ItemType.ChestArmor
if "two-handed" in concatenated_str or "two- handed" in concatenated_str:
if any(substring in concatenated_str for substring in ["two -handed", "two handed", "two- handed", "two-handed"]):
if item.item_type == ItemType.Sword:
item.item_type = ItemType.Sword2H
elif item.item_type == ItemType.Mace:
Expand Down

0 comments on commit bd154a9

Please sign in to comment.