From 8e29d7d2c0f75665c2458426f3b7cc89088b19d3 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Mon, 20 Nov 2023 21:43:11 +0800 Subject: [PATCH] feat: add scrimmage config --- config/template.json | 23 ++++++++ module/config/argument/args.json | 85 ++++++++++++++++++++++++++++ module/config/argument/argument.yaml | 21 +++++++ module/config/argument/default.yaml | 3 + module/config/argument/menu.json | 1 + module/config/argument/task.yaml | 6 ++ module/config/config_generated.py | 15 +++++ module/config/i18n/en-US.json | 70 +++++++++++++++++++++++ module/config/i18n/zh-CN.json | 70 +++++++++++++++++++++++ 9 files changed, 294 insertions(+) diff --git a/config/template.json b/config/template.json index 3cf7232..69525b4 100644 --- a/config/template.json +++ b/config/template.json @@ -86,6 +86,29 @@ "Count": 2 } }, + "Scrimmage": { + "Scheduler": { + "Enable": true, + "NextRun": "2020-01-01 00:00:00", + "Command": "Scrimmage", + "ServerUpdate": "04:00" + }, + "Scrimmage": { + "OnError": "skip" + }, + "Trinity": { + "Stage": 1, + "Count": 2 + }, + "Gehenna": { + "Stage": 1, + "Count": 2 + }, + "Millennium": { + "Stage": 1, + "Count": 2 + } + }, "TacticalChallenge": { "Scheduler": { "Enable": true, diff --git a/module/config/argument/args.json b/module/config/argument/args.json index d92674e..5f04a3f 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -357,6 +357,91 @@ } } }, + "Scrimmage": { + "Scheduler": { + "Enable": { + "type": "checkbox", + "value": true, + "option": [ + true, + false + ] + }, + "NextRun": { + "type": "datetime", + "value": "2020-01-01 00:00:00", + "validate": "datetime" + }, + "Command": { + "type": "input", + "value": "Scrimmage", + "display": "hide" + }, + "ServerUpdate": { + "type": "input", + "value": "04:00", + "display": "hide" + } + }, + "Scrimmage": { + "OnError": { + "type": "select", + "value": "skip", + "option": [ + "stop", + "skip" + ] + } + }, + "Trinity": { + "Stage": { + "type": "select", + "value": 1, + "option": [ + 1, + 2, + 3, + 4 + ] + }, + "Count": { + "type": "input", + "value": 2 + } + }, + "Gehenna": { + "Stage": { + "type": "select", + "value": 1, + "option": [ + 1, + 2, + 3, + 4 + ] + }, + "Count": { + "type": "input", + "value": 2 + } + }, + "Millennium": { + "Stage": { + "type": "select", + "value": 1, + "option": [ + 1, + 2, + 3, + 4 + ] + }, + "Count": { + "type": "input", + "value": 2 + } + } + }, "TacticalChallenge": { "Scheduler": { "Enable": { diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 33ea74c..562573c 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -102,6 +102,27 @@ Schoolhouse: option: [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] Count: 2 +Scrimmage: + OnError: + value: skip + option: [ stop, skip ] + +Trinity: + Stage: + value: 1 + option: [ 1, 2, 3, 4 ] + Count: 2 +Gehenna: + Stage: + value: 1 + option: [ 1, 2, 3, 4 ] + Count: 2 +Millennium: + Stage: + value: 1 + option: [ 1, 2, 3, 4 ] + Count: 2 + TacticalChallenge: PlayerSelect: value: 0 diff --git a/module/config/argument/default.yaml b/module/config/argument/default.yaml index d05be5a..bc5a3d2 100644 --- a/module/config/argument/default.yaml +++ b/module/config/argument/default.yaml @@ -16,6 +16,9 @@ Circle: Bounty: Scheduler: Enable: true +Scrimmage: + Scheduler: + Enable: true TacticalChallenge: Scheduler: Enable: true \ No newline at end of file diff --git a/module/config/argument/menu.json b/module/config/argument/menu.json index 7fc71d7..378272d 100644 --- a/module/config/argument/menu.json +++ b/module/config/argument/menu.json @@ -15,6 +15,7 @@ "Mail", "Circle", "Bounty", + "Scrimmage", "TacticalChallenge", "DataUpdate" ] diff --git a/module/config/argument/task.yaml b/module/config/argument/task.yaml index e6ce8a0..19b634b 100644 --- a/module/config/argument/task.yaml +++ b/module/config/argument/task.yaml @@ -35,6 +35,12 @@ Daily: - Highway - DesertRailroad - Schoolhouse + Scrimmage: + - Scheduler + - Scrimmage + - Trinity + - Gehenna + - Millennium TacticalChallenge: - Scheduler - TacticalChallenge diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 9b787b5..33a304a 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -60,6 +60,21 @@ class GeneratedConfig: Schoolhouse_Stage = 1 # 1, 2, 3, 4, 5, 6, 7, 8, 9 Schoolhouse_Count = 2 + # Group `Scrimmage` + Scrimmage_OnError = 'skip' # stop, skip + + # Group `Trinity` + Trinity_Stage = 1 # 1, 2, 3, 4 + Trinity_Count = 2 + + # Group `Gehenna` + Gehenna_Stage = 1 # 1, 2, 3, 4 + Gehenna_Count = 2 + + # Group `Millennium` + Millennium_Stage = 1 # 1, 2, 3, 4 + Millennium_Count = 2 + # Group `TacticalChallenge` TacticalChallenge_PlayerSelect = 0 # 0, 1, 2, 3 diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index ee222bc..301c5ca 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -34,6 +34,10 @@ "name": "Bounty", "help": "" }, + "Scrimmage": { + "name": "Scrimmage", + "help": "" + }, "TacticalChallenge": { "name": "Tactical Challenge", "help": "" @@ -294,6 +298,72 @@ "help": "Sweep the selected stage for X times" } }, + "Scrimmage": { + "_info": { + "name": "Scrimmage Settings", + "help": "" + }, + "OnError": { + "name": "Error Handling", + "help": "Perform the selected action when an error occurs (ticket not enough or any invalid setting)", + "stop": "Stop script", + "skip": "Skip current task" + } + }, + "Trinity": { + "_info": { + "name": "Trinity", + "help": "" + }, + "Stage": { + "name": "Select Stage", + "help": "", + "1": "01 - Trinity A", + "2": "02 - Trinity B", + "3": "03 - Trinity C", + "4": "04 - Trinity D" + }, + "Count": { + "name": "Sweep X times", + "help": "Sweep the selected stage for X times" + } + }, + "Gehenna": { + "_info": { + "name": "Gehenna", + "help": "" + }, + "Stage": { + "name": "Select Stage", + "help": "", + "1": "01 - Gehenna A", + "2": "02 - Gehenna B", + "3": "03 - Gehenna C", + "4": "04 - Gehenna D" + }, + "Count": { + "name": "Sweep X times", + "help": "Sweep the selected stage for X times" + } + }, + "Millennium": { + "_info": { + "name": "Millennium", + "help": "" + }, + "Stage": { + "name": "Select Stage", + "help": "", + "1": "01 - Millennium A", + "2": "02 - Millennium B", + "3": "03 - Millennium C", + "4": "04 - Millennium D" + }, + "Count": { + "name": "Sweep X times", + "help": "Sweep the selected stage for X times" + } + }, "TacticalChallenge": { "_info": { "name": "Tactical Challenge Settings", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 1f6dd05..77182b3 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -34,6 +34,10 @@ "name": "通缉悬赏", "help": "" }, + "Scrimmage": { + "name": "学院交流会", + "help": "" + }, "TacticalChallenge": { "name": "战术对抗赛", "help": "战术大赛 / 竞技场" @@ -294,6 +298,72 @@ "help": "扫荡所选择关卡 X 次" } }, + "Scrimmage": { + "_info": { + "name": "学院交流会设置", + "help": "" + }, + "OnError": { + "name": "错误处理", + "help": "当出现票券不足或设置有误等错误时,执行该操作", + "stop": "停止脚本运行", + "skip": "跳过当前任务" + } + }, + "Trinity": { + "_info": { + "name": "三一", + "help": "" + }, + "Stage": { + "name": "选择关卡", + "help": "", + "1": "01 - 三一 A", + "2": "02 - 三一 B", + "3": "03 - 三一 C", + "4": "04 - 三一 D" + }, + "Count": { + "name": "扫荡次数", + "help": "扫荡所选择关卡 X 次" + } + }, + "Gehenna": { + "_info": { + "name": "格黑娜", + "help": "" + }, + "Stage": { + "name": "选择关卡", + "help": "", + "1": "01 - 格黑娜 A", + "2": "02 - 格黑娜 B", + "3": "03 - 格黑娜 C", + "4": "04 - 格黑娜 D" + }, + "Count": { + "name": "扫荡次数", + "help": "扫荡所选择关卡 X 次" + } + }, + "Millennium": { + "_info": { + "name": "千年", + "help": "" + }, + "Stage": { + "name": "选择关卡", + "help": "", + "1": "01 - 千年 A", + "2": "02 - 千年 B", + "3": "03 - 千年 C", + "4": "04 - 千年 D" + }, + "Count": { + "name": "扫荡次数", + "help": "扫荡所选择关卡 X 次" + } + }, "TacticalChallenge": { "_info": { "name": "战术对抗赛设置",