mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Fix: Add setting In-game Text Language
This commit is contained in:
parent
76127b90e7
commit
2854a9eea8
@ -3,6 +3,7 @@
|
||||
"Emulator": {
|
||||
"Serial": "auto",
|
||||
"PackageName": "auto",
|
||||
"GameLanguage": "auto",
|
||||
"ScreenshotMethod": "scrcpy",
|
||||
"ControlMethod": "MaaTouch",
|
||||
"AdbRestart": false
|
||||
|
@ -16,6 +16,15 @@
|
||||
"com.miHoYo.hkrpg.bilibili"
|
||||
]
|
||||
},
|
||||
"GameLanguage": {
|
||||
"type": "select",
|
||||
"value": "auto",
|
||||
"option": [
|
||||
"auto",
|
||||
"cn",
|
||||
"en"
|
||||
]
|
||||
},
|
||||
"ScreenshotMethod": {
|
||||
"type": "select",
|
||||
"value": "scrcpy",
|
||||
|
@ -21,6 +21,9 @@ Emulator:
|
||||
PackageName:
|
||||
value: auto
|
||||
option: [ auto, ]
|
||||
GameLanguage:
|
||||
value: auto
|
||||
option: [ auto, cn, en ]
|
||||
ScreenshotMethod:
|
||||
value: auto
|
||||
option: [ auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy ]
|
||||
|
@ -18,6 +18,7 @@ class GeneratedConfig:
|
||||
# Group `Emulator`
|
||||
Emulator_Serial = 'auto'
|
||||
Emulator_PackageName = 'auto' # auto, com.miHoYo.hkrpg, com.HoYoverse.hkrpgoversea, com.miHoYo.hkrpg.bilibili
|
||||
Emulator_GameLanguage = 'auto' # auto, cn, en
|
||||
Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy
|
||||
Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch
|
||||
Emulator_AdbRestart = False
|
||||
|
@ -84,6 +84,13 @@
|
||||
"com.HoYoverse.hkrpgoversea": "OVERSEA",
|
||||
"com.miHoYo.hkrpg.bilibili": "CN com.miHoYo.hkrpg.bilibili"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "In-game Text Language",
|
||||
"help": "",
|
||||
"auto": "Auto-detect",
|
||||
"cn": "简体中文",
|
||||
"en": "English"
|
||||
},
|
||||
"ScreenshotMethod": {
|
||||
"name": "Screenshot Method",
|
||||
"help": "When using auto-select, a benchmark will be performed and automatically changed to the fastest screenshot method.\nGeneral speed: DroidCast_raw >> aScreenCap_nc > ADB_nc >>> aScreenCap > uiautomator2 ~= ADB.\nRun Tools - Performance Test to find the fastest method.",
|
||||
|
@ -84,6 +84,13 @@
|
||||
"com.HoYoverse.hkrpgoversea": "OVERSEA",
|
||||
"com.miHoYo.hkrpg.bilibili": "CN com.miHoYo.hkrpg.bilibili"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "Emulator.GameLanguage.name",
|
||||
"help": "Emulator.GameLanguage.help",
|
||||
"auto": "auto",
|
||||
"cn": "cn",
|
||||
"en": "en"
|
||||
},
|
||||
"ScreenshotMethod": {
|
||||
"name": "Emulator.ScreenshotMethod.name",
|
||||
"help": "Emulator.ScreenshotMethod.help",
|
||||
|
@ -84,6 +84,13 @@
|
||||
"com.HoYoverse.hkrpgoversea": "OVERSEA",
|
||||
"com.miHoYo.hkrpg.bilibili": "CN Bilibili渠道服 com.miHoYo.hkrpg.bilibili"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "游戏内文本语言",
|
||||
"help": "",
|
||||
"auto": "自动检测",
|
||||
"cn": "简体中文",
|
||||
"en": "English"
|
||||
},
|
||||
"ScreenshotMethod": {
|
||||
"name": "模拟器截图方案",
|
||||
"help": "使用自动选择时,将执行一次性能测试并自动更改为最快的截图方案\n一般情况下的速度: DroidCast_raw >> aScreenCap_nc > ADB_nc >>> aScreenCap > uiautomator2 ~= ADB\n运行 工具 - 性能测试 以寻找最快的方案",
|
||||
|
@ -84,6 +84,13 @@
|
||||
"com.HoYoverse.hkrpgoversea": "OVERSEA",
|
||||
"com.miHoYo.hkrpg.bilibili": "CN com.miHoYo.hkrpg.bilibili"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "遊戲內文本語言",
|
||||
"help": "",
|
||||
"auto": "自動檢測",
|
||||
"cn": "简体中文",
|
||||
"en": "English"
|
||||
},
|
||||
"ScreenshotMethod": {
|
||||
"name": "模擬器截圖方案",
|
||||
"help": "使用自動選擇時,將執行一次性能測試並自動更改為最快的截圖方案\n一般情況下的速度: DroidCast_raw >> aScreenCap_nc > ADB_nc >>> aScreenCap > uiautomator2 ~= ADB\n運行 工具 - 性能測試 以尋找最快的方案",
|
||||
|
@ -11,17 +11,15 @@ import uiautomator2 as u2
|
||||
from adbutils import AdbClient, AdbDevice, AdbTimeout, ForwardItem, ReverseItem
|
||||
from adbutils.errors import AdbError
|
||||
|
||||
import module.config.server as server_
|
||||
from module.base.decorator import Config, cached_property, del_cached_property
|
||||
from module.base.utils import ensure_time
|
||||
from module.base.utils import SelectedGrids, ensure_time
|
||||
from module.device.connection_attr import ConnectionAttr
|
||||
from module.device.method.utils import (
|
||||
RETRY_TRIES, remove_shell_warning, retry_sleep,
|
||||
handle_adb_error, PackageNotInstalled,
|
||||
recv_all, possible_reasons,
|
||||
random_port, get_serial_pair)
|
||||
from module.exception import RequestHumanTakeover, EmulatorNotRunningError
|
||||
PackageNotInstalled, RETRY_TRIES, get_serial_pair, handle_adb_error,
|
||||
possible_reasons, random_port, recv_all, remove_shell_warning, retry_sleep)
|
||||
from module.exception import EmulatorNotRunningError, RequestHumanTakeover
|
||||
from module.logger import logger
|
||||
from module.base.utils import SelectedGrids
|
||||
|
||||
|
||||
def retry(func):
|
||||
@ -109,6 +107,7 @@ class Connection(ConnectionAttr):
|
||||
# else:
|
||||
# set_server(self.package)
|
||||
logger.attr('PackageName', self.package)
|
||||
server_.lang = self.config.Emulator_GameLanguage
|
||||
logger.attr('Lang', self.config.LANG)
|
||||
|
||||
self.check_mumu_app_keep_alive()
|
||||
|
Loading…
Reference in New Issue
Block a user