From 2e4b81ccacd14661b5eab3c6f4b1060dab7d2bdf Mon Sep 17 00:00:00 2001 From: mgleed Date: Fri, 11 Feb 2022 21:50:57 -0500 Subject: [PATCH] Bugfix: string literal, added tp charges debug line (#535) --- src/char/i_char.py | 1 + src/transmute/transmute.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/char/i_char.py b/src/char/i_char.py index 59bc9282f..24023c459 100644 --- a/src/char/i_char.py +++ b/src/char/i_char.py @@ -110,6 +110,7 @@ def is_low_on_teleport_charges(self): img = self._screen.grab() charges_remaining = self.get_skill_charges() if charges_remaining: + Logger.debug(f"{charges_remaining} teleport charges remain") return charges_remaining <= 3 else: charges_present = self.skill_is_charged(img) diff --git a/src/transmute/transmute.py b/src/transmute/transmute.py index 757442a4e..13c348271 100644 --- a/src/transmute/transmute.py +++ b/src/transmute/transmute.py @@ -182,7 +182,7 @@ def put_back_all_gems(self, s: Stash) -> None: def should_transmute(self) -> bool: every_x_game = Config._transmute_config["transmute_every_x_game"] - if every_x_game is None or every_x_game is "" or int(every_x_game) <= 0: + if every_x_game is None or every_x_game == "" or int(every_x_game) <= 0: return False return self._game_stats._game_counter - self._last_game >= int(every_x_game) @@ -204,7 +204,7 @@ def check_cube_empty(self) -> bool: def inspect_cube(self)-> InventoryCollection: return self.inspect_area(4, 3, roi=Config.ui_roi["cube_area_roi"], known_items=FLAWLESS_GEMS) - + def _run_gem_transmutes(self) -> None: Logger.info("Starting gem transmute") self._last_game = self._game_stats._game_counter @@ -214,7 +214,7 @@ def _run_gem_transmutes(self) -> None: is_cube_empty = None while True: while inventory.count_empty() >= 3: - next_batch = algorithm.next_batch() + next_batch = algorithm.next_batch() is_cube_empty = self.check_cube_empty() if is_cube_empty is None else is_cube_empty if not is_cube_empty: Logger.warning("Some items detected in the cube. Skipping transmute")