mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-07 01:15:18 +00:00
update ui
This commit is contained in:
parent
661dcda8e7
commit
02dc6cc8e8
11
config.py
11
config.py
@ -62,13 +62,10 @@ config = {
|
||||
'error_log_file': 'logs/ok-script_error.log',
|
||||
'version': version,
|
||||
'onetime_tasks': [ # tasks to execute
|
||||
FarmEchoTask(),
|
||||
FarmWorldBossTask()
|
||||
FarmEchoTask,
|
||||
FarmWorldBossTask
|
||||
], 'trigger_tasks': [
|
||||
AutoCombatTask(),
|
||||
AutoDialogTask()
|
||||
],
|
||||
'scenes': [ # scenes to detect
|
||||
|
||||
AutoCombatTask,
|
||||
AutoDialogTask
|
||||
]
|
||||
}
|
||||
|
@ -52,8 +52,7 @@ class BaseChar:
|
||||
self._is_forte_full = False
|
||||
self.config = {"_full_ring_area": 0, "_ring_color_index": -1}
|
||||
if type(self) is not BaseChar:
|
||||
self.config = Config(self.config,
|
||||
self.name)
|
||||
self.config = Config(self.name, self.config)
|
||||
self.current_con = 0
|
||||
|
||||
def char_config(self):
|
||||
@ -192,7 +191,7 @@ class BaseChar:
|
||||
return clicked, duration, animated
|
||||
|
||||
def send_resonance_key(self, post_sleep=0, interval=-1):
|
||||
self.task.send_key(self.task.config.get('Resonance Key'), interval=interval)
|
||||
self.task.send_key(self.task.key_config.get('Resonance Key'), interval=interval)
|
||||
self.sleep(post_sleep)
|
||||
|
||||
def update_res_cd(self):
|
||||
@ -281,10 +280,10 @@ class BaseChar:
|
||||
return clicked
|
||||
|
||||
def get_liberation_key(self):
|
||||
return self.task.config['Liberation Key']
|
||||
return self.task.key_config['Liberation Key']
|
||||
|
||||
def get_echo_key(self):
|
||||
return self.task.config['Echo Key']
|
||||
return self.task.key_config['Echo Key']
|
||||
|
||||
def get_switch_priority(self, current_char, has_intro):
|
||||
priority = self.do_get_switch_priority(current_char, has_intro)
|
||||
|
@ -3,6 +3,7 @@ import time
|
||||
|
||||
import win32api
|
||||
|
||||
from ok.config.ConfigOption import ConfigOption
|
||||
from ok.feature.FindFeature import FindFeature
|
||||
from ok.logging.Logger import get_logger
|
||||
from ok.ocr.OCR import OCR
|
||||
@ -21,6 +22,13 @@ class NotInCombatException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
key_config_option = ConfigOption('Game Hotkey Config', {
|
||||
'Echo Key': 'q',
|
||||
'Liberation Key': 'r',
|
||||
'Resonance Key': 'e',
|
||||
}, description='In Game Hotkey for Skills')
|
||||
|
||||
|
||||
class BaseCombatTask(BaseTask, FindFeature, OCR, CombatCheck):
|
||||
|
||||
def __init__(self):
|
||||
@ -28,11 +36,7 @@ class BaseCombatTask(BaseTask, FindFeature, OCR, CombatCheck):
|
||||
CombatCheck.__init__(self)
|
||||
self.chars = [None, None, None]
|
||||
self.char_texts = ['char_1_text', 'char_2_text', 'char_3_text']
|
||||
self.default_config.update({
|
||||
'Echo Key': 'q',
|
||||
'Liberation Key': 'r',
|
||||
'Resonance Key': 'e',
|
||||
})
|
||||
self.key_config = self.get_config(key_config_option)
|
||||
|
||||
self.mouse_pos = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user