Skip to content

Commit

Permalink
moved profile screenshot before name copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrexxis committed Dec 11, 2024
1 parent d1f1023 commit e110071
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions roktracker/kingdom/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ def scan_governor(

if self.is_page_needed(1):
self.state_callback("Scanning general page")

# take screenshot before copying the name
self.adb_client.secure_adb_screencap().save(self.img_path / "gov_info.png")
image = load_cv2_img(self.img_path / "gov_info.png", cv2.IMREAD_UNCHANGED)

if self.scan_options["Name"]:
# nickname copy
copy_try = 0
Expand All @@ -291,9 +296,6 @@ def scan_governor(

# time.sleep(1.5 + random_delay())

self.adb_client.secure_adb_screencap().save(self.img_path / "gov_info.png")
image = load_cv2_img(self.img_path / "gov_info.png", cv2.IMREAD_UNCHANGED)

# 1st image data (ID, Power, Killpoints, Alliance)
with PyTessBaseAPI(
path=str(self.tesseract_path), psm=PSM.SINGLE_WORD, oem=OEM.LSTM_ONLY
Expand Down

0 comments on commit e110071

Please sign in to comment.