Skip to content

Commit

Permalink
Feat: config and UI of auto story
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmusen214 committed Feb 5, 2024
1 parent 07471b0 commit 54f9b5c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion BAAH_CONFIGS/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,6 @@
"SERVER_TYPE": "JP",
"CLOSE_EMULATOR_BAAH": true,
"FANHEXIE": false,
"KILL_PORT_IF_EXIST": false
"KILL_PORT_IF_EXIST": false,
"AUTO_EVENT_STORY_PUSH": false
}
1 change: 1 addition & 0 deletions DATA/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"config_ip_root": "Emulator Listening IP Address (This item does not include the port number)",
"config_adb_path": "ADB Path",
"config_screenshot_name": "Screenshot File Name",
"config_auto_event_story":"Auto View Event Story",

"config_server_jp": "Japanese Server",
"config_server_cn": "Chinese Official Server",
Expand Down
1 change: 1 addition & 0 deletions DATA/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"config_ip_root":"模拟器监听IP地址(此项不包含端口号)",
"config_adb_path":"ADB路径",
"config_screenshot_name":"截图文件名",
"config_auto_event_story":"自动推活动剧情",


"config_server_jp":"日服",
Expand Down
5 changes: 4 additions & 1 deletion gui/pages/Setting_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ def set_event(config):
ui.link_target("ACTIVITY")
ui.label(config.get_text("task_event")).style('font-size: x-large')


ui.checkbox(config.get_text("config_auto_event_story")).bind_value(config.userconfigdict, "AUTO_EVENT_STORY_PUSH")

ui.label(config.get_text("config_desc_times"))
list_edit_area(config.userconfigdict["EVENT_QUEST_LEVEL"], [config.get_text("config_day"), "", [config.get_text("config_level"), config.get_text("config_times")]], config.get_text("config_desc_list_edit"))
list_edit_area(config.userconfigdict["EVENT_QUEST_LEVEL"], [config.get_text("config_day"), "", [config.get_text("config_level"), config.get_text("config_times")]], config.get_text("config_desc_list_edit"))
3 changes: 2 additions & 1 deletion modules/AllTask/InEvent/InEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def on_run(self) -> None:
today = time.localtime().tm_mday

# 检测并跳过剧情
EventStory().run()
if config.userconfigdict["AUTO_EVENT_STORY_PUSH"]:
EventStory().run()
if config.userconfigdict["EVENT_QUEST_LEVEL"] and len(config.userconfigdict["EVENT_QUEST_LEVEL"]) != 0:
# 可选任务队列不为空时
quest_loc = today%len(config.userconfigdict['EVENT_QUEST_LEVEL'])
Expand Down
3 changes: 2 additions & 1 deletion modules/configs/defaultSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"SHOP_NORMAL_REFRESH_TIME":{"d": 0},
"SHOP_CONTEST_REFRESH_TIME":{"d": 0},
"LOCK_SERVER_TO_RESPOND_Y":{"d": True},
"CAFE_CAMERA_FULL":{"d":True}
"CAFE_CAMERA_FULL":{"d":True},
"AUTO_EVENT_STORY_PUSH":{"d":False}
}

# 软件的config里的默认值
Expand Down

0 comments on commit 54f9b5c

Please sign in to comment.