mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Limit click area of combat states (#339)
This commit is contained in:
parent
3ae48fedd8
commit
60ebf0a3ff
BIN
assets/share/combat/state/COMBAT_AUTO.BUTTON.png
Normal file
BIN
assets/share/combat/state/COMBAT_AUTO.BUTTON.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/share/combat/state/COMBAT_SPEED_2X.BUTTON.png
Normal file
BIN
assets/share/combat/state/COMBAT_SPEED_2X.BUTTON.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
@ -10,7 +10,7 @@ COMBAT_AUTO = ButtonWrapper(
|
||||
area=(1113, 22, 1183, 58),
|
||||
search=(1093, 2, 1203, 78),
|
||||
color=(135, 137, 131),
|
||||
button=(1113, 22, 1183, 58),
|
||||
button=(1136, 31, 1161, 49),
|
||||
),
|
||||
)
|
||||
COMBAT_PAUSE = ButtonWrapper(
|
||||
@ -30,6 +30,6 @@ COMBAT_SPEED_2X = ButtonWrapper(
|
||||
area=(1029, 22, 1099, 58),
|
||||
search=(1009, 2, 1119, 78),
|
||||
color=(138, 143, 146),
|
||||
button=(1029, 22, 1099, 58),
|
||||
button=(1047, 29, 1079, 49),
|
||||
),
|
||||
)
|
||||
|
@ -67,7 +67,8 @@ class CombatState(UI):
|
||||
return False
|
||||
if not self.is_combat_executing():
|
||||
if not self._combat_auto_checked and auto:
|
||||
if self._combat_click_interval.started() and not self._combat_click_interval.reached():
|
||||
# >=0.2s after clicking the button to avoid random noice
|
||||
if self._combat_click_interval.current() >= 0.15 and not self._combat_click_interval.reached():
|
||||
logger.info('Combat on going, _combat_auto_checked')
|
||||
self._combat_auto_checked = True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user