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

Commit

Permalink
Uncomment template_finder inverse mask and shift dependency to avoid …
Browse files Browse the repository at this point in the history
…circular ref
  • Loading branch information
Ezro committed Jun 18, 2022
1 parent 2795c58 commit f086892
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/template_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def search_all(
match = _single_template_match(template, img, roi, color_match, use_grayscale)
if (ind_found := match.score >= threshold):
matches.append(match)
# img = mask_by_roi(img, match.region, "inverse")
img = mask_by_roi(img, match.region, "inverse")
any_found |= ind_found
if not any_found:
break
Expand Down
2 changes: 1 addition & 1 deletion src/ui/skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import cv2
import time
import numpy as np
from utils import hotkeys
from utils.misc import cut_roi, color_filter, wait
from screen import grab
from config import Config
Expand Down Expand Up @@ -216,6 +215,7 @@ def has_tps() -> bool:
"""
:return: Returns True if botty has town portals available. False otherwise
"""
from utils import hotkeys
if SkillName.TownPortal in hotkeys.right_skill_key_map:
keyboard.send(hotkeys.right_skill_map[SkillName.TownPortal])
if not (tps_remain := wait_until_visible(ScreenObjects.TownPortalSkill, timeout=4).valid):
Expand Down

0 comments on commit f086892

Please sign in to comment.