Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Bugfix: string literal, added tp charges debug line (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliig authored Feb 12, 2022
1 parent af6f368 commit 2e4b81c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/char/i_char.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/transmute/transmute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 2e4b81c

Please sign in to comment.