From 41f023a71afe78aaf1cdd659a6d50f35fd058e40 Mon Sep 17 00:00:00 2001 From: JoShMiQueL Date: Thu, 10 Oct 2024 16:18:41 +0200 Subject: [PATCH] Add glaive weapon support - Update item_type.py - Update common.py - Update gen_data.py - Update item_types.json --- assets/lang/enUS/item_types.json | 1 + src/gui/importer/common.py | 2 ++ src/item/data/item_type.py | 1 + src/tools/gen_data.py | 1 + 4 files changed, 5 insertions(+) diff --git a/assets/lang/enUS/item_types.json b/assets/lang/enUS/item_types.json index e1533a28..cc731384 100644 --- a/assets/lang/enUS/item_types.json +++ b/assets/lang/enUS/item_types.json @@ -19,6 +19,7 @@ "OffHandTotem": "totem", "Polearm": "polearm", "Quarterstaff": "quarterstaff", + "Glaive": "glaive", "Ring": "ring", "Scythe": "scythe", "Scythe2H": "two-handed scythe", diff --git a/src/gui/importer/common.py b/src/gui/importer/common.py index 6d9ba07d..288f328a 100644 --- a/src/gui/importer/common.py +++ b/src/gui/importer/common.py @@ -52,6 +52,8 @@ def fix_weapon_type(input_str: str) -> ItemType | None: return ItemType.Scythe2H if "quarterstaff" in input_str: return ItemType.Quarterstaff + if "glaive" in input_str: + return ItemType.Glaive if "scythe" in input_str: return ItemType.Scythe if "crossbow" in input_str: diff --git a/src/item/data/item_type.py b/src/item/data/item_type.py index 0d852e48..ad445284 100644 --- a/src/item/data/item_type.py +++ b/src/item/data/item_type.py @@ -21,6 +21,7 @@ class ItemType(Enum): OffHandTotem = "totem" Polearm = "polearm" Quarterstaff = "quarterstaff" + Glaive = "glaive" Ring = "ring" Scythe = "scythe" Scythe2H = "two-handed scythe" diff --git a/src/tools/gen_data.py b/src/tools/gen_data.py index ac9c2a52..7b1860a5 100644 --- a/src/tools/gen_data.py +++ b/src/tools/gen_data.py @@ -174,6 +174,7 @@ def main(d4data_dir: Path, companion_app_dir: Path): "OffHandTotem", "Polearm", "Quarterstaff", + "Glaive", "Ring", "Scythe", "Scythe2H",