From a37be296df8b8a7e449f63e4d26ac6cb7568fb00 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:52:00 +0000 Subject: [PATCH] feat: 7 choices in lesson --- config/template.json | 8 +++++ module/config/argument/args.json | 46 +++++++++++++++++++++++++ module/config/argument/argument.yaml | 14 ++++++++ module/config/argument/task.yaml | 2 ++ module/config/config_generated.py | 8 +++++ module/config/i18n/en-US.json | 50 ++++++++++++++++++++++++++++ module/config/i18n/zh-CN.json | 50 ++++++++++++++++++++++++++++ tasks/schedule/schedule.py | 2 +- 8 files changed, 179 insertions(+), 1 deletion(-) diff --git a/config/template.json b/config/template.json index 37f69c9..294d80c 100644 --- a/config/template.json +++ b/config/template.json @@ -99,6 +99,14 @@ "Choice5": { "Location": "None", "Classrooms": null + }, + "Choice6": { + "Location": "None", + "Classrooms": null + }, + "Choice7": { + "Location": "None", + "Classrooms": null } }, "Shop": { diff --git a/module/config/argument/args.json b/module/config/argument/args.json index b353a4f..99a356b 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -473,6 +473,52 @@ "type": "textarea", "value": null } + }, + "Choice6": { + "Location": { + "type": "select", + "value": "None", + "option": [ + "None", + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] + }, + "Classrooms": { + "type": "textarea", + "value": null + } + }, + "Choice7": { + "Location": { + "type": "select", + "value": "None", + "option": [ + "None", + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] + }, + "Classrooms": { + "type": "textarea", + "value": null + } } }, "Shop": { diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 29b6c45..c83b1aa 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -133,6 +133,20 @@ Choice5: Classrooms: value: null type: textarea +Choice6: + Location: + value: None + option: [ None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] + Classrooms: + value: null + type: textarea +Choice7: + Location: + value: None + option: [ None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] + Classrooms: + value: null + type: textarea Bounty: OnError: diff --git a/module/config/argument/task.yaml b/module/config/argument/task.yaml index 1a04704..acf129b 100644 --- a/module/config/argument/task.yaml +++ b/module/config/argument/task.yaml @@ -37,6 +37,8 @@ Daily: - Choice3 - Choice4 - Choice5 + - Choice6 + - Choice7 Shop: - Scheduler - NormalShop diff --git a/module/config/config_generated.py b/module/config/config_generated.py index dfa64ab..2d6a249 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -75,6 +75,14 @@ class GeneratedConfig: Choice5_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Choice5_Classrooms = None + # Group `Choice6` + Choice6_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + Choice6_Classrooms = None + + # Group `Choice7` + Choice7_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + Choice7_Classrooms = None + # Group `Bounty` Bounty_OnError = 'skip' # stop, skip diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index f8df0d6..590cd01 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -423,6 +423,56 @@ "help": "" } }, + "Choice6": { + "_info": { + "name": "Choice 6", + "help": "Choice 6" + }, + "Location": { + "name": "Location", + "help": "", + "None": "None", + "0": "Schale Office", + "1": "Schale Residence", + "2": "Gehenna", + "3": "Abydos", + "4": "Millennium", + "5": "Trinity", + "6": "Red Winter", + "7": "Hyakkiyako", + "8": "D.U. Shiratori", + "9": "Shanhaijing" + }, + "Classrooms": { + "name": "Classrooms", + "help": "" + } + }, + "Choice7": { + "_info": { + "name": "Choice 7", + "help": "Choice 7" + }, + "Location": { + "name": "Location", + "help": "", + "None": "None", + "0": "Schale Office", + "1": "Schale Residence", + "2": "Gehenna", + "3": "Abydos", + "4": "Millennium", + "5": "Trinity", + "6": "Red Winter", + "7": "Hyakkiyako", + "8": "D.U. Shiratori", + "9": "Shanhaijing" + }, + "Classrooms": { + "name": "Classrooms", + "help": "" + } + }, "Bounty": { "_info": { "name": "Bounty Settings", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 32b9894..66affd4 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -423,6 +423,56 @@ "help": "Choice5.Classrooms.help" } }, + "Choice6": { + "_info": { + "name": "Choice6._info.name", + "help": "Choice6._info.help" + }, + "Location": { + "name": "Choice6.Location.name", + "help": "Choice6.Location.help", + "None": "None", + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9" + }, + "Classrooms": { + "name": "Choice6.Classrooms.name", + "help": "Choice6.Classrooms.help" + } + }, + "Choice7": { + "_info": { + "name": "Choice7._info.name", + "help": "Choice7._info.help" + }, + "Location": { + "name": "Choice7.Location.name", + "help": "Choice7.Location.help", + "None": "None", + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9" + }, + "Classrooms": { + "name": "Choice7.Classrooms.name", + "help": "Choice7.Classrooms.help" + } + }, "Bounty": { "_info": { "name": "悬赏通缉设置", diff --git a/tasks/schedule/schedule.py b/tasks/schedule/schedule.py index 423146b..f022cfa 100644 --- a/tasks/schedule/schedule.py +++ b/tasks/schedule/schedule.py @@ -24,7 +24,7 @@ class Schedule(ScheduleUI): info = [] input_valid = True schedule_config = self.config.cross_get("Schedule") - choices = ["Choice1", "Choice2", "Choice3", "Choice4", "Choice5"] + choices = ["Choice1", "Choice2", "Choice3", "Choice4", "Choice5", "Choice6", "Choice7"] for choice in choices: location, classrooms = schedule_config[choice]["Location"], schedule_config[choice]["Classrooms"]