From 25e055917147ba26c46e0e0c04f9010b9846e0bd Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Thu, 23 Nov 2023 14:23:52 +0800 Subject: [PATCH] feat: add oversea servers --- module/config/argument/args.json | 4 ++++ module/config/config_generated.py | 2 +- module/config/i18n/en-US.json | 6 +++++- module/config/i18n/zh-CN.json | 6 +++++- module/config/server.py | 4 ++++ module/config/utils.py | 6 +++++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 5f04a3f..2583925 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -12,6 +12,10 @@ "option": [ "auto", "JP-Official", + "OVERSEA-TWHKMO", + "OVERSEA-Korea", + "OVERSEA-Asia", + "OVERSEA-America", "OVERSEA-Global" ] }, diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 33a304a..0533b6a 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -17,7 +17,7 @@ class GeneratedConfig: # Group `Emulator` Emulator_Serial = 'auto' - Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-Global + Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-TWHKMO, OVERSEA-Korea, OVERSEA-Asia, OVERSEA-America, OVERSEA-Global Emulator_GameLanguage = 'auto' # auto, jp, en Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index adf9439..7a1fe5a 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -85,11 +85,15 @@ "help": "Can't distinguish different regions of oversea servers, please select the server manually.", "auto": "Auto-detect", "JP-Official": "[JP]-Official", + "OVERSEA-TWHKMO": "[OVERSEA]-TW/HK/MO", + "OVERSEA-Korea": "[OVERSEA]-Korea", + "OVERSEA-Asia": "[OVERSEA]-Asia", + "OVERSEA-America": "[OVERSEA]-North America", "OVERSEA-Global": "[OVERSEA]-Global" }, "GameLanguage": { "name": "In-game Text Language", - "help": "", + "help": "Can't detect language automatically, please select the language manually.", "auto": "Auto-detect", "jp": "Japanese", "en": "English" diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index b6fec8a..6808d42 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -85,11 +85,15 @@ "help": "无法区分国际服的不同地区,请手动选择服务器", "auto": "自动检测", "JP-Official": "[日服]-官服", + "OVERSEA-TWHKMO": "[国际服]-港澳台", + "OVERSEA-Korea": "[国际服]-韩国", + "OVERSEA-Asia": "[国际服]-亚洲", + "OVERSEA-America": "[国际服]-北美", "OVERSEA-Global": "[国际服]-全球" }, "GameLanguage": { "name": "游戏内文本语言", - "help": "", + "help": "无法自动检测语言,请手动选择语言", "auto": "自动检测", "jp": "日语", "en": "英语" diff --git a/module/config/server.py b/module/config/server.py index cd50b12..93cf319 100644 --- a/module/config/server.py +++ b/module/config/server.py @@ -8,6 +8,10 @@ server = 'JP-Official' VALID_LANG = ['jp', 'en'] VALID_SERVER = { 'JP-Official': 'com.YostarJP.BlueArchive', + 'OVERSEA-TWHKMO': 'com.nexon.bluearchive', + 'OVERSEA-Korea': 'com.nexon.bluearchive', + 'OVERSEA-Asia': 'com.nexon.bluearchive', + 'OVERSEA-America': 'com.nexon.bluearchive', 'OVERSEA-Global': 'com.nexon.bluearchive', } VALID_PACKAGE = set(list(VALID_SERVER.values())) diff --git a/module/config/utils.py b/module/config/utils.py index ae39235..56ea4d4 100644 --- a/module/config/utils.py +++ b/module/config/utils.py @@ -13,7 +13,11 @@ from module.config.atomicwrites import atomic_write LANGUAGES = ['zh-CN', 'en-US'] SERVER_TO_TIMEZONE = { 'JP-Official': timedelta(hours=9), - 'OVERSEA-Global': timedelta(hours=0), + 'OVERSEA-TWHKMO': timedelta(hours=9), + 'OVERSEA-Korea': timedelta(hours=9), + 'OVERSEA-Asia': timedelta(hours=9), + 'OVERSEA-America': timedelta(hours=9), + 'OVERSEA-Global': timedelta(hours=9), } DEFAULT_TIME = datetime(2020, 1, 1, 0, 0)