Skip to content

Commit

Permalink
add activity 温泉227推图 for CN
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Jan 4, 2024
1 parent ff9b61b commit 80cd7da
Show file tree
Hide file tree
Showing 14 changed files with 526 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
/*

!src
!module
!gui
Expand All @@ -21,3 +22,7 @@
!ui.png
!window.py
!window.spec
src/explore_task_data/__pycache__/normal_task_11.cpython-39.pyc
*.pyc
*.xml
module/.idea/.name
1 change: 1 addition & 0 deletions core/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
],
"explore_hard_task_list": "此处填写需要推图的关卡",
"manual_boss": false,
"explore_activity":false,
"burst1": "1",
"burst2": "2",
"pierce1": "1",
Expand Down
16 changes: 9 additions & 7 deletions core/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from module.common_shop import x as shop_x
from module.buy_ap import x as buy_ap_x
from module.collect_daily_power import x as collect_daily_power_x
from module.no_227_kinosaki_spa import x as activity_x

iad = {

Expand Down Expand Up @@ -62,11 +63,12 @@ def init_image_data(self):
'normal_task': normal_task_x,
'main_story': main_story_x,
'buy_ap': buy_ap_x,
'plot':{
'menu':(1172,21, 1231,56),
'skip-plot-button':(1193,103, 1235,132),
'skip-plot-notice':(606,124, 672,160)
}
'plot': {
'menu': (1172, 21, 1231, 56),
'skip-plot-button': (1193, 103, 1235, 132),
'skip-plot-notice': (606, 124, 672, 160)
},
'activity': activity_x,
}
filepath = 'src/images/CN'
elif self.server == 'Global':
Expand All @@ -85,8 +87,8 @@ def init_image_data(self):
'end-phase-notice': (595, 372, 669, 402),
'formation-teleport-notice': (542, 317, 625, 351),
'add-ally-notice': (730, 284, 846, 314),
'quit-mission-info':(536,142,740,182),
'mission-conclude-confirm':(959,641,1102,687),
'quit-mission-info': (536, 142, 740, 182),
'mission-conclude-confirm': (959, 641, 1102, 687),
'fight-skip': (1111, 531, 1136, 556),
'auto-over': (1072, 589, 1094, 611),
}
Expand Down
10 changes: 8 additions & 2 deletions gui/components/expand/exploreConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
class Layout(TemplateLayout):
def __init__(self, parent=None):
configItems = [
{
'label': '开启此按钮点击推图进行活动关推图',
'key': 'explore_activity',
'type': 'switch'
},
{
'label': '是否手动boss战(进入关卡后暂停等待手操)',
'key': 'manual_boss',
Expand Down Expand Up @@ -94,8 +99,9 @@ def __init__(self, parent=None):
self.hBoxLayout.addLayout(self.push_card)

def _accept_push(self):
push_list = [int(x) for x in self.input_push.text().split(',')]
self.set('explore_normal_task_regions', push_list)
if self.input_push.text() != '':
push_list = [int(x) for x in self.input_push.text().split(',')]
self.set('explore_normal_task_regions', push_list)
value = self.input_push.text()
w = InfoBar(
icon=InfoBarIcon.SUCCESS,
Expand Down
3 changes: 3 additions & 0 deletions gui/fragments/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def _init_script(self):
update_signal=self.update_signal)
self._main_thread.init_all_data()
self._main_thread.flag_run = True
self._main_thread.screenshot_updated = False

def display(self, text):
self.button_signal.emit(text)
Expand All @@ -211,6 +212,8 @@ def start_normal_task(self):
self._init_script()
self.display('停止')
# 这里可能有Bug,若用户还未登入,则会报错。
if self._main_thread.solve('no_227_kinosaki_spa'):
notify(title='BAAS', body='活动推图已完成')
if self._main_thread.solve('explore_normal_task'):
notify(title='BAAS', body='普通图推图已完成')

Expand Down
8 changes: 8 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'total_force_fight': module.total_force_fight.implement,
'restart': module.restart.implement,
'refresh_uiautomator2': module.refresh_uiautomator2.implement,
'no_227_kinosaki_spa': module.no_227_kinosaki_spa.implement,
}


Expand Down Expand Up @@ -619,6 +620,13 @@ def init_package_name(self):
self.package_name = 'com.nexon.bluearchive'
return True

def set_screenshot_interval(self, interval):
if interval < 0.1:
self.logger.error("screenshot_interval must be greater than 0.1")
interval = 0.1
self.logger.info("screenshot_interval set to " + str(interval))
self.screenshot_interval = interval


if __name__ == '__main__':
# # print(time.time())
Expand Down
1 change: 1 addition & 0 deletions module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
from module import total_force_fight
from module import restart
from module import refresh_uiautomator2
from module import no_227_kinosaki_spa
Loading

0 comments on commit 80cd7da

Please sign in to comment.