Fix gem transmute: open cube from inventory + ctrl+shift from GEMS tab into cube

- convert_all_gems_to_perfect: revert to _open_cube_from_inventory() — cube lives
  in character inventory, not stash PERSONAL tab
- After opening cube, switch to GEMS tab; ctrl+shift+click sends gems directly from
  GEMS tab into the open cube without an inventory roundtrip
- testbed _gems_all: add left_inventory_ready() fallback so stash-open detection
  works with new D2R UI (GoldBtnStash template doesn't match new UI)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
alexpolo1
2026-06-17 07:55:46 +02:00
co-authored by Claude Sonnet 4.6
parent fffc0a4b56
commit e79cf0470d
2 changed files with 17 additions and 13 deletions
+14 -12
View File
@@ -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")
+3 -1
View File
@@ -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