diff --git a/assets/lang/enUS/item_types.json b/assets/lang/enUS/item_types.json index 5cba72dd..6ee9652a 100644 --- a/assets/lang/enUS/item_types.json +++ b/assets/lang/enUS/item_types.json @@ -25,6 +25,7 @@ "Staff": "staff", "Sword": "sword", "Sword2H": "two-handed sword", + "TemperManual": "temper manual", "Tome": "tome", "Wand": "wand" } diff --git a/src/item/data/item_type.py b/src/item/data/item_type.py index f29d2ce4..07a61250 100644 --- a/src/item/data/item_type.py +++ b/src/item/data/item_type.py @@ -29,6 +29,7 @@ class ItemType(Enum): Sword2H = "two-handed sword" Tome = "tome" Wand = "wand" + TemperManual = "temper manual" # Custom Types Material = "material" Sigil = "sigil" diff --git a/src/item/descr/read_descr.py b/src/item/descr/read_descr.py index 6cb97ce2..74295d1c 100644 --- a/src/item/descr/read_descr.py +++ b/src/item/descr/read_descr.py @@ -36,7 +36,9 @@ def read_descr(rarity: ItemRarity, img_item_descr: np.ndarray, show_warnings: bo screenshot("failed_itempower_itemtype", img=img_item_descr) return None - if item.item_type == ItemType.Material or (item.rarity in [ItemRarity.Magic, ItemRarity.Common] and item.item_type != ItemType.Sigil): + if item.item_type in [ItemType.Material, ItemType.TemperManual] or ( + item.rarity in [ItemRarity.Magic, ItemRarity.Common] and item.item_type != ItemType.Sigil + ): return item # Find textures for bullets and sockets diff --git a/src/loot_filter.py b/src/loot_filter.py index 066bf370..11b169fd 100644 --- a/src/loot_filter.py +++ b/src/loot_filter.py @@ -75,6 +75,9 @@ def check_items(inv: InventoryBase): elif rarity == ItemRarity.Magic and item_descr.item_type == ItemType.Elixir: Logger.info(f"Matched: Elixir") continue + elif item_descr.item_type == ItemType.TemperManual: + Logger.info(f"Matched: Temper Manual") + continue elif rarity in [ItemRarity.Magic, ItemRarity.Common] and item_descr.item_type != ItemType.Sigil: keyboard.send("space") wait(0.13, 0.14) diff --git a/src/scripts/vision_mode.py b/src/scripts/vision_mode.py index d3814a7a..0143769d 100644 --- a/src/scripts/vision_mode.py +++ b/src/scripts/vision_mode.py @@ -183,6 +183,9 @@ def vision_mode(): elif rarity == ItemRarity.Magic and item_descr.item_type == ItemType.Elixir: Logger.info(f"Matched: Elixir") ignored_item = True + elif item_descr.item_type == ItemType.TemperManual: + Logger.info(f"Matched: Temper Manual") + ignored_item = True elif rarity in [ItemRarity.Magic, ItemRarity.Common] and item_descr.item_type != ItemType.Sigil: match = False diff --git a/src/tools/gen_data.py b/src/tools/gen_data.py index a37bf305..b42730a4 100644 --- a/src/tools/gen_data.py +++ b/src/tools/gen_data.py @@ -177,6 +177,7 @@ def main(d4data_dir: Path, companion_app_dir: Path): "Tome", "Wand", "OffHandTotem", + "TemperManual", ] item_typ_dict = { "Material": "custom type material", diff --git a/test/assets/item/temper_manual_2160p.png b/test/assets/item/temper_manual_2160p.png new file mode 100644 index 00000000..7a1fcc42 Binary files /dev/null and b/test/assets/item/temper_manual_2160p.png differ diff --git a/test/item/read_descr_test.py b/test/item/read_descr_test.py index 55267f4a..b193365b 100644 --- a/test/item/read_descr_test.py +++ b/test/item/read_descr_test.py @@ -214,6 +214,14 @@ codex_upgrade=True, ), ), + ( + (3840, 2160), + f"{BASE_PATH}/temper_manual_2160p.png", + Item( + item_type=ItemType.TemperManual, + rarity=ItemRarity.Magic, + ), + ), ], ) def test_read_descr(img_res: tuple[int, int], input_img: str, expected_item: Item):