mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Add: is_map_loading()
This commit is contained in:
parent
4831a9d71e
commit
d1abb19982
BIN
assets/share/combat/interact/MAP_LOADING.SEARCH.png
Normal file
BIN
assets/share/combat/interact/MAP_LOADING.SEARCH.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
BIN
assets/share/combat/interact/MAP_LOADING.png
Normal file
BIN
assets/share/combat/interact/MAP_LOADING.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
@ -13,3 +13,13 @@ DUNGEON_COMBAT_INTERACT = ButtonWrapper(
|
|||||||
button=(750, 411, 997, 448),
|
button=(750, 411, 997, 448),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
MAP_LOADING = ButtonWrapper(
|
||||||
|
name='MAP_LOADING',
|
||||||
|
share=Button(
|
||||||
|
file='./assets/share/combat/interact/MAP_LOADING.png',
|
||||||
|
area=(644, 367, 662, 389),
|
||||||
|
search=(639, 347, 667, 394),
|
||||||
|
color=(159, 141, 149),
|
||||||
|
button=(644, 367, 662, 389),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
from module.base.utils import color_similar, get_color
|
||||||
from tasks.base.ui import UI
|
from tasks.base.ui import UI
|
||||||
from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT
|
from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT, MAP_LOADING
|
||||||
|
from tasks.map.assets.assets_map_control import A_BUTTON
|
||||||
|
|
||||||
|
|
||||||
class CombatInteract(UI):
|
class CombatInteract(UI):
|
||||||
@ -12,3 +14,15 @@ class CombatInteract(UI):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def is_map_loading(self):
|
||||||
|
if self.appear(MAP_LOADING, similarity=0.75):
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
def is_map_loading_black(self):
|
||||||
|
color = get_color(self.device.image, A_BUTTON.area)
|
||||||
|
if color_similar(color, (0, 0, 0)):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
@ -10,6 +10,6 @@ ROGUE_REPORT = ButtonWrapper(
|
|||||||
area=(1198, 19, 1223, 42),
|
area=(1198, 19, 1223, 42),
|
||||||
search=(1178, 0, 1243, 62),
|
search=(1178, 0, 1243, 62),
|
||||||
color=(203, 165, 119),
|
color=(203, 165, 119),
|
||||||
button=(382, 645, 894, 700),
|
button=(1198, 19, 1223, 42),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user