diff --git a/src/transmute/transmute.py b/src/transmute/transmute.py index 7bd7eb4..f2172a8 100644 --- a/src/transmute/transmute.py +++ b/src/transmute/transmute.py @@ -508,22 +508,22 @@ class Transmute: Logger.info(f"convert_all_gems: {len(plan)} gem types to process, {total} total transmutes planned") # Step 3: execute. - # Flow per gem type: open cube from PERSONAL stash tab once, switch to - # GEMS tab (cube UI stays open), then for each batch: - # ctrl+shift+click gem stack 3x -> gems land directly in open cube - # transmute - # ctrl+click result from cube -> goes back to active GEMS tab - # Close cube when done with this gem type. + # Flow per gem type: + # Open cube from CHARACTER INVENTORY (right-click) + # Switch to GEMS tab — cube UI stays open alongside stash + # For each transmute: + # ctrl+shift+click gem stack 3x -> gems go directly into open cube + # transmute + # ctrl+click result from cube -> goes back to active GEMS tab + # Close cube when done with this gem type. done = 0 for n_transmutes, gem_template, gems_out, tier_name in plan: Logger.info(f"convert_all_gems: {n_transmutes}x {gem_template}") - # Open cube from PERSONAL tab - if not self._open_cube_from_stash(): - Logger.error(" cube not found in stash — aborting") + # Open cube from character inventory, then switch to GEMS tab + if not self._open_cube_from_inventory(): + Logger.error(" cube not found in inventory — aborting") return - - # Switch to GEMS tab (cube UI stays open) self._switch_to_gems_tab() for i in range(n_transmutes): @@ -533,7 +533,7 @@ class Transmute: if not matches: Logger.info(f" no {gem_template} left in GEMS tab, stopping") break - Logger.info(f" [{i+1}/{n_transmutes}] ctrl+shift+click {gem_template} x3 -> cube @ {matches[0].center_monitor}") + Logger.info(f" [{i+1}/{n_transmutes}] ctrl+shift {gem_template} x3 -> cube @ {matches[0].center_monitor}") for _ in range(3): self._ctrl_shift_click_monitor(*matches[0].center_monitor, label=gem_template) wait(0.15, 0.2) @@ -549,6 +549,8 @@ class Transmute: self.close_cube() wait(0.3, 0.4) + # Reopen GEMS tab for next gem type + self._switch_to_gems_tab() Logger.info(f"convert_all_gems: done — {done}/{total} transmutes completed") diff --git a/tools/testbed.py b/tools/testbed.py index a7b3e6f..f0d522c 100644 --- a/tools/testbed.py +++ b/tools/testbed.py @@ -96,7 +96,9 @@ def _gems_all() -> int: from inventory import common start_detecting_window() try: - if not is_visible(ScreenObjects.GoldBtnStash, grab()): + img = grab() + stash_open = is_visible(ScreenObjects.GoldBtnStash, img) or common.left_inventory_ready(img) + if not stash_open: print("gems_all: stash not open — navigating to stash...") import template_finder from ui import main_menu